fix: declare host_platform as non-dev dep (#945)

Fix https://github.com/bazel-contrib/bazel-lib/issues/944
This commit is contained in:
Jason Bedard 2024-09-23 18:43:45 -07:00 committed by GitHub
parent c5f65e8890
commit 1c05cd3224
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 109 additions and 1 deletions

View File

@ -73,7 +73,7 @@ host = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "host", dev_depend
host.host()
use_repo(host, "aspect_bazel_lib_host")
host_platform = use_extension("@platforms//host:extension.bzl", "host_platform", dev_dependency = True)
host_platform = use_extension("@platforms//host:extension.bzl", "host_platform")
use_repo(host_platform, "host_platform")
bazel_dep(name = "aspect_rules_lint", version = "1.0.0-rc10", dev_dependency = True)

1
e2e/api_entries/.bazeliskrc Symbolic link
View File

@ -0,0 +1 @@
../../.bazeliskrc

15
e2e/api_entries/.bazelrc Normal file
View File

@ -0,0 +1,15 @@
# Import Aspect bazelrc presets
try-import %workspace%/../../.aspect/bazelrc/local/bazel7.bazelrc
import %workspace%/../../.aspect/bazelrc/convenience.bazelrc
import %workspace%/../../.aspect/bazelrc/correctness.bazelrc
import %workspace%/../../.aspect/bazelrc/debug.bazelrc
import %workspace%/../../.aspect/bazelrc/javascript.bazelrc
import %workspace%/../../.aspect/bazelrc/performance.bazelrc
### YOUR PROJECT SPECIFIC OPTIONS GO HERE ###
# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`.
# This file should appear in `.gitignore` so that settings are not shared with team members. This
# should be last statement in this config so the user configuration is able to overwrite flags from
# this file. See https://bazel.build/configure/best-practices#bazelrc-file.
try-import %workspace%/../../.aspect/bazelrc/user.bazelrc

View File

@ -0,0 +1 @@
../../.bazelversion

View File

@ -0,0 +1,57 @@
load("@bazel_skylib//rules:build_test.bzl", "build_test")
# Ensure all lib:* bzl_target libraries can be loaded from a MODULE
# Targets from: `bazel query "kind('bzl_library', //lib:*)"`
build_test(
name = "api_bzl_entries",
targets = [
"@aspect_bazel_lib//lib:base64",
"@aspect_bazel_lib//lib:bats",
"@aspect_bazel_lib//lib:bats_toolchain_type",
"@aspect_bazel_lib//lib:bazelrc_presets",
"@aspect_bazel_lib//lib:bzlmod",
"@aspect_bazel_lib//lib:copy_directory",
"@aspect_bazel_lib//lib:copy_directory_toolchain_type",
"@aspect_bazel_lib//lib:copy_file",
"@aspect_bazel_lib//lib:copy_to_bin",
"@aspect_bazel_lib//lib:copy_to_directory",
"@aspect_bazel_lib//lib:copy_to_directory_toolchain_type",
"@aspect_bazel_lib//lib:coreutils_toolchain_type",
"@aspect_bazel_lib//lib:diff_test",
"@aspect_bazel_lib//lib:directory_path",
"@aspect_bazel_lib//lib:docs",
"@aspect_bazel_lib//lib:enable_runfiles",
"@aspect_bazel_lib//lib:expand_make_vars",
"@aspect_bazel_lib//lib:expand_template",
"@aspect_bazel_lib//lib:expand_template_toolchain_type",
"@aspect_bazel_lib//lib:extensions",
"@aspect_bazel_lib//lib:flag_bzlmod",
"@aspect_bazel_lib//lib:glob_match",
"@aspect_bazel_lib//lib:host_repo",
"@aspect_bazel_lib//lib:jq",
"@aspect_bazel_lib//lib:jq_toolchain_type",
"@aspect_bazel_lib//lib:lists",
"@aspect_bazel_lib//lib:output_files",
"@aspect_bazel_lib//lib:params_file",
"@aspect_bazel_lib//lib:paths",
"@aspect_bazel_lib//lib:platform_utils",
"@aspect_bazel_lib//lib:repo_utils",
"@aspect_bazel_lib//lib:repositories",
"@aspect_bazel_lib//lib:resource_sets",
"@aspect_bazel_lib//lib:run_binary",
"@aspect_bazel_lib//lib:stamp",
"@aspect_bazel_lib//lib:stamp_detect",
"@aspect_bazel_lib//lib:stamping",
"@aspect_bazel_lib//lib:strings",
"@aspect_bazel_lib//lib:tar",
"@aspect_bazel_lib//lib:tar_toolchain_type",
"@aspect_bazel_lib//lib:testing",
"@aspect_bazel_lib//lib:transitions",
"@aspect_bazel_lib//lib:utils",
"@aspect_bazel_lib//lib:windows_utils",
"@aspect_bazel_lib//lib:write_source_files",
"@aspect_bazel_lib//lib:yq",
"@aspect_bazel_lib//lib:yq_toolchain_type",
"@aspect_bazel_lib//lib:zstd_toolchain_type",
],
)

View File

@ -0,0 +1,7 @@
bazel_dep(name = "aspect_bazel_lib", version = "0.0.0", dev_dependency = True)
local_path_override(
module_name = "aspect_bazel_lib",
path = "../..",
)
bazel_dep(name = "bazel_skylib", version = "1.7.1", dev_dependency = True)

27
e2e/api_entries/WORKSPACE Normal file
View File

@ -0,0 +1,27 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_skylib",
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
local_repository(
name = "aspect_bazel_lib",
path = "../..",
)
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "register_coreutils_toolchains")
aspect_bazel_lib_dependencies()
# Registering coreutils is required under WORKSPACE for the copy action to work
# Under bzlmod, this is done automatically by just depending on the bazel-lib module.
register_coreutils_toolchains()

View File