chore: declare a dependency on aspect_rules_js#64
Open
ashwin153 wants to merge 1 commit intobenchsci:mainfrom
Open
chore: declare a dependency on aspect_rules_js#64ashwin153 wants to merge 1 commit intobenchsci:mainfrom
ashwin153 wants to merge 1 commit intobenchsci:mainfrom
Conversation
When I try to use `web_assets` with `bzlmod` I get the following error. ``` ERROR: error loading package under directory 'server/storyboard/ui': error loading package 'server/storyboard/ui': at /home/vscode/.cache/bazel/_bazel_vscode/7ad25f9ef7ff83782d7cbcac3c95dbb7/external/com_github_benchsci_rules_nodejs_gazelle+/defs.bzl:8:6: at /home/vscode/.cache/bazel/_bazel_vscode/7ad25f9ef7ff83782d7cbcac3c95dbb7/external/com_github_benchsci_rules_nodejs_gazelle+/internal/web_assets.bzl:6:6: Unable to find package for @@[unknown repo 'aspect_rules_js' requested from @@com_github_benchsci_rules_nodejs_gazelle+]//js:defs.bzl: The repository '@@[unknown repo 'aspect_rules_js' requested from @@com_github_benchsci_rules_nodejs_gazelle+]' could not be resolved: No repository visible as '@aspect_rules_js' from repository '@@com_github_benchsci_rules_nodejs_gazelle+'. ``` I get this error even when I add a dependency on aspect_rules_js to my `MODULE.bazel`. I think the root cause is a missing dependency on `aspect_rules_js` in this module, but I'm not a Bazel expert and might be mistaken. Let me know if this change will fix my problem.
Author
|
@ColinHeathman does this look ok to you? |
|
@ashwin153 your patch solved my issue, thanks! One can override the repo with: bazel_dep(name = "com_github_benchsci_rules_nodejs_gazelle", version = "0.8.1")
archive_override(
# Waiting for the PR to merge: https://github.com/benchsci/rules_nodejs_gazelle/pull/64
module_name = "com_github_benchsci_rules_nodejs_gazelle",
sha256 = "c7aeb7cb2aa8cdf25282a893ddd83e005ab38b7c41759e5ca8049054ff18055d",
strip_prefix = "rules_nodejs_gazelle-e8ef2bb18d4289225f62a63a9e8151308a36b875",
urls = ["https://github.com/ashwin153/rules_nodejs_gazelle/archive/e8ef2bb18d4289225f62a63a9e8151308a36b875.tar.gz"],
)Although it migth be cleaner to apply a local patch using https://bazel.build/rules/lib/globals/module#single_version_override Something like (untested): single_version_override(
module_name = "com_github_benchsci_rules_nodejs_gazelle",
patches=["//some/where/in/the/repo:nodejs_gazelle.patch"],
patch_strip=1,
)Where |
Collaborator
|
hey @ashwin153 is this still an issue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I try to use
web_assetswithbzlmodI get the following error.I get this error even when I add a dependency on aspect_rules_js to my
MODULE.bazel. I think the root cause is a missing dependency onaspect_rules_jsin this module, but I'm not a Bazel expert and might be mistaken. Let me know if this change will fix my problem.