Skip to content
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

Fix issue #2958 - deduplicate (anonymous) tasks in result #2959

Merged
merged 6 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
.
lefou committed Jan 9, 2024
commit cb1c994362b6b3298ce4ca57bd7bff8e20e6cee6
2 changes: 1 addition & 1 deletion main/eval/src/mill/eval/EvaluatorCore.scala
Original file line number Diff line number Diff line change
@@ -170,7 +170,7 @@ private[mill] trait EvaluatorCore extends GroupEvaluator {
EvaluatorCore.Results(
goals.indexed.map(results(_).map(_._1).result),
// result of flatMap may contain non-distinct entries,
// se we manually clean it up before converting to a `Strict.Agg`
// so we manually clean it up before converting to a `Strict.Agg`
// see https://github.com/com-lihaoyi/mill/issues/2958
Strict.Agg.from(
finishedOptsMap.values.flatMap(_.toSeq.flatMap(_.newEvaluated)).iterator.distinct
2 changes: 1 addition & 1 deletion main/eval/test/src/mill/eval/TaskTests.scala
Original file line number Diff line number Diff line change
@@ -251,7 +251,7 @@ trait TaskTests extends TestSuite {
check.apply(build.superBuildTargetOverrideWithInput) ==> Right((3, 0))
}
}
"duplicateTaskInResult-issue2958" - withEnv { (build,check) =>
"duplicateTaskInResult-issue2958" - withEnv { (build, check) =>
check.apply(build.com1()) ==> Right("task1,task1", 1)
}
}