Skip to content

Commit

Permalink
Refactor the "output_groups" string to the OutputGroupInfo() provider.
Browse files Browse the repository at this point in the history
This is the beginning of removing the legacy providers, per bazelbuild/bazel#7347

See https://docs.bazel.build/versions/master/skylark/rules.html#migrating-from-legacy-providers:
"The field output_groups takes a struct value and corresponds to an
OutputGroupInfo."

PiperOrigin-RevId: 265162279
  • Loading branch information
alexeagle committed Aug 24, 2019
1 parent cd7c305 commit ed2272e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,10 @@ def compile_ts(
),
files = depset(transitive = files_depsets),
),
OutputGroupInfo(
es5_sources = es5_sources,
es6_sources = es6_sources,
),
],
"instrumented_files": {
"dependency_attributes": ["deps", "runtime_deps"],
Expand All @@ -489,10 +493,6 @@ def compile_ts(
# e.g. rollup_bundle under Bazel needs to convert this into a UMD global
# name in the Rollup configuration.
"module_name": getattr(ctx.attr, "module_name", None),
"output_groups": {
"es5_sources": es5_sources,
"es6_sources": es6_sources,
},
# Expose the tags so that a Skylark aspect can access them.
"tags": ctx.attr.tags if hasattr(ctx.attr, "tags") else ctx.rule.attr.tags,
# TODO(martinprobst): Prune transitive deps, only re-export what's needed.
Expand Down

0 comments on commit ed2272e

Please sign in to comment.