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

Update syn to v2 #261

Merged
merged 1 commit into from Jun 18, 2023
Merged

Conversation

CosmicHorrorDev
Copy link
Contributor

This updates syn to v2. Changes involved:

  • Removing the Spanned requirement from get_metadata_inner() since it no longer seems needed and Spanned now requires ToTokens to be implemented on the type too
  • Changing parse_terminated()'s arguments to take the delimiter instead of passing it with a turbo-fish
  • Switching path to the method for Attributes
  • Changing the structure of how literals are expressed for meta name-values
  • Matching the old structure of how tokenstreams were represented for Attribute's
    • I tried to minimize the changes required to match the old parsing. A Meta::List(_) holds an internal tokenstream which could be used, but it's the tokenstream inside the group instead of the containing token-group itself. Instead I opted for taking the surrounding tokenstream and discarding the leading path to get at the group

@CosmicHorrorDev
Copy link
Contributor Author

syn bumped its MSRV up to 1.56, so it's expected that the builds back on 1.32 would fail

@smoelius
Copy link
Contributor

smoelius commented May 5, 2023

Can I please ask what the status of this PR is?

@Peternator7
Copy link
Owner

The PR is fine from an implementation standpoint. However, I try to maintain two years of backwards compatibility, and rust 1.56 is from 10/2021. Is there an urgency in merging this change?

@smoelius
Copy link
Contributor

smoelius commented May 6, 2023

I wouldn't say it's urgent. It's more of a housekeeping matter. For one of my projects, this is the last dependency that still relies on syn 1.0.

But I can wait until October.

Thanks very much for your response.

@Peternator7 Peternator7 merged commit 2b71e10 into Peternator7:master Jun 18, 2023
@Peternator7
Copy link
Owner

Just release 0.25.0 which has this upgrade! Decided it's not that far off from October and it's impractical to maintain a project that's on an unsupported syn version.

@smoelius1
Copy link

Thank you!

1 similar comment
@martin-g
Copy link

Thank you!

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

Successfully merging this pull request may close these issues.

None yet

5 participants