bazelbuild / BUILD_file_generator

Generate BUILD files for your Java files
Apache License 2.0
39 stars 19 forks source link

Document usage of BFG and modify usage to be more ergonomic #24

Open petroseskinder opened 6 years ago

petroseskinder commented 6 years ago

Bouncing off #21, the following changes arose after I tried (and failed) to use Bfg on a simple java project.

Documentation

NOTE: This is a WIP. My primary intent is to get the ball rolling on documentation.

It has been roughly a year since I last made serious contributions to Bfg, so there were a number of basic facts I had to recollect (e.g. like motivation, usage, etc). I augmented the README with whatever I felt was inadequately documented. Admittedly, there are a number of TODO statements littered through the README for things that were still unclear to me. For example, I don't really understand how you what the new proto format should look like.

Ergonomics

One thing I found incredibly annoying was needing to perform

bazel run //src/main/java/com/google/devtools/build/bfg:bfg

I found it more ergonomic to perform

bazel run //src:bfg

Consequently, I have moved the java_binary targets into their respective top level directories lang/ and src/. There is little need for the java_binary's to be wedged deep into the code base.

@cgrushko, undoubtedly, I have likely made stylistic snafus with how I managed visibility. Please let me know what the best approach is there.

petroseskinder commented 6 years ago

@spomorski since carmi is on paternity leave. Here is the documentation I was referring to.

tualeron commented 6 years ago

I don't have write access to this repository, but I provided approval from the documentation standpoint.

tualeron commented 6 years ago

Hey guys, any movement on this? I'm writing official documentation for bazel-deps and Bfg and would love to use this readme as source material. Thank you!