feat(@angular-devkit/schematics): add UpdateBuffer2 based on magic-string#21209
Conversation
|
This is an initial implementation of the |
|
Thank you for the contribution. |
|
This fix is not urgent for me, so landing it in v13 would be fine by me. I can change the deprecation notices accordingly. As for providing it side-by-side; A possibility would be to pass a parameter through |
|
For the option name, preference would be to treat |
|
An alternative for the configuration may be an environment variable (e.g. NG_LEGACY_UPDATE_RECORDER, NG_SAFE_UPDATE_RECORDER or simply NG_UPDATE_RECORDER_V2), as there are already precedents like NG_PERSISTENT_BUILD_CACHE. |
|
@clydin I have updated the implementation. I have reverted previous changes to the existing UpdateBuffer and created an additional UpdateBuffer2, which now both extend UpdateBufferBase. I have implemented a switch based on the environment variable |
|
@clydin I don't know whether the change to the goldens is acceptable in this case. I can revert the changes to HostSink, if it is a problem. |
|
@clydin With 13 looming, could I ask for another review of this PR? |
clydin
left a comment
There was a problem hiding this comment.
Sorry for the review delay.
This looks good for v13.
Can you rebase? There appears to be a conflict with package.json.
| * it means the content itself was deleted. | ||
| * | ||
| * @see UpdateBuffer | ||
| * @deprecated Since v12.2 |
There was a problem hiding this comment.
Nit: deprecations comments should be updated to @deprecated Since v13.0
There was a problem hiding this comment.
Thanks for the catch. Fixed accordingly.
|
@clydin No problem (in regards to the delay). I have rebased the branch. |
…ring This PR adds UpdateBuffer2 which should eventually replace UpdateBuffer. UpdateBuffer2 internally uses the magic-string library. UpdateBuffer and related symbols have been marked as deprecated. Closes #21110
|
Let's leave the default with the existing behavior for now. We may switch it for v13 but we would like to do some analysis regarding the magnitude of breakage before changing it. Thank you again for the contribution. |
|
Thank you for the review and other feedback. 😃 |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This PR adds UpdateBuffer2 which should eventually replace UpdateBuffer. UpdateBuffer2 internally uses the magic-string library.
UpdateBuffer and related symbols have been marked as deprecated.
Closes #21110