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

Fix --offline mode for scala-cli as scala installation via coursier #3029

Conversation

Gedochao
Copy link
Contributor

Fixes #3021

Copy link
Member

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

Lgtm!

@Gedochao Gedochao force-pushed the maintenance/fix-coursier-scala-cli-as-scala-installation branch from a7d2606 to 0b237c2 Compare July 16, 2024 11:55
@Gedochao Gedochao marked this pull request as ready for review July 16, 2024 11:56
@Gedochao
Copy link
Contributor Author

Kudos to @kasiaMarek for the initial idea for this hack, btw.

Copy link
Contributor

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

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

Can confirm this works very well (pwd returns the directory of the coursier installed scala 3.5.0-RC4)-

/Users/jamie/Workspace/scala-cli/out/cli/3.3.3/standaloneLauncher.dest/launcher \
  --prog-name scala \
  --cli-default-scala-version 3.5.0-RC4 \
  -r file://$(pwd)/maven2 \
  --power -e 'println(sys.props("java.class.path"))' --offline --server=false
The `--offline` option is experimental
Please bear in mind that non-ideal user experience should be expected.
If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
/var/folders/s7/dl7h4p057cz0fw4xgrv9snmm0000gn/T/10085725059665397379/.scala-build/10085725059665397379_39f5220048-c1fd01f914/classes/main:/Users/jamie/Library/Caches/Coursier/arc/https/github.com/scala/scala3/releases/download/3.5.0-RC4/scala3-3.5.0-RC4-aarch64-apple-darwin.tar.gz/scala3-3.5.0-RC4-aarch64-apple-darwin/maven2/org/scala-lang/scala3-library_3/3.5.0-RC4/scala3-library_3-3.5.0-RC4.jar:/Users/jamie/Library/Caches/Coursier/arc/https/github.com/scala/scala3/releases/download/3.5.0-RC4/scala3-3.5.0-RC4-aarch64-apple-darwin.tar.gz/scala3-3.5.0-RC4-aarch64-apple-darwin/maven2/org/scala-lang/scala-library/2.13.14/scala-library-2.13.14.jar

this is under the same conditions - coursier cache only has POM for scala3-compiler_3:3.5.0-RC4

@kasiaMarek
Copy link
Collaborator

Kudos to @kasiaMarek for the initial idea for this hack, btw.

Oh, how nice and thoughtful, though I believe it was actually @tgodzik's idea.

@Gedochao Gedochao merged commit e1c5c9c into VirtusLab:main Jul 17, 2024
75 checks passed
@Gedochao Gedochao deleted the maintenance/fix-coursier-scala-cli-as-scala-installation branch July 17, 2024 07:13
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.

can not use explict repo in offline mode when coursier cache has only POM file
4 participants