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

Default to a Scala version for REPL if there are no Scala artifacts. #2431

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

trilleplay
Copy link
Contributor

@trilleplay trilleplay commented Sep 27, 2023

Solves #2430

Currently if there's only non-scala artifacts available when launching the REPL, it throws an error because the underlying logic relied on there being at least one Scala artifact available. This commit resolves the latest version available if we're unable to infer a version from a Scala artifact.

This is my first commit to the project, I've had a look at the contributing document as best as I could but do let me know if I'm missing something!

@MaciejG604
Copy link
Contributor

Hello @trilleplay, thank you for the contribution!

The fix seems to be enough, but to make sure we should have it tested.
Could you add a test case covering the issue to modules/integration/src/test/scala/scala/cli/integration/ReplTests.scala?
You can take inspiration from modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala.

a command for running the ReplTests will be:

./mill integration.test.jvm 'scala.cli.integration.ReplTests.*'

More info on this in DEV.md

@trilleplay
Copy link
Contributor Author

Hey @MaciejG604 , I've gone ahead and introduced a test for this in my latest commit!

Copy link
Contributor

@MaciejG604 MaciejG604 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for helping!

@MaciejG604 MaciejG604 merged commit 5c75f8f into VirtusLab:main Sep 29, 2023
38 checks passed
@trilleplay trilleplay deleted the bugs/2430 branch September 29, 2023 11:53
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.

crash when .java-source only: Error: java.lang.RuntimeException: Expected Scala artifacts to be fetched
2 participants