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

Update Scala Toolkit to 0.4.0 & dynamically adjust Scala Native defaults #2955

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Jun 6, 2024

This PR does the following:

  • bumps the default Scala Toolkit to 0.4.0
  • lifts the Scala Native downgrade to 0.4.17 when default Scala toolkit is used (since toolkit 0.4.0 supports Scala Native 0.5.x)
  • still downgrades Scla Native to 0.4.17 when default native version is used and the user explicitly uses Toolkit 0.3.0 or older
scala-cli -e 'println(os.pwd)' --toolkit 0.3.0 --native                          
# [warn] Scala Toolkit Version(0.3.0) does not support Scala Native 0.5.3, 0.4.17 should be used instead.
# [warn] Scala Native default version 0.5.3 is not supported in this build. Using 0.4.17 instead.
# Compiling project (Scala 3.4.2, Scala Native 0.4.17)
# Compiled project (Scala 3.4.2, Scala Native 0.4.17)
# [info] Linking (900 ms)
# [info] Checking intermediate code (quick) (63 ms)
# [info] Discovered 888 classes and 5298 methods
# [info] Optimizing (debug mode) (836 ms)
# [info] Generating intermediate code (620 ms)
# [info] Produced 10 files
# [info] Compiling to native code (1860 ms)
# [info] Linking with [pthread, dl]
# [info] Total (4406 ms)
/~/scala-cli-tests

It, however, does not:

  • downgrade toolkit to 0.3.0 when built with Scala Native 0.4.x
scala-cli -e 'println(os.pwd)' --toolkit default --native --native-version 0.4.17
# Downloading 4 dependencies and 2 internal dependencies
# [error]  Error downloading org.scala-lang:toolkit-test_native0.4_3:0.4.0
# [error]   not found: /Users/pchabelski/.ivy2/local/org.scala-lang/toolkit-test_native0.4_3/0.4.0/ivys/ivy.xml
# [error]   not found: https://repo1.maven.org/maven2/org/scala-lang/toolkit-test_native0.4_3/0.4.0/toolkit-test_native0.4_3-0.4.0.pom
# [error]   not found: /Users/pchabelski/Library/Caches/ScalaCli/local-repo/1.3.2-12-70e34f/org.scala-lang/toolkit-test_native0.4_3/0.4.0/ivys/ivy.xml
# [error]   No fallback URL found
# [error] COMMAND_LINE
# [error]  Error downloading org.scala-lang:toolkit_native0.4_3:0.4.0
# [error]   not found: /Users/pchabelski/.ivy2/local/org.scala-lang/toolkit_native0.4_3/0.4.0/ivys/ivy.xml
# [error]   not found: https://repo1.maven.org/maven2/org/scala-lang/toolkit_native0.4_3/0.4.0/toolkit_native0.4_3-0.4.0.pom
# [error]   not found: /Users/pchabelski/Library/Caches/ScalaCli/local-repo/1.3.2-12-70e34f/org.scala-lang/toolkit_native0.4_3/0.4.0/ivys/ivy.xml
# [error]   No fallback URL found
# [error] COMMAND_LINE

Downgrading the default toolkit version when Scala Native 0.4.x is explicitly passed should be addressed separately (if we even decide to fix it, as that'd require rewriting a big chunk of the toolkit integration).

@Gedochao Gedochao force-pushed the maintenance/toolkit-0.4.0-0.3.0 branch from 70e34f6 to a451083 Compare June 6, 2024 12:48
@Gedochao Gedochao force-pushed the maintenance/toolkit-0.4.0-0.3.0 branch from a451083 to 07bd56c Compare June 7, 2024 13:56
@Gedochao Gedochao marked this pull request as ready for review June 7, 2024 13:56
@Gedochao Gedochao changed the title Update Scala Toolkit to 0.4.0 & dynamically adjust Scala Native/Scala Toolkit defaults Update Scala Toolkit to 0.4.0 & dynamically adjust Scala Native defaults Jun 7, 2024
Copy link
Collaborator

@kasiaMarek kasiaMarek 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 merged commit d7311e9 into VirtusLab:main Jun 10, 2024
75 checks passed
@Gedochao Gedochao deleted the maintenance/toolkit-0.4.0-0.3.0 branch June 10, 2024 11:27
@Gedochao
Copy link
Contributor Author

Addresses the Scala Toolkit part of #2870

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