-
Notifications
You must be signed in to change notification settings - Fork 100
Add GraphsSharedArraysExt
and remove Distributed
dependency
#430
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
base: master
Are you sure you want to change the base?
Conversation
These implementations are extremely basic, but they try to follow the patterns in the other parts of the Parallel module. My real motivation is to be able to move the Distributed implementations into an extension, so that Graphs.jl does not depend on Distributed.
b44e9a0
to
3476c5f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #430 +/- ##
==========================================
- Coverage 97.31% 96.63% -0.68%
==========================================
Files 117 118 +1
Lines 6956 7011 +55
==========================================
+ Hits 6769 6775 +6
- Misses 187 236 +49 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Looks like 1.6 / 1.9 have a different notion of "canonical" for I probably need to disable the test on Julia <1.9 |
I don't want to be too negative here - but I am not sure if this is something we want right now. My reasons for this:
If there is really the wish to have weak dependencies I am open to it - but first we should reach a consensus on that - so we should discus it in a Github issue. |
Disabling tests for the lower bound version cannot be an option. We could raise the lower bounds to the latest long-term support release though - that would be v1.10. We can do that in a separate PR though. |
It's just a formatting check though, which is implemented differently on v1.6 vs. 1.9 / 1.10. The |
I think we are due for bumping the min version of this package anyway so I created a PR: #432 - let's see if someone objects. |
Wouldn't this strictly decrease loading time? And decrease compilation time as well? It is a small change for this specific package, but for packages that depend on Graphs.jl (and other packages) this can start adding up. It is why DiffEq.jl split out all of its solvers in separate packages. e.g. running master: this pr:
But happening to have few dependencies makes the life of downstream package maintainers betters. If Graphs unconditionally depends on Distributed, then other packages that have extensions for Distributed will run precompilation for the extensions. Changes like this are overall beneficial for the user because way less unnecessary precompilation will be happening. |
How will it become more difficult?
There's no downside to having fewer dependencies? The fewer dependencies Graphs.jl has, the lower the barrier is to some other package deciding to take a dependency on Graphs.jl. |
[weakdeps] | ||
SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383" |
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.
Shouldn't SharedArrays then be removed from the [deps] section above as well?
As the maintainer of a package that uses Graphs.jl but never Distributed or SharedArrays, I support this change. We should also move Inflate.jl to an extension, it pulls in binary dependencies that most users wont use. |
This PR follows up on #429 to enable
parallel=:threads
by default and move Distributed-based parallelism to an extension, for faster loading times and reduced dependencies.On Julia <1.9, the dependency is still there so this shouldn't break backwards compatibility (1.6 tests are passing for me locally)