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

Pass invokeData all the way to pre-processing to give more meaningful error/warning messages #2073

Merged

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented May 4, 2023

Because ScalaCliInvokeData wasn't passed to pre-processing, we didn't know how the app was called when showing warnings/errors in preprocessors.
As a result, we had stuff like this:

scala-cli -e '//> using target.scope "test"'    
# [error] snippet:1:24
# [error] Directives errors: The '//> using target.scope "test"' directive is experimental.
# [error] Please run it with the '--power' flag or turn or turn power mode on globally by running:
# [error]   config power true

which should now be fixed to:

scala-cli -e '//> using target.scope "test"'      
# [error] snippet:1:24
# [error] Directives errors: The '//> using target.scope "test"' directive is experimental.
# [error] Please run it with the '--power' flag or turn or turn power mode on globally by running:
# [error]   scala-cli config power true

This should also make it easier to avoid stuff like that in the future.

@Gedochao Gedochao added the bug Something isn't working label May 4, 2023
@Gedochao Gedochao merged commit e89960e into VirtusLab:main May 5, 2023
@Gedochao Gedochao deleted the directives-cleanup-preprocessing-invoke-data branch May 5, 2023 10:29
@Gedochao Gedochao mentioned this pull request May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants