fix(rustic-babel): disable toolchain when invalid/unneeded#3
Merged
CeleritasCelery merged 3 commits intomainfrom Jul 8, 2024
Merged
fix(rustic-babel): disable toolchain when invalid/unneeded#3CeleritasCelery merged 3 commits intomainfrom
CeleritasCelery merged 3 commits intomainfrom
Conversation
When the user installs Rust tools using a method other than rustup, e.g. using an operating system's package manager, cargo generally has no support for toolchain specification. In such case, the user can then `nil', or `""', so that the respective functions in `rustic-babel' will remove the toolchain from params, i.e. only toolchain has a valid value if Cargo has toolchain support. See also: brotzeit/rustic#279 (comment) Fixes #498 introduced in 80d05c4 Co-authored-by: Sibi Prabakaran <sibi@psibi.in>
Contributor
|
If you need someone with Nix installed to test anything, just ping me! |
We are setting the default to `nil`, which means use the default provided by cargo and don't specify it explicitly. If overridden with a string value, that will be used instead and passed as +<toolchain>.
Contributor
Author
|
@Icy-Thought could you please test these changes now on Nix? |
Contributor
|
Sure thing! Will do that when I get home. |
Contributor
|
Alright, I just tested the changes and they appear to be working exactly as intended! No errors and the results from Example: #+begin_src rustic :exports both :tangle "shadowing.rs"
fn main() {
let x = 2;
let x = x + 2;
println!("The value of x is {}", x)
}
#+end_srcgenerates/outputs the following results: |
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.
Description by @yuuyins from brotzeit/rustic#499 :
When the user installs Rust tools using a method other than rustup, e.g. using an operating system's package manager, cargo generally has no support for toolchain specification. In such case, the user can then
nil, or"", so that the respective functions inrustic-babelwill remove the toolchain from params, i.e. only toolchain has a valid value if Cargo has toolchain support.See also: brotzeit/rustic#279 (comment)
Fixes brotzeit/rustic#498 introduced in 80d05c4