Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

SPM packages that include the DocC output in repo fail to build #163

Open
amonshiz opened this issue Jul 22, 2022 · 1 comment
Open

SPM packages that include the DocC output in repo fail to build #163

amonshiz opened this issue Jul 22, 2022 · 1 comment

Comments

@amonshiz
Copy link

I am trying to use https://github.com/b3ll/Motion in a Bazel project and we are using rules_spm. However, Motion includes a doc directory with the outputs of DocC which will name files based on function names. This means that files will have : within them. Example: https://github.com/b3ll/Motion/blob/main/docs/data/documentation/motion/animation/stop(resolveimmediately:postvaluechanged:).json

Unfortunately the :all_srcs target in rules_spm has srcs = glob([**]) which ends up including these JSON files. And that causes the build to fail:

ERROR: /private/var/tmp/_bazel_amonshiz/ca4217c5c6bfda9c1ca9031d2ae3cca8/external/swift_pkgs/BUILD.bazel:12:10: @swift_pkgs//:all_srcs: invalid label 'spm_build/checkouts/Motion/docs/data/documentation/motion/animation/stop(resolveimmediately:postvaluechanged:).json' in element 336 of attribute 'srcs' in 'filegroup' rule: invalid target name 'spm_build/checkouts/Motion/docs/data/documentation/motion/animation/stop(resolveimmediately:postvaluechanged:).json': target names may not contain ':'
ERROR: Evaluation of query "@swift_pkgs//:all_srcs" failed due to BUILD file errors
Loading: 0 packages loaded

I don't yet have a great answer off the top of my head except for maybe a way to provide custom srcs or even an exclude_dirs?

@cgrindel
Copy link
Owner

Sorry for the delay. I haven't had a chance to look into this, yet. I hope to be able to spend some time on rules_spm issues in August.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants