-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add cargo-flux binary #305
Conversation
Nice! Can you update the relevant bit in the docs? |
Haven't updated the docs yet but you should now be able to just do
I'd love to just be able to do @nilehmann any suggestions on how we might be able to reconfigure? Should I add a I'm also content with leaving it as-is though, it seems like a significant improvement in the install experience. |
We could also add a binary that generates the vscode plugin json. {
"rust-analyzer.checkOnSave.extraEnv": {
"RUSTC_WRAPPER": "/path/to/flux/target/release/flux",
"RUSTUP_TOOLCHAIN": "nightly-2022-10-11",
"LD_LIBRARY_PATH": "/path/to/.rustup/toolchains/nightly-2022-10-11-x86_64-apple-darwin/lib"
}
} Although personally I feel like it would make more sense to have this be generated when you run With some more investment, we could also add a script that would modify the existing plugin json, but I'm not sure whether it's woth it. |
I think this is good enough. You can do {
"rust-analyzer.checkOnSave.overrideCommand": [
"/path/to/flux/target/release/cargo-flux",
"check",
"--workspace",
"--message-format=json"
]
} |
flux-bin/src/utils.rs
Outdated
.map(|channel| channel.name().to_string()) | ||
} | ||
|
||
pub fn get_dyld_fallback_library_path(rust_toolchain: &str) -> Result<PathBuf, i32> { |
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 should be called something that's not macos specific.
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.
I picked the linux name (ld_library_path
) since it seems the most descriptive, but I'm open to suggestions.
If you ran {
"rust-analyzer.checkOnSave.overrideCommand": [
"cargo-flux",
"check",
"--workspace",
"--message-format=json"
]
} |
If But what is this |
Yeah sorry, I meant |
I've updated the readme with the new instructions. I tried to follow them myself but it would help if one of you could confirm that it works. I also added a cargo install --lib flux and cargo build but maybe if you have the muscle memory for the latter, you will find that env variable helpful. |
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.
@cole-k the code looks good. Just left you some small stylistics suggestions.
@ranjitjhala made this page https://liquid-rust.github.io/flux/. We you should add the changes to the docs there. The page can be edited here https://github.com/liquid-rust/flux/tree/main/flux-docs/src. We should also probably remove most of the text from the README and just put links to the doc
@@ -2,6 +2,13 @@ | |||
edition = "2021" | |||
name = "flux" | |||
version = "0.1.0" | |||
default-run = "flux" |
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.
👍🏽
0fec41c
to
ade1a47
Compare
Moved the readme's contents to |
@cole-k I think this is ready to go as soon as you resolve the conflict |
353ba98
to
2ee8dbb
Compare
Edit: Usage and installation details are now in
flux-docs
Testing locally
Change https://github.com/liquid-rust/flux/pull/305/files#diff-e3670cdab561aaacb93c3521ffc0db64aa666949dcfc0e5e7f0148fd595ef5afR18 to your flux binary path.
Note that this will clobber a pre-existing binary, so if you put your
cargo-flux
shell script there, you'll need to copy it elsewhere if you don't want it to disappear.