rules_swift_package_manager icon indicating copy to clipboard operation
rules_swift_package_manager copied to clipboard

Unable to build apple/swift-cassandra-client

Open rauhul opened this issue 10 months ago • 7 comments

builds fail with:

$ bazel build @@rules_swift_package_manager++swift_deps+swiftpkg_swift_cassandra_client//:Clibuv.rspm_c
external/rules_swift_package_manager++swift_deps+swiftpkg_swift_cassandra_client/Sources/Clibuv/libuv/src/timer.c:21:10: fatal error: 'uv.h' file not found
   21 | #include "uv.h"

I think this is because swift-cassandra-client uses custom sources paths and excludes which causes rules_swiftpm to skip using <Target>/include has a public_includes path.

rauhul avatar May 15 '25 16:05 rauhul

Do you have a repro that I can look at?

cgrindel avatar May 17 '25 13:05 cgrindel

@cgrindel just put one together here: https://github.com/rauhul/rules_swiftpm-cassandra!

rauhul avatar May 17 '25 15:05 rauhul

FYI. I started looking at this over the weekend, but ran out of time. If not before, I should be able to investigate further over the coming weekend.

cgrindel avatar May 19 '25 15:05 cgrindel

@cgrindel let me know if theres any thing else I can do to help here! I've been really enjoying rule_swiftpm in general :)

rauhul avatar May 29 '25 15:05 rauhul

Sorry for the radio silence. I have been heads down wrapping up a project at my day job. I will try to look at this over the weekend. However, if that doesn't happen, it will be another week or two before I can dig into this as I am on vacation next week.

cgrindel avatar May 29 '25 16:05 cgrindel

For future reference, https://github.com/apple/swift-cassandra-client.

cgrindel avatar Jul 06 '25 19:07 cgrindel

I made some progress trying to update rules_swift_package_manager to support the Cassandra client. I added code that detects the magical include directories even when srcs are specified. I broke some other examples, but I have not investigated those errors yet.

The next blocker for supporting Cassandra is the use of these header files that do not have a typical header extension. I need to think about how we will go about finding these files and making them available. 🤔

cgrindel avatar Jul 06 '25 19:07 cgrindel