-
Notifications
You must be signed in to change notification settings - Fork 11
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
make StaticArrays dependency into an extension #23
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportBase: 86.84% // Head: 86.84% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #23 +/- ##
=======================================
Coverage 86.84% 86.84%
=======================================
Files 1 2 +1
Lines 76 76
=======================================
Hits 66 66
Misses 10 10
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. |
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.
Based on JuliaArrays/StaticArraysCore.jl#15 and the recently added weak dependency on StaticArrays in ForwardDiff, I think we should make StaticArrays a weak dependency here as well instead of depending on StaticArraysCore.
@@ -1,18 +1,23 @@ | |||
name = "DiffResults" | |||
uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" | |||
version = "1.1.0" | |||
version = "1.0.3" |
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.
This line should not be reverted, I think:
version = "1.0.3" | |
version = "1.1.0" |
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | ||
|
||
[extensions] | ||
StaticArraysExt = "StaticArrays" |
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.
Might be good to use a prefix?
StaticArraysExt = "StaticArrays" | |
DiffResultsStaticArraysExt = "StaticArrays" |
@@ -0,0 +1,25 @@ | |||
module StaticArraysExt |
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.
module StaticArraysExt | |
module DiffResultsStaticArraysExt |
@@ -333,4 +317,8 @@ Base.show(io::IO, r::ImmutableDiffResult) = print(io, "ImmutableDiffResult($(r.v | |||
|
|||
Base.show(io::IO, r::MutableDiffResult) = print(io, "MutableDiffResult($(r.value), $(r.derivs))") | |||
|
|||
if !isdefined(Base, :get_extension) | |||
include("../ext/StaticArraysExt.jl") |
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.
include("../ext/StaticArraysExt.jl") | |
include("../ext/DiffResultsStaticArraysExt.jl") |
What would you think about #28 instead? |
Shouldn't be merged until the Registrator deployment of JuliaRegistries/Registrator.jl#397 is done.
Note, this reverts #22 since there is no point of a Core package with an extension. This means that people on 1.8 will get the full StaticArray load time but I think that doesn't really matter since ForwardDiff loads it anyway as it is right now.