Add support for setting defines of declared swift_library#171
Add support for setting defines of declared swift_library#171gferon wants to merge 7 commits intocgrindel:mainfrom
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 |
|
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! |
|
|
||
| spm_repositories( | ||
| name = "swift_pkgs", | ||
| build_mode = "bazel", |
There was a problem hiding this comment.
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_PLATFORMwasn't defined.This patch adds support to adding the output of
manifest.settings.kind["define"]to thedefinesof the generatedswift_library(I usespm_repositoriesinbazelmode).EDIT:
I haven't added support to thethis is obviously not necessary becausespm_swift_librarycounterpart, and I could give it a try if you'd like me to.spmhandles this properly.