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 repl does not work with -cp argument, needs -repl as workaround #12973

Closed
bjornregnell opened this issue Jun 28, 2021 · 8 comments · Fixed by #13343
Closed

scala 3 repl does not work with -cp argument, needs -repl as workaround #12973

bjornregnell opened this issue Jun 28, 2021 · 8 comments · Fixed by #13343
Assignees
Labels

Comments

@bjornregnell
Copy link
Contributor

Compiler version

3.0.0 and 3.0.1-RC2

Minimized code and output

The repl cannot be started with a -cp argument.

In 3.0.0 using the .zip from the release on Ubuntu:

$ scala -cp "some.jar" 
warning: command option is not correct.

In 3.0.1-RC2 instead of a warning, the -help output is printed.

Expectation

  • Should start the repl with "some.jar" on claspath.
  • Should work as in Scala 2.

Undocumented workaround:

$ scala -cp "some.jar" -repl
@griggt
Copy link
Contributor

griggt commented Aug 20, 2021

This seems to have been recently fixed, perhaps by #13081?

griggt added a commit to griggt/dotty that referenced this issue Aug 20, 2021
@bjornregnell
Copy link
Contributor Author

Fantastic if this is fixed!!! Will the old -repl option hurt after the fix or will that still work?
(I have updated my teaching material in several places to add -repl when -cp and it goes to print hopefully on Monday, students come Aug 30...)

@griggt
Copy link
Contributor

griggt commented Aug 20, 2021

Will the old -repl option hurt after the fix or will that still work?

I just tried it, and it now displays a message on startup: bad option '-repl' was ignored, but otherwise works.

So the situation is:

Scala 3.0.0 through 3.0.2 (forthcoming, RC1 is out): needs the -repl workaround
Scala 3.1.0 (not yet in RC): will have the fix, complains that -repl is a bad option, but works regardless

@bjornregnell
Copy link
Contributor Author

Thanks @griggt for clarification on versions. (Then I need to decide if I should print as is and make errata or add some kind of footnote with version info or something.)
When might stable 3.1.0 earliest be out on github releases?

@bishabosha
Copy link
Member

bishabosha commented Aug 20, 2021

When might stable 3.1.0 earliest be out on github releases?

If no issues are found with the 3.1.0-RC1 releasing about September 1 then the 3.1.0 final should be about October 13th

@bjornregnell
Copy link
Contributor Author

@griggt Is "bad option" the right message after fix? I mean: is there any use still for that -repl option or it is eradicated for good from 3.1?

@BarkingBad
Copy link
Contributor

I removed it. Related disscussion is here #13081 (comment)

@bjornregnell
Copy link
Contributor Author

Great! (I have just added a note in my teaching material that -repl in conjunction with -cp is not needed from Scala 3.1.0. It will be sent to print on sunday...)

anatoliykmetyuk added a commit that referenced this issue Aug 25, 2021
olsdavis pushed a commit to olsdavis/dotty that referenced this issue Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants