Imports are not working
See original GitHub issueHere’s how to reproduce:
create a file date.proto
syntax = "proto3";
message Date {
// Year of date. Must be from 1 to 9999, or 0 if specifying a date without
// a year.
int32 year = 1;
// Month of year. Must be from 1 to 12.
int32 month = 2;
// Day of month. Must be from 1 to 31 and valid for the year and month, or 0
// if specifying a year/month where the day is not significant.
int32 day = 3;
}
create a file foo.proto
syntax = "proto3";
import "date.proto";
message Foo {
Date date = 1;
}
You’ll get an error saying Date is undefined
. Compiling with protoc
itself works though…
I’m creating a course on Protobuf and I’m recommending your plugin, but that error is a roadblock to properly recording the video. Any chance you know how to solve this?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
python - Import not Working - Stack Overflow
Let's say a.py is part of the library, b is the user's program that uses the library, and I wrote the library. If...
Read more >import * as not working · Issue #36983 · angular ... - GitHub
I am using this utils to show configuration and run local test, It is working fine as a standalone (without angular). URL :...
Read more >5. The import system — Python 3.11.1 documentation
Python code in one module gains access to the code in another module by the process of importing it. The import statement is...
Read more >Traps for the Unwary in Python's Import System
I'm using a similar layout described here and using explicit relative imports in my tests, however I'm running into numerous problems when I...
Read more >Auto import | IntelliJ IDEA Documentation - JetBrains
Basic procedures to create and optimize imports in IntelliJ IDEA. Learn more how to import the missing import or XML namespace.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Doing some debugging on vscode 1.31.1 on OSX with vscode-proto3 0.2.2 (
code --inspect-extensions 12345
, and then attaching using chrome debug tools), I can see that when vscode-proto3 gets to here: https://github.com/zxh0/vscode-proto3/blob/7fa48c3f4093b8537705207d99d42f1302620b10/src/proto3Compiler.ts#L71 , all of the paths have been expanded to absolute paths. For example, with:The value of
args
being passed toexecFile
isThis is expected to be the following for protoc 3.6.1 to work:
Running into similar issues. Is there a way of observing what protoc is being called with, and its output?