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

[chore] make generate uses .tools/mdatagen #36416

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

jade-guiton-dd
Copy link
Contributor

@jade-guiton-dd jade-guiton-dd commented Nov 18, 2024

Description

This PR is in the context of this PR on the core Collector modifying make check-contrib to use the latest version of mdatagen.

The make generate commands currently starts by compiling build tools in the .tools folder, then it go installs mdatagen globally for use in go:generate. Unfortunately, go install does not take into account the version of mdatagen referenced in internal/tools/go.mod. This means it isn't possible to generate using the local version of mdatagen for testing, even with replace statements.

This PR fixes this by prepending .tools to the $PATH before running the generate command, which makes go:generate use the version of mdatagen in that folder instead of a global one.

(Originally, this PR also added a new modgenerate target in Makefile.Common, to allow running generate commands on a specific group of modules instead of all of them for efficiency reasons. After discussing it with @mx-psi, we decided to hold off on that change for a later PR, as it warrants further discussion.)

@jade-guiton-dd jade-guiton-dd changed the title [chore] make generate uses .tools/mdatagen and respects GROUP [chore] make generate uses .tools/mdatagen Nov 19, 2024
@jade-guiton-dd jade-guiton-dd marked this pull request as ready for review November 19, 2024 13:30
@jade-guiton-dd
Copy link
Contributor Author

It seems marking the PR as ready for review, then turning into a draft again temporarily caused two people to be assigned, sorry about that.

@bogdandrutu bogdandrutu merged commit 3f4e13f into open-telemetry:main Nov 19, 2024
160 checks passed
@github-actions github-actions bot added this to the next release milestone Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants