You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it not possible to specify registry sources via this? I wanted to migrate from using registry-index sources in Publishing crates to IPFS so that I could test it with #8890, but trying to use this flag to define the registries it doesn't seem to be picked up:
> cargo -Zunstable-options '--config=source.bs58_cli_0_1_0_anyhow.registry="http://127.0.0.1:8080/ifps/QmP6KmpjQrYpYyeXGqAvmrw45dPoKvmKeTqTanmSqJGJKz"''--config=source.bs58_cli_0_1_0_bs58.registry="http://127.0.0.1:8080/ifps/Qmb2PJ9vMALRFmQjLDQbcNHYUvcFc96XzKMwAhBMEECxzb"''--config=source.bs58_cli_0_1_0_paw.registry="http://127.0.0.1:8080/ifps/QmNkJbrmpjJErbX9fTpSSQYb7Ky1Qnpg47QptfMcVQUwBx"''--config=source.bs58_cli_0_1_0_structopt.registry="http://127.0.0.1:8080/ifps/Qmbh5sZbKezvYq2ESVhbnymqs7VKMTaz7yXUaoMi9tBjJp"' update --manifest-path /tmp/ipfs-registry.bs58-cli-0.1.0.yIgXKp/bs58-cli-0.1.0/Cargo.tomlerror: failed to parse manifest at `/tmp/ipfs-registry.bs58-cli-0.1.0.yIgXKp/bs58-cli-0.1.0/Cargo.toml`Caused by: no index found for registry: `bs58_cli_0_1_0_anyhow`
I'll add what I think is a pretty compelling use-case for this: passing -Zinstrument-coverage for coverage testing (which is stabilizing in rust-lang/rust#90132). It requires leaving any existing rustflags intact since things like linker flags (-Clink-args) may be required for the crate to build in the first place, which using RUSTFLAGS doesn't do (#5376) but --config='build.rustflags = ["-Zinstrument-coverage"]' does (#5376 (comment)).
For the unresolved issue, some guidance on exactly what you're imagining would be helpful @ehuss. Specifically, why do you think that restriction is necessary in the first place? Alternatively, could we just parse into a toml::Value and then check that it only contains one actual entry?
The restriction is to just constrain the format so that it has a straightforward syntax. That way, someone wouldn't be able to pass in comments or [bracketed.tables] or newlines or anything like that. It already parses to a toml::Value and checks for one value.
Activity
Auto merge of #7901 - ehuss:config-cli-path, r=alexcrichton
jyn514 commentedon Sep 19, 2020
A use case for this: docs.rs wants to pass
RUSTFLAGSwithout having the spacing interpreted by the shell: rust-lang/docs.rs#1057Nemo157 commentedon Dec 1, 2020
Is it not possible to specify registry sources via this? I wanted to migrate from using
registry-indexsources in Publishing crates to IPFS so that I could test it with #8890, but trying to use this flag to define the registries it doesn't seem to be picked up:Nemo157 commentedon Dec 1, 2020
🤦 ignore that, I was using the wrong config key.
dancrossnyc commentedon Jul 1, 2021
Curious if there's any updated status on this? It would be really great to get stabilized!
ehuss commentedon Jul 1, 2021
There's no update. There's still an unresolved issue noted above that needs someone to work on it.
jonhoo commentedon Nov 23, 2021
I'll add what I think is a pretty compelling use-case for this: passing
-Zinstrument-coveragefor coverage testing (which is stabilizing in rust-lang/rust#90132). It requires leaving any existing rustflags intact since things like linker flags (-Clink-args) may be required for the crate to build in the first place, which usingRUSTFLAGSdoesn't do (#5376) but--config='build.rustflags = ["-Zinstrument-coverage"]'does (#5376 (comment)).For the unresolved issue, some guidance on exactly what you're imagining would be helpful @ehuss. Specifically, why do you think that restriction is necessary in the first place? Alternatively, could we just parse into a
toml::Valueand then check that it only contains one actual entry?ehuss commentedon Nov 29, 2021
The restriction is to just constrain the format so that it has a straightforward syntax. That way, someone wouldn't be able to pass in comments or
[bracketed.tables]or newlines or anything like that. It already parses to atoml::Valueand checks for one value.jonhoo commentedon Dec 6, 2021
👍
Implemented in #10176
Check --config for dotted keys only
Auto merge of #10176 - jonhoo:config-cli-simple, r=ehuss
jonhoo commentedon Jan 25, 2022
Now that #10176 has been merged, I think the unchecked box can be ticked!
40 remaining items
Auto merge of #10755 - jonhoo:stabilize-config-cli, r=ehuss
Disallow setting registry tokens with --config
Allow --config path without config-include
Stabilize --config
Disallow setting registry tokens with --config
Allow --config path without config-include
Stabilize --config