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

REVERTED: process.Parser strips escaping backslash #10114

Merged
merged 1 commit into from Aug 22, 2022

Conversation

som-snytt
Copy link
Contributor

"""echo \"hello world\" """.!! should behave like
echo \"hello world\" in the shell, with result
"hello world". The two arguments are "hello
and world".

scala/bug#12611 (comment)

`"""echo \"hello world\" """.!!` should behave like
`echo \"hello world\"` in the shell, with result
`"hello world"`. The two arguments are `"hello`
and `world"`.
@scala-jenkins scala-jenkins added this to the 2.13.10 milestone Aug 20, 2022
@som-snytt som-snytt modified the milestones: 2.13.10, 2.13.9 Aug 20, 2022
@SethTisue SethTisue added the library:base Changes to the base library, i.e. Function Tuples Try label Aug 22, 2022
@SethTisue SethTisue merged commit 8685a46 into scala:2.13.x Aug 22, 2022
@som-snytt som-snytt deleted the followup/12611-strip-quotes branch August 23, 2022 02:06
@SethTisue
Copy link
Member

@som-snytt regression (not sure whether a real regression, or whether it's just surfacing a flaw in test-only code) on Windows: scala/scala-dev#814

@retronym
Copy link
Member

Related to the deduplication of cmd.CommandLineParser and sys.Process.Parser in 0500158. I guess the use case of Settings.processArgumentString ought to skip the new escaping logic? Or is this a general Windows problem for sys.process users as well who would be suprised to see "Process("java.exe c:\temp.jar"") interpret the \ as an escape character?

@som-snytt
Copy link
Contributor Author

In my excitement, I forgot that I commented previously on the anomaly of Windows paths and escapes. Maybe that was in the context of escapes in string interpolations.

I'll take a look shortly, and warn myself on the corresponding dotty PR.

@SethTisue SethTisue changed the title process.Parser strips escaping backslash REVERTED: process.Parser strips escaping backslash Sep 1, 2022
@SethTisue
Copy link
Member

reverted (at least until after 2.13.9 is out) by #10128

@som-snytt
Copy link
Contributor Author

We're not the only ones.

https://bugs.openjdk.org/browse/JDK-8282008

@SethTisue
Copy link
Member

It's all CP/M's fault!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
library:base Changes to the base library, i.e. Function Tuples Try reverted
Projects
None yet
4 participants