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

add LinearAlgebraExt #86

Merged
merged 10 commits into from
Aug 21, 2024
Merged

Conversation

longemen3000
Copy link
Contributor

should make the package dependency free on julia > 1.9. motivated by JuliaFolds2/Trand

@jw3126
Copy link
Member

jw3126 commented Jul 16, 2024

Hey thanks. In principle I agree this is a good move. However we were burnt by something similar before JuliaObjects/Accessors.jl#127

@aplavin you think this PR would trigger the same issues?

@longemen3000
Copy link
Contributor Author

longemen3000 commented Jul 16, 2024

seems that the problem is (somewhat) solved in 1.11, so maybe a good idea would be to guard extensions against that release instead? (see JuliaLang/julia#52511)

test/runtests.jl Outdated Show resolved Hide resolved
@jw3126
Copy link
Member

jw3126 commented Jul 16, 2024

seems that the problem is (somewhat) solved in 1.11, so maybe a good idea would be to guard extensions against that release instead? (see JuliaLang/julia#52511)

How would that work? Would you add julia = "1.11" to ConstructionBase/Project.toml?

@longemen3000
Copy link
Contributor Author

longemen3000 commented Jul 16, 2024

seems that the problem is (somewhat) solved in 1.11, so maybe a good idea would be to guard extensions against that release instead? (see JuliaLang/julia#52511)

How would that work? Would you add julia = "1.11" to ConstructionBase/Project.toml?

i was thinking on just guarding the loading of extensions against if Base.VERSION < v"1.11" instead of using if !isdefined(Base,:get_extension)

longemen3000 and others added 2 commits July 16, 2024 02:23
Co-authored-by: Jan Weidner <jw3126@gmail.com>
@rafaqz
Copy link
Member

rafaqz commented Jul 16, 2024

Guarding against 1.11 seems fine to me, I guess you won't be using the LTS in projects that need to trim LinearAlgebra.jl anyway.

@aplavin
Copy link
Member

aplavin commented Jul 16, 2024

Not sure what is the best way here. I'd suggest being totally sure a foundational package like this doesn't throw any warnings on installation/loading in at least 1.10 and newer. Test with running julia afresh as JULIA_DEPOT_PATH=$(mktemp -d) julia and installing it.

I understand it's potentially frustrating, but having a smooth user experience without confusing warnings for everyone is better than shaving a few stdlib dependencies. JuliaLang/julia#52511 isn't fully fixed even on 1.11.

@longemen3000
Copy link
Contributor Author

What about just having the structure ready for when the problem is solved?, I suppose that this problem will be solved in a future 1.10 release and a 1.11 one, so it is just a matter of waiting for those releases, and loading the ext unconditionally until then?

Comment on lines 6 to 9
else
import ..ConstructionBase
import ..LinearAlgebra
end
Copy link
Member

Choose a reason for hiding this comment

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

not needed?

end
if !isdefined(Base,:get_extension)
using LinearAlgebra
include("../ext/ConstructionBaseLinearAlgebraExt.jl")
Copy link
Member

Choose a reason for hiding this comment

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

move to main source file?

throw(ArgumentError("Invalid patch for `Cholesky`: $(patch)"))
end
if !isdefined(Base,:get_extension)
using LinearAlgebra
Copy link
Member

@aplavin aplavin Jul 16, 2024

Choose a reason for hiding this comment

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

using is not needed

@aplavin aplavin mentioned this pull request Jul 16, 2024
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.

Project coverage is 2.00%. Comparing base (8e3e773) to head (6947d65).
Report is 10 commits behind head on master.

Files Patch % Lines
ext/ConstructionBaseLinearAlgebraExt.jl 0.00% 18 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

❗ There is a different number of reports uploaded between BASE (8e3e773) and HEAD (6947d65). Click for more details.

HEAD has 20 uploads less than BASE
Flag BASE (8e3e773) HEAD (6947d65)
22 2
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #86       +/-   ##
==========================================
- Coverage   25.49%   2.00%   -23.50%     
==========================================
  Files           5       6        +1     
  Lines         153     150        -3     
==========================================
- Hits           39       3       -36     
- Misses        114     147       +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@longemen3000
Copy link
Contributor Author

longemen3000 commented Aug 19, 2024

i would say that this PR is ready to merge. as mentioned before, this PR no longer sets LinearAlgebra as an extension, but it paves the way to allow that change.

test errors are integration errors, that are also present on the master branch.

Copy link
Member

@jw3126 jw3126 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @longemen3000

@jw3126 jw3126 merged commit 3f1e80e into JuliaObjects:master Aug 21, 2024
33 of 37 checks passed
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.

5 participants