-
Notifications
You must be signed in to change notification settings - Fork 157
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
No source root found for .../modules/core/shared/src/main/scala-3/io/circe/Derivation.scala
#444
Comments
Thanks for the report @nikololiahim. Can you verify if the behavior is the same or different if you use 2.13.8. If it's not then it would be a problem in the actual Scala 3 compiler and we can move this issue over there. |
@ckipp01 Just tried with 2.13.8, seems to work correctly. I had to rewrite the code a bit: import io.circe._
import io.circe.generic.semiauto._
case class User(name: String, address: Address)
case class Address(country: String, city: String)
object User {
implicit val userDecoder: Codec[User] = deriveCodec
implicit val addrDecoder: Codec[Address] = deriveCodec
def fromString(s: String): Option[User] = {
s.split(",[ ]?") match {
case Array(name, country, city) =>
Some(User(name, Address(country, city)))
case _ => None
}
}
} And also add "io.circe" %% "circe-generic-extras" % "0.14.2", to Seems like the problem is indeed tied to the |
Gotcha, since this works for 2.13, are you then able to create an issue for this over at https://github.com/lampepfl/dotty/issues since I believe it will actually need to be fixed over there. |
@ckipp01 Should I copy it as is or should I reword it somehow? |
You can just copy and just ensure that you have a minimal reproduction. |
seems like it was already reported: scala/scala3#15490 |
Ah, perfect. I totally missed that. |
@ckipp01 I checked this issue on dotty side and the generation looks to be working as intended. I closed the issue as |
The issue is still present with Scala 3.2.1-RC1. |
This issue seems to be preventing PureConfig from enabling coverage on Scala 3 (pureconfig/pureconfig#1387). |
Same thing with Scala |
Note that this is probably the same issue as in #458 and I believe should be fixed by the work in scala/scala3#16235. |
IMO, fixing the coverage instrumentation is good but the report writer of scoverage should be able to ignore missing sources 🤔 Design for failure :) |
But then how else would we know the instrumentation is broken! Jokes aside, it's probably a good idea to loudly warn the user in this situation but gracefully continue. As you said it'd require some small changes in https://github.com/scoverage/scalac-scoverage-plugin, which I'd be happy to review. |
Apologies for being a pest but what is the state now? It looks like scala/scala3#16235 is merged (thank you @TheElectronWill). I see that dotty is at 3.2.1-RC4. Will that changset make it in 3.2.1? If that is the case, from what I get from this thread, a subsequent change needs to be made to https://github.com/scoverage/scalac-scoverage-plugin? Is that what is supposed to happen or am I misunderstanding? |
3.2.1 is actually released already, just not announced as the other parts of the ecosystem need to catch up. https://github.com/lampepfl/dotty/releases/tag/untagged-6fa1a15db952f2cb4a28
Nope, this will just be fixed when the coverage output from the compiler is fixed. There are some changes we can make to maybe hand this type of situation a bit better though, and I'm open to review those changes. |
Scala |
Thanks for confirming @z4f1r0v. I'll go ahead and close this then. If anyone else is hitting on this and |
Getting the "No source root found for ..." error on Could be a cross project issue? The listed source roots are correct, but where No idea why this is happening, but it makes EDIT If I run tests/coverageReport from individual subprojects then everything works as expected. Not ideal, but it will have to do for now. I'll see if I can come up with a minimal repro and file a separate issue -- I suspect cross project + |
I don't know if this affects only
circe
or any code that uses thederives
keyword.To reproduce:
User.scala
tosrc/main/scala
folder andUserTest.scala
tosrc/test/scala
folder.sbt clean coverage test coverageReport
Problem
The command fails with:
The text was updated successfully, but these errors were encountered: