Skip to content

Releases: hzeller/bant

Better dealing with targets that have slashes.

02 Oct 05:59
Compare
Choose a tag to compare

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

16 Sep 00:48
Compare
Choose a tag to compare

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;

07 Jul 20:58
Compare
Choose a tag to compare

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

19 Jun 06:33
Compare
Choose a tag to compare

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 # and include
  • Allow to tell bant to keep a dependency by adding a # keep comment to a line with a dependency.

Improved `glob()` implementation; filsystem-prewarm

01 Jun 22:02
Compare
Choose a tag to compare

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`

27 May 16:55
Compare
Choose a tag to compare

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.

https://github.com/hzeller/bant/blob/635ae883473c0dcd5292c327e3ff741393d004da/.github/workflows/ci.yml#L117-L130

Bant first release v0.1.0

25 May 05:36
4313283
Compare
Choose a tag to compare

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.