forked from aspect-build/rules_swc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addresses aspect-build#252
- Loading branch information
davidaghassi
committed
Nov 16, 2024
1 parent
9498a51
commit fa4b2fc
Showing
3 changed files
with
50 additions
and
13 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
diff --git a/swc/private/swc.bzl b/swc/private/swc.bzl | ||
index 386cb03..81f4c91 100644 | ||
--- a/swc/private/swc.bzl | ||
+++ b/swc/private/swc.bzl | ||
@@ -3,6 +3,7 @@ | ||
load("@aspect_bazel_lib//lib:platform_utils.bzl", "platform_utils") | ||
load("@aspect_rules_js//js:libs.bzl", "js_lib_helpers") | ||
load("@aspect_rules_js//js:providers.bzl", "js_info") | ||
+load("@aspect_bazel_lib//lib:expand_make_vars.bzl", "expand_locations", "expand_variables") | ||
load("@bazel_skylib//lib:paths.bzl", "paths") | ||
load("//swc:providers.bzl", "SwcPluginConfigInfo") | ||
|
||
@@ -240,7 +241,13 @@ def _impl(ctx): | ||
fail("Under output_dir, the srcs must be directories, not files") | ||
output_dir = ctx.actions.declare_directory(ctx.attr.out_dir if ctx.attr.out_dir else ctx.label.name) | ||
|
||
- inputs.extend(ctx.files.srcs) | ||
+ inputs.extend([ | ||
+ " ".join([ | ||
+ expand_variables(ctx, exp, attribute_name = "srcs") | ||
+ for exp in expand_locations(ctx, arg, ctx.attr.srcs).split(" ") | ||
+ ]) | ||
+ for arg in ctx.attr.srcs | ||
+ ]) | ||
inputs.extend(ctx.files.plugins) | ||
inputs.extend(plugin_cache) | ||
|
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