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

[nfc] Update bazel to 7.0.1, clean up git-based dependencies and related documentation #1559

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

fhanau
Copy link
Collaborator

@fhanau fhanau commented Jan 19, 2024

Upstream PR to follow. I don't feel entirely sure about dropping shallow_since but if I interpret bazelbuild/bazel#12857 correctly it will only be faster in edge cases while being slower otherwise as --depth 1 is not being used.

- Based on bazelbuild/bazel#16064 git_repository
  supports the same arguments as new_git_repository and the latter
  should no longer be used.
- Update documentation to reflect that v8 is now used as a http_archive
  dependency.
Based on bazelbuild/bazel#12857 shallow_since
may actually slow down the build. As of version 6.1.0, bazel no longer
prints a warning if shallow_since is absent.
Among other changes this fixes several issues with /tmp in the sandbox
that were introduced in 7.0.0.
@fhanau fhanau requested a review from mikea January 19, 2024 19:32
@fhanau fhanau requested review from a team as code owners January 19, 2024 19:32
@fhanau fhanau requested a review from hoodmane January 19, 2024 19:32
@fhanau
Copy link
Collaborator Author

fhanau commented Jan 19, 2024

CC @jasnell here's the documentation cleanup based on v8 no longer being fetched using git.

@@ -172,11 +172,10 @@ http_archive(
# old for tcmalloc. Absurdly, Bazel simply ignores later attempts to define the same repo name,
# rather than erroring out. Thus this leads to confusing compiler errors in tcmalloc complaining
# that ABSL_ATTRIBUTE_PURE_FUNCTION is not defined.
new_git_repository(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between these sources?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a difference in the past – new_git_repository() supports a build_file argument for importing a repository that does not have a pre-existing bazel build file. However, git_repository() has been updated as of bazel 6.1.0 to also have that argument so that only one function is needed. new_git_repository() is set to be removed in a future version, see bazelbuild/bazel#16064 for details. Currently both versions are supported, but only using one of them looks cleaner.

@fhanau fhanau merged commit 8c29080 into main Jan 23, 2024
11 checks passed
@fhanau fhanau deleted the felix/git_repo-cleanup branch January 23, 2024 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants