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

Feedback on the example #33

Open
humphrej opened this issue May 2, 2023 · 0 comments
Open

Feedback on the example #33

humphrej opened this issue May 2, 2023 · 0 comments

Comments

@humphrej
Copy link

humphrej commented May 2, 2023

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_prefix it worked fine
  • Other gotchas not present in the original example:
    • aot is mandatory
    • clojure dependencies need to be specified explicitly
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