Skip to content

Commit 2510c05

Browse files
committed
match against environment manifest version before using the default channel
alternative to #1095
1 parent b2f6592 commit 2510c05

File tree

5 files changed

+476
-15
lines changed

5 files changed

+476
-15
lines changed

Cargo.lock

Lines changed: 62 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ is-terminal = "0.4"
6161
path-absolutize = "3.1.0"
6262
numeric-sort = "0.1.5"
6363
regex = "1.10"
64+
toml = "0.8"
6465

6566
[target.'cfg(windows)'.dependencies]
6667
windows = { version = "0.61.1", features = ["Win32_Foundation", "Win32_UI_Shell", "Win32_Security", "Win32_System_JobObjects", "Win32_System_Console", "Win32_System_Threading", "Services_Store", "Foundation", "Foundation_Collections", "Web_Http", "Web_Http_Headers", "Storage_Streams", "Management_Deployment"] }

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,18 @@ The Julia launcher `julia` automatically determines which specific version of Ju
156156
1. A command line Julia version specifier, such as `julia +release`.
157157
2. The `JULIAUP_CHANNEL` environment variable.
158158
3. A directory override, set with the `juliaup override set` command.
159-
3. The default Juliaup channel.
159+
4. Automatic version selection based on the active project.
160+
5. The default Juliaup channel.
160161

161162
The channel is used in the order listed above, using the first available option.
162163

164+
### Automatic Project-based Version Selection
165+
166+
When no explicit channel is specified via command line, environment variable, or directory override, Juliaup will automatically attempt to select an appropriate Julia version based on the active project's requirements:
167+
168+
- If a project is specified (via `--project` or `JULIA_PROJECT`), Juliaup reads the project's `Manifest.toml` file and uses the `julia_version` field to determine which Julia version to use.
169+
- If no suitable version is found or no project is specified, it falls back to the default channel.
170+
163171
## Path used by Juliaup
164172

165173
Juliaup will by default use the Julia depot at `~/.julia` to store Julia versions and configuration files. This can be changed by setting

0 commit comments

Comments
 (0)