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

[julia] Install the CompilerExplorer.jl after installing the compiler #1264

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

giordano
Copy link
Contributor

This is my initial attempt to address #1259, but there are still things I don't understand, so opening as draft.

CC: @vchuravy.

@@ -3,7 +3,8 @@ compilers:
type: tarballs
compression: gz
dir: julia-{name}
check_exe: bin/julia --version
julia_exe: bin/julia
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can I define custom fields in this yaml file? I did it for convenience, to avoid repeating some things, but if it doesn't work I'll change this;

Copy link
Member

Choose a reason for hiding this comment

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

you can; and that's the intention to let you cascading-ly refer to things later on as you do.

@@ -21,3 +22,7 @@ compilers:
url: https://julialangnightlies-s3.julialang.org/bin/linux/x86_64/julia-latest-linux-x86_64.tar.gz
strip_components: 1
create_untar_dir: true
depot: {destination}/depot
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no clue what path destination is, I saw it in

- ./configure --prefix={destination}/{dir}
but I don't know if {destination}/depot is something like /opt/compiler-explorer/julia-{name} or what.

Copy link
Member

Choose a reason for hiding this comment

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

You may need to quote some of these things to make them valid yaml

depot: {destination}/depot
cejl_revision: 532185e32ed03d340e16922c1da330c973047570
after_stage_script:
- JULIA_DEPOT_PATH={depot} {julia_exe} -e 'using Pkg; Pkg.add(; url="https://github.com/giordano/CompilerExplorer.jl", rev="{ce_revision}"); Pkg.precompile()'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is bin/julia (== {julia_exe}) a sensible way to call the julia executable after it has been installed? I followed the check_exe example.

depot: {destination}/depot
cejl_revision: 532185e32ed03d340e16922c1da330c973047570
after_stage_script:
- JULIA_DEPOT_PATH={depot} {julia_exe} -e 'using Pkg; Pkg.add(; url="https://github.com/giordano/CompilerExplorer.jl", rev="{ce_revision}"); Pkg.precompile()'

Choose a reason for hiding this comment

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

Suggested change
- JULIA_DEPOT_PATH={depot} {julia_exe} -e 'using Pkg; Pkg.add(; url="https://github.com/giordano/CompilerExplorer.jl", rev="{ce_revision}"); Pkg.precompile()'
- JULIA_DEPOT_PATH={depot}: {julia_exe} -e 'using Pkg; Pkg.add(; url="https://github.com/giordano/CompilerExplorer.jl", rev="{ce_revision}"); Pkg.precompile()'

Any reason for using {depot} instead of {destination}/local/share/julia?

We likely also need a project + manifest in the LOAD_PATH

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was planning adding the package to the global environment, so that we don't have to deal with adding a Project.toml/Manifest.toml here (the latter file being problematic, since it's different for each julia version). But I'm open to better solutions.

Choose a reason for hiding this comment

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

So if you use the local depot https://docs.julialang.org/en/v1/base/constants/#Base.DEPOT_PATH

Then we don't need to modify the depot path later one.

I don't think we want to use the default project since the user might try to modify it and this is read-only (might also be fine).

You need : after the path so that we still have the system depot available for the stdlib

@giordano
Copy link
Contributor Author

giordano commented Mar 30, 2024

In order to set JULIA_DEPOT_PATH=/path/to/depot, in https://github.com/compiler-explorer/compiler-explorer/blob/042e2b1c02416ac7039d050bbccba726e1e7ddaf/lib/compilers/julia.ts we need to override getDefaultExecOptions to add JULIA_DEPOT_PATH=... to the environment, right?

@partouf
Copy link
Contributor

partouf commented Mar 31, 2024

In order to set JULIA_DEPOT_PATH=/path/to/depot, in https://github.com/compiler-explorer/compiler-explorer/blob/042e2b1c02416ac7039d050bbccba726e1e7ddaf/lib/compilers/julia.ts we need to override getDefaultExecOptions to add JULIA_DEPOT_PATH=... to the environment, right?

correct

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.

None yet

4 participants