Unable to use development container in VSCode #8
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: aparoksha/adwaita-template#8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fails with:
Thanks for opening this issue! @stevestreza, do you know what could cause the problem?
Personally, I rarely use VS Code, but when I do, I build using the Flatpak extension, in case you want to try it that way.
Using the Flatpak extension to build and run the app works fine in VSCode, it's the actual development that does not work on any IDE I've tried. Gnome Builder doesn't load any diagnostic and code highlighting (despite this working in normal Swift code), while in VSCode the recommended way to develop, the dev container, results in this error.
I can't reproduce the issue here, a fresh clone and rebuild of the container works fine for me, though I'm on NixOS so who knows how that changes the calculation. This is with v0.376.0 of the Dev Containers extension.
The error looks to be related to how VSCode/podman are setting up the container under the hood. I found reference to basically the same error here (regrettably unanswered). The Dockerfile and devcontainer.json don't appear to do anything that would interfere with those folders.
I would try double checking that VSCode, the Dev Containers extension, any related Docker/Podman extensions, and Docker/Podman themselves are up to date. Otherwise that might be one to file in Microsot/vscode-remote-release.
I added the dev container because NixOS has some quirks with packaging and loading dynamic libraries like those needed for CodeLLDB and the Swift toolchain. If you're able to use Flatpak for development, I'd recommend using that instead.
@kdwk, could you maybe check the line in your Flatpak manifest calling the
swift build
command? Is itswift build -c debug
orswift build -c release
? It should bedebug
for developing andrelease
for publishing, otherwise, autocompletion does not work in GNOME Builder.Also, you should compile using the Swift 5 compiler, as it doesn't work at all with the Swift 6 compiler currently (also when compiling Swift 5 code, but this should be fixed soon). This template is not yet updated to Swift 6, so you probably don't have to change anything.