Flatpak VSCode: no such module 'Adwaita' #50

Open
opened 2024-09-03 13:27:54 +02:00 by kdwk · 1 comment
kdwk commented 2024-09-03 13:27:54 +02:00 (Migrated from github.com)

Describe the bug

When developing Adwaita Swift apps in VSCode, import Adwaita is flagged as an error with No such module 'Adwaita', and code docs and autocomplete don't work. However, when using flatpak-builder to run the app it compiles and runs successfully.

To Reproduce

  1. Clone the template repository
  2. Open in VSCode (Flatpak)
  3. Any import Adwaita statements are flagged as errors

Expected behavior

Adwaita is imported correctly and code docs and autocomplete work correctly

Additional context

  1. Already installed Swift SDK extension from Flathub
  2. Already set FLATPAK_ENABLE_SDK_EXT=*
  3. dependencies: [ .package(url: "https://github.com/AparokshaUI/Adwaita", from: "0.2.0") ] is already added to Package.swift
  4. Code docs and autocomplete for other Swift code, including standard library functions, work
### Describe the bug When developing Adwaita Swift apps in VSCode, `import Adwaita` is flagged as an error with `No such module 'Adwaita'`, and code docs and autocomplete don't work. However, when using flatpak-builder to run the app it compiles and runs successfully. ### To Reproduce 1. Clone the template repository 2. Open in VSCode (Flatpak) 3. Any `import Adwaita` statements are flagged as errors ### Expected behavior Adwaita is imported correctly and code docs and autocomplete work correctly ### Additional context 1. Already installed Swift SDK extension from Flathub 2. Already set FLATPAK_ENABLE_SDK_EXT=* 3. ` dependencies: [ .package(url: "https://github.com/AparokshaUI/Adwaita", from: "0.2.0") ]` is already added to Package.swift 4. Code docs and autocomplete for other Swift code, including standard library functions, work
david-swift commented 2024-09-04 20:44:23 +02:00 (Migrated from github.com)

I'm a GNOME Builder user myself (it actually works quite well). I set up VS Code today (it might be useful for debugging as GNOME Builder currently isn't great for debugging Swift, so thanks for opening the issue 😸) and I did not face any issues.

I installed VS Code using my system's package manager (not via Flatpak), added the Flatpak and Swift extensions, and it worked. Maybe you could try the version of VS Code installed via your system's package manager instead of Flatpak?

I'm a GNOME Builder user myself (it actually works quite well). I set up VS Code today (it might be useful for debugging as GNOME Builder currently isn't great for debugging Swift, so thanks for opening the issue 😸) and I did not face any issues. I installed VS Code using my system's package manager (not via Flatpak), added the Flatpak and Swift extensions, and it worked. Maybe you could try the version of VS Code installed via your system's package manager instead of Flatpak?
david-swift added the
bug
label 2024-10-07 12:14:56 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: aparoksha/adwaita-swift#50
No description provided.