-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: follow symlinks when searching for xcframework directories #983
fix: follow symlinks when searching for xcframework directories #983
Conversation
Curious. What was the situation that instigated this change? |
@cgrindel One of our third party dependencies is laid out with a symlink at the root to an XCFramework that's in its own directory. The Similar to this: https://github.com/jflan-dd/symlink_framework Without this change this code wasn't following the symlink to find the |
What do you think about adding that Swift package to one of the examples? This will ensure the code change works and it continues to work. |
@cgrindel I'm very new to Bazel and don't have a good understanding of how the tests are setup in this repository. I've added an example with an empty XCFramework behind a symlink, but I don't know how to add a test to make sure it can build or make sure it runs with the other tests. Could you provide some guidance? |
@jflan-dd I think we want this example to have a local Swift package that includes the symlinked framework and then some code that uses the Swift package in some way. Here is my suggestion:
How does that sound? |
One last thing, once you are able to run
|
@cgrindel Thanks for the guidance! I've added a test and validated locally that the test fails without the change to follow symlinks. |
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.
Overall, LGTM. Just a question about tidy and the example.
9ebd238
to
3d46cb0
Compare
@cgrindel are there any other changes/additions you're looking for? |
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.
LGTM. Thanks!
…#304) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | rules_swift_package_manager | bazel_dep | minor | `0.29.2` -> `0.30.0` | | [rules_swift_package_manager](https://github.com/cgrindel/rules_swift_package_manager) | http_archive | minor | `v0.29.2` -> `v0.30.0` | --- ### Release Notes <details> <summary>cgrindel/rules_swift_package_manager (rules_swift_package_manager)</summary> ### [`v0.30.0`](https://github.com/cgrindel/rules_swift_package_manager/releases/tag/v0.30.0) [Compare Source](https://github.com/cgrindel/rules_swift_package_manager/compare/v0.29.2...v0.30.0) #### What's Changed - chore(deps): update dependency vapor/vapor to v4.92.6 by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1000 - chore(deps): update dependency quick/nimble to from: "13.3.0" by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1001 - chore(deps): update dependency rules_xcodeproj to v2.1.0 by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1003 - chore(deps): update dependency rules_xcodeproj to v2.1.1 by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1006 - chore(deps): update dependency firebase/firebase-ios-sdk to from: "10.24.0" by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1007 - chore(deps): update dependency rules_apple to v3.5.1 by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1005 - chore(deps): update dependency nicklockwood/swiftformat to from: "0.53.6" by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1008 - chore(deps): update dependency stripe-ios to v23.27.0 by [@​jpsim](https://github.com/jpsim) in [cgrindel/rules_swift_package_manager#1009 - chore(deps): update dependency shakebugs/shake-ios to from: "16.2.4" by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1011 - chore: update README.md for v0.29.2 by [@​cgrindel-app-token-generator](https://github.com/cgrindel-app-token-generator) in [cgrindel/rules_swift_package_manager#1004 - chore(deps): update dependency protobuf to v26 by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1013 - chore(deps): update dependency nicklockwood/swiftformat to from: "0.53.7" by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1014 - chore(deps): update dependency rules_xcodeproj to v2.2.0 by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1015 - chore(deps): update dependency airbnb/lottie-spm to from: "4.4.3" by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1017 - chore(deps): update dependency ashleymills/reachability.swift to from: "5.2.2" by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1018 - feat: Implement support for new swift_proto_library rule by [@​AttilaTheFun](https://github.com/AttilaTheFun) in [cgrindel/rules_swift_package_manager#834 - chore(deps): update dependency rules_apple to v3.5.1 by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1024 - chore(deps): update dependency pointfreeco/swift-composable-architecture to from: "1.9.3" by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1020 - chore(deps): update dependency vapor/vapor to v4.93.0 by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1022 - chore(deps): update dependency protobuf to v26 by [@​cgrindel-self-hosted-renovate](https://github.com/cgrindel-self-hosted-renovate) in [cgrindel/rules_swift_package_manager#1025 - fix: follow symlinks when searching for xcframework directories by [@​jflan-dd](https://github.com/jflan-dd) in [cgrindel/rules_swift_package_manager#983 **Full Changelog**: cgrindel/rules_swift_package_manager@v0.29.2...v0.30.0 #### Bazel Module Snippet ```python bazel_dep(name = "rules_swift_package_manager", version = "0.30.0") ``` #### Workspace Snippet ```python load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_swift_package_manager", sha256 = "28d33f5f2898f660acafb250b266d7ea1f059bcb9c473838ef9c2431374af150", urls = [ "https://github.com/cgrindel/rules_swift_package_manager/releases/download/v0.30.0/rules_swift_package_manager.v0.30.0.tar.gz", ], ) load("@​rules_swift_package_manager//:deps.bzl", "swift_bazel_dependencies") swift_bazel_dependencies() load("@​cgrindel_bazel_starlib//:deps.bzl", "bazel_starlib_dependencies") bazel_starlib_dependencies() ### MARK: - Gazelle ### gazelle:repo bazel_gazelle load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies") load("@​rules_swift_package_manager//:go_deps.bzl", "swift_bazel_go_dependencies") load("@​io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") ### Declare Go dependencies before calling go_rules_dependencies. swift_bazel_go_dependencies() go_rules_dependencies() go_register_toolchains(version = "1.21.1") gazelle_dependencies() ### MARK: - Swift Toolchain http_archive( name = "build_bazel_rules_swift", ### Populate with your preferred release ### https://github.com/bazelbuild/rules_swift/releases ) load( "@​build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) load("//:swift_deps.bzl", "swift_dependencies") ### gazelle:repository_macro swift_deps.bzl%swift_dependencies swift_dependencies() swift_rules_dependencies() load( "@​build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() ``` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/bazel-contrib/rules_bazel_integration_test). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
One of the packages we depend on puts its XCFramework behind a symlink for some reason. Without this change rspm doesn't follow the symlink to find the contents of the actual framework.
mimic behavior of _list_files_under