Replies: 4 comments 11 replies
-
Thank you so much! This is the solution! I think I'll change the template repository to build for debugging and add instructions here advising to switch to release for publishing. I don't know about the |
Beta Was this translation helpful? Give feedback.
-
you're right @JCWasmx86 - I've checked the version of So I suspect the culprit is swift-format-setup-offline.sh |
Beta Was this translation helpful? Give feedback.
-
great! also fyi - I was just looking into the Builder sources to see what it would take to support Swift as a project template: It seems they have two template plugins at the moment, one is so unless somebody is already looking into it, I will give it a try. My C is a little rusty but I should manage, maybe @JCWasmx86 you could review or help. I see you've already contributed into the builder codebase, which would be a first time for me. |
Beta Was this translation helpful? Give feedback.
-
Okay, so I fixed the auto completion problem in AparokshaUI/AdwaitaTemplate@d046bbc. The swift format problem should be fixed with flathub/org.freedesktop.Sdk.Extension.swift5@branch/23.08...swift-lint-510-1-0 ( One question to @JCWasmx86 now that you're here: is there a reason you built SwiftLint from source instead of using the Linux download (https://github.com/realm/SwiftLint/releases/download/0.55.1/swiftlint_linux.zip)? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all @david-swift congrats on AparokshaUI, it's an amazing piece of work and very well documented. I even found your tutorial pathway explained the "SwiftUI" concepts better than Apples official documentation. Well done 👏
I'm using it on Fedora/40 at the moment and here are a couple of things I found out that others perhaps might find helpful as well. I had the same issues with auto completion as described in #9 and decided to dig deeper as I also didn't quite understand the
flatpak
setup in builder.With the setup described in the tutorial I didn't get proper autocompletion, only parts were working but crucially
import Adwaita
was failing:After a lot of trial and error and fiddling with project settings, I could narrow it down to the fact that
sourcekit-lsp
relies not only on a properly built project for their indices, but also thatswift build
doesn't seem to provide them (fully?) when building withrelease
configuration as specified in the build config in io.github.AparokshaUI.AdwaitaTemplate.jsonAlthough
-c release
makes perfect sense to distribute the project, changing it to-c debug
during development now also let LSP complete the missingAdwaita
package:Another option I found is to open a
New Build Terminal
(ctrl+alt+shift+t) and navigate to the source directory and do a manualswift build
there. One note that you also might night to reopen the project in builder to make it recognize the index. I also tried--enable-index-store
as a build option, but that didn't seem to help.Now with this fixed I still had the remaining issue of the source formatter not working. This should be taken care of by
swift-format
however all I got was:I'm afraid the I only workaround I found for this was with a local install of
swift-format
on my host system. I assume it might have something to do with the LSP and the formatter perhaps running in a different container environment and not having access to the same index files. I initially had a local build from the swift-format repo in conjunction with the fedoraswift-lang
rpm. However the rpm is still at swift 5.8 so in the end I found it much easier to just use homebrew on linux (shudder!) to have both swift 5.10 and swift-format on the host.WIth that setup, even the formatter now work for me in Builder.
Screencast.from.2024-05-16.10-37-56.mp4
The only issue left for me is that hover documentation windows in Builders are extremely fickle and there is no keyboard shortcut yet to open a more permanent view, but that's a problem for all other project types as well, not only Aparoksha...
Beta Was this translation helpful? Give feedback.
All reactions