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

[BUG] ${workspaceFolder}: directory does not exist. #165

Open
zs-dima opened this issue Sep 28, 2023 · 1 comment
Open

[BUG] ${workspaceFolder}: directory does not exist. #165

zs-dima opened this issue Sep 28, 2023 · 1 comment

Comments

@zs-dima
Copy link

zs-dima commented Sep 28, 2023

Usage of ${workspaceFolder} leads to ${workspaceFolder}/proto: warning: directory does not exist.
Windows 11, VSCode 1.83

Without ${workspaceFolder} compile_on_save works well

"protoc": {
        "path": "protoc",
        "compile_on_save": true,
        "options": [
            "-Iproto=c:/service/proto",
            "--proto_path=c:/service/proto",
            "--go_out=paths=source_relative:c:/service/internal/gen/proto",
            "--go-grpc_out=paths=source_relative:c:/service/internal/gen/proto",
            "--grpc-gateway_out=c:/service/internal/gen/proto",
            "--grpc-gateway_opt=paths=source_relative"
        ]
    }

With ${workspaceFolder} compile_on_save generated error 'directory does not exist'

"protoc": {
        "path": "protoc",
        "compile_on_save": true,
        "options": [
            "-Iproto=${workspaceFolder}/proto",
            "--proto_path=c:/service/proto",
            "--go_out=paths=source_relative:c:/service/internal/gen/proto",
            "--go-grpc_out=paths=source_relative:c:/service/internal/gen/proto",
            "--grpc-gateway_out=c:/service/internal/gen/proto",
            "--grpc-gateway_opt=paths=source_relative"
        ]
    }

"compile_all_path": "${workspaceFolder}/proto"
A system error occurred (ENOENT: no such file or directory, scandir '${workspaceFolder}/proto')

@zs-dima
Copy link
Author

zs-dima commented Sep 28, 2023

@zxh0 interesting that pointint to a parent folder '/../' compile_on_save works well
However it does not work for the 'proto_path'

"options": [
            "-Iproto=${workspaceFolder}/../proto",
            "--proto_path=c:/service/proto",
            "--go_out=paths=source_relative:${workspaceFolder}/../internal/gen/proto",
            "--go-grpc_out=paths=source_relative:${workspaceFolder}/../internal/gen/proto",
            "--grpc-gateway_out=${workspaceFolder}/../internal/gen/proto",
            "--grpc-gateway_opt=paths=source_relative"
        ]

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