-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
go.toolsEnvVars does not substitute env variables #2680
Comments
This would be a really neat feature. I usually have CGO disabled, but require CGO for some tools (as saprfc), where I require to set CGO_LDFLAGS and CGO_CFLAGS, which would be neat if it could be handled via the env war which is required anyway - Thus, the checked in .vscode/settings.json would be standardized for all developers and wouldn't require to have the lib installed in either the same dir or devs to create their own. |
I think this is a regression, rather than a feature request. The change for #413 (https://golang.org/cl/246958) looks like it claims to support |
@ian-h-chamberlain thanks for the hint - that's a good catch, I've read the linked report and it seems to cover the same issue. Fact is, with golang 1.20.1 and the latest vscode (stable) I'm having this exact issue. So either it was not fixed completely or it's indeed a regression. I just tested it again, with using fixed pathes instead of the environment variables it works perfectly well, using the env variables it fails to compile gorfc due to missing libraries. I need to delete the compiled gorfc libs though between trying, since if gorfc was compiled once it seems vscode recognizes this (probably because we do find a precompiled binary for the library, it just complains then not finding the saprfc.h file (which is yet another env var), but that's out of my depth knowing how this works to be true, I didn't try to get in the code deeper yet and would not know where to start. And I am not really very fond of javascript :D .. so that could be an issue since my knowledge there is very limited. If I can help debugging this I'd be happy to do so though. |
It's not a regression - it looks like this was never implemented. I see the CL description of cl/246958) is confusing, but the fix for #413 is to support only a small set of known variables such as We are looking into a way to consolidate and handle across the extension consistently. |
Change https://go.dev/cl/534980 mentions this issue: |
Type: Bug
My settings.json has:
and with this I get the following errors:
If I replace the environment variable with actual values like below:
the installation of tools succeed:
Extension version: 0.37.1
VS Code version: Code 1.75.1 (441438abd1ac652551dbe4d408dfcec8a499b8bf, 2023-02-08T21:32:34.589Z)
OS version: Windows_NT x64 10.0.19042
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.15.0-1027-gcp
Remote OS version: Linux x64 5.15.0-1027-gcp
Remote OS version: Linux x64 5.15.0-1027-gcp
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: