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

[heft] Introduce a --no-bundle flag to heft test to let users skip the webpack bundling build stage #2778

Closed
ghost opened this issue Jun 30, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 30, 2021

Summary

At my work we have a specific use case where we invoke Heft at different steps in the CI build pipeline. In one step we invoke Heft to run tests via heft test which executes the task runner and it's configured build stages. However, in a later step we then run heft build --no-test within a Docker Image which excludes tests.

In the first case, we don't need Heft to produce the ESModule build output (i.e. the lib folder) nor the Webpack bundling stage as we only require the code be transpiled to lib-commonjs so that the tests can run. It would be great if the Heft CLI introduced a --no-bundle flag to reduce steps required to run tests.

@octogonz
Copy link
Collaborator

octogonz commented Jul 1, 2021

@iclanton @D4N14L what do you think?

@iclanton
Copy link
Member

iclanton commented Jul 2, 2021

We have a feature planned that would allow you to run a subsequence of build substages. The motivation is to allow the bundle substage to be run in a separate phase (with BuildXL or Rush's upcoming multiphase build feature), enabling downstream projects to start building while their upstream dependencies are bundling.

@josh-biddick, would something like this work for you? You could run (with syntax I just made up) heft build --stage-filter [, compile] (to run everything up to compile) and then run heft build --stage filter --[bundle, ] (to run bundle and everything afterward) and then run heft test --no-build to run tests). To skip bundling, you could run heft build --stage-filter [, compile] and then heft build --stage-filter [postbuild, ].

@ghost
Copy link
Author

ghost commented Jul 2, 2021

@iclanton Yes, that sounds like a great idea. The symantics of how the syntax looks is less important to me, just as long as it performs what I'm wanting to acheive. Perfect!

@github-project-automation github-project-automation bot moved this to Needs triage in Bug Triage Feb 26, 2024
@iclanton
Copy link
Member

Doing something like this is now supported in the new version of Heft.

@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants