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

parser panics instead of returning an error #284

Closed
theKlisha opened this issue Aug 16, 2023 · 3 comments · Fixed by #285 or #286
Closed

parser panics instead of returning an error #284

theKlisha opened this issue Aug 16, 2023 · 3 comments · Fixed by #285 or #286
Labels
bug Something isn't working

Comments

@theKlisha
Copy link

theKlisha commented Aug 16, 2023

Provided code snippet causes panic.

let str = r#"
  locals {
    test = {
      a = b// this comment breaks the parser
      c = d // but this one doesn't
    }
  }
"#;

let _: Result<hcl::Body, _> = hcl::from_str(str);

tested on version 0.16.3

@martinohmann martinohmann added the bug Something isn't working label Aug 23, 2023
@martinohmann
Copy link
Owner

martinohmann commented Aug 23, 2023

Hi there!

Thanks for the bug report and the reproducer.

I'm trying to get this fixed with the next release but it may take a couple of days since i just moved to a new home and still need to unpack stuff in order to set up my workspace again 😉.

@martinohmann
Copy link
Owner

@theKlisha Got to it earlier than expected. I just released the fix as 0.16.4.

@theKlisha
Copy link
Author

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants