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

os/exec: on Windows look for extensions in Run if not already done #67035

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

qiulaidongfeng
Copy link
Contributor

@qiulaidongfeng qiulaidongfeng commented Apr 25, 2024

CL 512155 fixed #36768, but introduced #62596.
CL 527820 fixed #62596, but meant that the code failed to look up
file extensions on Windows for a relative path.
This CL fixes that problem by recording whether it has already
looked up file extensions.
This does mean that if Path is set manually then we do not update
it with file extensions, as doing that would be racy.

Fixes #66586

For avoid data race for cmd.Path , in CL 527820 fixed data race , but addition of suffixe as shown in golang#66586 was also introduced.
The result of call lookExtensions is actually the name passed to os.StartProcess,
But solutions at the time chose to reuse cmd.Path to represent the name passed to os.StartProcess,since this results in golang#66586,
So use new field save call lookExtensions result.

Fixes golang#66586

Change-Id: Ib1baa6d7803f9471af6e38bcb55f0298422e6743
@gopherbot
Copy link

This PR (HEAD: 78e0ae5) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

n
Change-Id: Iaf48768865f63b9d828a2bf46478e72da65891c7
@gopherbot
Copy link

This PR (HEAD: fd6c529) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@qiulaidongfeng qiulaidongfeng changed the title os/exec: not add a suffix to Cmd.Path os/exec: not add a suffix to Cmd.Path when absolute path Apr 25, 2024
@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 2: Commit-Queue+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 2:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-25T12:47:06Z","revision":"513c94fb4669854608794164d65687b1d6b0a07e"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 2: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 2:

This CL has failed the run. Reason:

Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results):


FAILURE

Error: failed to run "make.bash": exit status 2

Links:


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 2: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 4: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 4:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-25T13:00:46Z","revision":"74f07c1f2dca4e87e05e2c846a5721c2efc0986b"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 4: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 4:

This CL has failed the run. Reason:

Tryjob golang/try/gotip-windows-amd64 has failed with summary (view all results):


FAILURE

Error: shard 1: failed to run "make.bat": exit status 1

Links:


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 4: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

n
Change-Id: I23878885974cddceb110566020f44a776e9af2f4
n
Change-Id: Ia532697ea429907567ab156f6f50059a15e90fbb
@gopherbot
Copy link

This PR (HEAD: be41db8) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 5: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 5:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-25T13:27:31Z","revision":"809075a3c45077dda6dc4d9fecc402dbec7fecff"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 5: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 5:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 5: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 5:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

n
Change-Id: Ia5035a9e583fffee355265ee18cb10609d9c14c1
@gopherbot
Copy link

This PR (HEAD: d9ffb2d) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 6: Commit-Queue+1

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 6:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-26T08:22:57Z","revision":"d21a94e2cfa4adb969a93ad9900d863e5a40e629"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 6:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 6: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

n
Change-Id: I22c8737d1c6201f5d1b63ff70b85b04df3863e0f
@qiulaidongfeng qiulaidongfeng changed the title os/exec: not add a suffix to Cmd.Path when absolute path os/exec: fix manually set Cmd.Path run fail without suffix Apr 28, 2024
@gopherbot
Copy link

This PR (HEAD: 16f6808) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 8:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 8: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 8:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-28T02:20:19Z","revision":"b4971b50be6894a5b34f3a650c673c381abbcd78"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 8: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 8:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 8: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 8:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

n
Change-Id: I3d1f59eb50c754715d333526b84f7cebee65476a
@gopherbot
Copy link

This PR (HEAD: 119b230) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 9:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 9:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@qiulaidongfeng qiulaidongfeng changed the title os/exec: fix manually set Cmd.Path run fail without suffix os/exec: on Windows look for extensions in Run if not already done Apr 29, 2024
@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 11:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 11: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 11:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-29T10:29:49Z","revision":"8b1c3b29234e74cc9006d2236d4010016d5d35a2"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 11: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 11:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 11: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Russ Cox:

Patch Set 11: Hold+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Russ Cox:

Patch Set 11:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 11:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 11:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants