Skip to content
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

Updating to syn 2 changed the output #179

Closed
ijackson opened this issue Mar 25, 2023 · 2 comments
Closed

Updating to syn 2 changed the output #179

ijackson opened this issue Mar 25, 2023 · 2 comments

Comments

@ijackson
Copy link

Hi.

In derive-adhoc we use macrotest for our tests, and that uses cargo expand (which it expects to have been cargo installed)

Recently, our CI started failing, reporting, basically, this diff (comparing expected and actual output):

+        ds.field("bar", &<PrettyVec<String> as From<&Vec<String>>>::from(&self.bar));
-        ds.field("bar", &<PrettyVec<String> as From::<&Vec<String>>>::from(&self.bar));

Experimenting, this changed betweencargo-expand 1.0.40 and 1.0.44.

I don't know if there is anything useful or better to be done here in cargo-expand. Perhaps it would make sense to treat this as a major version bump for cargo-expand and for people who run cargo-expand in CI in this rather-brittle way to specify the major version?

Anyway, I thought you should be told. I've dealt with the problem in our CI by pinning to the precise cargo-expand version.

Thanks for your attention.

@dtolnay
Copy link
Owner

dtolnay commented Mar 25, 2023

Preserving byte-for-byte identical output across releases has never been a commitment that this crate has made.

@dtolnay dtolnay closed this as completed Mar 25, 2023
@ijackson
Copy link
Author

OK, fair enough, thanks.

I will file a ticket against macrotest, which I think needs to tell users that they need to use cargo install --version=... --locked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants