-
Notifications
You must be signed in to change notification settings - Fork 18
Fix some JET errors around matching methods for send_connection_hdr(...) and send_msg_now(...) (underlying problem: the Worker(...) constructors might not always return a Worker)
#180
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
Merged
Merged
Changes from all commits
Commits
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 hidden or 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.
Would this also be fixed by adding
::Workerreturn annotations to the constructors?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.
Hmmm. I think we need to look at this code closer.
The problematic line seems to be line 143 here:
Distributed.jl/src/cluster.jl
Lines 140 to 152 in d06aa73
Line 143 is this line:
return map_pid_wrkr[id]map_pid_wrkris a global constant. The problem (I think) is the type ofmap_pid_wrkr:Distributed.jl/src/cluster.jl
Line 850 in d06aa73
So when we index into
map_pid_wrkrwithmap_pid_wrkr[id], how do we know whethermap_pid_wrkr[id]is aWorkeror aLocalProcess?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.
Wow, I absolutely hate that 🤮 But something to fix another time... We could safely add an annotation to this constructor though, which I think is the one getting called here:
Distributed.jl/src/cluster.jl
Line 124 in d06aa73
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 tried adding
::Workerto that constructor (the constructor starting on line 124), but that's not sufficient. Here's the source code for that constructor:Distributed.jl/src/cluster.jl
Lines 124 to 137 in 2adcd26
The problem is, on line 127, that constructor calls the
Worker(::Int)constructor, which in turn calls theWorker(::Int, ::Any)constructor, and now we're in theWorker(::Int, ::Any)constructor, which is the constructor that includes thereturn map_pid_wrkr[id]line.So, if I try adding
::Workerto the line 124 constructor, JET still complains, becauseWorker(::Int, ::Any)might return aLocalProcess.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.
Bleh, devastating.
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've opened an issue: #182