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

Bootstrap failed: 1:34: expected ']', found 16 (and 4 more errors) #355

Open
Anon5710 opened this issue Nov 30, 2021 · 2 comments
Open

Bootstrap failed: 1:34: expected ']', found 16 (and 4 more errors) #355

Anon5710 opened this issue Nov 30, 2021 · 2 comments

Comments

@Anon5710
Copy link

When trying to generate the marshal/unmarshall structs for any file in my project.
This error keeps popping up : "Bootstrap failed: 1:34: expected ']', found 16 (and 4 more errors)"

Any idea what is causing this?
Is there a way to show more debug output ?

@Anon5710
Copy link
Author

Anon5710 commented Dec 1, 2021

I was able to get the parsing to work when I separated out the code we want to improve. It's showing a 134x speed increase when unmarshaling a big struct we use. ( wow ... )

Unfortunately, when trying to run the parsing against the full source code I still run into the issue above. I'm adding more trace code into the app now, I'll update when I have more information.

@Anon5710
Copy link
Author

Anon5710 commented Dec 2, 2021

So, I'm guessing when the parser loads my project files, it also executes the Init() function in one of my packages.
This init function is printing something to std:out, which in turn seems to mess up the temp files leaving it as invalid go-code. Wich causes failures down the line.

Removing the trace from my Init() function solved the issue.

  1. It looks like easyjson passes around std:out to generate this file. It seems weird to do that, is there a good reason why easyjson doesn't use a file?

  2. I spend almost a day finding this issue, the error message should be improved. If the issue is not solved, at least a big warning should be placed in the readme to warn new users to this issue.

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

No branches or pull requests

1 participant