All Projects → mikedanese → Gazel

mikedanese / Gazel

Licence: apache-2.0
DEPRECATED: use gazelle

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Gazel

Sandboxfs
A virtual file system for sandboxing
Stars: ✭ 286 (+1200%)
Mutual labels:  bazel
Subpar
Subpar is a utility for creating self-contained python executables. It is designed to work well with Bazel.
Stars: ✭ 471 (+2040.91%)
Mutual labels:  bazel
Zhihudailypurify
Purified version of Zhihu Daily - 更纯净的知乎日报
Stars: ✭ 4,998 (+22618.18%)
Mutual labels:  bazel
Bazel Buildfarm
Bazel remote caching and execution service
Stars: ✭ 352 (+1500%)
Mutual labels:  bazel
Examples
Examples for Bazel
Stars: ✭ 412 (+1772.73%)
Mutual labels:  bazel
Rules nodejs
JavaScript and NodeJS rules for Bazel
Stars: ✭ 488 (+2118.18%)
Mutual labels:  bazel
Rules scala
Scala rules for Bazel
Stars: ✭ 269 (+1122.73%)
Mutual labels:  bazel
Rules docker
Rules for building and handling Docker images with Bazel
Stars: ✭ 744 (+3281.82%)
Mutual labels:  bazel
Rules foreign cc
Build rules for interfacing with "foreign" (non-Bazel) build systems (CMake, configure-make, GNU Make, boost, ninja)
Stars: ✭ 418 (+1800%)
Mutual labels:  bazel
Daml
The Daml smart contract language
Stars: ✭ 548 (+2390.91%)
Mutual labels:  bazel
Angular Bazel Example
MOVED to the bazel nodejs monorepo 👉
Stars: ✭ 354 (+1509.09%)
Mutual labels:  bazel
Tulsi
An Xcode Project Generator For Bazel
Stars: ✭ 365 (+1559.09%)
Mutual labels:  bazel
Intellij
IntelliJ plugin for Bazel projects
Stars: ✭ 500 (+2172.73%)
Mutual labels:  bazel
Bazel
a fast, scalable, multi-language and extensible build system
Stars: ✭ 17,790 (+80763.64%)
Mutual labels:  bazel
Startup Os
Working examples of Google's Open Source stack and deployment to the cloud.
Stars: ✭ 564 (+2463.64%)
Mutual labels:  bazel
Rules typescript
MOVED to https://github.com/bazelbuild/rules_nodejs/tree/3.x/third_party/github.com/bazelbuild/rules_typescript
Stars: ✭ 280 (+1172.73%)
Mutual labels:  bazel
Android Studio Poet
Generate large Android Studio projects
Stars: ✭ 489 (+2122.73%)
Mutual labels:  bazel
Colossus
Colossus — An example microservice architecture for Kubernetes using Bazel, Go, Java, Docker, Kubernetes, Minikube, Gazelle, gRPC, Prometheus, Grafana, and more
Stars: ✭ 917 (+4068.18%)
Mutual labels:  bazel
Awesome Bazel
A curated list of Bazel rules, tooling and resources.
Stars: ✭ 640 (+2809.09%)
Mutual labels:  bazel
Buildtools
A bazel BUILD file formatter and editor
Stars: ✭ 538 (+2345.45%)
Mutual labels:  bazel

gazel - a BUILD file generator for go and bazel

Requirements: #############

  • Your project must be somewhat compatible with go tool because gazel uses go tool to parse your import tree.
  • You must have a GOPATH and GOROOT setup and your project must be in the correct location in your GOPATH.
  • Your ./vendor directory may not contain BUILD files.

Usage:

  1. Get gazel by running go get github.com/mikedanese/gazel/gazel.

  2. Create a .gazelcfg.json in the root of the repository. For the gazel repository, the .gazelcfg.json would look like:

.. code-block:: json

{ "GoPrefix": "github.com/mikedanese/gazel", "SrcDirs": [ "./gazel" ], "SkippedPaths": [ ".foobar(baz)?.$" ] }

  1. Run gazel:

.. code-block:: bash

$ gazel -root=$GOPATH/src/github.com/mikedanese/gazel

Defaults: #########

  • SrcDirs in .gazelcfg.json defaults to ["./"]
  • -root option defaults to the current working directory

Automanagement: ###############

gazel reconciles rules that have the "automanaged" tag. If you no longer want gazel to manage a rule, you can remove the automanaged tag and gazel will no longer manage that rule.

gazel only manages srcs, deps, and library attributes of a rule after initial creation so you can add and managed other attributes like data and copts and gazel will respect your changes.

gazel automatically formats all BUILD files in your repository except for those matching SkippedPaths.

Adding "sources" rules: #######################

If you set "AddSourcesRules": true in your .gazelcfg.json, gazel will create "package-srcs" and "all-srcs" rules in every package.

The "package-srcs" rule is a glob matching all files in the package recursively, but not any files owned by packages in subdirectories.

The "all-srcs" rule includes both the "package-srcs" rule and the "all-srcs" rules of all subpackages; i.e. //:all-srcs will include all files in your repository.

The "package-srcs" rule defaults to private visibility, since it is safer to depend on the "all-srcs" rule: if a subpackage is added, the "package-srcs" rule will no longer include those files.

You can remove the "automanaged" tag from the "package-srcs" rule if you need to modify the glob (such as adding excludes). It's recommended that you leave the "all-srcs" rule automanaged.

Getting latest stable version: ##############################

The latest tagged release of gazel is v14. To get the latest stable version of gazel run:

.. code-block:: bash

$ go get -u gopkg.in/mikedanese/gazel.v14/gazel

Validating BUILD files in CI: #############################

If you run gazel with --validate, it will not update any BUILD files, but it will exit nonzero if any BUILD files are out-of-date. You can add --print-diff to print out the changes needed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].