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

[cmd/mdatagen] Work around a go-generate issue blocking make generate #10133

Closed

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented May 18, 2022

If mdatagen is causing file renames, e.g. migration to the new metrics builder, running go generate ./... ends up with a failure no such file or directory even if the mdatagen command successfully completed. The root cause of that is in how go generate works, see golang/go#36068. This change adds a workaround for the issue using go build tags.

@dmitryax dmitryax added the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 18, 2022
@bogdandrutu
Copy link
Member

Does it make sense to do this since we can maybe drop the "_v2" from the file name, now that we are close to make transition to all?

@dmitryax
Copy link
Member Author

dmitryax commented May 18, 2022

Does it make sense to do this since we can maybe drop the "_v2" from the file name, now that we are close to make transition to all?

This actually helps to rename of all the files by running make generate instead of doing it manually :) Also we might want to rename the files in future or have metrics builder v3 :)

@dmitryax
Copy link
Member Author

I'm ok to keep it as is but that error was too annoying so I wanted to get rid of it

@dmitryax
Copy link
Member Author

@bogdandrutu what's your thought on this? Can we merge it? I think it's good to have it to avoid confusing failures that still possibly can arise. I don't see downsides except for the 3 more lines in the generated code.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2022

This PR was marked stale due to lack of activity. It will be closed in 14 days.

…s builder, running `go generate ./...` ends up with a failure `no such file or directory` even if the `mdatagen` command successfully completed. The root cause of that is in how go generate works. This change adds a workaround for the issue using go build tags.
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jun 24, 2022
@dmitryax dmitryax removed the Stale label Jun 24, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2022

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jul 9, 2022
@github-actions
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants