Skip to content
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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KristofferC
Copy link

@KristofferC KristofferC commented Dec 29, 2022

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.

@codecov-commenter
Copy link

Codecov Report

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

Coverage data is based on head (0a4cdba) compared to base (276d1d7).
Patch coverage: 100.00% of modified lines in pull request are covered.

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           
Impacted Files Coverage Δ
src/DiffResults.jl 84.84% <ø> (-2.00%) ⬇️
ext/StaticArraysExt.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.

Copy link
Member

@devmotion devmotion left a 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"
Copy link
Member

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:

Suggested change
version = "1.0.3"
version = "1.1.0"

StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[extensions]
StaticArraysExt = "StaticArrays"
Copy link
Member

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?

Suggested change
StaticArraysExt = "StaticArrays"
DiffResultsStaticArraysExt = "StaticArrays"

@@ -0,0 +1,25 @@
module StaticArraysExt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
include("../ext/StaticArraysExt.jl")
include("../ext/DiffResultsStaticArraysExt.jl")

@gdalle
Copy link
Member

gdalle commented Mar 15, 2024

What would you think about #28 instead?

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.

4 participants