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

chore: bump syn to 2.0 #2482

Merged
merged 2 commits into from
Mar 14, 2024
Merged

Conversation

saiintbrisson
Copy link
Contributor

@saiintbrisson saiintbrisson commented May 1, 2023

This PR bumps the syn crate to the new major 2.0 version. Following what some of the dependencies
are using as well (serde 1.0.159, futures 0.3.27, tokio 1.26.0).

It seems like now is a good time to bump before the 0.7 release. Some of the breakages include:

  • AttributeArgs no longer exists, we must Punctured directly;
  • NestedMeta no longer exists.
  • LifetimeDef is now LifetimeParam;
  • No more support for type ascription;

The parse_nested_meta replaces whatever would be done using AttributeArgs.

@saiintbrisson saiintbrisson changed the title chore: bump syn to 2.0.15 chore: bump syn to 2.0 May 1, 2023
@saiintbrisson
Copy link
Contributor Author

I'm not sure whether this one is needed or should be taken into account ATM, but keeping syn up-to-date seems like a nice quality-of-life update since our dependencies are also updating to it.

@saiintbrisson saiintbrisson marked this pull request as ready for review May 1, 2023 22:06
@abonander
Copy link
Collaborator

The removal of type ascription is a significant breaking change, at least for our own dogfooding usage. I'd like to at least try to provide deprecation warnings for it before we drop it entirely.

@saiintbrisson
Copy link
Contributor Author

saiintbrisson commented May 1, 2023

Fair enough. Should I leave this PR in draft? I can try and come up with a following PR with a deprecation notice.

@abonander
Copy link
Collaborator

I can try and come up with a following PR with a deprecation notice.

Yeah if you like.

I think it would be as simple as adding a hidden, public function to sqlx with an appropriate deprecation message, and then every time the type ascription syntax is used just emit a call to that function and assign the call the span of the type ascription usage.

@Sytten
Copy link

Sytten commented Dec 21, 2023

Any progress? Trying eliminate syn 1 from our dependencies.

@saiintbrisson
Copy link
Contributor Author

@Sytten we're targeting the next major release, but I'm unaware of any plans or dates.

@abonander
Copy link
Collaborator

@saiintbrisson do you have time to come back to this? I'm finally committing to getting 0.8.0 out

@saiintbrisson
Copy link
Contributor Author

saiintbrisson commented Mar 12, 2024

@abonander should be good to go.

On a completely different note, I've been thinking for a while now about adding a new feature flag derive for derive macros only (the macros flag would still enable derive by default as to not confuse). Could be useful to allow people to enable the derives without having the pollution of sqlx_*! macros, as they are completely unrelated. WDYT?

@abonander
Copy link
Collaborator

I'm not necessarily against that, I suppose.

@saiintbrisson
Copy link
Contributor Author

@abonander Ill create the mentioned PR when this one gets merged, lmk if you need anything.

@abonander abonander merged commit 4c68302 into launchbadge:main Mar 14, 2024
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants