Skip to content

Commit

Permalink
fix: change all cfg=host configs to cfg=exec
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Jan 11, 2022
1 parent fa84c43 commit 5d8f53a
Show file tree
Hide file tree
Showing 20 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion examples/angular/tools/karma.bzl
Expand Up @@ -70,7 +70,7 @@ _generate_karma_config = rule(
# https://github.com/bazelbuild/rules_nodejs/blob/3.3.0/packages/concatjs/web_test/karma_web_test.bzl#L88-L91
"_conf_tmpl": attr.label(
doc = """the karma config template""",
cfg = "host",
cfg = "exec",
allow_single_file = True,
default = Label("//tools:karma.conf.js"),
),
Expand Down
2 changes: 1 addition & 1 deletion examples/parcel/parcel.bzl
Expand Up @@ -57,7 +57,7 @@ parcel = rule(
# This default assumes that users name their install "npm"
default = Label("@npm//parcel-bundler/bin:parcel"),
executable = True,
cfg = "host",
cfg = "exec",
),
"srcs": attr.label_list(allow_files = True),
},
Expand Down
2 changes: 1 addition & 1 deletion examples/worker/uses_workers.bzl
Expand Up @@ -34,7 +34,7 @@ work = rule(
"tool": attr.label(
default = Label("//:tool"),
executable = True,
cfg = "host",
cfg = "exec",
),
},
)
2 changes: 1 addition & 1 deletion internal/bazel_integration_test/bazel_integration_test.bzl
Expand Up @@ -244,7 +244,7 @@ is published on GitHub.
),
"_test_runner": attr.label(
executable = True,
cfg = "host",
cfg = "exec",
default = Label("@build_bazel_rules_nodejs//internal/bazel_integration_test:test_runner"),
),
}
Expand Down
2 changes: 1 addition & 1 deletion internal/linker/test/integration/rule.bzl
Expand Up @@ -20,5 +20,5 @@ linked = rule(_linked, attrs = {
aspects = [module_mappings_aspect],
),
"out": attr.output(),
"program": attr.label(executable = True, cfg = "host", mandatory = True),
"program": attr.label(executable = True, cfg = "exec", mandatory = True),
})
2 changes: 1 addition & 1 deletion internal/linker/test/no_npm_deps/no_npm_deps.bzl
Expand Up @@ -11,7 +11,7 @@ _ATTRS = {
),
"terser": attr.label(
executable = True,
cfg = "host",
cfg = "exec",
default = Label("@npm//terser/bin:terser"),
),
}
Expand Down
2 changes: 1 addition & 1 deletion internal/node/node.bzl
Expand Up @@ -665,7 +665,7 @@ nodejs_test_kwargs = dict(
"_lcov_merger": attr.label(
executable = True,
default = Label("@build_bazel_rules_nodejs//internal/coverage:lcov_merger_sh"),
cfg = "target",
cfg = "exec",
),
}),
doc = """
Expand Down
2 changes: 1 addition & 1 deletion internal/node/npm_package_bin.bzl
Expand Up @@ -21,7 +21,7 @@ _ATTRS = {
"stdout": attr.output(),
"tool": attr.label(
executable = True,
cfg = "host",
cfg = "exec",
mandatory = True,
),
"stamp": STAMP_ATTR,
Expand Down
2 changes: 1 addition & 1 deletion internal/npm_install/npm_umd_bundle.bzl
Expand Up @@ -114,7 +114,7 @@ This target would be then be used instead of the generated `@npm//typeorm:typeor
),
"_browserify_wrapped": attr.label(
executable = True,
cfg = "host",
cfg = "exec",
default = Label("@build_bazel_rules_nodejs//internal/npm_install:browserify-wrapped"),
),
}
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg_web/pkg_web.bzl
Expand Up @@ -38,7 +38,7 @@ See the section on stamping in the README.""",
"_assembler": attr.label(
default = "@build_bazel_rules_nodejs//internal/pkg_web:assembler",
executable = True,
cfg = "host",
cfg = "exec",
),
}

Expand Down
6 changes: 3 additions & 3 deletions internal/providers/test/run_node_test.bzl
Expand Up @@ -75,17 +75,17 @@ js_write_file = rule(
"content": attr.string(),
"_clone": attr.label(
default = Label("//internal/providers/test:cloner_bin"),
cfg = "host",
cfg = "exec",
executable = True,
),
"_writer": attr.label(
default = Label("//internal/providers/test:writer_bin"),
cfg = "host",
cfg = "exec",
executable = True,
),
"_writer2": attr.label(
default = Label("//internal/providers/test:writer_bin2"),
cfg = "host",
cfg = "exec",
executable = True,
),
},
Expand Down
4 changes: 2 additions & 2 deletions packages/concatjs/devserver/concatjs_devserver.bzl
Expand Up @@ -152,14 +152,14 @@ concatjs_devserver = rule(
Defaults to precompiled go binary setup by @bazel/typescript npm package""",
default = Label("//packages/concatjs/devserver"),
executable = True,
cfg = "host",
cfg = "exec",
),
"devserver_host": attr.label(
doc = """Go based devserver executable for the host platform.
Defaults to precompiled go binary setup by @bazel/typescript npm package""",
default = Label("//packages/concatjs/devserver"),
executable = True,
cfg = "host",
cfg = "exec",
),
"entry_module": attr.string(
doc = """The `entry_module` should be the AMD module name of the entry module such as `"__main__/src/index".`
Expand Down
2 changes: 1 addition & 1 deletion packages/concatjs/internal/build_defs.bzl
Expand Up @@ -407,7 +407,7 @@ then it needs to be a data dependency of `tsc_wrapped` so that it can be loaded
default = Label(_DEFAULT_COMPILER),
allow_files = True,
executable = True,
cfg = "host",
cfg = "exec",
),
"deps": attr.label_list(
aspects = DEPS_ASPECTS + [node_modules_aspect],
Expand Down
2 changes: 1 addition & 1 deletion packages/concatjs/test/some_module/run_node_test.bzl
Expand Up @@ -23,7 +23,7 @@ ts_write_file = rule(
"content": attr.string(),
"_writer": attr.label(
default = Label("//packages/concatjs/test/some_module:writer_bin"),
cfg = "host",
cfg = "exec",
executable = True,
),
},
Expand Down
2 changes: 1 addition & 1 deletion packages/concatjs/web_test/karma_web_test.bzl
Expand Up @@ -65,7 +65,7 @@ KARMA_WEB_TEST_ATTRS = {
# NB: replaced during pkg_npm with "@npm//karma/bin:karma"
default = "//packages/concatjs/web_test:karma_bin",
executable = True,
cfg = "target",
cfg = "exec",
allow_files = True,
),
"runtime_deps": attr.label_list(
Expand Down
4 changes: 2 additions & 2 deletions packages/protractor/protractor_web_test.bzl
Expand Up @@ -213,13 +213,13 @@ _protractor_web_test = rule(
"protractor": attr.label(
doc = "Protractor executable target",
executable = True,
cfg = "target",
cfg = "exec",
allow_files = True,
),
"server": attr.label(
doc = "Optional server executable target",
executable = True,
cfg = "target",
cfg = "exec",
allow_files = True,
),
"srcs": attr.label_list(
Expand Down
4 changes: 2 additions & 2 deletions packages/rollup/rollup_bundle.bzl
Expand Up @@ -118,7 +118,7 @@ Otherwise, the outputs are assumed to be a single file.
"rollup_bin": attr.label(
doc = "Target that executes the rollup binary",
executable = True,
cfg = "host",
cfg = "exec",
default = (
# BEGIN-INTERNAL
"@npm" +
Expand All @@ -129,7 +129,7 @@ Otherwise, the outputs are assumed to be a single file.
"rollup_worker_bin": attr.label(
doc = "Internal use only",
executable = True,
cfg = "host",
cfg = "exec",
default = "//packages/rollup/bin:rollup-worker",
),
"silent": attr.bool(
Expand Down
2 changes: 1 addition & 1 deletion packages/terser/terser_minified.bzl
Expand Up @@ -104,7 +104,7 @@ If you want to do this, you can pass a filegroup here.""",
doc = "An executable target that runs Terser",
default = Label("//packages/terser/bin:terser"),
executable = True,
cfg = "host",
cfg = "exec",
),
}

Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/internal/ts_project.bzl
Expand Up @@ -35,7 +35,7 @@ _ATTRS = {
# that compiler might allow more sources than tsc does.
"srcs": attr.label_list(allow_files = True, mandatory = True),
"supports_workers": attr.bool(default = False),
"tsc": attr.label(default = Label(_DEFAULT_TSC), executable = True, cfg = "host"),
"tsc": attr.label(default = Label(_DEFAULT_TSC), executable = True, cfg = "exec"),
"transpile": attr.bool(doc = "whether tsc should be used to produce .js outputs"),
"tsconfig": attr.label(mandatory = True, allow_single_file = [".json"]),
}
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/internal/validate_options.bzl
Expand Up @@ -68,7 +68,7 @@ validate_options = rule(
"target": attr.string(),
"ts_build_info_file": attr.string(),
"tsconfig": attr.label(mandatory = True, allow_single_file = [".json"]),
"validator": attr.label(default = Label("//packages/typescript/bin:ts_project_options_validator"), executable = True, cfg = "host"),
"validator": attr.label(default = Label("//packages/typescript/bin:ts_project_options_validator"), executable = True, cfg = "exec"),
},
)

Expand Down

0 comments on commit 5d8f53a

Please sign in to comment.