-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Scala sh rewrite #13081
Scala sh rewrite #13081
Conversation
46dbb4f
to
86095f7
Compare
86095f7
to
2c46c3e
Compare
33991ab
to
630579b
Compare
Does anyone know why we couldn't create val of type
Also, for coursier tests I need artifacts to be published. Is it OK @smarter or I should redesign it, for example move it to the separate CI action? |
The analysis done by CheckReentrant is imprecise and incorrectly thinks that java regexps are not thread-safe, but it's actually fine to use them, so we just turn off the check using
What's important is that if I run |
def process(args: List[String], settings: Settings): Settings = args match | ||
case Nil => | ||
settings | ||
case "-repl" :: tail => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which situation is it necessary to explicitly pass -repl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, never. But dist/bin
script provides such option, so we wanted to recreate this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's never used let's just remove it then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which situation is it necessary to explicitly pass -repl?
In dist/bin/scalac
, it's needed, but doesn't seem to be needed in dist/bin/scala
.
The last commit committed .class and .tasty files that shouldn't be in git. |
I did it on purpose for testing |
This PR addresses coursier/coursier#2058, right? |
@lrytz I was not aware about this issue. However I am afraid it will take some time till we get it released to maven central, so the coursier descriptor can be created for |
if this is deemed important enough, we could backport it to the 3.0.2 branch. |
1fae969
to
04af902
Compare
…on, apply requested changes
04af902
to
72c279f
Compare
@BarkingBad - I like the idea of migrating functionality from sh script to scala code, although I'm not entirely clear as to the scope of this PR. Will there be support for |
What do you mean @philwalk? If you mean that coursier tests cannot initialize jline I think it's the internal problem from calling in the virtual terminal. Calling REPL works just fine for both shell script and when we eventually turn it into coursier executable |
I'm not referring specifically to the coursier use-case, but to whether and how a Windows When I launch a REPL session from a # philwalk@d5 ~/workspace/dotty-sh-rewrite
$ bin/scala
Starting scala3 REPL...
←[?1h←=←[90m~←[0m
←[?2004h←[34mscala> ←[0m:q
:q
←[?1l←>←[?1000l←[?2004l By contrast, here's what happens with the current scala release: $ /opt/scala3/bin/scala
scala> :q Also, there is some other lost functionality compared to the current release (e.g., BTW, I developed a scala implementation of |
A fix for the cygwin console problem is to copy the following line from [ -z "${ConEmuPID-}" -o -n "${cygwin-}" ] && export MSYSTEM= PWD= # workaround for #12405 |
Thank you for your response @philwalk. I will try to setup VM Windows to test it as well when I settle up with other issues |
@BarkingBad The The decision as to whether an argument is a The release version of |
e8fc083
to
7e43057
Compare
Hi @philwalk I implemented your cygwin fix. Also referring to your comment #13081 (comment) the stacktrace is from the The second comment #13081 (comment) about I rebased onto your branch with tests (since they are not merged yet) and ran these tests locally - all passed 😄 |
2275440
to
ca5b9a7
Compare
ca5b9a7
to
12eeb9f
Compare
Yes, that's better. Everthing looks good to me! |
Could you take a look @philwalk one more time and if everything is OK give approval? I need it to merge the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BarkingBad - everything looks good, I only have one suggestion:
- in CoursierScalaTests.scala, the
scriptTest
only verifies that the property is defined, it could also verify that the value endsWithscriptPath.sc
.
can we backport this? |
I think we could, it would be beneficial for all coursier users I guess |
I'd say no: it's ~500 lines of fresh code, let's leave the backports for the critical bugfixes. |
Hey, this is great! 👏 I was able to figure out how to use this from Coursier today, with a little extra effort; see coursier/coursier#2058 (comment) for details |
No description provided.