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] Merge Heft RC to main #4145

Merged
merged 318 commits into from
Jun 2, 2023
Merged

[heft] Merge Heft RC to main #4145

merged 318 commits into from
Jun 2, 2023

Conversation

dmichon-msft
Copy link
Contributor

@dmichon-msft dmichon-msft commented Jun 1, 2023

Summary

Merging the RC branch for heft-next into main.

Details

Fixes #3181 - See for the main discussion of the design of this overhaul.

At a high level, refactors Heft to support more granular build phases than merely build and test.
Heft will now internally perform task-based scheduling in a manner analogous to Rush, with the addition of treating watch mode as a first-class scenario all the way through the pipeline.

Configurability

The core Heft package no longer contains API-Extractor, TypeScript, or ESLint/TSLint support. These are now all their own separate plugin packages, so consumers that wish to use Heft without some or all of the above can do so without paying the cost of loading those features.

The heft.json file now specifies one or more named phases, each of which is expected to contain zero or more named tasks, forming a directed acyclic task graph. Each task invokes either exactly one plugin or exactly one "event" (which are just shorthand for calling utility plugins).

Boot Performance

All heft plugin packages are now required to provide a heft-plugin.json manifest, which provides a list of one or more plugin entry points, the options schemas, and any command line parameter definitions that are applicable to the plugins. This allows the Heft runtime to load the manifest files and determine what tasks to execute without having to load the plugin code itself until it is needed.

This avoids situations where a given Heft plugin may contain very expensive initialization code that is executed even for Heft commands that don't invoke the plugin.

Watch Mode

Plugins configured for watch mode are expected to perform their own file watching, though may utilize a provided watchGlobAsync hook for simple watch scenarios, and invoke a requestRun callback when changes are detected.

When the requestRun callback is invoked (either directly or internally by watchGlobAsync), the Heft scheduler determines if the change impacts work that has already completed, in which case it will abort any current run and start a new one, or only future work, in which case it proceeds normally.

How it was tested

Local runs, use of the RC in other repositories.

Impacted documentation

All Heft documentation.

D4N14L and others added 30 commits July 26, 2022 16:23
@dmichon-msft dmichon-msft marked this pull request as ready for review June 1, 2023 23:03
apps/heft/UPGRADING.md Outdated Show resolved Hide resolved
@iclanton iclanton enabled auto-merge June 2, 2023 00:37
Copy link
Member

@D4N14L D4N14L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡

@iclanton iclanton merged commit cddc381 into main Jun 2, 2023
@iclanton iclanton deleted the release/heft-0.50.0-rc branch June 2, 2023 00:57
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

Successfully merging this pull request may close these issues.

[heft] Design Proposal: Alignment with Rush phased commands
3 participants