Releases: hzeller/bant
More evaluation and built-in macros.
A lot of features that help to better evaluate BUILD-files to see through more
constructs needed for dwyu
(Also printing allows to show the evaulated
view if requested).
Most notably added were list comprehension (for lists and rule generation) and
some common string methods (e.g. "str".format()
or "str".join()
).
Also, bant now employs some builtin-macros to help further see through
bazel rules by breaking them down into genrule()
and cc_library()
for
dwyy
to understand.
Note, also available in the Bazel Central Registry for easy integration in your project
bazel_dep(name = "bant", version = "0.2.0")
Improved cxxopt extracting for compilation DB
For creating the compilation DB, the copt and cxxopts are extracted from the .bazelrc
more comprehensively.
Note, also available in the Bazel Central Registry for easy integration in your project
bazel_dep(name = "bant", version = "0.1.14")
Deal with aliased proto rules; compilation DB includes build outputs
- Improved dealing in
dwyu
for proto buffer rules that are aliased. - Compilation DB adds
-I
includes forbazel-bin/
generated header files
Minor maintenance: reduce requirement from c++23 -> c++20
No substantial changes this time, just reducing c++ standard requirement.
Maintenance release, refined compdb, updated MODULE.bazel
Maintenance release.
Read bazel 8 workspaces
First step towards reading bazel8 workspaces.
Also: improve assembly of include directories in the experimental compilation db/compilation flags feature (it is now better working for bzlmod repos).
Better dealing with targets that have slashes.
Maintenance release.
This improves dealing with targets that have slashes in them, such as:
cc_library(
name = "foo/bar"
# ...
)
These will now be correctly dealt with in printing mypackage:/foo/bar
and other features such as dwyu
Maintenance release; improved DWYU reduced dependency set
Most relevant change is a more compact dependency set calculation when suggesting DWYU edits.
This is needed because unfortunately some projects list the same header as provided by multiple libraries, so there can be an ambiguity which library to link. In these cases, the minimal set of dependencies is determined and used.
Improved alias handling; printing with grep;
In this release
- Improved alias handling in
bant dwyu
operation : more cases where aliases are used to organize location and visibility of libraries are handled. - The
print
command does some basic syntax highlighting print
now has a-g
option to 'grep' for any substring. Not only the matching line is printed, but the whole surrounding rule.- Some early stages of compilation-db creation added (though not complete and thus not working in all cases yet)
Refine parsing; improved visibility checking; allow # keep
Minor improvements
- Parse more rare observed constructs in bazel files.
- Visibility rules: assume
//visibility:public
if visibility rule can not be elaborated. - When extracting include files, allow for spaces between
#
andinclude
- Allow to tell bant to keep a dependency by adding a
# keep
comment to a line with a dependency.