8000 Ensure a main class element is findable in Scala code passed by `stdin` by Gedochao · Pull Request #933 · VirtusLab/scala-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ensure a main class element is findable in Scala code passed by stdin #933

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

Merged
merged 5 commits into from
Apr 26, 2022

Conversation

Gedochao
Copy link
Contributor
@Gedochao Gedochao commented Apr 25, 2022

Fixes #907

@Gedochao Gedochao force-pushed the fix-main-class-for-stdin-scala-code branch from 88c319d to b1d11ee Compare April 25, 2022 11:36
@Gedochao Gedochao marked this pull request as ready for review April 25, 2022 11:38
Copy link
Contributor
@lwronski lwronski left a comment

Choose a reason for hiding this comment

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

I think, we should fix following use case and update scala-cli integration test

lwronski@VL-D-0317 scala-cli % scala-cli version                         
0.1.4
lwronski@VL-D-0317 scala-cli % scala-cli https://gist.github.com/lwronski/ab522c25905a50d07d0e4cb3e1fcf5d5
Hello
lwronski@VL-D-0317 scala-cli % git branch
* fix-main-class-for-stdin-scala-code
  main
lwronski@VL-D-0317 scala-cli % ./mill scala https://gist.github.com/lwronski/ab522c25905a50d07d0e4cb3e1fcf5d5
Compiling project (Scala 3.1.1, JVM)
Warning: Flag -bootclasspath set repeatedly
Warning: Flag -classpath set repeatedly
[error] ab522c25905a50d07d0e4cb3e1fcf5d5-main/Hello.scala:3:11: Not found: Messages
Error compiling project (Scala 3.1.1, JVM)
Compilation failed
1 targets failed
cli.run subprocess failed

@Gedochao
Copy link
Contributor Author

I think, we should fix following use case and update scala-cli integration test

lwronski@VL-D-0317 scala-cli % scala-cli version                         
0.1.4
lwronski@VL-D-0317 scala-cli % scala-cli https://gist.github.com/lwronski/ab522c25905a50d07d0e4cb3e1fcf5d5
Hello
lwronski@VL-D-0317 scala-cli % git branch
* fix-main-class-for-stdin-scala-code
  main
lwronski@VL-D-0317 scala-cli % ./mill scala https://gist.github.com/lwronski/ab522c25905a50d07d0e4cb3e1fcf5d5
Compiling project (Scala 3.1.1, JVM)
Warning: Flag -bootc
8000
lasspath set repeatedly
Warning: Flag -classpath set repeatedly
[error] ab522c25905a50d07d0e4cb3e1fcf5d5-main/Hello.scala:3:11: Not found: Messages
Error compiling project (Scala 3.1.1, JVM)
Compilation failed
1 targets failed
cli.run subprocess failed

Should be fixed now. The issue involved wrongly passing the relPath appropriate for a stdin input to multiple files inside of a zip archive.
I added a relevant integration test.

@Gedochao Gedochao force-pushed the fix-main-class-for-stdin-scala-code branch from bcb58b1 to 773e4c8 Compare April 26, 2022 07:39
@Gedochao Gedochao force-pushed the fix-main-class-for-stdin-scala-code branch from 773e4c8 to 7cebce4 Compare April 26, 2022 08:15
@Gedochao Gedochao merged commit bdd649e into VirtusLab:main Apr 26, 2022
@Gedochao Gedochao deleted the fix-main-class-for-stdin-scala-code branch April 26, 2022 09: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.

Scala CLI does not see main classes from stdin passed as _.scala
3 participants
0