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

Windows, launcher: implement correct escaping #7411

Closed
wants to merge 2 commits into from

Conversation

laszlocsomor
Copy link
Contributor

Add a correct implementation of WindowsEscapeArg.

This is a follow-up to #7402

Next steps:

  • update Bazel to separate jvm_flags that are
    embedded in the native lauancher by some other
    character than space, so that arguments with
    spaces can be embedded

  • replace the current WindowsEscapeArg
    implementation in the launcher with the new,
    correct one

See #7072

Add a correct implementation of WindowsEscapeArg.

This is a follow-up to bazelbuild#7402

Next steps:
- update Bazel to separate jvm_flags that are
  embedded in the native lauancher by some other
  character than space, so that arguments with
  spaces can be embedded

- replace the current WindowsEscapeArg
  implementation in the launcher with the new,
  correct one

See bazelbuild#7072
laszlocsomor added a commit to laszlocsomor/bazel that referenced this pull request Feb 13, 2019
Add an integration test to assert that
subprocesses created with WindowsSubprocessFactory
receive arguments as intended.

Next steps:
- implement the same argument escaping logic in
  Bazel as windowsEscapeArg2 in bazelbuild#7411
- replace WindowsProcesses.quoteCommandLine with
  the new escaper

See bazelbuild#7122
laszlocsomor added a commit to laszlocsomor/bazel that referenced this pull request Feb 13, 2019
Add an integration test to assert that
subprocesses created with WindowsSubprocessFactory
receive arguments as intended.

Next steps:
- implement the same argument escaping logic in
  Bazel as windowsEscapeArg2 in bazelbuild#7411
- replace WindowsProcesses.quoteCommandLine with
  the new escaper

See bazelbuild#7122
bazel-io pushed a commit that referenced this pull request Feb 13, 2019
Add an integration test to assert that
subprocesses created with WindowsSubprocessFactory
receive arguments as intended.

Next steps:
- implement the same argument escaping logic in
  Bazel as windowsEscapeArg2 in #7411
- replace WindowsProcesses.quoteCommandLine with
  the new escaper

See #7122

Closes #7413.

PiperOrigin-RevId: 233730449
@bazel-io bazel-io closed this in b7bd7a1 Feb 13, 2019
@laszlocsomor laszlocsomor deleted the gh-7072-c branch February 13, 2019 13:35
laszlocsomor added a commit to laszlocsomor/bazel that referenced this pull request Feb 13, 2019
When Bazel embeds the jvm_flags data into the
java_binary launcher, it will now join the flags
on TAB instead of on space.

While TAB is just as much a legal character in
flags as space is, it is probably rarer, and as
such its a slightly safer choice than joining the
flags on space (and thus losing the ability to
support flags with spaces in them).

This is a follow-up to bazelbuild#7411

Next steps:

- Update Bazel to Bash-tokenize the jvm_flags
  before embedding them in the launcher. This is
  required because the jvm_flags attribute should
  support Bash-tokenization (according to the
  Build Encyclopedia).

- Update the launcher to escape the jvm_flags with
  WindowsEscapeArg2 instead of WindowsEscapeArg.

See bazelbuild#7072
bazel-io pushed a commit that referenced this pull request Feb 14, 2019
When Bazel embeds the jvm_flags data into the
java_binary launcher, it will now join the flags
on TAB instead of on space.

While TAB is just as much a legal character in
flags as space is, it is probably rarer, and as
such it's a slightly safer choice than joining the
flags on space (and thus losing the ability to
support flags with spaces in them).

This is a follow-up to #7411

Next steps:

- Update Bazel to Bash-tokenize the jvm_flags
  before embedding them in the launcher. This is
  required because the jvm_flags attribute should
  support Bash-tokenization (according to the
  Build Encyclopedia).

- Update the launcher to escape the jvm_flags with
  WindowsEscapeArg2 instead of WindowsEscapeArg.

See #7072

Closes #7421.

PiperOrigin-RevId: 233900484
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants