diff --git a/.aspect/bazelrc/.gitignore b/.aspect/bazelrc/.gitignore new file mode 100644 index 0000000..f25e3eb --- /dev/null +++ b/.aspect/bazelrc/.gitignore @@ -0,0 +1 @@ +user.bazelrc \ No newline at end of file diff --git a/.aspect/workflows/bazelrc b/.aspect/workflows/bazelrc index d844b50..04f3f6d 100644 --- a/.aspect/workflows/bazelrc +++ b/.aspect/workflows/bazelrc @@ -1,6 +1,6 @@ # build without the bytes -test --remote_download_minimal -test --nobuild_runfile_links +common --remote_download_outputs=minimal +common --nobuild_runfile_links # Allows tests to run bazelisk-in-bazel, since this is the cache folder used -test --test_env=XDG_CACHE_HOME +common --test_env=XDG_CACHE_HOME diff --git a/.bazelrc b/.bazelrc index 977e2b8..f7551aa 100644 --- a/.bazelrc +++ b/.bazelrc @@ -8,12 +8,6 @@ import %workspace%/.aspect/bazelrc/performance.bazelrc ### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### -# Runfiles still required for Windows in this repository despite not -# being strictly necessary for rules_js support with -# https://github.com/aspect-build/rules_js/pull/1428 landed. -# TODO: fix broken targets on Windows and remove this flag -build --enable_runfiles - # Don’t want to push a rules author to update their deps if not needed. # https://bazel.build/reference/command-line-reference#flag--check_direct_dependencies # https://bazelbuild.slack.com/archives/C014RARENH0/p1691158021917459?thread_ts=1691156601.420349&cid=C014RARENH0 diff --git a/.github/workflows/ci.bazelrc b/.github/workflows/ci.bazelrc index f20a68d..2f7e279 100644 --- a/.github/workflows/ci.bazelrc +++ b/.github/workflows/ci.bazelrc @@ -2,14 +2,14 @@ common --disk_cache=~/.cache/bazel-disk-cache common --repository_cache=~/.cache/bazel-repository-cache -# Bazel version specific settings -common:bazel6 --build_tag_filters=-skip-on-bazel6 -common:bazel6 --test_tag_filters=-skip-on-bazel6 -common:bazel7 --build_tag_filters=-skip-on-bazel7 -common:bazel7 --test_tag_filters=-skip-on-bazel7 +# Debug where options came from +common --announce_rc + +# Allows tests to run bazelisk-in-bazel, since this is the cache folder used +common --test_env=XDG_CACHE_HOME # Runfiles still required for Windows in this repository despite not # being strictly necessary for rules_js support with # https://github.com/aspect-build/rules_js/pull/1428 landed. # TODO: fix broken targets on Windows and remove this flag -build --enable_runfiles +common --enable_runfiles \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 28f4aa0..c02ec2b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,7 +86,7 @@ jobs: ~/.cache/bazel-disk-cache ~/.cache/bazel-repository-cache ~/.cache/xdg-cache - key: bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}-${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel', 'MODULE.bazel.lock') }} + key: bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}-${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel') }} restore-keys: bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}- - name: Configure Bazel version @@ -119,7 +119,8 @@ jobs: --bazelrc=${GITHUB_WORKSPACE//\\/\/}/.aspect/bazelrc/ci.bazelrc \ --bazelrc=${GITHUB_WORKSPACE//\\/\/}/.github/workflows/ci.bazelrc \ test \ - --config=bazel${{ matrix.bazel-version.major }} \ + --test_tag_filters=-skip-on-bazel${{ matrix.bazel-version.major }} \ + --build_tag_filters=-skip-on-bazel${{ matrix.bazel-version.major }} \ --enable_bzlmod=${{ matrix.bzlmod }} \ //... env: diff --git a/.gitignore b/.gitignore index 908c7ad..a597df8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,18 @@ bazel-* -**/.terraform/* .bazelrc.user +node_modules/ +.pnpm-* + .idea/ .ijwb/ -node_modules +.vscode +.DS_Store -# Don't commit lockfile for now as it is unstable. Do allow for it to be -# created, however, since it gives a performance boost for local development. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 +# Bazel's MODULE lockfile isn't ready to check in yet as of Bazel 7.1. +# Do allow for it to be created, however, since it gives a performance boost for local development. +# [Store resolved repository attributes in the Bzlmod lockfile](https://github.com/bazelbuild/bazel/issues/19026) +# [MODULE.bazel.lock file contains user specific paths](https://github.com/bazelbuild/bazel/issues/19621) +# [Consider skipping bazel_tools@_ from lockfile](https://github.com/bazelbuild/bazel/issues/19971) +# [MODULE.bazel.lock file "reads through" already-locked package manager](https://github.com/bazelbuild/bazel/issues/20272) +# [moduleFileHash in MODULE.bazel.lock causes frequent Git merge conflicts](https://github.com/bazelbuild/bazel/issues/20369) MODULE.bazel.lock diff --git a/WORKSPACE b/WORKSPACE index b62215d..0646f93 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -85,9 +85,6 @@ buildifier_prebuilt_register_toolchains() load( "@aspect_rules_lint//format:repositories.bzl", "fetch_shfmt", - "fetch_terraform", ) fetch_shfmt() - -fetch_terraform() diff --git a/e2e/jasmine_test/.bazelrc b/e2e/jasmine_test/.bazelrc index e69de29..413c995 100644 --- a/e2e/jasmine_test/.bazelrc +++ b/e2e/jasmine_test/.bazelrc @@ -0,0 +1,15 @@ +# Import Aspect bazelrc presets +try-import %workspace%/../../.aspect/bazelrc/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 diff --git a/e2e/jasmine_test/MODULE.bazel b/e2e/jasmine_test/MODULE.bazel index 3e0396d..ffd4d50 100644 --- a/e2e/jasmine_test/MODULE.bazel +++ b/e2e/jasmine_test/MODULE.bazel @@ -10,7 +10,7 @@ npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependenc npm.npm_translate_lock( name = "npm", npmrc = "//:.npmrc", - pnpm_lock = "@aspect_rules_jasmine//:pnpm-lock.yaml", + pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) use_repo(npm, "npm") diff --git a/e2e/jasmine_test/pnpm-lock.yaml b/e2e/jasmine_test/pnpm-lock.yaml index 4630aa7..6219e58 100644 --- a/e2e/jasmine_test/pnpm-lock.yaml +++ b/e2e/jasmine_test/pnpm-lock.yaml @@ -1,16 +1,14 @@ lockfileVersion: 5.4 -importers: - - .: - specifiers: - jasmine: 4.6.0 - jasmine-core: 4.6.0 - jasmine-reporters: 2.5.2 - devDependencies: - jasmine: 4.6.0 - jasmine-core: 4.6.0 - jasmine-reporters: 2.5.2 +specifiers: + jasmine: 4.6.0 + jasmine-core: 4.6.0 + jasmine-reporters: 2.5.2 + +devDependencies: + jasmine: 4.6.0 + jasmine-core: 4.6.0 + jasmine-reporters: 2.5.2 packages: diff --git a/e2e/smoke/.bazelrc b/e2e/smoke/.bazelrc index d455182..413c995 100644 --- a/e2e/smoke/.bazelrc +++ b/e2e/smoke/.bazelrc @@ -1,6 +1,15 @@ -# rules_js needs to create symlinks to build the runfiles tree. -# Creating symlinks on Windows requires one of the following: -# 1. Bazel is run with administrator privileges. -# 2. The system version is Windows 10 Creators Update (1703) or later -# and developer mode is enabled. -build --enable_runfiles +# Import Aspect bazelrc presets +try-import %workspace%/../../.aspect/bazelrc/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 diff --git a/e2e/smoke/MODULE.bazel b/e2e/smoke/MODULE.bazel index 3e0396d..ffd4d50 100644 --- a/e2e/smoke/MODULE.bazel +++ b/e2e/smoke/MODULE.bazel @@ -10,7 +10,7 @@ npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependenc npm.npm_translate_lock( name = "npm", npmrc = "//:.npmrc", - pnpm_lock = "@aspect_rules_jasmine//:pnpm-lock.yaml", + pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) use_repo(npm, "npm") diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index 15c2d33..91369d8 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -23,19 +23,8 @@ alias( }), ) -alias( - name = "terraform", - actual = select({ - "@bazel_tools//src/conditions:darwin_arm64": "@terraform_macos_aarch64//:terraform", - "@bazel_tools//src/conditions:darwin_x86_64": "@terraform_macos_x86_64//:terraform", - "@bazel_tools//src/conditions:linux": "@terraform_linux_x86_64//:terraform", - "//conditions:default": ":noop", - }), -) - multi_formatter_binary( name = "format", sh = ":shfmt", starlark = "@buildifier_prebuilt//:buildifier", - terraform = ":terraform", )