-
-
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
chore: updating cargo lock for toml #672
base: master
Are you sure you want to change the base?
chore: updating cargo lock for toml #672
Conversation
Signed-off-by: Simon Paitrault <[email protected]>
IIUC, upgrading toml has backward compatibility concerns: #439. Is there a version that fixes the issues you were hitting without breaking backward-compat? |
Hello, I think that |
After trying, it is only solved on 0.8. But I'm a little confused about this, the failing test:
Should have basic string, not literal, right? User {
id: 42,
username: "peter-doe".into(),
display_name: r#"peter "The Machine" doe"#.into(),
email: Email("[email protected]".into()),
} which would produce: id = 42
username = "peter-doe"
display_name = 'peter "The Machine" doe'
email = "[email protected]" I understand that it can break some existing snapshot, but on the other side, it makes the library unusable for valid types. The only workaround that I found is to preserialize the struct with |
Right, but breaking existing snapshots requires us to bump the major version of insta (which is possible but there's lots of things we'd like to get in; we wouldn't do it for just this). Is it possible to do this with a feature, like |
Yes I can do that |
@max-sixty it means that we will have duplication in |
Is it instead possible to do this with a feature? |
Due to the fact that we're testing with |
Yes, we'd need to find some way of it using v8 when both features were enabled. To the extent we have both versions of toml on the Or if that's confusing — would be interested to see your proposal above with both dependencies active. I'd have thought the jump from that to conditionally compiling isn't that big (but may well be missing something) |
This PR updates
toml
dependency to avoid discrepancy between the latesttoml
version and the one ininsta
.When refactoring some part of the configuration on one of my project that is using
toml
, I discovered that my configuration was properly serialized when usingtoml = 0.8.x
while when using ininsta
it was failing withUnsupportedType
. After digging a bit, it is related to this.To reproduce on a fresh
cargo new --lib
:Cargo.toml
lib.rs