Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't run clean-gen twice #214

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ endif
GO := go
GO_MOD_ROOT := go.opentelemetry.io/proto
ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS))
ALL_GO_SUB_MOD_DIRS := $(shell find . -type f -name 'go.mod' -mindepth 2 -exec dirname {} \; | sort)
OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_SUB_MOD_DIRS))
Comment on lines +42 to +43
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need clean-gen after these changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yeah, we could indeed remove it and only run tidy in the submodules. I'm thinking it's too easy to get bitten by gen code that hasn't been cleaned though. So doing it is a good measure as well.

Copy link
Member

@pellared pellared Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to have gen (build artifacts) after running make to easier troubleshoot problems if something goes wrong. I created #215

TIMEOUT = 60

PROTOBUF_GEN_DIR := opentelemetry-proto-gen
Expand Down Expand Up @@ -159,7 +160,8 @@ clean-gen:
rm -rf $(GEN_TEMP_DIR)

.PHONY: clean
clean: clean-gen
clean:
rm -rf $(GEN_TEMP_DIR)
rm -rf $(OTLP_OUTPUT_DIR)/*/ $(OTLPSLIM_OUTPUT_DIR)/*/

.PHONY: go-mod-tidy
Expand Down
Loading