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

Host crate on Cargo: tag julia as binary name for julialauncher #639

Merged
merged 9 commits into from
Jun 27, 2023

Conversation

MilesCranmer
Copy link
Member

@MilesCranmer MilesCranmer commented May 10, 2023

This creates julia as another executable for julialauncher in the cargo bin folder. Thus allowing you to install juliaup from crates.io and have a working julia command.

Fixes #618. Note that julialauncher will still appear in the bin folder.

You can test this out by running:

cargo install --git https://github.com/MilesCranmer/juliaup.git --branch rust-pkg

and verifying that juliaup and julia are installed in the cargo binary folder.

@davidanthoff feel free to push to this PR

- Note that `julialauncher` will still appear in the `bin` folder
@MilesCranmer
Copy link
Member Author

@davidanthoff it might be worth adding https://github.com/marketplace/actions/publish-crates to automatically publish new updates to the juliaup crate

@MilesCranmer MilesCranmer changed the title Tag julia as binary name for julialauncher Host crate on Cargo: tag julia as binary name for julialauncher May 10, 2023
@MilesCranmer
Copy link
Member Author

MilesCranmer commented May 10, 2023

If some of the deployments need to avoid installing the julia binary, you can use the --bin commands to specify which binaries are installed. Likewise for running cargo build. See here: https://doc.rust-lang.org/cargo/commands/cargo-install.html#install-options.

@davidanthoff should I add this as an option anywhere?

@davidanthoff
Copy link
Collaborator

Great!

The whole CI workflow is very, very complicated, so probably easiest if I push to this branch to get that into working shape. Thanks so much for the start, though!

@uncomfyhalomacro
Copy link
Contributor

Just a quick question. Wouldn't it be better to just rename julialauncher.rs to julia.rs or am I missing something here? I feel like having two binaries with the same purpose are wasted duplicates. Maybe it's just me.

@davidanthoff
Copy link
Collaborator

Just a quick question. Wouldn't it be better to just rename julialauncher.rs to julia.rs or am I missing something here? I feel like having two binaries with the same purpose are wasted duplicates.

For the binaries that we ship via any of the other installers the current design has the benefit that one can distinguish between the launcher process and an actual Julia process in things like the task manager. But I think with this PR here we can keep the Juliaup julia binary really strictly to the cargo install method, and leave all the other deployments on julialauncher and juliaup.

@davidanthoff davidanthoff merged commit fe33290 into JuliaLang:main Jun 27, 2023
@davidanthoff
Copy link
Collaborator

All done now: https://crates.io/crates/juliaup/. New package versions should be automatically pushed whenever we release a build to the release channel. Thanks, @MilesCranmer!

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.

Host crate on Cargo as well
3 participants