Skip to content
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

Rules Swift Package Manager transitive deps no longer compile correctly #1210

Open
ed-irl opened this issue May 29, 2024 · 0 comments
Open

Comments

@ed-irl
Copy link

ed-irl commented May 29, 2024

Hello,
While trying out the fix for #1204 I noticed that my rules_swift_package_manager dependencies no longer compile on recent unreleased revisions of rules_swift. I had previously been compiling with 1.18.0.

I have a repro here: https://github.com/ed-irl/rules_s_p_m_rules_swift_cnio_compile_error_repro

This is the output of running bazel build //:main in the above repo:

Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Analyzing: target //:main (0 packages loaded, 0 targets configured)
Analyzing: target //:main (0 packages loaded, 0 targets configured)
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
INFO: Analyzed target //:main (0 packages loaded, 0 targets configured).
ERROR: /private/var/tmp/_bazel_ekohlwey/b401baf76224645435743afc2f7969c5/external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_nio/BUILD.bazel:205:14: Compiling Swift module @@rules_swift_package_manager~~swift_deps~swiftpkg_swift_nio//:NIOConcurrencyHelpers.rspm failed: (Exit 1): worker failed: error executing SwiftCompile command (from target @@rules_swift_package_manager~~swift_deps~swiftpkg_swift_nio//:NIOConcurrencyHelpers.rspm) bazel-out/darwin_arm64-opt-exec-ST-13d3ddad9198/bin/external/rules_swift~/tools/worker/worker swiftc ... (remaining 1 argument skipped)
error: emit-module command failed with exit code 1 (use -v to see invocation)
external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_nio/Sources/NIOConcurrencyHelpers/NIOAtomic.swift:15:8: error: no such module 'CNIOAtomics'
import CNIOAtomics
       ^
external/rules_swift_package_manager~~swift_deps~swiftpkg_swift_nio/Sources/NIOConcurrencyHelpers/NIOAtomic.swift:15:8: error: no such module 'CNIOAtomics'
import CNIOAtomics
       ^
error: fatalError
Target //:main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.656s, Critical Path: 0.57s
INFO: 5 processes: 5 internal.
ERROR: Build did NOT complete successfully

Confusingly, the dependency itself is able to build correctly, eg. bazel build '@swiftpkg_swift_nio//:NIOConcurrencyHelpers' builds successfully.

I will file a bug on rules_swift_package_manager and cross link here as well.

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

No branches or pull requests

1 participant