generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
chore(deps): Migrate to bzl mod dependencies #61
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1 @@ | ||
6.3.2 | ||
# The first line of this file is used by Bazelisk and Bazel to be sure | ||
# the right version of Bazel is used to build and test this repo. | ||
# This also defines which version is used on CI. | ||
# | ||
# Note that you should also run integration_tests against other Bazel | ||
# versions you support. | ||
7.1.0 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ bazel-* | |
.idea/ | ||
.ijwb/ | ||
node_modules | ||
MODULE.bazel.lock | ||
e2e/workspace/MODULE.bazel.lock |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
"aspect-build/rules_cypress" | ||
|
||
module( | ||
name = "aspect_rules_cypress", | ||
version = "0.0.0", | ||
compatibility_level = 1, | ||
) | ||
|
||
cypress = use_extension("//cypress:extensions.bzl", "cypress") | ||
cypress.toolchain(cypress_version = "12.3.0") | ||
use_repo(cypress, "cypress_toolchains") | ||
|
||
register_toolchains("@cypress_toolchains//:all") | ||
|
||
bazel_dep(name = "platforms", version = "0.0.5") | ||
bazel_dep(name = "aspect_rules_js", version = "1.38.0") | ||
bazel_dep(name = "rules_nodejs", version = "5.8.2") | ||
|
||
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") | ||
node.toolchain(node_version = "16.14.2") | ||
################################# | ||
|
||
bazel_dep(name = "rules_go", version = "0.39.1", dev_dependency = True, repo_name = "io_bazel_rules_go") | ||
bazel_dep(name = "gazelle", version = "0.31.0", dev_dependency = True, repo_name = "bazel_gazelle") | ||
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc") | ||
|
||
bazel_dep(name = "aspect_bazel_lib", version = "2.5.3") | ||
bazel_dep(name = "bazel_skylib", version = "1.5.0") | ||
|
||
bazel_dep( | ||
name = "buildifier_prebuilt", | ||
version = "6.4.0", | ||
dev_dependency = True, | ||
) | ||
|
||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
# To update CHROME_REVISION, use the below script | ||
# | ||
# LASTCHANGE_URL="https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2FLAST_CHANGE?alt=media" | ||
# CHROME_REVISION=$(curl -s -S $LASTCHANGE_URL) | ||
# echo "latest CHROME_REVISION_LINUX is $CHROME_REVISION" | ||
CHROME_REVISION_LINUX = "1072361" | ||
|
||
http_archive( | ||
name = "chrome_linux", | ||
build_file_content = """filegroup( | ||
name = "all", | ||
srcs = glob(["**"]), | ||
visibility = ["//visibility:public"], | ||
)""", | ||
dev_dependency = True, | ||
sha256 = "0df22f743facd1e090eff9b7f8d8bdc293fb4dc31ce9156d2ef19b515974a72b", | ||
strip_prefix = "chrome-linux", | ||
urls = [ | ||
"https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F" + CHROME_REVISION_LINUX + "%2Fchrome-linux.zip?alt=media", | ||
], | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,2 @@ | ||
# Declare the local Bazel workspace. | ||
workspace(name = "aspect_rules_cypress") | ||
|
||
load(":internal_deps.bzl", "rules_cypress_internal_deps") | ||
|
||
# Fetch deps needed only locally for development | ||
rules_cypress_internal_deps() | ||
|
||
load("@aspect_rules_cypress//cypress:dependencies.bzl", "rules_cypress_dependencies") | ||
|
||
# Fetch dependencies which users need as well | ||
rules_cypress_dependencies() | ||
|
||
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") | ||
|
||
aspect_bazel_lib_dependencies(override_local_config_platform = True) | ||
|
||
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains") | ||
|
||
nodejs_register_toolchains( | ||
name = "nodejs", | ||
node_version = DEFAULT_NODE_VERSION, | ||
) | ||
|
||
load("@aspect_rules_cypress//cypress:repositories.bzl", "cypress_register_toolchains") | ||
|
||
cypress_register_toolchains( | ||
name = "cypress", | ||
cypress_version = "12.3.0", | ||
) | ||
|
||
# For running our own unit tests | ||
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") | ||
|
||
bazel_skylib_workspace() | ||
|
||
# Buildifier | ||
load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps") | ||
|
||
buildifier_prebuilt_deps() | ||
|
||
load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains") | ||
|
||
buildifier_prebuilt_register_toolchains() |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"extensions for bzlmod" | ||
|
||
load("@aspect_rules_cypress//cypress:repositories.bzl", "cypress_register_toolchains") | ||
|
||
def _toolchain_extension(module_ctx): | ||
for mod in module_ctx.modules: | ||
for toolchain in mod.tags.toolchain: | ||
cypress_register_toolchains( | ||
name = toolchain.name, | ||
cypress_version = toolchain.cypress_version, | ||
register = False, | ||
) | ||
|
||
cypress = module_extension( | ||
implementation = _toolchain_extension, | ||
tag_classes = { | ||
"toolchain": tag_class(attrs = { | ||
"name": attr.string( | ||
doc = "Base name for generated repositories", | ||
default = "cypress", | ||
), | ||
"cypress_version": attr.string( | ||
doc = "Version of cypress to download", | ||
), | ||
}), | ||
}, | ||
) |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these caused by bzlmod using a newer version of
aspect_bazel_lib
then what we had declared in WORKSPACE? Now bzlmod takes the latest declared dep instead of the first declared...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, you nailed it