mafintosh / mafintosh/protocol-buffers
Cannot reference type with package name
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 760
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
I have .proto file with following structure:
package A;
message AB
{
…
}
message AC
{
optional A.AB ab_field = 1;
}
Compilation fails if I use message name prefixed with package name.
Error: Could not resolve VoiceProxyProtobuf.AlignInfo
at resolve (XXX/protocol-buffers/compile.js:502:19)
at XXX/protocol-buffers/compile.js:185:14
at Array.map (native)
at compileMessage (XXX/protocol-buffers/compile.js:184:24)
at resolve (XXX/protocol-buffers/compile.js:505:27)
at XXX/protocol-buffers/compile.js:509:12
at Array.map (native)
at module.exports (XXX/protocol-buffers/compile.js:508:62)
at new Messages (XXX/protocol-buffers/index.js:14:5)
at module.exports (XXX/protocol-buffers/index.js:27:10)
Here is complete .proto file:
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 the complete .proto file linked in the issue, then inspect type resolution in compile.js around lines 185 and 502 from the stack trace. Done means a message referenced with its package-qualified name compiles successfully without the reported resolution error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100