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 3.5.0 #298

Closed
wants to merge 9 commits into from
Closed

Scala 3.5.0 #298

wants to merge 9 commits into from

Conversation

francisdb
Copy link
Collaborator

@rparree
Copy link
Contributor

rparree commented Aug 26, 2024

I am not sure if you already found the problem, but when i run the commands locally i get

❯ scala3-3.5.0/bin/scala -nocompdaemon test.scala
Deprecated option '-nocompdaemon' is ignored.
The script runner can no longer be picked as before.
Downloading compilation server 1.5.17-sc-2
Starting compilation server
Compiling project (Scala 3.5.0, JVM (17))
[error] ./test.scala:1:52
[error] Not found: dotty
[error] @main def main = println(s"Scala library version ${dotty.tools.dotc.config.Properties.versionNumberString}")
[error]                                                    ^^^^^
Error compiling project (Scala 3.5.0, JVM (17))

[error]        

@rparree
Copy link
Contributor

rparree commented Aug 26, 2024

changing the test code to

echo '@main def main = println(s"Hello Scala")' > test.scala

Fixed the problem for me locally

@francisdb
Copy link
Collaborator Author

related to #208

@francisdb
Copy link
Collaborator Author

@rparree thanks for the hint, I'll fix this.

@francisdb
Copy link
Collaborator Author

francisdb commented Aug 26, 2024

Hmm, looks like this is an issue with scala being replaced by scala-cli

see also VirtusLab/scala-cli#2758

root@00eff3a8e8f5:/# scala run test.scala
Error: os.PathError$LastOnEmptyPath: empty path has no last segment
For more details, please see '/.scala-build/stacktraces/1724704787-6633636436291166558.log'
root@00eff3a8e8f5:/# cat /.scala-build/stacktraces/1724704787-6633636436291166558.log
os.PathError$LastOnEmptyPath: empty path has no last segment
  os.PathError$LastOnEmptyPath$.apply(Path.scala:228)
  os.BasePathImpl.last$$anonfun$1(Path.scala:210)
  scala.Option.getOrElse(Option.scala:201)
  os.BasePathImpl.last(Path.scala:210)
  os.BasePathImpl.last$(Path.scala:190)
  os.Path.last(Path.scala:483)
  os.BasePathImpl.baseName(Path.scala:205)
  os.BasePathImpl.baseName$(Path.scala:190)
  os.Path.baseName(Path.scala:483)
  scala.build.input.Inputs$.forValidatedElems(Inputs.scala:155)
  scala.build.input.Inputs$.forNonEmptyArgs(Inputs.scala:415)
  scala.build.input.Inputs$.apply(Inputs.scala:460)
  scala.cli.commands.shared.SharedOptions$.inputs(SharedOptions.scala:692)
  scala.cli.commands.shared.SharedOptions.inputs(SharedOptions.scala:612)
  scala.cli.commands.run.Run$.runCommand(Run.scala:140)
  scala.cli.commands.run.Run$.runCommand(Run.scala:68)
  scala.cli.commands.run.Run$.runCommand(Run.scala:61)
  scala.cli.commands.ScalaCommand.run(ScalaCommand.scala:379)
  scala.cli.commands.ScalaCommand.run(ScalaCommand.scala:361)
  caseapp.core.app.CaseApp.main(CaseApp.scala:157)
  scala.cli.commands.ScalaCommand.main(ScalaCommand.scala:346)
  caseapp.core.app.CommandsEntryPoint.main(CommandsEntryPoint.scala:169)
  scala.cli.ScalaCliCommands.main(ScalaCliCommands.scala:125)
  scala.cli.ScalaCli$.main0(ScalaCli.scala:291)
  scala.cli.ScalaCli$.main(ScalaCli.scala:117)
  scala.cli.ScalaCli.main(ScalaCli.scala)

@francisdb
Copy link
Collaborator Author

Guess this will have to wait for scala-cli fixes?

@rparree
Copy link
Contributor

rparree commented Aug 27, 2024

That problem i solved by placing the Test.Scala outside the root.

mkdir -p /test &&  echo '@main def main = println("Hello Scala")' > /test/test.scala
scala -nocompdaemon  /test/test.scala

@rparree rparree mentioned this pull request Aug 27, 2024
@rparree
Copy link
Contributor

rparree commented Aug 27, 2024

I created a separate PR #299. I think it should work (local build runs)

@francisdb
Copy link
Collaborator Author

moved to #299

@francisdb francisdb closed this Aug 27, 2024
@francisdb francisdb deleted the scala-3.5.0 branch September 5, 2024 08:40
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

Successfully merging this pull request may close these issues.

2 participants