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

Recent Unreleased Revisions of rules_swift cause transitive compilation errors in rules_swift_package_manager dependencies #1091

Open
ed-irl opened this issue May 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ed-irl
Copy link

ed-irl commented May 29, 2024

See bazelbuild/rules_swift#1210.

I have a repro of the issue 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.

@cgrindel cgrindel added the bug Something isn't working label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants