-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix new file detection in PostCSS plugin #14829
Conversation
5e9a595
to
8bd9176
Compare
things can run too fast apparently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few small changes, but I like it.
.filter_map(Result::ok) | ||
} | ||
|
||
#[tracing::instrument(skip(root))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[tracing::instrument(skip(root))] | |
#[tracing::instrument(skip_all)] |
read_dir(root, None) | ||
} | ||
|
||
#[tracing::instrument(skip(root))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[tracing::instrument(skip(root))] | |
#[tracing::instrument(skip_all)] |
.filter(|path| !known.contains(path)) | ||
.collect::<Vec<_>>(); | ||
|
||
modified_dirs.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit cursed, I love it.
@@ -27,9 +27,25 @@ static IGNORED_CONTENT_DIRS: sync::LazyLock<Vec<&'static str>> = | |||
|
|||
#[tracing::instrument(skip(root))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[tracing::instrument(skip(root))] | |
#[tracing::instrument(skip_all)] |
We broke this at some point — probably when we tried to optimize rebuilds in PostCSS by not performing a full auto-source detection scan.
This PR addresses this problem by: