-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: migrate to tools directive #13844
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
Conversation
a35e6bc
to
b0c521b
Compare
b0c521b
to
b92dcc5
Compare
I've set the min Go version to 1.24 for the tools, which should fix the majority of the pipeline failures, since they are running on the old stable version. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13844 +/- ##
==========================================
- Coverage 91.69% 91.67% -0.02%
==========================================
Files 652 652
Lines 42506 42506
==========================================
- Hits 38976 38968 -8
- Misses 2725 2731 +6
- Partials 805 807 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Please hold this one for now, as it seems there is an issue related to how
It appears that the relative I will follow up with additional details, as soon as I have them, but for now please hold this PR. Thanks! |
Please hold this PR for now, as there is a known limitation with how See this one for more details. @dmathieu , in order to workaround this limitation we may need to remove the Are you okay with such changes? Also, is there a specific reason why Thanks! |
Removing the replace directive would be fine by me, if the behavior remains the same. |
73c52a5
to
9f0ca9b
Compare
Makes sense, I've just updated and rebased the PR. |
8dbc713
to
ac3cc9e
Compare
ac3cc9e
to
b9e6b80
Compare
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds a new flag (`-C path`) to the `pdatagen` utility, which allows specifying the workdir for the tool. Currently `pdatagen` expects to find the respective files in`pdata` directory of the `$cwd`. When `pdatagen` is called outside of the `$repo_root` the tool fails, because it cannot find `pdata` and panics. This PR adds an optional `-C path` flag, which would allow `pdatagen` to use an alternative workdir, and also be able to be called outside of the `$repo_root` directory. See #13844 for more details about this PR and the proposed changes. The commit from this PR have been extracted from #13844 . <!-- Issue number if applicable --> #### Link to tracking issue <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.-->
Feel free to rebase this PR now! |
See [1] for more details about the new recommended approach for managing tool dependencies. [1]: https://go.dev/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
`modernize' should not be installed via `go get -tool', since gopls release branch needs a specific version and x/tools does not present a stable internal API to gopls. See [1] for more details about this one. [1]: golang/go#73279
b9e6b80
to
b471232
Compare
... and done :) |
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.
Thank you!!
8658c56
Description
This PR migrates the existing
internal/tools
to the new recommended approach for managing tool dependencies.The makefile targets have been updated, including test/build scripts as well.
All tools have been migrated to the to the new
go tool
approach, with one exception -modernize
tool.The reason why
modernize
has been left out is because of this issue.Please check this issue for full details:
Based on the comment above it would appear that even in the current internal/tools/go.mod we have a dependency on
gopls
, which we should not.cc: @mx-psi
Link to tracking issue
Fixes #13721
Testing
Manual testing and running the various Makefile targets, including
all
target.Documentation
N/A