-
Notifications
You must be signed in to change notification settings - Fork 49
feat: show target of links in in "elan show" #181
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
Conversation
When doing `elan show` after ``` elan toolchain link lean4-pgit /home/user/build/release/stage1 ``` the output now shows ``` installed toolchains -------------------- lean4 (linked to local path /home/user/build/release/stage1) leanprover/lean4:v4.22.0 leanprover/lean4:v4.23.0 (resolved from default 'stable') leanprover/lean4:v4.24.0-rc1 active toolchain ---------------- leanprover/lean4:v4.23.0 (resolved from default 'stable') Lean (version 4.23.0, x86_64-unknown-linux-gnu, commit 50aaf682e9b74ab92880292a25c68baa1cc81c87, Release) ``` with the novelty being the "(linked to local path /home/user/build/release/stage1)" message.
| use crate::errors::*; | ||
| use crate::notifications::Notification; | ||
| use dirs; | ||
| use json; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just rustfmt, happy to remove if it's undesired noise
| let releases = json::parse(&json) | ||
| .chain_err(|| format!("failed to parse release data: {}", url))?; | ||
| releases[channel][0]["name"].as_str() | ||
| let releases = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also just rustfmt
| return Err(Error::from( | ||
| format!("channel 'beta' is not supported for custom origin '{}'", origin) | ||
| )); | ||
| return Err(Error::from(format!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also just rustfmt
| if let Some(path) = get_toolchain_local_target(&cfg, &t)? { | ||
| println!( | ||
| "{} (linked to local path {})", | ||
| &t, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be mk_toolchain_label(&t, &default_tc, &resolved_default_tc) instead of just &t? I'm not sure about the potential for different decorations to overlap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, seems fine
When doing
elan showafterthe output now shows
with the novelty being the
(linked to local path /home/user/build/release/stage1)message.