GitHunt
CB

cburroughs/example-codegen

An example repository to demonstrate codegen support in Pants

example-codegen

An example repository to demonstrate codegen support in Pants.

You run Pants goals using the pants launcher binary, which will bootstrap the
version of Pants configured for this repo if necessary.

See here for how to install the pants binary.

Refer to these docs for more information:

Some commands you can try out:

  • pants export-codegen :: - see the generated files.
    • This isn't necessary for Pants to use the generated files, but can be useful when
      debugging or to generate files for IDEs.
  • pants test :: - run all tests
  • pants fmt :: - format Protobuf with buf
  • pants lint :: - lint Protobuf with buf
  • pants dependencies <path/to/file> - see what depends on what

Check out our other example repositories to see
other features like packaging binaries.

Note: to try out Go, you must comment out pants_ignore in pants.toml. This is so that non-Go
users do not need to have Go installed to run the project.

Languages

Shell69.8%Python13.1%Starlark7.8%Thrift5.2%Go4.2%

Contributors

Apache License 2.0
Created January 31, 2025
Updated January 31, 2025
cburroughs/example-codegen | GitHunt