-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Clean up RunScript helpers and Evaluator code #4094
Comments
#4144 helps a bit, but more to be done. In particular we can get rid of the |
What about evaluator commands? We heavily use anonymous tasks in |
Good question, we'll need to see if there's any alternatives that can be provided, if not we're stuck supporting them whether we like it or not |
I think what needs to happen here is to split up the internal
The goal being that user-land tasks should not need to dig around the various packages in |
#4094 - Move `Evaluator` into a downstream module `core/` that depends on `core/{define,resolve,eval}` - Remove `RunScript` and inline its functionality into `Evaluator` - Rename `eval/` into `exec/`, along with all internal classes - Wrap `Resolve.{Task,Segments}` APIs as `Evaluator.resolve{Tasks,Segments}` Effectively this splits up: * The user-facing portion of `Evaluator`, still called `Evaluator` * The execute-task-graph part of `Evaluator`, now called `exec`/`Execution` This preserves the user-facing name `evaluator: Evaluator`, and renames mostly internal classes to `Execution` to avoid churn in the user-facing API. Now that `Evaluator` is its own thing, we can also move more APIs into it (e.g. `Resolve.*`) without it getting too bloated. This also exposes a consistently usable `Evaluator` object to user code, rather than constantly needing to pass bits and pieces of it to static helpers like passing `.rootModule` to `mill.resolve.Resolve`
Made a lot of progress here, but more to be done. All user-facing APIs have been consolidated into def resolveEvaluate(
scriptArgs: Seq[String],
selectMode: SelectMode,
selectiveExecution: Boolean = false
): Result[(Seq[Watchable], Result[Seq[(Any, Option[(Evaluator.TaskName, ujson.Value)])]])]
def evaluate(
targets: Seq[Task[Any]],
selectiveExecution: Boolean = false
): (Seq[Watchable], Result[Seq[(Val, Option[(Evaluator.TaskName, ujson.Value)])]]) = { |
Not sure exactly how, but they definitely feel a bit out of place, as a bunch of static helpers wrapping
Evaluator
Noticed when working on #4091
Would need to be done in 0.13.0 when we can break bincompat
The text was updated successfully, but these errors were encountered: