-
-
Notifications
You must be signed in to change notification settings - Fork 474
Bazel: general improvements. #1043
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
Conversation
Improve the Bazel build. Attempt to fix previous errors recorded while trying to publish ftxui in the Bazel Central Registry: - bazelbuild/bazel-central-registry#4485 - https://buildkite.com/bazel/bcr-presubmit/builds/13601#01968b61-f5b2-4d16-94d0-c87a03a1a23b Test against "recent" platforms ------------------------------- Previously, I got the error: ``` gcc: error: unrecognized command line option '-std-c++20'; did you mean '-std-c++2a'? ``` This was due to using old distribution like ubuntu 2004. Test against newer platforms only to avoid GCC version<-9.x.y Downgrade gtest version. ------------------------ I suspect this caused the Bazel Central Registry error: ``` file:///workdir/modules/googletest/1.15.2/MODULE.bazel:68:20: name 'use_repo_rule' is not defined ``` I hoped using a lower version will fix the issue. Tag gtest as dev_dependency --------------------------- Presumably, this should avoid dependants to fetch it? Enable --features-layering_check -------------------------------- Aka clang `-Wprivate-header`. Fix the encountered errors. Use clang in the CI ------------------- The CI was defining clang/gcc in the matrix, but was not using it. Fix the bug.
Hello @kcc and @robinlinden, Would you have any additional comments / suggestion about FTXUI bazel build files? 1 Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Should allow me to drop the layering_check patch I have. :)
# Test deps. | ||
bazel_dep(name = "googletest", version = "1.16.0.bcr.1") | ||
# Test dependencies. | ||
bazel_dep(name = "googletest", version = "1.14.0.bcr.1", dev_dependency = True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was some discussion in bazelbuild/bazel about test-only deps as dev_dependencies: bazelbuild/bazel#22187
iirc there's some ongoing work on optional dependencies, but I don't think that's in a state where it's usable yet.
Bazel: general improvements.
Improve the Bazel build. Attempt to fix previous errors recorded while
trying to publish ftxui in the Bazel Central Registry:
Test against "recent" platforms
Previously, I got the error:
This was due to using old distribution like ubuntu 2004. Test against
newer platforms only to avoid GCC version<-9.x.y
Downgrade gtest version.
I suspect this caused the Bazel Central Registry error:
I hoped using a lower version will fix the issue.
Tag gtest as dev_dependency
Presumably, this should avoid dependants to fetch it?
Enable --features-layering_check
Aka clang
-Wprivate-header
. Fix the encountered errors.Use clang in the CI
The CI was defining clang/gcc in the matrix, but was not using it. Fix
the bug.