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

fix: support running with --enable_runfiles on Windows #2258

Closed
wants to merge 1 commit into from

Conversation

dae
Copy link
Contributor

@dae dae commented Oct 28, 2020

I was finding the run and test commands on a 2.2.2 nodejs binary on
Windows gave an error message similar to the one mentioned in the
following post when --enable_runfiles is passed in on the command line:

#2178 (comment)

Running without runfiles, my nodejs tests worked correctly, but other packages
in my repo require runfiles, and switching the setting forces many things to be
recompiled.

This patch changes the resolution to use the MANIFEST file inside
the runfiles folder when runfiles are enabled, which seems to fix
the issue.

I'm new to the codebase, and only use it in a limited fashion at the moment,
so this change could benefit from a review by someone more familiar with the code.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla google-cla bot added the cla: yes label Oct 28, 2020
@dae dae marked this pull request as draft October 28, 2020 12:40
@dae
Copy link
Contributor Author

dae commented Oct 28, 2020

Looks like this has broken all the Windows tests - I'll try dig into it some more.

I was finding the run and test commands on a nodejs binary on
Windows gave an error message similar to the one mentioned in the
following post when --enable_runfiles is passed in on the command line:

bazel-contrib#2178 (comment)

Running with --noenable_runfiles, the tests worked correctly, but
other packages in my repo require runfiles.

This patch changes the resolution to use the MANIFEST file inside
the runfiles folder when runfiles are enabled, which seems to fix
the issue for me.
@dae
Copy link
Contributor Author

dae commented Oct 29, 2020

I'm afraid I was not even able to get this repo building on Windows to try the tests locally - it errors out just trying to build @nodejs//:yarn_node_repositories on my Windows system. I tested the original fix by building a release.tar.gz on a Mac machine and copying it over to a Windows system..

@alexeagle
Copy link
Collaborator

Looks like the test assertions are easy enough to update even without having a windows machine available. I'll see if @gregmagolan can take a look since he authored the test that needs to change

@lukasholzer
Copy link
Collaborator

lukasholzer commented Nov 27, 2020

@dae does this fix your problem as well?: #2178

@dae
Copy link
Contributor Author

dae commented Nov 28, 2020

Yep, looks like it does - thanks!

@dae dae closed this Nov 28, 2020
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