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

How does this differ from the Vite-Laminar-Livechart example? #4

Open
spaceunifyfifty opened this issue Jul 30, 2024 · 5 comments
Open

Comments

@spaceunifyfifty
Copy link

spaceunifyfifty commented Jul 30, 2024

Are there any differences worth noting between this g8 template repository and specifically the vite-end-state branch from the Getting Started with Scala.js and Vite guide?

As I only want a basic vite.js app without Laminar or Scalably typed, I think the single command

sbt new scala-js/vite.g8

would be easier than running

git clone https://github.com/sjrd/scalajs-sbt-vite-laminar-chartjs-example
mv scalajs-sbt-vite-laminar-chartjs-example my-project-name
cd my-project-name
git switch scalajs-vite-end-state
rm -rf .git

But I want to confirm that the end results will be equivalent. Thanks!

@sjrd
Copy link
Member

sjrd commented Jul 30, 2024

It's intended to be basically the same, but they are not explicitly kept in sync.

@spaceunifyfifty
Copy link
Author

It's intended to be basically the same, but they are not explicitly kept in sync.

Attempting to get this working on my system, sbt ~fastLinkJS yields

[info] started sbt server
java.lang.IllegalArgumentException: Invalid commands: 'fastLinkJS,

Am I supposed to compile this a different way?

@sjrd
Copy link
Member

sjrd commented Jul 30, 2024

I just tried and that command worked as is. What system are you using? Perhaps ~ gets interpreted somehow? Try running sbt without argument, and only within sbt run ~fastLinkJS. That should rule out that hypothesis.

Also make sure you start the command when in the directory that contains the build.sbt file generated by the template.

@spaceunifyfifty
Copy link
Author

spaceunifyfifty commented Jul 30, 2024

I tried again, and now I running sbt yields

[info] welcome to sbt 1.8.2 (Homebrew Java 22.0.2)
error:
  bad constant pool index: 0 at pos: 49176
     while compiling: <no file>
        during phase: globalPhase=<no phase>, enteringPhase=<some phase>
     library version: version 2.12.17
    compiler version: version 2.12.17
  reconstructed args: -classpath /Users/user/.sbt/boot/scala-2.12.17/lib/scala-library.jar -Yrangepos

  last tree to typer: EmptyTree
       tree position: <unknown>
            tree tpe: <notype>
              symbol: null
           call site: <none> in <none>

full gist

@sjrd
Copy link
Member

sjrd commented Jul 30, 2024

Ah you're running into a typical issue with recent Java versions + old sbt/Scala versions. We updated all the things in the vite-laminar-livechart repo but not here.

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

2 participants