-
Notifications
You must be signed in to change notification settings - Fork 207
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
Add option to delay file system writes #3418
Conversation
|
Oh wait nvm, the linked issue, apparently filed by me, describes the reasoning, LOL. |
cc @natebosch did you want to review this as well? |
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.
I was initially worried, but I don't think it should be possible for this cache to have the same content as the CachingAssetReader - we should always invalidate an asset before it could be possible to write it, and we'd never read an asset from disk before writing it during the build.
}); | ||
bool? delayAssetWrites, | ||
}) : | ||
// Delayed asset writes should be enabled by default if we're not in the |
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.
How confident are we that this is the right choice for the default?
example/pubspec.yaml
Outdated
build_runner: | ||
path: ../build_runner | ||
build_runner_core: | ||
path: ../build_runner_core |
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.
Please add a trailing newline
new failure here looks potentially related |
I think that particular failure is from the Ah, already fixed in a better way by #3429 :D |
Does the test pass if we revert the last commit "Fix symlink test" and merge master? I'd prefer to avoid the |
Were you referring to b93d534? Unfortunately, I agree that the |
Sorry for the slow response. Yes, I think merging the interface of I'd guess few implementation won't be able to implement it, but I haven't looked closely. |
@simolus3 is this still WIP? Closing this for now as it is stale and the files are out of date. Feel free to reopen in case you still want to land it! |
This adds a
--delay-writes
option to thebuild
,watch
,serve
anddaemon
commands. When enabled, file system writes will only happen once at the end of a build.We can determine the impact of this option on larger builds (in terms of how the analyzer reacts, memory used by the build system, ...). If it turns out that some refinements are needed (like only doing this for Dart files or source assets), we can improve the option in subsequent releases. Once everything works, we might want to make this the default mode (at least if not using the low resource mode).
This probably needs more integration tests, but I'm not sure what the place best to add them would be.
Closes #3321