Skip to content

Make Makefile tool installation optional#8406

Open
janezpodhostnik wants to merge 3 commits intomasterfrom
janez/make-tool-install-optional
Open

Make Makefile tool installation optional#8406
janezpodhostnik wants to merge 3 commits intomasterfrom
janez/make-tool-install-optional

Conversation

@janezpodhostnik
Copy link
Contributor

@janezpodhostnik janezpodhostnik commented Feb 10, 2026

This is my personal preference!

I would like the make commands to not mess up my local installation of go tools or use time checking for updates every time I run any make command. I added a env variable guard so I can optionally disable the tool installation.

Another option would be to separate the install tools from the other commands, because you generally need to run it only once (every so often).

Summary by CodeRabbit

  • Chores
    • Enhanced build configuration to support conditional tool installation, allowing developers to skip tool setup when needed.

@janezpodhostnik janezpodhostnik requested a review from a team February 10, 2026 19:47
@janezpodhostnik janezpodhostnik self-assigned this Feb 10, 2026
@janezpodhostnik janezpodhostnik requested a review from a team as a code owner February 10, 2026 19:47
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

The Makefile's tool installation targets are now conditionally executed using an ifndef guard that checks for the FLOW_GO_SKIP_TOOL_INSTALL environment variable, allowing installations to be skipped when defined.

Changes

Cohort / File(s) Summary
Makefile Tool Installation Guard
Makefile
Added conditional ifndef FLOW_GO_SKIP_TOOL_INSTALL guard around install-mock-generators and install-tools targets to allow skipping tool installations when the variable is defined.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A path through the tools, now with choice!
Skip or install, let the variable rejoice—
The Makefile hops with conditional grace,
A guard stands ready, in its rightful place! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Make Makefile tool installation optional' is clear, concise, and accurately describes the main change—introducing a conditional guard to make tool installation optional rather than automatic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch janez/make-tool-install-optional

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
Makefile (1)

84-92: Consider adding a brief comment documenting the env var.

The guard works correctly and mirrors the install-mock-generators pattern. However, FLOW_GO_SKIP_TOOL_INSTALL isn't documented anywhere in the Makefile. A short comment near the top (where other variables like GO_TEST_PACKAGES are described) would help discoverability for other contributors.

Suggested documentation (e.g. after line 11)
 GO_TEST_PACKAGES := ./...
+
+# Set FLOW_GO_SKIP_TOOL_INSTALL to any value to skip automatic tool installation
+# in the install-tools and install-mock-generators targets.
+# Example: FLOW_GO_SKIP_TOOL_INSTALL=1 make generate-mocks

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

2 participants

Comments