feat: create symlink for build files present on local installed npm modules #2326
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently if a local module installed with npm contains a BUILD file we generate the usual BUILD file content and just append the one found on the BUILD file.
Issue Number: #2131
What is the new behavior?
With this PR the BUILD file inside an installed local module will be symlinked instead of generated and get its content appended.
Does this PR introduce a breaking change?
It is really unlikely that the current behaviour is being useful to someone who relies on having a BUILD file in a local installed npm module as it introduces a race condition. However, the migration path would be to rewrite their BUILD files inside such modules to contain the expected generated targets by npm_install/yarn_install rules like
*-module__contents
or*--module__files
and also add the extra targets they have previously defined on the BUILD file.HINT: In order to don't have to manually writ
*-module__contents
or*--module__files
we can remove the BUILD file, run the npm_install/yarn_install rules and just grasp the generated BUILD file content.Other information