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

build: fix the deletion of old pkg/sql/exec/*.eg.go files #40765

Merged
merged 1 commit into from
Sep 14, 2019
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
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ execgen-exclusions = $(addprefix -not -path ,$(EXECGEN_TARGETS))

$(info Cleaning old generated files.)
$(shell find pkg/sql/colexec -type f -name '*.eg.go' $(execgen-exclusions) -delete)
$(shell find pkg/sql/exec -type f -name '*.eg.go' $(execgen-exclusions) -delete || true)
$(shell find pkg/sql/exec -type f -name '*.eg.go' $(execgen-exclusions) -delete 2>/dev/null)

OPTGEN_TARGETS = \
pkg/sql/opt/memo/expr.og.go \
Expand Down Expand Up @@ -1496,9 +1496,6 @@ pkg/sql/colexec/vecbuiltins/row_number.eg.go: pkg/sql/colexec/vecbuiltins/row_nu
pkg/sql/colexec/zerocolumns.eg.go: pkg/sql/colexec/zerocolumns_tmpl.go

$(EXECGEN_TARGETS): bin/execgen
@# Remove generated files with the old suffix to avoid conflicts.
@# See https://github.com/cockroachdb/cockroach/pull/32265.
@rm -f pkg/sql/colexec/*.og.go
execgen $@

optgen-defs := pkg/sql/opt/ops/*.opt
Expand Down Expand Up @@ -1551,7 +1548,7 @@ unsafe-clean-c-deps:
.PHONY: clean-execgen-files
clean-execgen-files:
find ./pkg/sql/colexec -type f -name '*.eg.go' -exec rm {} +
find ./pkg/sql/exec -type f -name '*.eg.go' -exec rm {} + || true
test -d ./pkg/sql/exec && find ./pkg/sql/exec -type f -name '*.eg.go' -exec rm {} + || true
Copy link
Contributor

Choose a reason for hiding this comment

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

tip: I'd have done -exec rm -f ... and removed || true so that you'd still grab permission errors from find if any.


.PHONY: clean
clean: ## Remove build artifacts.
Expand Down