-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DiffResult for MArray #18
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9524f62
Add DiffResult for MArray
charleskawczynski f7c8877
Add DiffResult for SizedArray
charleskawczynski 2b16fe9
Update src/DiffResults.jl
gdalle c25b292
Update src/DiffResults.jl
gdalle 973f7c8
Merge remote-tracking branch 'origin/master' into pr/charleskawczynsk…
gdalle 5160396
Merge master
gdalle 061a09c
Add tests
gdalle 4670f89
Ignore Manifest
gdalle 356773b
Undo gitignore
gdalle 141adbc
Noise in changes
gdalle 5ba9c6b
Remove noise
gdalle d3fecde
Remove more noise
gdalle 38cbfb1
Bump version to 1.2
gdalle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That way, if there is even one mutable array in the mix (like
MArray
), the whole thing becomes aMutableDiffResult
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's wrong though, isn't it? All
value
andderivs
have to be mutable, otherwise theMutableDiffResult
will error when trying to update the immutable component.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, so it's the other way around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what we want, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, to me it seems that's what we want for StaticArrays. The safest option would be to make the
ImmutableDiffResult
the defaultDiffResult
type, but given the wide range of mutable arrays (without clear way to catch them all apart from - to some extent -ArrayInterface.ismutable
) I think it's much easier implementation-wise to only add special cases for StaticArrays. Even though this is also doomed to fail with wrapper types such asDiagonal
etc...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theoretically, if everyone used the API correctly, making
Immutable
the default would not be breaking. Unfortunately, as seen in #26, SciML and others are playing fast and loose with realiasing.So from an ecosystem point of view, any transition
Mutable
->Immutable
has the potential to be breaking