-
Notifications
You must be signed in to change notification settings - Fork 130
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
upgrade selected GAP packages at startup #3222
Conversation
I'll try to explain the Aqua issue reported here: A packages |
That Downloads.jl fix will also be in 1.10.1. Edit: Also there might be something else involved here, since that Downloads.jl issue should be fixed and included on the latest julia nightly (via JuliaLang/julia#52885). |
Hm, I don't see it in JuliaLang/julia#52755 or am I just blind? |
The commit is there but it doesn't seem to appear in the list: JuliaLang/julia@ |
@lgoettgens @benlorenz Thanks for the information, but I do not understand what the proposal is. |
1.10 should have that function, it has an exclamation mark at the end:
I am indeed confused why this also happens on nightly which is supposed to clean up these downloaders automatically. Especially since the following seems to work, even though it is not really nice: GAP.Packages.Downloads.default_downloader!(GAP.Packages.Downloads.Downloader(grace=0.01))
for (pkg, version) in [
("repsn", "3.1.1"),
]
GAP.Packages.install(pkg, version, interactive = false, quiet = false)
end
GAP.Packages.Downloads.default_downloader!() Note that this would need some extra if statement to skip these calls for 1.9 and older. Another option would be to add a custom Downloader in the GAP packages.jl file like this: dlhelper = Downloads.Downloader(; grace=0.1)
...
buffer = Downloads.download(String(url), IOBuffer(); downloader=dlhelper) The dlhelper can probably be created in the |
Thanks @benlorenz. Logically, the right place to fix the problem is in GAP.jl, as you suggest. This does not solve the problem in Oscar until the next release of GAP.jl. I am going to add the "not really nice" solution sketched above to the current pull request. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #3222 +/- ##
==========================================
+ Coverage 81.62% 81.68% +0.05%
==========================================
Files 546 546
Lines 72877 73059 +182
==========================================
+ Hits 59489 59677 +188
+ Misses 13388 13382 -6
|
src/Oscar.jl
Outdated
@@ -80,9 +80,21 @@ function __init__() | |||
GAP.Globals.BindGlobal(GapObj("Oscar"), Oscar) | |||
GAP.Globals.SetPackagePath(GAP.Obj("OscarInterface"), GAP.Obj(joinpath(@__DIR__, "..", "gap", "OscarInterface"))) | |||
GAP.Globals.LoadPackage(GAP.Obj("OscarInterface")) | |||
# Work around a problem in Julia 1.10 (see https://github.com/oscar-system/Oscar.jl/pull/3222). | |||
isdefined(GAP.Packages.Downloads, :default_downloader!) && GAP.Packages.Downloads.default_downloader!(GAP.Packages.Downloads.Downloader(grace=0.01)) |
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.
I have just release GAP.jl 0.10.2 so you could remove this and update Project.toml
instead.
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.
Great. Thanks.
resolves #3219