Skip to content
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

ts_project: ensure assets get propagated #742

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

iamricard
Copy link
Contributor

@iamricard iamricard commented Dec 2, 2024

#533, in fixing the issue caused by #493, also omitted adding assets that shouldn't be copied to the JsInfo provider. As a result, downstream rules (such as esbuild) will fail to find the file because it never collected it.


Changes are visible to end-users: no

Test plan

  • New test cases added
  • Manual testing; please provide instructions so we can reproduce:

Easiest way to repro this issue is to pipe the existing test cases into an esbuild bundle. The target should fail with [plugin: bazel-sandbox] Could not resolve "./generated.json".

@CLAassistant
Copy link

CLAassistant commented Dec 2, 2024

CLA assistant check
All committers have signed the CLA.

aspect-build#533, in fixing the issue caused by aspect-build#493, also omitted adding assets that shouldn't be copied to the `JsInfo` provider. As a result, downstream rules (such as `esbuild`) will fail to find the file because it never collected it.
@jbedard
Copy link
Member

jbedard commented Dec 2, 2024

Would you be able to add a test? Assuming it's simple... maybe just put a json file in the assets and require it at runtime? Could run the same test twice (once reproducing this bug, again with outDir to test that case) if possible?

@jbedard jbedard self-requested a review December 2, 2024 18:41
Copy link

aspect-workflows bot commented Dec 2, 2024

Test

4 test targets passed

Targets
//examples/assets:ts-runtime-assets_test [k8-fastbuild]                  175ms
//examples/assets:ts-runtime-assets_typecheck_test [k8-fastbuild]        61ms
//examples/assets:ts-runtime-outdir-assets_test [k8-fastbuild]           86ms
//examples/assets:ts-runtime-outdir-assets_typecheck_test [k8-fastbuild] 83ms

Total test execution time was 405ms. 150 tests (97.4%) were fully cached saving 9s.


Buildifier      Format

@iamricard
Copy link
Contributor Author

Would you be able to add a test? Assuming it's simple... maybe just put a json file in the assets and require it at runtime? Could run the same test twice (once reproducing this bug, again with outDir to test that case) if possible?

Done! Let me know if that's what you had in mind.

@jbedard jbedard enabled auto-merge (squash) December 2, 2024 21:28
@jbedard jbedard merged commit edf61ee into aspect-build:main Dec 2, 2024
24 checks passed
@iamricard iamricard deleted the patch-1 branch December 3, 2024 10:00
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