griffinbank / griffinbank/rules_clojure
Feedback on the example
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 60
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Hello rules_clojure - I appreciate the thought and effort that went into these rules!
I have been upgrading a project that previously used https://github.com/simuons/rules_clojure.
The example in the examples directory is incomplete so it took me a while to get something running.
- With bazel 5.4.1 I was unable to run anything from the example directory - for example
$ cd examples/setup/default/
$ bazel build //...
INFO: Repository remote_java_tools instantiated at:
/DEFAULT.WORKSPACE.SUFFIX:392:6: in <toplevel>
/private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
Repository rule http_archive defined at:
/private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
INFO: Repository rules_jvm_external instantiated at:
/Users/humphrej/work/rules_clojure/examples/setup/default/WORKSPACE:15:19: in <toplevel>
/private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/rules_clojure/repositories.bzl:15:10: in rules_clojure_deps
/private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
Repository rule http_archive defined at:
/private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
ERROR: /private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/rules_clojure/src/rules_clojure/BUILD:7:12: error loading package '@rules_clojure_maven_deps//': Unable to find package for @bazel_skylib//:bzl_library.bzl: The repository '@bazel_skylib' could not be resolved: Repository '@bazel_skylib' is not defined. and referenced by '@rules_clojure//src/rules_clojure:bootstrap-deps'
ERROR: /private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/rules_clojure/src/rules_clojure/BUILD:7:12: error loading package '@rules_clojure_maven_deps//': Unable to find package for @bazel_skylib//:bzl_library.bzl: The repository '@bazel_skylib' could not be resolved: Repository '@bazel_skylib' is not defined. and referenced by '@rules_clojure//src/rules_clojure:bootstrap-deps'
ERROR: /private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/rules_clojure/src/rules_clojure/BUILD:7:12: error loading package '@rules_clojure_maven_deps//': Unable to find package for @bazel_skylib//:bzl_library.bzl: The repository '@bazel_skylib' could not be resolved: Repository '@bazel_skylib' is not defined. and referenced by '@rules_clojure//src/rules_clojure:bootstrap-deps'
ERROR: /private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/rules_clojure/src/rules_clojure/BUILD:7:12: error loading package '@rules_clojure_maven_deps//': Unable to find package for @bazel_skylib//:bzl_library.bzl: The repository '@bazel_skylib' could not be resolved: Repository '@bazel_skylib' is not defined. and referenced by '@rules_clojure//src/rules_clojure:bootstrap-deps'
ERROR: /private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/rules_clojure/src/rules_clojure/BUILD:7:12: error loading package '@rules_clojure_maven_deps//': Unable to find package for @bazel_skylib//:bzl_library.bzl: The repository '@bazel_skylib' could not be resolved: Repository '@bazel_skylib' is not defined. and referenced by '@rules_clojure//src/rules_clojure:bootstrap-deps'
ERROR: /private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/rules_clojure/src/rules_clojure/BUILD:7:12: error loading package '@rules_clojure_maven_deps//': Unable to find package for @bazel_skylib//:bzl_library.bzl: The repository '@bazel_skylib' could not be resolved: Repository '@bazel_skylib' is not defined. and referenced by '@rules_clojure//src/rules_clojure:bootstrap-deps'
ERROR: /private/var/tmp/_bazel_humphrej/4be210efea4e002768ca9c7a24014711/external/rules_clojure/src/rules_clojure/BUILD:7:12: error loading package '@rules_clojure_maven_deps//': Unable to find package for @bazel_skylib//:bzl_library.bzl: The repository '@bazel_skylib' could not be resolved: Repository '@bazel_skylib' is not defined. and referenced by '@rules_clojure//src/rules_clojure:bootstrap-deps'
ERROR: Analysis of target '//:example' failed; build aborted:
INFO: Elapsed time: 0.690s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (35 packages loaded, 337 targets configured)
currently loading: @rules_clojure_maven_deps//
Fetching @local_config_cc; fetching
- I created a standalone project where I had more success
https://github.com/humphrej/rules_clojure_example - I wasn't able to get it working as per the example where the WORKSPACE+BUILD+example.clj are all in the top level folder.
- With a folder underneath the WORKSPACE and using
resource_strip_prefixit worked fine - Other gotchas not present in the original example:
aotis mandatory- clojure dependencies need to be specified explicitly
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in examples/setup/default/ by reading WORKSPACE, BUILD, and example.clj, then run bazel build //... with Bazel 5.4.1 to reproduce the reported failure. Compare the standalone rules_clojure_example project, including its resource_strip_prefix, aot, and explicit dependency setup; done means the repository example is complete and builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- build-system, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100