Centralize where paths are discovered v2 - #1556
Open
ghyatzo wants to merge 1 commit into
Open
Conversation
Member
|
@ghyatzo CI fails, already the |
Contributor
Author
|
Yeah, I had a misconfigured IDE without the proper features enabled. |
Replace the scattered get_juliaup_path() / current_exe() calls with two new GlobalPaths fields — juliaupselfexecfolder and juliaupselfexec — computed once via dunce::canonicalize in get_paths() and reused everywhere. Changes: - global_paths.rs: add juliaupselfexecfolder + juliaupselfexec, unconditional; soft fallback if canonicalize fails; use canonicalized path for juliaupselfhome too - julialauncher.rs: delete get_juliaup_path() helper, thread &GlobalPaths through do_initial_setup / run_versiondb_update / run_selfupdate / spawn_juliaup_add, fix all call sites - command_selfupdate.rs: download to paths.juliaupselfexecfolder; preserve the _post-update spawn from JuliaLang#1513 (critical: previous attempt in JuliaLang#915 dropped this, regressing the julia symlink restore) - operations.rs: BundledJulia path via paths.juliaupselfexecfolder; remove_symlink and install_background_selfupdate take &GlobalPaths - juliainstaller.rs + command_config_modifypath.rs: rename juliaupselfbin → juliaupselfexecfolder - utils.rs: get_bin_dir(paths) drops undocumented JULIAUP_BIN_DIR env var; sources from paths.juliaupselfexecfolder; keeps ~/.local/bin fallback for system-wide installs - Update all remove_symlink / install_background_selfupdate call sites Fixes from the JuliaLang#915 rebase: - _post-update hook no longer dropped (the JuliaLang#1513 regression) - path vs paths typo and juliupselfexecfolder typo corrected - run_selfupdate call sites pass &paths to new signature Supersedes: JuliaLang#915, JuliaLang#886
ghyatzo
force-pushed
the
centralize-paths-v2
branch
from
August 9, 2026 12:21
117e3d0 to
1aed748
Compare
Contributor
Author
|
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks to @fingolfin that reminded me that I had licked the cookied but hadn't eaten it yet.
Replace the scattered get_juliaup_path() / current_exe() calls with two new GlobalPaths fields — juliaupselfexecfolder and juliaupselfexec — computed once via dunce::canonicalize in get_paths() and reused everywhere.
Supersedes: #915, #886
some additional small changes on top of #915 regarding
JULIAUP_BIN_DIR. I renamed the functionget_bin_dirtoget_channel_link_dirto clarify it's real purpose.There is a bit of a mismatch with having the ability to specify
JULIAUP_DEPOT_PATHthrough env var, but not the binary location (other than sourcing .bashrc) but that can be a separate discussion, along with keep relying or not oncurrent_exesemantics instead of more external authorities (would help with the wholejulialaunchercallingjuliauptrick).Discussions on whether the undocumented
JULIAUP_BIN_DIRstill has its place or not are also out of scope, although it ties pretty close with the above since the name is pretty confusing. should it be a thing on its own? all binaries and symlinks in the same folder?