Skip to content

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

Open
@Quafadas

Description

@Quafadas

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 ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions