-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Allow configuring unstable flags via config file #8393
Commits on Jul 8, 2020
-
Allow populating CliUnstable from a HashMap
This makes it easier to populate unstable options from configuration files. Might also help make unstable option tests easier to write.
Configuration menu - View commit details
-
Copy full SHA for 1cea4cb - Browse repository at this point
Copy the full SHA 1cea4cbView commit details -
Allow setting unstable options in .cargo/config
Obviously this only works with nightlies and all that, but if you're e.g. testing resolver v2, want to always have Ztiming on in your workspace, or something like that, this makes it easier to do.
Configuration menu - View commit details
-
Copy full SHA for 4aede8c - Browse repository at this point
Copy the full SHA 4aede8cView commit details -
Allow both dashes and underscores for Z flags
This makes it a little easier to match whatever the natural formatting is for where you're setting unstable options -- CLI or config file.
Configuration menu - View commit details
-
Copy full SHA for 9cb1ef8 - Browse repository at this point
Copy the full SHA 9cb1ef8View commit details -
Update src/doc/src/reference/unstable.md
Co-authored-by: Eric Huss <eric@huss.org>
Configuration menu - View commit details
-
Copy full SHA for c60da96 - Browse repository at this point
Copy the full SHA c60da96View commit details -
Clarify CliUnstable::parse/update_with_table
These masquerade like construction functions, but they're in-place mutators since they're meant to be used one after another in a precedence chain.
Configuration menu - View commit details
-
Copy full SHA for 6d7421c - Browse repository at this point
Copy the full SHA 6d7421cView commit details -
Per comments on the PR, a couple changes need to be backed out.
Configuration menu - View commit details
-
Copy full SHA for 48a6f59 - Browse repository at this point
Copy the full SHA 48a6f59View commit details -
Switch unstable config parsing to serde
Tests are currently failing, looks like there's something in the Deserializer impl that's forcing field-missing errors even when the serde `default` annotation is applied.
Configuration menu - View commit details
-
Copy full SHA for bd938f0 - Browse repository at this point
Copy the full SHA bd938f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 14c32d4 - Browse repository at this point
Copy the full SHA 14c32d4View commit details -
Treat all CliUnstable values as default-false
This is a workaround in case y'all would like to land this change before I'm able to finish up a Deserializer refactor.
Configuration menu - View commit details
-
Copy full SHA for c532c49 - Browse repository at this point
Copy the full SHA c532c49View commit details -
Drop broken test asserting invalid configs error on nightly
The current behavior, with the default-false workaround in place, is not able to identify extra members of the `unstable` table, so it can't error on unexpected members. I'll add this test back in with a Deserializer refactor to clean up the extra logic added to CliUnstable.
Configuration menu - View commit details
-
Copy full SHA for 08f1020 - Browse repository at this point
Copy the full SHA 08f1020View commit details
Commits on Jul 9, 2020
-
Revert workaround and patch Deserializer
This patch changes how ConfigMapAccess iterates k/v pairs when deserializing structs. Previously we produced keys for exactly the set of fields needed for a struct, and errored out in the deserializer if we can't find anything for that field. This patch makes us produces keys from the union of two sets: 1. All fields that are both needed for the struct and can be found in the environment. 2. All fields in the config table. This change allows serde's codegen to handle both missing and unknown fields via the usual derive annotations (default or deny_unknown_fields respectively)
Configuration menu - View commit details
-
Copy full SHA for 62d6233 - Browse repository at this point
Copy the full SHA 62d6233View commit details -
Minor test fix (error text comparison)
Serde's errors for missing fields are a lil' different than the ones from our Deserializer.
Configuration menu - View commit details
-
Copy full SHA for 724273e - Browse repository at this point
Copy the full SHA 724273eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 782b32b - Browse repository at this point
Copy the full SHA 782b32bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 90b9c6a - Browse repository at this point
Copy the full SHA 90b9c6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b82281a - Browse repository at this point
Copy the full SHA b82281aView commit details -
Add tests verifying overlapping prefixes and defaults
These tests demonstrate the current failure mode around overlapping env keys and inner structs. To some extent this is a limitation of mapping on to environment variables with an underscore as both the namespace separator and the substitute for dashes in flag names in that the mapping is not strictly one-to-one.
Configuration menu - View commit details
-
Copy full SHA for e49b3ae - Browse repository at this point
Copy the full SHA e49b3aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for d035daa - Browse repository at this point
Copy the full SHA d035daaView commit details