Dongpo Liu

Results 256 comments of Dongpo Liu

I think this is a feature, not a bug. ```rust /// A config type that is a program to run. /// /// This supports a list of strings like `['/path/to/program',...

Could you try `cargo run --config "target.'cfg(all())'.runner=['run1']" --config "target.'cfg(cfg(not(target_os = "none")))'.runner=['run2']" --config "target.'cfg(all())'.runner=['run3']"`? I think it will use the last one and overwrite the second one. Also you can try...

For now, `cargo run --config "target.'cfg(all())'.runner=['run1']" --config "target.'cfg(all())'.runner=['run3']"` equal to ```toml [target.'cfg(all())'] runner = ["run1","run3"] ``` I'm not sure if should we change the behavior.

If you try to add this config and also pass the CLI args, it will be concatenated. ```toml [target.'cfg(all())'] runner = ["run1","run2"] ``` `cargo run --config "target.'cfg(all())'.runner=['run3']" --config "target.'cfg(all())'.runner=['run4']"` You...

> There is no `run2` in any of your settings, I am confused? Oops, I posted the out-of-date config and command. updated.

> * But we have some counterexamples to that. Could you indicate which ones? Do you mean `cargo +nightly run --config "target.'cfg(not(target_os = "none"))'.runner=['run3']" --config "target.'cfg(all())'.runner=['run3']"` this one?

> * Having `target.'cfg(all())'.runner` set in different files should be rejected, because having it set twice in the same file is being rejected, and having `target.'cfg(all())'.runner` in one file and...

> * And the other one you mentioned where they use different `cfg` that are both true for the same target. I found that this is a bug in `CfgExpr::matches_key`....

> I found that this is a bug in `CfgExpr::matches_key`. I will try to fix it tomorrow. `cargo +nightly run --config "target.'cfg(not(target_os = "none"))'.runner=['run3']" --config "target.'cfg(all())'.runner=['run3']"` and `cargo +nightly run...

> What happens when a config file omits the `"`? Same. It will be ignored.