Skip to content

make ChainRulesCore dependency into an extension #12

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 1 commit into from
Jan 17, 2023

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented Dec 29, 2022

Shouldn't be merged until the Registrator deployment of JuliaRegistries/Registrator.jl#397 is done.

@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (c9785e8) compared to base (41ca2a3).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         3    +1     
  Lines           61        61           
=========================================
  Hits            61        61           
Impacted Files Coverage Δ
src/with_ladj.jl 100.00% <ø> (ø)
ext/ChainRulesCoreExt.jl 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@oschulz
Copy link
Collaborator

oschulz commented Dec 29, 2022

@KristofferC I hadn't been aware of Pkg extensions until just now (but I'm very much in favor of the concept!). If I understand the docs correctly this will be backward-compatible down to at least Julia v1.6, right? Do extensions eliminate the drawbacks of Requires.jl (no precompilation and often big hit on load time of stacks of packages)?

@KristofferC
Copy link
Member Author

Should be backwards compatible to Julia 1.0.

Do extensions eliminate the drawbacks of Requires.jl (no precompilation and often big hit on load time of stacks of packages)?

Yes, that's the idea. These extensions get precompiled like a normal package.

@oschulz
Copy link
Collaborator

oschulz commented Dec 30, 2022

Yes, that's the idea. These extensions get precompiled like a normal package.

Oh, that is awesome!

@oschulz
Copy link
Collaborator

oschulz commented Jan 17, 2023

Shouldn't be merged until the Registrator deployment of JuliaRegistries/Registrator.jl#397 is done.

Do you know if that's deployed now?

@KristofferC
Copy link
Member Author

Yes, it should be! So we can try this out.

@KristofferC KristofferC marked this pull request as ready for review January 17, 2023 11:30
@oschulz
Copy link
Collaborator

oschulz commented Jan 17, 2023

Ok, let's try it! :-)

@oschulz oschulz merged commit 7ab5c4e into JuliaMath:master Jan 17, 2023
@KristofferC KristofferC deleted the kc/chainrules_ext branch January 17, 2023 12:51
@oschulz
Copy link
Collaborator

oschulz commented Jan 24, 2023

Seems to work like a charm with Julia v1.9.0-beta3:

julia> @time_imports import ChangesOfVariables
      0.6 ms  ChangesOfVariables

julia> @time_imports import ChainRulesCore
      0.1 ms  Compat
     58.9 ms  ChainRulesCore
      0.4 ms  ChangesOfVariables  ChainRulesCoreExt

@devmotion, if you have no objections I'll tag a ChangesOfVariables release with this?

@devmotion
Copy link
Member

Sure, I'm really excited about weak dependencies 🙂

@oschulz
Copy link
Collaborator

oschulz commented Jan 24, 2023

Sure, I'm really excited about weak dependencies

Me too, I hope this will start a minor (maybe not so minor) revolution across the ecosystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants