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

Scala JS source maps, map to CI runner dir? #124

Open
Quafadas opened this issue Jan 5, 2023 · 0 comments
Open

Scala JS source maps, map to CI runner dir? #124

Quafadas opened this issue Jan 5, 2023 · 0 comments

Comments

@Quafadas
Copy link

Quafadas commented Jan 5, 2023

In my pet project, vite complains about source map errors. I believe one of the culprits to be this sourcecode library.

Here's a sample .js.map file.

{
"version": 3,
"file": "frontend.Clients$.js",
"mappings": "blah blah",
"sources": ["https://raw.githubusercontent.com/raquo/Airstream/c769f6591e7f6f1377154d484ce8657b752aa179/src/main/scala/com/raquo/airstream/core/BaseObservable.scala", "file:///C:/temp/ilsclaims/frontend/src/utils.scala", "https://raw.githubusercontent.com/raquo/Airstream/c769f6591e7f6f1377154d484ce8657b752aa179/src/main/scala/com/raquo/airstream/state/Var.scala", "file:///home/runner/work/sourcecode/sourcecode/sourcecode/src/sourcecode/SourceContext.scala"],
"names": ["internal-b28b7af69320201d1cf206ebf28373980add1451", "eventClient", "internal-9fb50eb6088e86acde75de71513c77ec947f608e", "exposedEventClient", "notificationClient", "claimReportClient", "ilsopWrapperClient"],
"lineCount": 59
}

I think the important part, is the file:///home/runner/work/sourcecode/sourcecode/sourcecode/src/sourcecode/SourceContext.scala line, which obviously doesn't exist, in my local environment. Compared to the laminar source above, which references back to github.

I lurk discord, where this was discussed at some length;
https://discord.com/channels/632150470000902164/635668814956068864/1060561961810677760

Typelevel have a solution here,
https://github.com/typelevel/sbt-typelevel/blob/4da726ca021ea2c6459e8286d9ec49ab7c79a883/github/src/main/scala/org/typelevel/sbt/TypelevelScalaJSGitHubPlugin.scala#L35

And laminar / airstream must have one, as that appears to be working above.

I believe there to be a compiler flag, which could potentially point this back to this repository, for example. I will openly admit, that my understanding of this, is superficial however ...

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

No branches or pull requests

1 participant