-
Notifications
You must be signed in to change notification settings - Fork 38
feat: Adds a test case for using swift-build #1562
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
base: main
Are you sure you want to change the base?
feat: Adds a test case for using swift-build #1562
Conversation
This new test should be able to build the example project added, it cannot right now due to errors in rspm around bundle accessors Signed-off-by: Maxwell Elliott <[email protected]>
22aaa8d
to
9b26969
Compare
Signed-off-by: Maxwell Elliott <[email protected]>
Signed-off-by: Maxwell Elliott <[email protected]>
Signed-off-by: Maxwell Elliott <[email protected]>
Signed-off-by: Maxwell Elliott <[email protected]>
Signed-off-by: Maxwell Elliott <[email protected]>
This an unusual example. This is the error that I see: INFO: Running command line: bazel-bin/external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_build/swbuild.rspm build /Users/chuck/code/cgrindel/rules_swift_package_manager/maxwell_pr/examples/swift_build_example/swift-build-app/swift-build-app.xcodeproj --target swift-build-app
Error communicating with the build service: cannot determine build service executable URL The command in the "${bazel}" run @swiftpkg_swift_build//:swbuild -- build \
"${script_dir}/swift-build-app/swift-build-app.xcodeproj" \
--target swift-build-app The Bazel build appears to complete successfully. The failure is in the Xcode project build. I do not see any errors related to bundle accessors. As far as I can tell, |
Signed-off-by: Maxwell Elliott <[email protected]>
I just pushed up d49ceb7 it should show the direct error in RSPM |
The build graph sees a dependency between the # Dependency path from :swbuild.rspm to the missing resource bundle.
$ bazel query 'somepath(@swiftpkg_swift_build//:swbuild.rspm, @swiftpkg_swift_build//:SWBUniversalPlatform.rspm_resource_bundle)'
@swiftpkg_swift_build//:swbuild.rspm
@swiftpkg_swift_build//:SWBBuildServiceBundle.rspm
@swiftpkg_swift_build//:SWBBuildService.rspm
@swiftpkg_swift_build//:SWBUniversalPlatform.rspm
@swiftpkg_swift_build//:SWBUniversalPlatform.rspm_resource_bundle When I look in the runfiles for $ tree /private/var/tmp/_bazel_chuck/bfccfcc5f9ede9c9f6099415961273c1/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_build/swbuild.rspm.runfiles
/private/var/tmp/_bazel_chuck/bfccfcc5f9ede9c9f6099415961273c1/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_build/swbuild.rspm.runfiles
├── MANIFEST
├── _main
│ └── external
│ └── rules_swift_package_manager~~swift_deps~swiftpkg_swift_build
│ ├── SWBBuildServiceBundle.rspm -> /private/var/tmp/_bazel_chuck/bfccfcc5f9ede9c9f6099415961273c1/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_build/SWBBuildServiceBundle.rspm
│ └── swbuild.rspm -> /private/var/tmp/_bazel_chuck/bfccfcc5f9ede9c9f6099415961273c1/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_build/swbuild.rspm
├── _repo_mapping -> /private/var/tmp/_bazel_chuck/bfccfcc5f9ede9c9f6099415961273c1/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_build/swbuild.rspm.repo_mapping
└── rules_swift_package_manager~~swift_deps~swiftpkg_swift_build
├── SWBBuildServiceBundle.rspm -> /private/var/tmp/_bazel_chuck/bfccfcc5f9ede9c9f6099415961273c1/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_build/SWBBuildServiceBundle.rspm
└── swbuild.rspm -> /private/var/tmp/_bazel_chuck/bfccfcc5f9ede9c9f6099415961273c1/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_build/swbuild.rspm It looks like the runtime dependencies (e.g., I suspect that the underlying issue is related to the fact that I have a few suggestions for how to move forward:
If using a I hope that this helps. Let me know what you find. cc: @luispadron @brentleyjones If they have any insights or suggestions for how to proceed. |
Signed-off-by: Maxwell Elliott <[email protected]>
So Ill have to go into rules_swift to figure this out. Thanks for the detailed reply |
This reverts commit 92e47dd.
@cgrindel I added a test here, it does look like those transitive runfiles are being pulled in bazelbuild/rules_swift#1507 Are you thinking of another scenario we need coverage for? |
When I looked in the runfiles for the target, I did not see the transitive resource bundles. |
So add yet another layer to this test and make sure that layer's data files also are brought into the swift_binary |
This new test should be able to build the example project added.
it cannot right now due to errors in rspm around bundle accessors