-
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
Implement an interface for Distributed-like libraries #871
base: master
Are you sure you want to change the base?
Conversation
a0bc479
to
6d879e4
Compare
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'm strongly supportive of anything that reduces dependency on Distributed, especially if the replacements are less vulnerable to invalidations. The overall design of this PR seems OK.
Project.toml
Outdated
JuliaInterpreter = "0.9" | ||
LoweredCodeUtils = "3.0.1" | ||
OrderedCollections = "1" | ||
# Exclude Requires-1.1.0 - see https://github.com/JuliaPackaging/Requires.jl/issues/94 | ||
Requires = "~1.0, ^1.1.1" | ||
julia = "1.6" | ||
julia = "1.9" |
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'd say let's go straight to 1.10
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.
Roger that, fixed in b468b35.
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 realized there's some cleanup we can do now that 1.10 is required so I've split that out into a separate commit in 67ee77c.
src/packagedef.jl
Outdated
|
||
# Wrapper struct to indicate a worker belonging to the Distributed stdlib. Other | ||
# libraries should make their own types for Revise to dispatch on. | ||
struct DistributedWorker |
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.
Does this have to be here or could it be in the extension? I guess it's here because of init_worker(p::Int)
below?
Also, should we define an AbstractWorker
and then suggest people subtype? I'm not sure it helps concretely, but it seems mildly tidier to me.
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.
Yeah exactly it's because of the init_worker(::Int)
definition. Technically I think that could also go in the extension, but I slightly lean towards keeping it in the main package since the extension doesn't really 'own' the Int
type that we're dispatching on.
Agreed about the AbstractWorker
type, added it in b468b35.
Mostly so that we can use package extensions.
This moves support for Distributed into a package extension and adds an interface for other distributed worker libraries to use to support Revise for their workers.
b468b35
to
5955e0e
Compare
This moves support for Distributed into a package extension and adds an interface for other distributed worker libraries (i.e. DistributedNext.jl) to use to support Revise for their workers. Admittedly the interface is quite... clunky... so I'm open to other ideas. This also required bumping the minimum Julia version to 1.9 to use package extensions.
As a bonus the load times are slightly improved: