Fix mill visualize with no arguments failing with MatchError#6973
Draft
Fix mill visualize with no arguments failing with MatchError#6973
mill visualize with no arguments failing with MatchError#6973Conversation
Agent-Logs-Url: https://github.com/com-lihaoyi/mill/sessions/52205d6b-22d4-4601-84f6-9010562f57a1 Co-authored-by: alexarchambault <7063723+alexarchambault@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve error message for visualize command without arguments
Fix Mar 30, 2026
mill visualize with no arguments failing with MatchError
alexarchambault
requested changes
Apr 3, 2026
Collaborator
alexarchambault
left a comment
There was a problem hiding this comment.
Don't use return statements
Agent-Logs-Url: https://github.com/com-lihaoyi/mill/sessions/2d1d2f9b-9db9-404f-8185-4e5f134d1c65 Co-authored-by: alexarchambault <7063723+alexarchambault@users.noreply.github.com>
Contributor
Author
Done in 7b36cb7 — replaced both |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running
mill visualizewith no arguments crashes with an unhelpfulMatchError: List()deep in the resolution stack. This adds an early guard to return a clear failure message instead.Changes
VisualizeModule.visualize0(both the current overload and the deprecated bin-compat one): added upfront empty-tasks check that short-circuits with a descriptiveResult.Failurebefore any task resolution occursBefore:
After: