8000 Draft: Conditional compilation of Package parts by DivineDominion · Pull Request #144 · stackotter/swift-cross-ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Draft: Conditional compilation of Package parts #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

DivineDominion
Copy link
Contributor

I haven't looked into how to detect GTK3, yet. Opening this for discussion after reading #80 -- which failed on my machine before I installed GTK4, for example.

@DivineDominion
Copy link
Contributor Author

So a huge downside of this is that Package.resolved cannot be checked in anymore -- because it'll change on each and every machine. :/

@stackotter
Copy link
Owner

So a huge downside of this is that Package.resolved cannot be checked in anymore -- because it'll change on each and every machine. :/

Yeah that's the reason I removed conditional compilation from the package manifest (I did originally have it).

Another issue was that the detection sometimes failed when people used alternative installation methods for Gtk (making it impossible for them to use GtkBackend even though they have all the required dependencies).

And the issue that finally convinced me to remove conditional compilation was that if someone added GtkBackend as a dependency without gtk installed, they'd get "No such product 'GtkBackend'" instead of "gtk/gtk.h not found", the latter of which I think is more intuitive.


That said, as you've noticed, running swift build or swift test doesn't really work anymore. The former is workable but the latter is pretty annoying. Luckily I recently found a workaround for running swift test without building every single product in the package; swift test --test-product swift-cross-uiPackageTests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0