-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Labels
type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
A new feature that could address a number of outstanding requests / issues.
- Give
BuildStep
a methodwritePart(String content)
, for use when the primary input is a library - A bit like the
source_gen
shared part builder, it handles allowing multiple builders to write to one part file - It does the formatting, so it can be done efficiently / in parallel
- Parts are not the same as outputs: they don't trigger other builders, they are not inputs. Builders only run on libraries. Builders do see the partial state of the part file as it accumulates source.
build_runner
decides on the location of the part file, and is responsible for updating (or prompting to update) the manually-maintained file with the correctpart
statement; a bit like the "multi-root packages" idea, but without any SDK feature needed, this meansbuild_runner
can e.g. put all the parts under one folder
Re: folder layout, we could do for example: lib/_parts/...
, test/_parts/...
; note that parts can't be used from anywhere else so there is no need to put them under src
.
lishaduck and sigurdmrrousselGit
Metadata
Metadata
Assignees
Labels
type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug