-
Notifications
You must be signed in to change notification settings - Fork 607
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
[rush] Incremental build should skip projects that succeed with warnings #1402
Comments
The logic is here: ProjectTask.ts#L94 From what I understand, the package-deps.json file will not be written if either (1) the process exit code is nonzero, or (2) if there is a "warning or error" (i.e. any output written to STDERR). Because the file is not written, Here's why I think it was designed that way: Imagine if warnings did not invalidate the build: Suppose that you run How can we implement this? A simple idea would be for the package-deps.json file to track whether the build succeeded with warnings. Perhaps we could even save the STDERR content in that file. Thoughts? |
But we may need some escape hatch to skip the build cache invalidate for warning build, since we may know that some tools write to stderr not for warnings(esbuild for example, use stderr to print info instead of stdout, because it already use stdout for pipe communication evanw/esbuild#1024) |
So will you eventually provide this as you mentioned? such as 'allowWarningsCache' that make package-deps.json file to track whether the build succeeded with warnings. And save the STDERR content in that file while next build to remember the warnings; |
any news on this? |
Any advancement on this. It's very annoying to rebuild projects that only had warnings. The We're adopting the api-extractor, and that gives a bunch of warnings, that we want to have, but not be blocking and increasing build times |
I just looked at the source (the path mentioned here is not up-to-date?) It seems there's an experimental flag? |
Oh well, there's a flag. Go to See also the config source |
@alber70g I enabled that flag and I'm still having the same problem. I went ahead and changed my Babel config to supress the warning, but the flag itself did not fix the issue. Is there something that I am missing? Just curious in case I encounter this problem again. |
Is this a feature or a bug?
What is the expected behavior?
console.error("Warning!");
)rush build
,rush build
againExpected behavior: The project should be skipped the second time, since nothing has changed
Actual behavior: The project gets built a second time
The text was updated successfully, but these errors were encountered: