Skip to content

Update sqlparser-derive to use syn 2.0 - #1040

Merged
alamb merged 5 commits into
apache:mainfrom
serprex:syn-2
Nov 27, 2023
Merged

Update sqlparser-derive to use syn 2.0#1040
alamb merged 5 commits into
apache:mainfrom
serprex:syn-2

Conversation

@serprex

@serprexserprex commented Nov 6, 2023

Copy link
Copy Markdown
Contributor

@tobyhede

Copy link
Copy Markdown
Contributor

@serprex Some more context on this change would be useful ... I assume it is updating syn?

@serprex

Copy link
Copy Markdown
ContributorAuthor

Yes

Comment threadderive/Cargo.toml Outdated
@alamb

Copy link
Copy Markdown
Contributor

Thank you for this contribution @serprex

@coveralls

coveralls commented Nov 18, 2023

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 7009097570

  • 0 of 17(0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.004%) to 87.706%

Changes Missing CoverageCovered LinesChanged/Added Lines%
derive/src/lib.rs0170.0%
TotalsCoverage Status
Change from base Build 7008917646:-0.004%
Covered Lines:17992
Relevant Lines:20514

💛 - Coveralls

@serprex

Copy link
Copy Markdown
ContributorAuthor

Won't have time this weekend to look into, but will look at how to run tests & fix next week (I only ran cargo test in derive crate)

@alamb
alamb marked this pull request as draft November 20, 2023 19:45
@alamb

Copy link
Copy Markdown
Contributor

Thanks @serprex . Converting to a draft while review feedback is being addressed. Please mark it ready for review when it is ready for another look

@serprex
serprex marked this pull request as ready for review November 21, 2023 00:43
@alambalamb changed the title derive: syn 2Update sqlaprser-derive to use syn 2.0Nov 21, 2023
@serprexserprex changed the title Update sqlaprser-derive to use syn 2.0Update sqlparser-derive to use syn 2.0Nov 22, 2023
@alamb

Copy link
Copy Markdown
Contributor

Given I think this may be a non trivial change, I plan to merge this immediately after #1030

Then this PR will have maximum "bake time" for early adopters and others to try it out before I release it on crates.io

@alambalamb mentioned this pull request Nov 27, 2023
5 tasks
Comment threadderive/Cargo.toml

[dependencies]
syn = "1.0"
syn = { version = "2.0", default-features = false, features = ["printing", "parsing", "derive", "proc-macro"] }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems according to
https://docs.rs/syn/latest/syn/index.html#optional-features

Listing these 4 will at least avoid

clone-impls (enabled by default) — Clone impls for all syntax tree types.

@alambalamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- thank you @serprex

I took the liberty of merging up from main and reducing the feature set used

@alamb
alamb merged commit 8d97330 into apache:mainNov 27, 2023
@alamb

Copy link
Copy Markdown
Contributor

Thanks again @serprex and @tobyhede

serprex added a commit to PeerDB-io/sqlparser-rs that referenced this pull request Dec 3, 2023
serprex added a commit to PeerDB-io/sqlparser-rs that referenced this pull request Dec 11, 2023
Merge 0.40 + apache/datafusion-sqlparser-rs#1040
Upstream implemented END parsing as COMMIT on postgresql: apache/datafusion-sqlparser-rs#1035 allowing some convergence
Sign up for freeto 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.

4 participants

@serprex@tobyhede@alamb@coveralls