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 old scala runner to use correct JLine classpath #22464

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

WojciechMazur
Copy link
Contributor

@WojciechMazur WojciechMazur commented Jan 27, 2025

  • Remove JNA dependencies from dist scripts.
  • Add jline-native dependency (used by jline-terminal-jni)

Issue affected only Windows users - when executing the script the no longer existing class path entries (jna-5, and jline-terminal-jna) were reported with errors as not existing files

Fixes #22460

@WojciechMazur
Copy link
Contributor Author

Test locally on Windows machine

PS C:\Users\scala\scala3> .\dist\target\pack\bin\scala.bat --version
Scala code runner version 3.3.5-RC3-bin-SNAPSHOT-git-f70ef36 -- Copyright 2002-2025, LAMP/EPFL
PS C:\Users\scala\scala3> .\dist\target\pack\bin\scala.bat
Welcome to Scala 3.3.5-RC3-bin-SNAPSHOT-git-f70ef36 (1.8.0_292, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.

scala> :q
PS C:\Users\scala\scala3> .\dist\target\pack\bin\scalac.bat --version
Scala compiler version 3.3.5-RC3-bin-SNAPSHOT-git-f70ef36 -- Copyright 2002-2025, LAMP/EPFL
PS C:\Users\scala\scala3> .\dist\target\pack\bin\scaladoc.bat --version
Scaladoc version 3.3.5-RC3-bin-SNAPSHOT-git-f70ef36 -- Copyright 2002-2025, LAMP/EPFL
PS C:\Users\scala\scala3>

@WojciechMazur
Copy link
Contributor Author

Behaviour before the fix:

PS C:\Users\scala\scala3> .\dist\target\pack\bin\scaladoc.bat --version
File Not Found
File Not Found
Scaladoc version 3.3.5-RC3-bin-SNAPSHOT-git-2bda6c1 -- Copyright 2002-2025, LAMP/EPFL
PS C:\Users\scala\scala3> .\dist\target\pack\bin\scalac.bat --version
File Not Found
File Not Found
Scala compiler version 3.3.5-RC3-bin-SNAPSHOT-git-2bda6c1 -- Copyright 2002-2025, LAMP/EPFL
PS C:\Users\scala\scala3> .\dist\target\pack\bin\scala.bat --version
File Not Found
File Not Found
Scala code runner version 3.3.5-RC3-bin-SNAPSHOT-git-2bda6c1 -- Copyright 2002-2025, LAMP/EPFL
PS C:\Users\scala\scala3> .\dist\target\pack\bin\scala.bat
File Not Found
File Not Found
Jan 27, 2025 12:48:24 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
Welcome to Scala 3.3.5-RC3-bin-SNAPSHOT-git-2bda6c1 (1.8.0_292, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.

scala>

@WojciechMazur WojciechMazur merged commit 3231b5b into scala:release-3.3.5 Jan 27, 2025
20 checks passed
@WojciechMazur WojciechMazur deleted the fix/jni-deps-deps branch January 27, 2025 13:37
@michelou
Copy link
Contributor

@WojciechMazur You did not follow my instructions faithfully.
The following 2 script files are still incorrect :

scala3/dist/bin/scaladoc
scala3/dist/bin/scaladoc.bat

@michelou michelou mentioned this pull request Jan 27, 2025
34 tasks
@WojciechMazur
Copy link
Contributor Author

@michelou
Thanks, that a mistake. However, can I ask you how did the issue affected you? I assume you're using Windows becouse it seems to be the only OS where there was a problem in the first place. Are you using the PowerShell/CMD or some Unix-like shell? When testing it on Windows is seemed to worked even before the fix, however it warned with not found errors

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.

3 participants