Find a better way to encode access to super
-tasks from overridden tasks
#4383
lefou
started this conversation in
Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, whenever we try to override a task in a trait and want to access the result of the overridden task, we produce a binary-incompatible change. This is not an issue when it happens in local traits, since Mill will recompile them when changed, but it is an issue when we use Mill plugins that are distrubuted as binaries (which are typically all of them).
My initial idea was to let the
Task
-macros automatically generatesuper
-calls, disregarding of the fact that we need or call them. And this could indeed fix those cases, were we want to change tasks definitions to access thesuper
-result where we previously did not. But it will not fix the case, where we want to add a task override where we previously had non.Since we already keep a record of all tasks and use a
Cacher
to keep them, we might find some encoding, that can find and access thesuper
-task in a more robust (but dynamic) way, that does not break binary compatibility.I neither have an idea if this is possible, nor do I know if these issue are the same once we migrate to Scala 3.6 as they are now with Scala 2.13.
Beta Was this translation helpful? Give feedback.
All reactions