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

change the handling of IncludeJuliaStartupFile (for Julia 1.10) #1017

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

ThomasBreuer
Copy link
Member

The JuliaInterface package introduces a GAP user preference IncludeJuliaStartupFile that is intended to force loading Julia's startup file in the situation that GAP gets started from Julia via a gap.sh script.
The file pkg/JuliaInterface/init.g contains code that evaluates this user preferences and if necessary loads this file into the Julia session.

All this should be irrelevant if one first starts Julia and then loads GAP, because then the Julia startup file has been read already, but this is not true:
If one calls using Oscar in a fresh Julia session and if Oscar.jl has to get precompiled then the precompilation takes place in a Julia that has not read its startup file.
In Julia before 1.10, then JuliaInterface simply includes this startup file. In Julia 1.10, including this file fails (and then one gets a crash).

The current proposal is not yet good enough.
An info message is printed during precompilation, saying that the startup file could not be included. We can simply omit this message. However, I fear that the above analysis is not yet good enough, so perhaps we need another change.

In Julia 1.10, the startup file seems to be not readable
with `include` during precompilation,
and the old code runs into an error.
@ThomasBreuer ThomasBreuer added the kind: bug Something isn't working label Jun 27, 2024
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.03%. Comparing base (f43772a) to head (4db8d3d).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1017      +/-   ##
==========================================
+ Coverage   75.69%   76.03%   +0.34%     
==========================================
  Files          51       51              
  Lines        4205     4165      -40     
==========================================
- Hits         3183     3167      -16     
+ Misses       1022      998      -24     
Files Coverage Δ
pkg/JuliaInterface/gap/JuliaInterface.gd 100.00% <ø> (ø)
pkg/JuliaInterface/init.g 100.00% <ø> (+33.33%) ⬆️
src/setup.jl 84.21% <ø> (+7.89%) ⬆️

... and 2 files with indirect coverage changes

@fingolfin
Copy link
Member

We just discussed this PR this morning, and I proposed the following: we drop IncludeJuliaStartupFile completely. Instead, we modify gap.sh so that the user can control by some other means (e.g. an environment variable) whether --startup=file=no or =yes is used.

remove the GAP user preference `IncludeJuliaStartupFile`,
do not try to include the Julia startup file from GAP,
instead use an environment variable in the situation
that GAP gets started via `gap.sh`.
@ThomasBreuer
Copy link
Member Author

Two tests with Julia nightly failed, I restarted them, then only one test failed ...

@fingolfin
Copy link
Member

Julia nightly breakage is "normal", there were changes there and we'll probably have to rebuild a bunch of JLLs. So don't worry about it.

src/setup.jl Outdated Show resolved Hide resolved
src/setup.jl Outdated Show resolved Hide resolved
src/setup.jl Outdated Show resolved Hide resolved
@fingolfin fingolfin enabled auto-merge (squash) July 2, 2024 13:43
@fingolfin fingolfin merged commit efac892 into oscar-system:master Jul 2, 2024
19 of 21 checks passed
@ThomasBreuer ThomasBreuer deleted the TB_startup_file branch August 27, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants