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

Compile-time error on Scala 3 #179

Open
sergeda opened this issue Apr 29, 2023 · 4 comments
Open

Compile-time error on Scala 3 #179

sergeda opened this issue Apr 29, 2023 · 4 comments

Comments

@sergeda
Copy link

sergeda commented Apr 29, 2023

This code produce compile-time error:

enum Subcommand:
    case IndexFile(file: Path)

val fileArg = Args.file("path-to-file", Exists.Yes) ?? "Path to the file"
val command = Command(name = "index-file", args = fileArg)
    .withHelp("Index file")
    .map{ path => Subcommand.IndexFile(path)}

Version is 0.4.0 , Scala is 3.3.0-RC2
Here is the error:

[error] java.lang.AssertionError: assertion failed: `wildApprox` failed to remove uninstantiated A
[error] scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
@jdegoes
Copy link
Member

jdegoes commented May 9, 2023

/bounty $50

@algora-pbc
Copy link

algora-pbc bot commented May 9, 2023

💎 $50 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #179 with your implementation plan
  2. Submit work: Create a pull request including /claim #179 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-cli!

Add a bountyShare on socials

@andrzejressel
Copy link
Contributor

andrzejressel commented May 10, 2023

I couldn't reproduce it (I believe the supplied code snippet is not enough), but I believe it's this :scala/scala3#17305. I believe it's something on Dotty side, I'll see if I can minimize it.

EDIT: The good thing is that is means something is wrong with your code - so I guess If you find it you don't have to wait for new Dotty version.

@pragmaxim
Copy link

This error seems to happen in case of any compilation error related to the syntax needed in the DSL, so it is indeed a dotty bug, just go line by line or comment out blocks of code and find the real compilation error to get rid of it.

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

No branches or pull requests

4 participants