Skip to content

Make WrapperVisitor even more unholy but somehow better#195

Merged
sunshowers merged 5 commits into
mainfrom
sunshowers/spr/make-wrappervisitor-even-more-unholy-but-somehow-better
Aug 8, 2024
Merged

Make WrapperVisitor even more unholy but somehow better#195
sunshowers merged 5 commits into
mainfrom
sunshowers/spr/make-wrappervisitor-even-more-unholy-but-somehow-better

Conversation

@sunshowers

@sunshowers sunshowers commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

I discovered while trying to use ParseWrapper that we were losing span
information, due to the serialize/deserialize roundtrip. Here's this
alternative "solution" that addresses this using a thread-local.

Test included, and also checked that it works great in Dropshot.

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Comment thread Cargo.toml
@sunshowers sunshowers requested a review from ahl July 24, 2024 03:19
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
@sunshowers

sunshowers commented Jul 24, 2024

Copy link
Copy Markdown
Contributor Author

BTW I've just used an empty slice as a sentinel value. Since we can never really have bytes in this situation, we can pass in arbitrary commands this way. Neat.

Comment thread src/ibidem.rs

@ahl ahl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good; couple of comment suggestions

Comment thread Cargo.toml
Comment thread src/ibidem.rs Outdated
Comment thread src/ibidem.rs Outdated
Comment thread src/ibidem.rs Outdated
Comment thread src/ibidem.rs
Comment thread src/ibidem.rs
Comment thread tests/ui/bad_parse_wrapper.stderr
Created using spr 1.3.6-beta.1
@sunshowers sunshowers merged commit b98921e into main Aug 8, 2024
@sunshowers sunshowers deleted the sunshowers/spr/make-wrappervisitor-even-more-unholy-but-somehow-better branch August 8, 2024 21:58
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.

2 participants