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

fix(parser): switch from &[u8] to &str based stream #351

Merged
merged 1 commit into from
May 24, 2024

Conversation

martinohmann
Copy link
Owner

Fixes #350

This fixes an unsoundness around handling of UTF-8 identifiers in the parser at the expense of decreasing the performance by around 20-30%.

I may switch back to a &[u8] based stream once I figured out how to handle UTF-8 identifiers with it safely without adding a truck load of complexity, but for now correctness is more important than performance.

Fixes #350

This fixes an unsoundness around handling of UTF-8 identifiers in the
parser at the expense of decreasing the performance by around 20-30%.

I may switch back to a `&[u8]` based stream once I figured out how to
handle UTF-8 identifiers with it safely without adding a truck load of
complexity, but for now correctness is more important than performance.
@martinohmann martinohmann merged commit c975e96 into main May 24, 2024
5 checks passed
@martinohmann martinohmann deleted the hcl-edit/str-based-stream branch May 24, 2024 18:55
This was referenced May 24, 2024
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.

HCL Parsing fails on valid UTF-8 identifier
1 participant