-
Notifications
You must be signed in to change notification settings - Fork 39
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
Remove some unused stuff from the devtools makefile #2136
Conversation
…ls). Allow for there not to be a commit (not in git maybe?). Only get the branch if needed. Allow GOLANGCI_LINT to be provided as an env var and get rid of the use of wildcard for it because that breaks if there's a space or paren in the path. Move setting of CMTVERSION SUPPORTED_GO_MAJOR_VERSION SUPPORTED_GO_MINOR_VERSIO GO_MAJOR_VERSION and GO_MINOR_VERSION closer to where they're used. Use a second tab in a couple places where it was tab+spaces. Make UNAME_S and UNAME_M resolve immediately rather than each time they're looked at.
…e urls in quotes because the # is almost certainly commenting out the rest of the commands.
…go with the GO var.
…stand-alone makefile. Remove setting of GO and BINDIR since that's already being done in the main Makefile. Remove a chunk of unneeded code (db_tag is always empty now) and clarify the comment above it.
…rd-party to differentiate it from proto-check-breaking.
WalkthroughThe changes involve a comprehensive cleanup of makefiles associated with the project, focusing on removing obsolete configurations, improving logic for determining the Go executable and version, and simplifying the Makefile for developer tools. The modifications enhance clarity, streamline the build process, and eliminate unnecessary environment detection mechanisms. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Makefile
participant Go
Developer->>Makefile: Initiates build process
Makefile->>Go: Check Go executable
Go-->>Makefile: Returns Go version
Makefile->>Developer: Outputs build status
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
Makefile (1)
4-11
: Consider adding a comment for clarity.The logic to find the Go executable is well-implemented. Adding a comment to explain why this check is necessary could improve readability.
# Find the go executable if it wasn't pre-set (e.g. via env var). + # This ensures compatibility across different platforms.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- .changelog/unreleased/improvements/2136-makefile-cleanup.md (1 hunks)
- Makefile (8 hunks)
- contrib/devtools/Makefile (1 hunks)
- sims.mk (3 hunks)
Files skipped from review due to trivial changes (3)
- .changelog/unreleased/improvements/2136-makefile-cleanup.md
- contrib/devtools/Makefile
- sims.mk
Additional comments not posted (4)
Makefile (4)
12-15
: LGTM!The error handling for the absence of a Go executable is clear and effective.
16-18
: LGTM!The logic for setting the
GOPATH
is straightforward and effective.
79-80
: LGTM!The export of
CMTVERSION
using the Go executable is appropriate and effective.
322-330
: LGTM!The Go version validation logic is clear and effective, providing a useful error message if the version is unsupported.
…err since that should provide useful info when needed.
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.
Actionable comments posted: 0
When working on this I found out some interesting things about makefile syntax that I'd like to share. When you assign a value using The Another example:
Nothing is printed to stderr when setting That means that, if we were to put a line between 2 and 3 that changes You can force a variable to resolve itself by doing Now, to add to all this, we have the From https://www.gnu.org/software/make/manual/html_node/Setting.html
The first critical piece in there is that it uses the The second critical piece is that makefile distinguishes between a variable being undefined and being empty. If my environment has Lastly, wrapping quotes are not stripped from variable values. E.g. all three of these are different: |
Description
This PR removes a bunch of unused stuff from
contrib/devtools/Makefile
, and also moves some stuff from there into the primaryMakefile
. There's a little more cleanup done in this too.Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
).godoc
comments..changelog/unreleased
(see Adding Changes).Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.Summary by CodeRabbit
These changes contribute to a more efficient and user-friendly development environment.