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

Improve the CLI output when nothing changed #14351

Merged
merged 3 commits into from
Sep 5, 2024
Merged

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Sep 5, 2024

When we observe that no new candidates were found, then we can return early because nothing really changed. There is also no need to re-optimize (use Lightning CSS) in this case.

But this had a side effect that when no new candidates were detected, that you didn't see any output either. This feels like nothing is working from a DX perspective.

Typically you are changing things, so it's not really a problem. But the moment you use a class that already existed (e.g.: in another file) you also don't get any output because we have a shared cache.

This PR solves that by always showing the output. But it still doesn't write to disk if nothing changed.

@RobinMalfait RobinMalfait force-pushed the feat/improve-cli-output branch from 5ca1224 to 3344116 Compare September 5, 2024 15:16
When we observe that no new candidates were found, we didn't write to
disk because nothing really changed. There is also no need to
re-optimize (minify / lightningcss) when nothing changed.

But this had a side effect that when nothing changes that you didn't see
any output.

Typically you are changing things, so it's not really a problem. But the
moment you use a class that already existed you also don't get any
output because we have a shared cache.

This improves that by always having some output.
@RobinMalfait RobinMalfait force-pushed the feat/improve-cli-output branch from 3344116 to 30e840e Compare September 5, 2024 15:17
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Adam Wathan <[email protected]>
@adamwathan adamwathan merged commit af774e8 into next Sep 5, 2024
3 checks passed
@adamwathan adamwathan deleted the feat/improve-cli-output branch September 5, 2024 21: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.

2 participants