-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Move dependencies of tools package to a tools directory #466
Move dependencies of tools package to a tools directory #466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor comment. Otherwise LGTM.
Makefile
Outdated
@@ -52,7 +56,7 @@ check-clean-work-tree: | |||
.PHONY: build | |||
build: | |||
# TODO: Fix this on windows. | |||
set -e; for dir in $(ALL_GO_MOD_DIRS); do \ | |||
set -e; for dir in $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS)); do \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only 'go mod tidy' is run for TOOLS_MOD_DIR. May be it is better to exclude TOOLS_MOD_DIR from ALL_GO_MOD_DIRS and explicitly run 'go mod tidy' on ALL + TOOLS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea. The comment about ALL_GO_MOD_DIRS
could be updated at the same time.
Makefile
Outdated
@@ -1,10 +1,11 @@ | |||
EXAMPLES := $(shell ./get_main_pkgs.sh ./example) | |||
TOOLS_MOD_DIR := ./tools | |||
|
|||
# All source code and documents. Used in spell check. | |||
ALL_DOCS := $(shell find . -name '*.md' -type f | sort) | |||
# All directories with go.mod files. Used in go mod tidy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While following what @rghetia wrote in the review, could you update this comment? Maybe something like:
# All directories with go.mod files related to opentelemetry library. Used for building, testing and linting.
Makefile
Outdated
@@ -52,7 +56,7 @@ check-clean-work-tree: | |||
.PHONY: build | |||
build: | |||
# TODO: Fix this on windows. | |||
set -e; for dir in $(ALL_GO_MOD_DIRS); do \ | |||
set -e; for dir in $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS)); do \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea. The comment about ALL_GO_MOD_DIRS
could be updated at the same time.
then run 'go mod tidy' on ALL_GO_MOD_DIRS and TOOLS_MOD_DIR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
In the future, OpenTelemetry will be widely used in services. Therefore, remove any dependent packages that are not used in this implementation.