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
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bin/yaml/julia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

check_exe: {julia_exe} --version
targets:
- name: 1.10.0
url: https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.0-linux-x86_64.tar.gz
Expand All @@ -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

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.

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

Loading