Releases: hzeller/bant
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.
Improved `glob()` implementation; filsystem-prewarm
Most important: glob()
works more accurately now. Previously **/foo.txt
was not matching the plain foo.txt
while now **/
is correctly interpreted as zero or more directory elements. Also, the matching was improved to only delegate to regular expressions if needed, reducing expensive expressions.
Support to get the most out of slow file-systems has been added: on slow network filesystems or cold-storage CI machines it might make sense to enable it by creating a ~/.cache/bant/
directory that bant then makes use of for this feature.
Actionable exit status on `dwyu` and `canonicalize`
Not much functional change, except that the exit status now indicates if there was an edit emitted for dwyu
and canonicalize
mode.
Exit status
0
(zero) if there were not edits to be made (BUILD
files clean already)3
(three) if at least one edit is suggested (cleanup opportunity).
This makes it simple to use in scripts.
The bant
CI shows how to use bant on a bazel project by downloading the static version from the bant release and use that.
Bant first release v0.1.0
First release of bant with all the initial features useful for typical daily work added.
Attached is a statically linked binary to be used on essentially any recent x86_64 Linux.