Skip to content

Conversation

jbedard
Copy link
Member

@jbedard jbedard commented Oct 21, 2024

After removing the use of js_library the ts_project(data) no longer conditionally goes through js_library(data) when the transpiler attribute is set. However the js_library(data) was creating the runfiles differently then ts_project_rule(data).

This change makes ts_project(data) align with the defaults of js_library(data) to restore the previous behaviour.


Changes are visible to end-users: no

Test plan

  • Covered by existing test cases
  • New test cases added

@jbedard jbedard requested review from alexeagle and dzbarsky October 21, 2024 21:55
Copy link

aspect-workflows bot commented Oct 21, 2024

Test

2 test targets passed

Targets
//examples/json_data:test [k8-fastbuild]               24ms
//examples/json_data:tsc_typecheck_test [k8-fastbuild] 21ms

Total test execution time was 45ms. 140 tests (98.6%) were fully cached saving 8s.


Buildifier      Format

@jbedard jbedard merged commit 41a2678 into aspect-build:main Oct 21, 2024
24 checks passed
@jbedard jbedard deleted the ts_project-data-runfiles branch October 21, 2024 22:18
@gzm0
Copy link
Contributor

gzm0 commented Nov 6, 2024

I'm afraid this is a breaking change for usages of ts_project without a custom transpiler:

copy_data_files_to_bin = True comes with the caveat that it is source files coming from a different package are not allowed in data.

This breaks a basic filegroup:

# package //files
filegroup(
  name = "files",
  srcs = [...],
)

# package //code
ts_project(
  data = ["//files"],  # this will break with this change.
)

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.

3 participants