devpod
devpod copied to clipboard
Plain `.devcontainer.json` contains empty `build` key
What happened?
For a simple Javascript project like https://github.com/luebken/hello-nodejs the built-in language detection creates the following .devcontainer.json
:
{"image":"mcr.microsoft.com/devcontainers/javascript-node","build":{}}
When opening the code the following warning is shown VSCode:
Property build is not allowed.
What did you expect to happen instead?
I expect .devcontainer.json
to only contain the image key, so no warning is shown.
How can we reproduce the bug? (as minimally and precisely as possible)
- clone https://github.com/luebken/hello-nodejs
-
devpod up .
- open vscode > View > Problems
Local Environment:
- DevPod Version: v0.1.9
- Operating System: mac
- ARCH of the OS: ARM64
DevPod Provider:
- Local/remote provider: docker
Anything else we need to know? From my understanding, the issue here is how Go marshals nested structs, which is how the ConfigBuildOptions are defined: https://github.com/loft-sh/devpod/blob/main/pkg/devcontainer/config/config.go#L215
@luebken thanks for creating this issue! You are correct, we should fix this, thanks for the analysis.
should be fixed, not sure why we didn't link the PR #702