-
Notifications
You must be signed in to change notification settings - Fork 6
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
config: Read environment variables from [env]
section in config.toml
#12
Conversation
This file contains 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
dvc94ch
approved these changes
Feb 28, 2022
MarijnS95
commented
Mar 2, 2022
dvc94ch
reviewed
Mar 2, 2022
MarijnS95
force-pushed
the
env
branch
2 times, most recently
from
March 2, 2022 14:03
c1d70a2
to
1d4d80d
Compare
MarijnS95
changed the title
config: Parse
config: Read environment variables from Mar 2, 2022
[env]
block[env]
section in config.toml
MarijnS95
force-pushed
the
env
branch
2 times, most recently
from
March 2, 2022 14:18
a54b1f1
to
e992e82
Compare
MarijnS95
added a commit
to MarijnS95/ndk
that referenced
this pull request
Mar 2, 2022
Environment variables can be set and optionally override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. The entire handling of these variables is implemented in rust-mobile/cargo-subcommand#12 which can be read as-is from cargo-apk and ndk-build, through a trait to keep ndk-build oblivious for cargo-subcommand.
MarijnS95
added a commit
that referenced
this pull request
Mar 3, 2022
While implementing #12 an invalid `.cargo/config.toml` turned into an undescriptive and incorrect `ManifestNotFound` here. Forwarding the parsing error gives the user a much more descriptive error message that'll help understand what to fix.
MarijnS95
added a commit
that referenced
this pull request
Mar 3, 2022
…errors from "manifest not found" (#14) * error: Distinguish toml parsing errors from "manifest not found" While implementing #12 an invalid `.cargo/config.toml` turned into an undescriptive and incorrect `ManifestNotFound` here. Forwarding the parsing error gives the user a much more descriptive error message that'll help understand what to fix. * error: Map toml parsing errors to include path of offending file * error: Add path to io errors as context
MarijnS95
added a commit
to MarijnS95/ndk
that referenced
this pull request
Mar 3, 2022
Environment variables can be set and optionally override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. The entire handling of these variables is implemented in rust-mobile/cargo-subcommand#12 which can be read as-is from cargo-apk and ndk-build, through a trait to keep ndk-build oblivious for cargo-subcommand.
dvc94ch
approved these changes
Mar 3, 2022
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.
looks good
Environment variables can be set and optionally override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder.
Glad I got the CI merged first 😬 - already coming in clutch. |
Published as 0.6 since we have at least breaking changes in the public error type. |
MarijnS95
added a commit
to MarijnS95/ndk
that referenced
this pull request
Mar 4, 2022
Environment variables can be set and optionally override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. The entire handling of these variables is implemented in rust-mobile/cargo-subcommand#12 which can be read as-is from cargo-apk and ndk-build, through a trait to keep ndk-build oblivious for cargo-subcommand.
MarijnS95
added a commit
to rust-mobile/ndk
that referenced
this pull request
Mar 22, 2022
Environment variables can be set and override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. The entire handling of these variables is implemented in rust-mobile/cargo-subcommand#12 and rust-mobile/cargo-subcommand#16 which immediately populate the process environment with these variables when `Subcommand::new()` is called by `cargo-apk`.
MarijnS95
added a commit
to rust-mobile/ndk
that referenced
this pull request
Mar 22, 2022
Environment variables can be set and override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. The entire handling of these variables is implemented in rust-mobile/cargo-subcommand#12 and rust-mobile/cargo-subcommand#16 which immediately populate the process environment with these variables when `Subcommand::new()` is called by `cargo-apk`.
MarijnS95
added a commit
to rust-mobile/ndk
that referenced
this pull request
Mar 25, 2022
) Environment variables can be set and override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. The entire handling of these variables is implemented in rust-mobile/cargo-subcommand#12 and rust-mobile/cargo-subcommand#16 which immediately populate the process environment with these variables when `Subcommand::new()` is called by `cargo-apk`.
MarijnS95
added a commit
to rust-mobile/xbuild
that referenced
this pull request
May 3, 2023
…nment Environment variables can be set and optionally override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. Besides exposing variables to all other processes called by `xbuild`, this also allows `xbuild` itself to be driven by variables set in `.cargo/config.toml`, such as `$ANDROID_HOME` needed for #116. rust-mobile/cargo-subcommand#12 rust-mobile/cargo-subcommand#16
MarijnS95
added a commit
to rust-mobile/xbuild
that referenced
this pull request
May 15, 2023
…nment Environment variables can be set and optionally override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. Besides exposing variables to all other processes called by `xbuild`, this also allows `xbuild` itself to be driven by variables set in `.cargo/config.toml`, such as `$ANDROID_HOME` needed for #116. rust-mobile/cargo-subcommand#12 rust-mobile/cargo-subcommand#16
MarijnS95
added a commit
to rust-mobile/xbuild
that referenced
this pull request
Aug 17, 2023
…nment Environment variables can be set and optionally override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. Besides exposing variables to all other processes called by `xbuild`, this also allows `xbuild` itself to be driven by variables set in `.cargo/config.toml`, such as `$ANDROID_HOME` needed for #116. rust-mobile/cargo-subcommand#12 rust-mobile/cargo-subcommand#16
MarijnS95
added a commit
to rust-mobile/xbuild
that referenced
this pull request
Aug 22, 2023
…nment (#117) * Propagate `.cargo/config.toml` `[env]` settings to the process environment Environment variables can be set and optionally override the process environment through `.cargo/config.toml`'s `[env]` section: https://doc.rust-lang.org/cargo/reference/config.html#env These config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing `.cargo/` folder. Besides exposing variables to all other processes called by `xbuild`, this also allows `xbuild` itself to be driven by variables set in `.cargo/config.toml`, such as `$ANDROID_HOME` needed for #116. rust-mobile/cargo-subcommand#12 rust-mobile/cargo-subcommand#16 * cargo/config: Don't canonicalize joined `[env]` `relative` paths Cargo doesn't do this either, and canonicalization requires the path to exist which it does not have to.
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.
Environment variables can be set and optionally override the process environment through
.cargo/config.toml
's[env]
section: https://doc.rust-lang.org/cargo/reference/config.html#envThese config variables have specific precedence rules with regards to overriding the environment set in the process, and can optionally represent paths relative to the parent of the containing
.cargo/
folder.