mafintosh / mafintosh/protocol-buffers-schema
Error: Unexpected token: "XXX.proto". Expected ";"
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
We do not support `import public` when running `grpc-dynamic-gateway`.
After removing the `public`, it runs without any problem.
```
/home/huan/git/grpc-dynamic-gateway/node_modules/protocol-buffers-schema/parse.js:501
if (tokens[0] !== ';') throw new Error('Unexpected token: ' + tokens[0] + '. Expected ";"')
^
Error: Unexpected token: "puppet/base.proto". Expected ";"
```
Related issue: https://github.com/grpc-ecosystem/grpc-gateway/issues/139
Link to https://github.com/konsumer/grpc-dynamic-gateway/issues/50
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with a schema containing `import public`, using the parser location shown in `node_modules/protocol-buffers-schema/parse.js` around line 501 as the starting point. Trace how import statements are parsed and verify that the reported `puppet/base.proto` example is accepted without breaking regular imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100