Skip to content

Feat ignore not compatible packages #2263

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Mivr
Copy link
Contributor

@Mivr Mivr commented Jul 8, 2025

Ignoring packages that are not compatible to the platform of the build

Changes are visible to end-users: no

Test plan

  • New test cases added

Copy link

aspect-workflows bot commented Jul 8, 2025

Test

All tests were cache hits

228 tests (100.0%) were fully cached saving 33s.


Test

e2e/bzlmod

All tests were cache hits

5 tests (100.0%) were fully cached saving 539ms.


Test

e2e/gyp_no_install_script

⚠️ Buildkite build #8966 failed.

Failed tests (1)
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]🔗

💡 To reproduce the test failures, run

bazel test //:write_npm_translate_lock_bzlmod_test

Test

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 6s.


Test

e2e/npm_link_package

Buildkite build #8966 is running...


Test

e2e/npm_link_package-esm

Buildkite build #8966 is running...


Test

e2e/npm_translate_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_lock_empty

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 268ms.


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_lock_replace_packages

All tests were cache hits

3 tests (100.0%) were fully cached saving 269ms.


Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 73ms.


Test

e2e/npm_translate_package_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/package_json_module

All tests were cache hits

1 test (100.0%) was fully cached saving 324ms.


Test

e2e/pnpm_lockfiles

⚠️ Buildkite build #8966 failed.

Failed tests (5)
//v101:repos_3_test [k8-fastbuild]🔗
//v54:repos_3_test [k8-fastbuild]🔗
//v60:repos_3_test [k8-fastbuild]🔗
//v61:repos_3_test [k8-fastbuild]🔗
//v90:repos_3_test [k8-fastbuild]🔗

💡 To reproduce the test failures, run

bazel test //v61:repos_3_test //v60:repos_3_test //v101:repos_3_test //v90:repos_3_test //v54:repos_3_test

Test

e2e/pnpm_workspace

1 test target passed

Targets
//app/a:npm_link_targets_test [k8-fastbuild]95ms

Total test execution time was 95ms. 14 tests (93.3%) were fully cached saving 2s.


Test

e2e/pnpm_workspace_rerooted

1 test target passed

Targets
//app/a:npm_link_targets_test [k8-fastbuild]166ms

Total test execution time was 166ms. 14 tests (93.3%) were fully cached saving 2s.


Test

e2e/repo_mapping

All tests were cache hits

3 tests (100.0%) were fully cached saving 410ms.


Test

e2e/rules_foo

Buildkite build #8966 is running...


Test

e2e/runfiles

All tests were cache hits

1 test (100.0%) was fully cached saving 80ms.


Test

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 114ms.


Buildifier

Buildifier managed files require formatting

--- ./e2e/npm_translate_lock_platform/BUILD.bazel	2025-07-31 10:33:34.914847990 +0000
+++ /tmp/buildifier-tmp-14872520	2025-07-31 10:34:23.636546075 +0000
@@ -1,14 +1,13 @@
+load("@aspect_rules_js//js:defs.bzl", "js_test")
+
 # No load needed - sh_test is a built-in rule
 load("@npm//:defs.bzl", "npm_link_all_packages")
-load("@aspect_rules_js//js:defs.bzl", "js_test")
 
 npm_link_all_packages(name = "node_modules")
 
 # Simple functionality test - just verify esbuild can be required and works
 js_test(
     name = "test",
-    entry_point = "basic_require_test.js",
     data = [":node_modules"],
+    entry_point = "basic_require_test.js",
 )
-
- 
\ No newline at end of file
--- ./e2e/npm_translate_lock_platform/MODULE.bazel	2025-07-31 10:33:34.914847990 +0000
+++ /tmp/buildifier-tmp-2971283185	2025-07-31 10:34:23.648546006 +0000
@@ -1,6 +1,8 @@
 # Minimal module for platform fetch e2e test
 bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True)
+
 bazel_dep(name = "platforms", version = "0.0.5")
+
 local_path_override(
     module_name = "aspect_rules_js",
     path = "../..",
@@ -11,10 +13,8 @@
     "npm",
     dev_dependency = True,
 )
-
 npm.npm_translate_lock(
     name = "npm",
     pnpm_lock = "//:pnpm-lock.yaml",
 )
-
-use_repo(npm, "npm") 
\ No newline at end of file
+use_repo(npm, "npm")
--- ./e2e/npm_translate_lock_platform/WORKSPACE	2025-07-31 10:33:34.914847990 +0000
+++ /tmp/buildifier-tmp-3237820505	2025-07-31 10:34:23.655545965 +0000
@@ -1 +0,0 @@
- 
\ No newline at end of file
--- ./npm/extensions.bzl	2025-07-31 10:33:34.954847737 +0000
+++ /tmp/buildifier-tmp-713657754	2025-07-31 10:34:24.050543698 +0000
@@ -21,8 +21,6 @@
 DEFAULT_PNPM_VERSION = _DEFAULT_PNPM_VERSION
 LATEST_PNPM_VERSION = _LATEST_PNPM_VERSION
 
-
-
 def _npm_extension_impl(module_ctx):
     if not bazel_lib_utils.is_bazel_6_or_greater():
         # ctx.actions.declare_symlink was added in Bazel 6
--- ./npm/private/npm_import.bzl	2025-07-31 10:33:34.963847680

... 25440 chars truncated

💡 Run the following to apply the suggested formatting fixes

bazel run //:buildifier

Format

Formatting check has failed

💡 Some formatting failures can be fixed automatically by running the command below, while others may require manual fixes

bazel run //:format -- e2e/npm_translate_lock_platform/BUILD.bazel e2e/npm_translate_lock_platform/MODULE.bazel e2e/npm_translate_lock_platform/WORKSPACE e2e/npm_translate_lock_platform/test.sh npm/extensions.bzl npm/private/npm_import.bzl npm/private/npm_translate_lock_helpers.bzl npm/private/starlark_codegen_utils.bzl npm/private/test/BUILD.bazel npm/private/test/platform_performance_test.bzl npm/private/test/platform_utils_tests.bzl platforms/BUILD.bazel test.sh test_new.sh

ℹ️ A patch file containing the changes has been archived as an artifact of this build

@Mivr Mivr force-pushed the feat-ignore-not-compatible-packages branch from 546e1b7 to 7144479 Compare July 8, 2025 16:34
@Mivr Mivr force-pushed the feat-ignore-not-compatible-packages branch from 7144479 to 32aa6c0 Compare July 28, 2025 14:18
@Mivr Mivr marked this pull request as draft August 5, 2025 16:59
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

Successfully merging this pull request may close these issues.

1 participant