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: add back old case in linker to close: https://github.com/bazelbu… #3058

Closed
wants to merge 1 commit into from

Conversation

dymart
Copy link
Contributor

@dymart dymart commented Nov 3, 2021

…ild/rules_nodejs/issues/3054

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)

I'm not as familiar with how to write tests for the linker but given some of the cases were removed on a refactor we might want to define which cases to support somewhere and write tests for them. I would be happy to help with this when I have time. It seems that none of the rules in this repo hit that case and that's why it went unnoticed.

Also not sure if other cases that the linker used to support are missing, just happened to to upgrading some rules and noticed a break between 4.4.1 and 4.4.2 with this case. Or the only case that changed was the one I used.

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?

There was a refactor to the linker between 4.4.1 and 4.4.2 and a case seems to have been dropped.

Issue Number:
#3054

What is the new behavior?

restore behaviour to the linker that was there before the refactor. This fixes the issue 3054.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I don't want it to seem like I'm blaming the refactor, it seems as though the rules I was working on used a case others have not touched. Hopefully writing a test case for this will stop this from happening again.

@alexeagle
Copy link
Collaborator

cool, thanks!

Seems like the CI failure on windows is maybe legit? but only on examples_esbuild?

ERROR: C:/temp/tmp-7636bipkpjjbbjsd/src/BUILD.bazel:6:11: Compiling TypeScript project //src:lib [tsc -p src/tsconfig_lib.json] [for host] failed: (Exit 1): tsc.bat failed: error executing command bazel-out/host/bin/external/npm/typescript/bin/tsc.bat --project bazel-out/host/bin/src/tsconfig_lib.json --outDir bazel-out/host/bin/src --rootDir src ... (remaining 1 argument(s) skipped)
--


} Error: ENOENT: no such file or directory, unlink 'C:\users\b\_bazel_b\yuom5rwl\execroot\examples_esbuild\node_modules'

@dymart
Copy link
Contributor Author

dymart commented Nov 3, 2021

I'll try to reproduce it on windows

@gregmagolan
Copy link
Collaborator

Replaced by #3059

@gregmagolan gregmagolan closed this Nov 4, 2021
@alexeagle
Copy link
Collaborator

@dymart you diagnosed the right problem, which is pretty impressive! You seem to have a deeper Bazel knowledge than almost anyone I've worked with :)

@dymart
Copy link
Contributor Author

dymart commented Nov 4, 2021

Hey @gregmagolan, thanks for taking a look and creating a new pr your solution seems much better :)

@dymart
Copy link
Contributor Author

dymart commented Nov 4, 2021

Thanks @alexeagle, that is very kind of you to say!

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