Fix source map URLs (as much as possible). Fixes #519 #551
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this is the best I can do for #519
scala-java-time build does some non-standard things that make supporting fully correct source maps pretty hard. But, we can get pretty close. This PR fixes the URLs for all source maps under
core/shared
. Unfortunately, the source maps forcore/js
remain broken, but most files are inshared
. Someone strong in sbt may be able to improve on this, but absent of that, my vote is that it's good enough.Also, scala-java-time build transforms the content of the source files (changes packages / imports / etc.) – FYI, to the extent that this modifies positions of terms in the source code, this could break source maps as well. But, most of the transformations are line-for-line replacements of imports and package names, which should keep the rest of the file unaffected.
In practice, the source maps generated with the new code seem to work just fine for me.
This PR introduces a change in the src_managed folder structure for the
core/js
project. Instead of copying source files intosrc_managed/main/org/threeteen/...
, we now move files intosrc_managed/main/scala/org/threeteen/...
(thescala
part changes toscala-3
for sources that are located inscala-3
).I published the
core
module locally, and used it from my Scala 3 project, and it works fine, source maps included. It seems that these changes should even be binary compatible, seeing that only the folder structure is changed, not package names?