Skip to content

Conversation

@Nitwix
Copy link

@Nitwix Nitwix commented Aug 12, 2025

When running scala run hello.scala as shown in the tutorial (https://docs.scala-lang.org/scala3/book/taste-hello-world.html) I get:

source file not found: run
1 error found
Errors encountered during compilation

This happens with scala 3.3.6:

> scala --version
Scala code runner version 3.3.6 -- Copyright 2002-2025, LAMP/EPFL

Am I doing something wrong, or is the documentation out of date?

If I only do scala hello.scala, it works as expected, which is why I propose this PR.

Nitwix added 2 commits August 12, 2025 11:12
When running `scala run hello.scala` I get:
```
source file not found: run
1 error found
Errors encountered during compilation
```

=======
Context: `scala --version`:
```
Scala code runner version 3.3.6 -- Copyright 2002-2025, LAMP/EPFL
```
@sjrd
Copy link
Member

sjrd commented Aug 12, 2025

Am I doing something wrong, or is the documentation out of date?

IIUC, it's your version of the scala runner that is out of date. The documentation assumes a scala runner at least 3.5.0.

@Nitwix
Copy link
Author

Nitwix commented Aug 12, 2025

Am I doing something wrong, or is the documentation out of date?

IIUC, it's your version of the scala runner that is out of date. The documentation assumes a scala runner at least 3.5.0.

Ah! makes sense. Thanks for the quick answer. I'll close the PR then.

Just fyi, the reason I had scala 3.3.6 installed is because it's the latest supported version on nixpkgs (but that's more a nix problem than a scala problem x) ): https://search.nixos.org/packages?channel=unstable&show=scala&from=0&size=50&sort=relevance&type=packages&query=scala

@Nitwix Nitwix closed this Aug 12, 2025
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