-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
build_file_content in new_local_repository overwrites original BUILD file #1697
Comments
If you already have a BUILD file, use local_repository, not new_local_repository. |
I'm aware of Anyway, this seems like an inconsistency, since |
We should definitely not overwrite the source's BUILD file, I think this is happening because we write the BUILD file after symlinking everything from the source path. So if a build file exist we overwrite it, that is not good. build_file does symlinking so it does overwrite the symlink whereas build_file_content write the file itself. |
Hey @kchodorow,
throws:
|
Whoops. Thanks for the report. |
Wait, how do you have a BUILD file in that directory that isn't a symbolic link? Could you do Edit: just realized that this is probably a remote repository, not a local one. |
Yes, it's git repository.
|
Thanks! It works fine now. |
My previous change carefully checked that the file was a symlink before removing it and added a test with local repositories... and it of course isn't a symlink with downloaded repositories and crashes. Fixes #1697. -- MOS_MIGRATED_REVID=134536130
My previous change carefully checked that the file was a symlink before removing it and added a test with local repositories... and it of course isn't a symlink with downloaded repositories and crashes. Fixes #1697. -- MOS_MIGRATED_REVID=134536130
My previous change carefully checked that the file was a symlink before removing it and added a test with local repositories... and it of course isn't a symlink with downloaded repositories and crashes. Fixes #1697. -- MOS_MIGRATED_REVID=134536130
My previous change carefully checked that the file was a symlink before removing it and added a test with local repositories... and it of course isn't a symlink with downloaded repositories and crashes. Fixes bazelbuild#1697. -- MOS_MIGRATED_REVID=134536130
build_file_content
innew_local_repository
overwrites originalBUILD
file at the source and not just locally...build_file
works as expected and overwritesBUILD
file only locally, without modifyingBUILD
file at the source.The text was updated successfully, but these errors were encountered: