cquiroz / scala-java-time

Implementation of the `java.time` API in scala. Especially useful for scala.js
http://cquiroz.github.io/scala-java-time/
BSD 3-Clause "New" or "Revised" License
126 stars 33 forks source link

Scala.js source maps are pointing to unpublished generated sources #519

Open raquo opened 3 weeks ago

raquo commented 3 weeks ago

Hello,

The Scala.js source maps should point to the corresponding file on raw.githubusercontent.com containing the corresponding file content.

For example, the source map url for ZoneRulesProvider.scala should* point to https://raw.githubusercontent.com/cquiroz/scala-java-time/v2.6.0/core/shared/src/main/scala/org/threeten/bp/zone/ZoneRulesProvider.scala, however currently the published source maps for this file are pointing to https://raw.githubusercontent.com/cquiroz/scala-java-time/v2.6.0/core/js/target/scala-3.3.3/src_managed/main/org/threeten/bp/zone/ZoneRulesProvider.scala which does not exist.

* Assuming that the files are copied into target without modification. If there are source modifications during that copy, then the issue becomes more complicated.

This source mapping feature was first raised in #25 and fully implemented in #32. It's likely that moving to sbt-typelevel in #418 broke this, as that is when the code from #32 was removed.

ETA: As for how to test the correctness of the paths – the sjsir files in the published artifact are binary, but contain these paths as plain strings, so you can view them e.g. in IntelliJ under "external libraries" in the project / file tree, when loading the library from another intellij project. IDE may need a restart / reload when updating the publishLocal-ed version to see the changes.

cquiroz commented 3 weeks ago

I'm sorry too hear that, I'd be happy too accept a PR if you find a fix