make StaticArrays dependency into an extension#23
make StaticArrays dependency into an extension#23KristofferC wants to merge 2 commits intoJuliaDiff:masterfrom
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. |
devmotion
left a comment
There was a problem hiding this comment.
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.
| name = "DiffResults" | ||
| uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" | ||
| version = "1.1.0" | ||
| version = "1.0.3" |
There was a problem hiding this comment.
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.
Might be good to use a prefix?
| StaticArraysExt = "StaticArrays" | |
| DiffResultsStaticArraysExt = "StaticArrays" |
| @@ -0,0 +1,25 @@ | |||
| module StaticArraysExt | |||
There was a problem hiding this comment.
| module StaticArraysExt | |
| module DiffResultsStaticArraysExt |
| 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.
| 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.