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

[Makefile.Common] Files under submodule will cause the result of all-pkgs to be empty. #31928

Closed
h0cheung opened this issue Mar 25, 2024 · 2 comments
Labels
bug Something isn't working closed as inactive needs triage New item requiring triage Stale

Comments

@h0cheung
Copy link
Contributor

Component(s)

No response

What happened?

Description

Run make all-pkgs in a module which has both .go files in root directory and submodules, will get an empty result.
And when running any target by make, many logs will be printed by go. The logs look like:

main module (github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage) does not contain package github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage
main module (github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage) does not contain package github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage/internal/metadata
main module (github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage) does not contain package github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage
main module (github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage) does not contain package github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/internal/metadata

This is caused by the command

ALL_SRC := $(shell find $(ALL_PKG_DIRS) -name '*.go' \
                                -not -path '*/third_party/*' \
                                -not -path '*/local/*' \
                                -type f | sort)

will return all go files under $(ALL_PKG_DIRS), even if in a submodule. Then ALL_PKGS := $(shell $(GOCMD) list $(sort $(dir $(ALL_SRC)))) will try to run go list with directories in submodules, then go runs to failure and the logs will be printed.

Steps to Reproduce

make -C extension/storage all-pkgs.

Expected Result

Print packages in stdout.

Actual Result

Print logs in stderr.

Collector version

v0.95.0

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label May 27, 2024
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closed as inactive needs triage New item requiring triage Stale
Projects
None yet
Development

No branches or pull requests

1 participant