Skip to content

Commit

Permalink
Disable protocol regeneration during normal library use
Browse files Browse the repository at this point in the history
  • Loading branch information
wintersteiger committed Aug 1, 2024
1 parent f346491 commit bf11fd2
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ clean:
@dune clean

protoc-gen:
@dune build @lint
FORCE_GENPROTO=true @dune build @lint

format:
@dune build @fmt
Expand Down
121 changes: 97 additions & 24 deletions src/proto/dune
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
(rule
(alias lint)
(mode promote)
(enabled_if %{env:FORCE_GENPROTO=false})
(targets status.ml status.mli)
(deps
(:file status.proto)
Expand All @@ -20,95 +21,167 @@
(rule
(alias lint)
(mode promote)
(enabled_if %{env:FORCE_GENPROTO=false})
(targets common.ml common.mli)
(deps
(:file
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto)
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto)
(source_tree %{project_root}/vendor/opentelemetry-proto/))
(action
(run ocaml-protoc %{file} -I %{project_root}/vendor/opentelemetry-proto/
--ml_out . --pp --make --binary)))
(run
ocaml-protoc
%{file}
-I
%{project_root}/vendor/opentelemetry-proto/
--ml_out
.
--pp
--make
--binary)))

(rule
(alias lint)
(mode promote)
(enabled_if %{env:FORCE_GENPROTO=false})
(targets resource.ml resource.mli)
(deps
(:file
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto)
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto)
(source_tree %{project_root}/vendor/opentelemetry-proto/))
(action
(run ocaml-protoc %{file} -I %{project_root}/vendor/opentelemetry-proto/
--ml_out . --pp --make --binary)))
(run
ocaml-protoc
%{file}
-I
%{project_root}/vendor/opentelemetry-proto/
--ml_out
.
--pp
--make
--binary)))

(rule
(alias lint)
(mode promote)
(enabled_if %{env:FORCE_GENPROTO=false})
(targets trace.ml trace.mli)
(deps
(:file
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto)
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto)
(source_tree %{project_root}/vendor/opentelemetry-proto/))
(action
(run ocaml-protoc %{file} -I %{project_root}/vendor/opentelemetry-proto/
--ml_out . --pp --make --binary)))
(run
ocaml-protoc
%{file}
-I
%{project_root}/vendor/opentelemetry-proto/
--ml_out
.
--pp
--make
--binary)))

(rule
(alias lint)
(mode promote)
(enabled_if %{env:FORCE_GENPROTO=false})
(targets metrics.ml metrics.mli)
(deps
(:file
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto)
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto)
(source_tree %{project_root}/vendor/opentelemetry-proto/))
(action
(run ocaml-protoc %{file} -I %{project_root}/vendor/opentelemetry-proto/
--ml_out . --pp --make --binary)))
(run
ocaml-protoc
%{file}
-I
%{project_root}/vendor/opentelemetry-proto/
--ml_out
.
--pp
--make
--binary)))

(rule
(alias lint)
(mode promote)
(enabled_if %{env:FORCE_GENPROTO=false})
(targets logs.ml logs.mli)
(deps
(:file
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto)
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto)
(source_tree %{project_root}/vendor/opentelemetry-proto/))
(action
(run ocaml-protoc %{file} -I %{project_root}/vendor/opentelemetry-proto/
--ml_out . --pp --make --binary)))
(run
ocaml-protoc
%{file}
-I
%{project_root}/vendor/opentelemetry-proto/
--ml_out
.
--pp
--make
--binary)))

(rule
(alias lint)
(mode promote)
(enabled_if %{env:FORCE_GENPROTO=false})
(targets metrics_service.ml metrics_service.mli)
(deps
(:file
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto)
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto)
(source_tree %{project_root}/vendor/opentelemetry-proto/))
(action
(run ocaml-protoc %{file} -I %{project_root}/vendor/opentelemetry-proto/
--ml_out . --pp --make --binary)))
(run
ocaml-protoc
%{file}
-I
%{project_root}/vendor/opentelemetry-proto/
--ml_out
.
--pp
--make
--binary)))

(rule
(alias lint)
(mode promote)
(enabled_if %{env:FORCE_GENPROTO=false})
(targets trace_service.ml trace_service.mli)
(deps
(:file
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto)
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto)
(source_tree %{project_root}/vendor/opentelemetry-proto/))
(action
(run ocaml-protoc %{file} -I %{project_root}/vendor/opentelemetry-proto/
--ml_out . --pp --make --binary)))
(run
ocaml-protoc
%{file}
-I
%{project_root}/vendor/opentelemetry-proto/
--ml_out
.
--pp
--make
--binary)))

(rule
(alias lint)
(mode promote)
(enabled_if %{env:FORCE_GENPROTO=false})
(targets logs_service.ml logs_service.mli)
(deps
(:file
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto)
%{project_root}/vendor/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto)
(source_tree %{project_root}/vendor/opentelemetry-proto/))
(action
(run ocaml-protoc %{file} -I %{project_root}/vendor/opentelemetry-proto/
--ml_out . --pp --make --binary)))
(run
ocaml-protoc
%{file}
-I
%{project_root}/vendor/opentelemetry-proto/
--ml_out
.
--pp
--make
--binary)))

0 comments on commit bf11fd2

Please sign in to comment.