-
Notifications
You must be signed in to change notification settings - Fork 110
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
WIP: fix #552: use invoke_in_world #556
Draft
simeonschaub
wants to merge
6
commits into
timholy:master
Choose a base branch
from
simeonschaub:invoke_in_world
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c489d56
WIP: use invoke_in_world to shield Revise from self-invalidation
timholy 51a768c
use correct worldage in lowering and remotecall
simeonschaub bd361c4
make compatible with all Julia versions
simeonschaub ba5e6ca
wip
simeonschaub eb51a57
foo
simeonschaub 210c220
wip
simeonschaub 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
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
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.
Do we need to catch all errors here, or can we only catch certain ones? This bit me during debugging, when I tried to throw an error in the finalizer to get a stacktrace for debugging.
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.
Certainly it's fine to comment out while debugging, or to
catch e; isa(e, SomeKindOfError) && throw(e)
ifSomeKindOfError
deserves special handling. What kind of errors did you have in mind?Off-topic, but since we talked about
backtrace()
in our other discussion, just checking, do you know aboutcatch_backtrace()
? It's sometimes quite useful.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.
I was more wondering, what kind of errors this was initially supposed to catch, because catching all possible errors seems seems a bit dangerous to me, since we possibly ignore errors the user would like to know about. So I was more thinking of something along the lines of
e isa ErrorThatsDistributedsFault || rethrow()
, i.e. that the default would be to rethrow errors. Perhaps that's just not possible in this case though.I do now! 😆
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.
Or can we at least log those errors with something like
@warn
?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.
I see your point. This probably is the "lazy" approach, but doing better requires that we anticipate two things:
try/catch
stuff; now, it seems likely that it wouldn't even get here if it fails in the main process.As long as we can avoid pestering users incorrectly, I'm all in favor of pestering them when they deserve it 😄.
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.
Is there a way to check whether an error was thrown during regular "revising" or something else? If not, I would propose we just keep it as it is currently, but use either
@debug
or Revise's logging facilities to log the error, so people who want to know about these kinds of errors can still get them.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.
The pkgdata might be in
revision_errors
but the needed info doesn't propagate down here. I think logging it makes sense. EDIT: but it probably doesn't make it here if it triggers an error during regular revision, so you could just give it a whirl? As long as you can distinguish the second point above, perhaps via the exception type?