Skip to content

Reintroduce -Zchalk with error recommending -Ztrait-solver=chalk #106514

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

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jan 5, 2023

Adds -Zchalk back with a helpful error message:

error: unstable option `chalk` removed in favor of `-Z trait-solver=chalk`

cc #106385

@rustbot
Copy link
Collaborator

rustbot commented Jan 5, 2023

r? @nagisa

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 5, 2023
@compiler-errors compiler-errors force-pushed the reintroduce-chalk-flag-w-err branch from a5ce2da to 47ecdce Compare January 6, 2023 02:33
@compiler-errors compiler-errors force-pushed the reintroduce-chalk-flag-w-err branch from 47ecdce to 53e46db Compare January 11, 2023 19:55
Copy link
Member

@nagisa nagisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the full refactor like this truly necessary? Could there been a simple if opts.chalk { output_the_diagnostic() } to start?

I would rather the big refactor be discussed separately as a non-functional-change, rather than bundled with useful changes (like -Zchalk). Clearly our options parsing code is now quite crufty and it isn’t clear to me if adding more complexity to it is a good tradeoff at the moment.

(also really sorry for the late review!)

},
Err(ParseError::Removed(in_favor_of)) => early_error(
error_format,
&format!("{outputname} option `{key}` removed in favor of `{in_favor_of}`"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won’t this make the diagnostic here non-translatable? Do we want it to be translatable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just as untranslatable as the existing error message above it. And the inputs are just options, so I don't see why this couldn't be migrated

@compiler-errors
Copy link
Member Author

Is the full refactor like this truly necessary? Could there been a simple if opts.chalk { output_the_diagnostic() } to start?

Yeah, I could probably find somewhere to shove that. I'll put it up as a separate PR, probably much shorter.

@compiler-errors compiler-errors deleted the reintroduce-chalk-flag-w-err branch August 11, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants