-
Notifications
You must be signed in to change notification settings - Fork 13
Add support for setting defines of declared swift_library #171
base: main
Are you sure you want to change the base?
Conversation
Thanks for the contribution! What do you think would be a good test for this functionality? |
Good point. I guess I could expand the JSON from https://github.com/cgrindel/rules_spm/blob/main/test/json_test_data.bzl or introduce another one and check that the final target compiles with the right |
Is it possible to add Auth0.swift to the interesting_deps example where it uses a define? |
I just did this, it should be good enough as a test (the extra example wouldn't build without the extra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
To fix the failing CI tests, run |
@cgrindel it should be fine now! |
@gferon I just used GitHub to update your PR with the AsyncMain fix. I hope that this will address the failing CI job. |
@cgrindel I'm not exactly sure which steps I need to take to get CI to pass, could you point me in the right direction? Thanks! |
@@ -38,6 +38,7 @@ load("@cgrindel_rules_spm//spm:defs.bzl", "spm_pkg", "spm_repositories") | |||
|
|||
spm_repositories( | |||
name = "swift_pkgs", | |||
build_mode = "bazel", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, bazel
build mode is not quite ready for primetime. Try removing this. Then, we can chase down any CI issues.
While trying to use Auth0.swift I realized it failed to compile because
WEB_AUTH_PLATFORM
wasn't defined.This patch adds support to adding the output of
manifest.settings.kind["define"]
to thedefines
of the generatedswift_library
(I usespm_repositories
inbazel
mode).EDIT:
I haven't added support to thethis is obviously not necessary becausespm_swift_library
counterpart, and I could give it a try if you'd like me to.spm
handles this properly.