-
Notifications
You must be signed in to change notification settings - Fork 102
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
Babel: Toolchain support via :toolchain
#279
Conversation
This allows one to specify `'(foo . "path/to/dependency")` so that Cargo will look locally for the dependency, instead of pulling from crates.io. This is very useful for testing local Rust code in Org snippets.
This allows the user to use the Beta or Nightly toolchains in snippets.
:nightly
:toolchain
I ran the tests manually(there seem to be some issues with cask again). Sorry for the delay and thanks for the contribution! |
(params '("cargo" "build" "--quiet")) | ||
(toolchain (cond ((eq toolchain-kw 'nightly) "+nightly") | ||
((eq toolchain-kw 'beta) "+beta") | ||
(t "+stable"))) |
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 only allows nightly
/beta
/stable
channels by keyword.
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.
As opposed to?
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.
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.
Ah I see the issue. We could expand the accepted format of toolchain-kw
to allow for more free-form strings, and pass those as-is (or parse them?) down to the cargo
line.
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.
Does d71fbf5 work for you ?
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.
That should do the trick.
how to disable this? i didn't install rust tools with rustup; i use my systems' package manager. setting
|
That use-case never occurred to me so I wasn't aware that |
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 rescpective functions in `rustic-babel' will remove the toolchain from params, that is only toolchain has a valid value it uses toolchain. See also: brotzeit#279 (comment)
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 rescpective functions in `rustic-babel' will remove the toolchain from params, that is only toolchain has a valid value it uses toolchain. See also: brotzeit#279 (comment)
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#279 (comment) Fixes brotzeit#498 introduced in 80d05c4 Co-authored-by: Sibi Prabakaran <[email protected]>
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#279 (comment) Fixes brotzeit#498 introduced in 80d05c4 Co-authored-by: Sibi Prabakaran <[email protected]>
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 <[email protected]>
This PR allows the user to specify the toolchain via a new
:toolchain
keyword when writing Org snippets.Note: This PR was built off #278, so that should be merged first.
Closes #277