bazelbuild / rules_license

Apache License 2.0
80 stars 28 forks source link

How to use rules_license on the envoy project ? #136

Open aallrd opened 11 months ago

aallrd commented 11 months ago

Hello,

I have to list all the external dependencies of a bazel built project (envoy), with their name, version and license(s).

It seems rules_license would help me in this task, but I don't understand how to use it (I am new to bazel), do you have an example ?

Regarding my envoy specific use case, it seems all the required information is available to bazel: envoy/bazel/repository_locations.bzl

I have a bazel build command used to produce an envoy static binary with many 'filters' and 'options':

bazel \
  build \
  --define google_grpc=disabled  \
  --@envoy//bazel:http3=False     \
  --@envoy//source/extensions/wasm_runtime/v8:enabled=false \
  [...]
  @envoy//source/exe:envoy-static
phlax commented 4 weeks ago

@aallrd envoy has a bazel target that produces a json representation of the dependencies including license info

bazel build //bazel:all_repository_locations