zxh0 / vscode-proto3

vscode extension for proto3
MIT License
327 stars 75 forks source link

Can not compile protos on windows #3

Open rogeralsing opened 8 years ago

rogeralsing commented 8 years ago

I'm not sure if this is a windows issue or a general bug. Bug I can't compile my protos using the "proto3: Compile this proto" and there is no output anywhere so it's hard to say what is wrong.

These are my settings

    "protoc": {
        "path": "C:\\proto\\protoc.exe",
        "options": [
            "--gofast_out=plugins=grpc:.",
            "--proto_path=.",
            "--proto_path=c:\\projects\\src"
        ]
    }

and this works from cmd line:

protoc --gofast_out=plugins=grpc:. --proto_path=. --proto_path=c:\projects\src messages.proto

zxh0 commented 8 years ago

Hi, thank you for the feedback.

Maybe you didn't have an active proto document when you execute 'proto3: Compile this proto' command? Sorry for this problem.

Buy the way, could you trigger the syntax check when you save proto file (write some bad syntax, save the proto file, and to see if there are wavy lines) ? If syntax check works, this command should also work.

rogeralsing commented 8 years ago

The wavy lines works, i just tested it.

The main issue IMO is that there is no place to see the output so it becomes impossible to see if the issue is that some path or something can't be resolved.

The Protos do build fine in command line, and neither the "compile this" or "compile all" works for me, nothing happens

rogeralsing commented 8 years ago

Any progress on this?

It is unclear how windows paths should be escaped user settings:

{
    "editor.fontFamily": "Fira Code Retina",
    "editor.fontSize": 16,
    "editor.fontWeight":"400",
    "editor.fontLigatures": true,
    "protoc": {
        "path": "c:/proto/protoc.exe",
        "options": [
            "--gogoslick_out=plugins=grpc:.",
            "-I=.",
            "-I=c:/projects/src"
        ]
    }
}

I have tried many permutations and I'm still unable to get this to work. It looks like the plugin is using some default settings, as it do find errors etc. but it cannot find my imported protos

zxh0 commented 8 years ago

i will try my best to make some progress this weekend :)

zxh0 commented 8 years ago

hi, not sure but i guess the problem is caused by the gogoslick_out option. i will do more investigation tomorrow.

rogeralsing commented 8 years ago

I have tried with others like --gofast_out also.

rogeralsing commented 7 years ago

Slight slight progress on this one. At least the new version returns an error message "missing output directives" Not quite sure what that actually means. but it's not completely silent as it was before

zxh0 commented 7 years ago

Really sorry for the slow response. I think the problem is that this extension can not work well with protobuf-golang-plugin. I will investigate more when I get some time.

rc452860 commented 5 years ago

This problem seems to have not been fixed.

lesomnus commented 5 years ago

still not working

nealwon commented 5 years ago

image

not working too!

zxh0 commented 5 years ago

I am sorry guys. I have no windows machine & time budget for now. I will try to solve this problem when I get some time.

nealwon commented 5 years ago

My system is OSX 10.14.3

AdallomRoy commented 3 years ago

Not working also on Linux, same error "missing output directives"

ragvri commented 3 years ago

Same on macos. I am unable to make this work. I also get "could not import work/services/product/proto (no required module provides package "work/services/product/proto")compiler" when trying to import the proto in golang.

imloama commented 1 year ago

Working for me on Windows 10 environment PATH include protoc

settings

    "protoc": {
        "options": [
            "--proto_path=${workspaceRoot}",
            "--go_out=."
        ],
        "path": "protoc"
    }
syntax = "proto3";
package pb;

option go_package = "/pb";
message User {
int32 id = 1;
string name = 2;
}
zs-dima commented 1 year ago

+1