-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
Move override segment suffixing from planning time to task instantiation time #4176
Comments
Task.Source
with a Task
causes unnecessary invalidation during ./mill --watch
Might need to go into Mill 0.13.0 if we need to add more implicit macro parameters to the Could possibly re-use some of the refactoring necessary in #4026 |
Task.Source
with a Task
causes unnecessary invalidation during ./mill --watch
The problem is that it is difficult to determine whether a given task is overridden or not at instantiation time.
Seems like we may need to wait for 0.13.0, and once we have the change to break bincompat we can update |
example.thirdparty[gatling].testRepoRoot
seems to invalidate unnecessarily when running./mill -w docs.fastPages
and editingexample/large/selective/9-selective-execution/build.mill
The problem appears to come from the #1600, where we made tasks get labelled and assigned
.super.foo
suffixes during planning. Thus, depending on what exactly Mill is asked to evaluate, the overriddenexample.thirdparty[gatling].testRepoRoot
in the preparatory evaluation has the same label as the overridingexample.thirdparty[gatling].testRepoRoot
in the main evaluation. This causes them to collide on disk and results in the latter unnecessarily invalidating since the hashes appear to have changed (since the other task stomped over the json files on disk)Even outside of
--watch
, this scenario can probably occur when running two different sets of tasks manually:.super
suffix and the override task no.super
suffix in the first run.super
suffix with the override not evaluated in the second run the otherThis whole "tasks are assigned their final label during planning" thing is an endless source of bugs, and was originally introduced because we started using the ordering of tasks during planning to determine override ordering which is necessary to assign
.super.Foo
suffixes as part of the labels in (#1600). Although that PR fixed stackable traits overrides from colliding in the same evaluation run, it introduced this issue which can cause overriden and overriding tasks to collide across multiple evaluation runsWe probably should try to detect move override detection and label allocation to task instantiation time to avoid this footgun.
The text was updated successfully, but these errors were encountered: