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

cross-build to sbt 2.x #440

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

cross-build to sbt 2.x #440

wants to merge 1 commit into from

Conversation

bjaglin
Copy link
Collaborator

@bjaglin bjaglin commented Oct 5, 2024

https://www.scala-sbt.org/2.x/docs/en/changes/migrating-from-sbt-1.x.html
https://github.com/sbt/sbt/wiki/sbt-2.x-plugin-migration

WIP - I'll iterate on that PR in the coming days to find the actual blockers

  • [2.x] Missing implementation of Def.inputTaskDyn sbt/sbt#7707
    [error] -- [E008] Not Found Error: /home/brice/git/scala/sbt-scalafix/src/main/scala/scalafix/sbt/ScalafixPlugin.scala:380:34 
    [error] 380 |    InputTask.createDyn(InputTask.initParserAsInput(scalafixParser))(
    [error]     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [error]     |       value initParserAsInput is not a member of object sbt.InputTask
  • [error] -- [E189] Not Found Error: /home/brice/git/scala/sbt-scalafix/src/main/scala/scalafix/sbt/ScalafixPlugin.scala:246:13 
    [error] 246 |        case Value(v: UpdateReport) => v
    [error]     |             ^^^^^
    [error]     |             no pattern match extractor named Value was found
    [error]     |
    [error]     | longer explanation available when compiling with `-explain`
  • [error] -- [E172] Type Error: /home/brice/git/scala/sbt-scalafix/src/main/scala/scalafix/sbt/ScalafixPlugin.scala:603:45 
    [error] 603 |                write(stampFile(path.toFile))
    [error]     |                                             ^
    [error]     |Ambiguous given instances: both object StringJsonFormat in trait PrimitiveFormats and value argFormat match type sjsonnew.JsonWriter[String] of a context parameter of method write
  • [error] -- [E008] Not Found Error: /home/brice/git/scala/sbt-scalafix/src/main/scala/scalafix/sbt/ScalafixPlugin.scala:437:20 
    [error] 437 |            (config / scalafix / streams).value.log,
    [error]     |             ^^^^^^^^
    [error]     |value / is not a member of sbt.ConfigKey, but could be made available as an extension method.
    [error]     |
    [error]     |One of the following imports might fix the problem:
    [error]     |
    [error]     |  import sbt.SlashSyntax0.given_Conversion_ConfigKey_RichConfiguration
    [error]     |  import sbt.given_Conversion_ConfigKey_RichConfiguration
    [error]     |

@bjaglin bjaglin force-pushed the sbt2 branch 3 times, most recently from c9451e2 to 42e7e69 Compare October 5, 2024 22:05
@bjaglin bjaglin changed the title sbt 2.x cross-build to sbt 2.x Oct 5, 2024
@@ -155,21 +155,21 @@ object ScalafixEnable {
} else {
val latestAvailable =
tail.lastOption.getOrElse(earliestAvailable)
Seq(
Copy link
Collaborator Author

@bjaglin bjaglin Oct 5, 2024

Choose a reason for hiding this comment

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

This was picked as significant indentation by the compiler (and has been also all along by scalafmt, as scala3 is aggressively/incorrectly used on all files as dialect), which was causing latestAvailable's type to be recursive ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant