-
Notifications
You must be signed in to change notification settings - Fork 185
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
better error for external rules ran with old scalafix-cli version #1562
Conversation
I tested to run a build of simulacrum-scalafix against this PR with a very old scalafix-cli and confirmed the presence of the error message
|
metaconfig-pprint brought by metaconfig-core 0.10.0 will not be available to external rules when classloaded by an old scalafix-cli version as the runtime scalafix-core and its dependencies are driven by scalafix-cli dependencies, not the rule dependencies. We obviously have no control over old scalafix-cli versions, but since the reference to the potentially-missing type is from a macro-generated block, this wraps it to provide a more actionable error message.
Unfortunately, sbt-scalfix only keeps the first line of the exception, so this is not useful at all:
Since sbt-scalafix will be updated before any external rule, I guess it's not really a problem. The expected added value of this PR will be on other clients lagging behind. |
Follows #1530
metaconfig-pprint
brought bymetaconfig-core
0.10.0 will not be available to external rules when classloaded by an oldscalafix-cli
version as the runtimescalafix-core
and its dependencies are driven byscalafix-cli
dependencies, not the rule dependencies.We obviously have no control over old
scalafix-cli
versions, but since the reference to the potentially-missing type is from a macro-generated block, this wraps it to provide a more actionable error message.