Repository navigation
make upgrade #1371
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
make upgrade #1371
Changes from 10 commits
4632e60
3062f8c
9ac7f66
d0e63dc
3f1309e
93533cc
1d65c7c
077bb82
9ddc19f
a87f13b
29cb107
cf63764
f50dd2e
168def7
826ea30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -190,44 +190,38 @@ services: ## Restart platform-specific services (launchd on macOS, systemd on Li | |||||||||||||||||||||||||||||||
| $(MAKE) systemctl; \ | ||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: dotagents-sync | ||||||||||||||||||||||||||||||||
| dotagents-sync: ## Sync dotagents (commands, skills, MCP configuration). | ||||||||||||||||||||||||||||||||
| @$(MAKE) -C dotagents sync | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: test | ||||||||||||||||||||||||||||||||
| test: neovim-test nix-test shell-test python-test shell-inline-check ## Run all tests (neovim + nix + shell + python + shell-inline-check). | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ##@ Update | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: update | ||||||||||||||||||||||||||||||||
| update: update-local-binaries ## Update local binaries | ||||||||||||||||||||||||||||||||
| ##@ Dev | ||||||||||||||||||||||||||||||||
| .PHONY: dev | ||||||||||||||||||||||||||||||||
| dev: nix-develop ## Enter the Nix dev shell (alias for nix-develop). | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: update-local-binaries | ||||||||||||||||||||||||||||||||
| update-local-binaries: ## Update and rebuild local binaries from .local-binaries.txt. | ||||||||||||||||||||||||||||||||
| @echo "🔄 Updating local binaries..." | ||||||||||||||||||||||||||||||||
| @if [ "$$CI" = "true" ] || [ "$$IN_DOCKER" = "true" ]; then \ | ||||||||||||||||||||||||||||||||
| echo "⏭️ Skipping local binaries update in CI/Docker"; \ | ||||||||||||||||||||||||||||||||
| else \ | ||||||||||||||||||||||||||||||||
| ./scripts/update-local-binaries.sh; \ | ||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||
| .PHONY: nix-develop | ||||||||||||||||||||||||||||||||
| nix-develop: ## Enter the Nix development shell. | ||||||||||||||||||||||||||||||||
| DEVENV_ROOT=$(CURDIR) $(NIX_ALLOW_UNFREE) $(NIX_EXEC) develop $(NIX_FLAGS) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: devenv-cli | ||||||||||||||||||||||||||||||||
| devenv-cli: ## Build the packaged devenv CLI binary. | ||||||||||||||||||||||||||||||||
| @echo "📦 Building packaged devenv CLI..." | ||||||||||||||||||||||||||||||||
| @$(NIX_ALLOW_UNFREE) $(NIX_EXEC) build .#devenv-cli $(NIX_FLAGS) --show-trace | ||||||||||||||||||||||||||||||||
| @echo "✅ devenv CLI available in ./result/bin/devenv" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ##@ Upgrade | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: upgrade | ||||||||||||||||||||||||||||||||
| upgrade: nix-upgrade overlays-upgrade neovim-upgrade llm-upgrade gitalias-upgrade codex-security-sync rtk-rewrite-sync ## Upgrade Nix flake, overlays, Neovim plugins, LLM configs, and gitalias | ||||||||||||||||||||||||||||||||
| upgrade: sync update | ||||||||||||||||||||||||||||||||
|
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: llm-upgrade | ||||||||||||||||||||||||||||||||
| llm-upgrade: ## Regenerate tool configs from models.json. | ||||||||||||||||||||||||||||||||
| @echo "🤖 Updating LLM tool configs..." | ||||||||||||||||||||||||||||||||
| @./scripts/llm-update.sh | ||||||||||||||||||||||||||||||||
| @echo "✅ LLM configs updated" | ||||||||||||||||||||||||||||||||
| .PHONY: upgrade-dev | ||||||||||||||||||||||||||||||||
| upgrade-dev: ## Upgrade inside the Nix dev shell (mirrors CI). | ||||||||||||||||||||||||||||||||
| @echo "🔄 Running upgrade inside the Nix dev shell..." | ||||||||||||||||||||||||||||||||
| @DEVENV_ROOT=$(CURDIR) $(NIX_ALLOW_UNFREE) $(NIX_EXEC) develop $(NIX_FLAGS) .# --command $(MAKE) upgrade | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: gitalias-upgrade | ||||||||||||||||||||||||||||||||
| gitalias-upgrade: ## Download latest gitalias.txt from upstream. | ||||||||||||||||||||||||||||||||
| @echo "📥 Updating gitalias.txt..." | ||||||||||||||||||||||||||||||||
| @./scripts/update-gitalias.sh | ||||||||||||||||||||||||||||||||
| @echo "✅ gitalias.txt updated" | ||||||||||||||||||||||||||||||||
| ##@ Sync | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: dotagents-sync | ||||||||||||||||||||||||||||||||
| dotagents-sync: ## Sync dotagents (commands, skills, MCP configuration). | ||||||||||||||||||||||||||||||||
| @$(MAKE) -C dotagents sync | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: codex-security-sync | ||||||||||||||||||||||||||||||||
| codex-security-sync: ## Sync Codex security deny patterns from Claude settings. | ||||||||||||||||||||||||||||||||
|
|
@@ -241,13 +235,22 @@ rtk-rewrite-sync: ## Sync rtk-rewrite.sh from upstream rtk repo. | |||||||||||||||||||||||||||||||
| @./scripts/sync-rtk-rewrite.sh | ||||||||||||||||||||||||||||||||
| @echo "✅ rtk-rewrite.sh synced" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: upgrade-dev | ||||||||||||||||||||||||||||||||
| upgrade-dev: ## Upgrade inside the Nix dev shell (mirrors CI). | ||||||||||||||||||||||||||||||||
| @echo "🔄 Running upgrade inside the Nix dev shell..." | ||||||||||||||||||||||||||||||||
| @DEVENV_ROOT=$(CURDIR) $(NIX_ALLOW_UNFREE) $(NIX_EXEC) develop $(NIX_FLAGS) .# --command $(MAKE) upgrade | ||||||||||||||||||||||||||||||||
| ##@ Update | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .PHONY: dev | ||||||||||||||||||||||||||||||||
| dev: nix-develop ## Enter the Nix dev shell (alias for nix-develop). | ||||||||||||||||||||||||||||||||
| .PHONY: uptate | ||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
|
||||||||||||||||||||||||||||||||
| .PHONY: uptate | |
| .PHONY: update |
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.
The help comment for nix-update is outdated. It still mentions "build, and switch", but the target now only performs nix-daemon-update and nix-flake-update. Additionally, note that nix-update no longer triggers a system switch, which is a significant change from the previous nix-upgrade behavior.
nix-update: nix-daemon-update nix-flake-update ## Update Nix daemon and flake lock file.
Copilot
AI
Apr 5, 2026
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.
Target comment is inaccurate: nix-update no longer depends on nix-build and nix-switch, but the description still says 'build, and switch'. Update the comment to match the actual dependencies (or re-add nix-build/nix-switch if that behavior is still intended).
| nix-update: nix-connect nix-daemon-update nix-flake-update ## Upgrade Nix flake, build, and switch. | |
| nix-update: nix-connect nix-daemon-update nix-flake-update ## Connect to Nix, update the daemon, and update flake inputs. |
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.
Keep nix-daemon-update out of unattended make update runs.
home-manager/services/make-updater/update.sh:1-8 invokes make update, so wiring nix-daemon-update into nix-update now pushes a sudo determinate-nixd upgrade into a background service path. That either fails every run or waits for credentials. Either move the daemon upgrade to upgrade only, or make nix-daemon-update explicitly short-circuit for automated runs.
One safe way to keep background updates non-interactive
-.PHONY: upgrade
-upgrade: sync update
+.PHONY: upgrade
+upgrade: sync nix-daemon-update update
-.PHONY: nix-update
-nix-update: nix-connect nix-daemon-update nix-flake-update ## Upgrade Nix flake, build, and switch.
+.PHONY: nix-update
+nix-update: nix-connect nix-flake-update ## Refresh daemon connectivity and flake inputs.Also applies to: 377-384
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Makefile` around lines 324 - 325, The nix-daemon-update step must not run
during unattended make update runs; remove "nix-daemon-update" from the
"nix-update" target and instead wire it only into the interactive "upgrade"
target, or alternatively add a short-circuit at the top of the
"nix-daemon-update" recipe that exits immediately when in automated contexts
(e.g., detect CI or a NONINTERACTIVE/CI env var or lack of a TTY) so automated
callers of "make nix-update" won't invoke the sudo determinate-nixd upgrade;
update both the "nix-update" target definition and the duplicate block around
the other occurrence (the similar target group later in the file) or implement
the env-check guard inside the "nix-daemon-update" rule to cover both
occurrences.
Copilot
AI
Apr 5, 2026
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.
PR description mentions adding nix-daemon-upgrade, but the Makefile introduces nix-daemon-update. Please align naming between the PR description and the actual target name (either rename the target or update the PR description) to avoid confusion for users.
Copilot
AI
Apr 5, 2026
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.
Target name launchctl-brew-upgrader conflicts with the updated agent name/file (brew-updater). Renaming the target to launchctl-brew-updater (and updating any aggregate dependencies listing it) would keep the Makefile interface consistent and reduce confusion.
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.
Use the existing brew-upgrader plist name here.
home-manager/services/brew-upgrader/default.nix:1-15 still defines launchd.agents.brew-upgrader, so Home Manager will emit org.nix-community.home.brew-upgrader.plist. Pointing launchctl-brew-upgrader at ...brew-updater.plist means the unload/load commands miss the actual agent.
Suggested fix
launchctl-brew-upgrader: ## Restart brew-updater launchd agent.
- `@echo` "🔄 Restarting brew-updater..."
- `@launchctl` unload ~/Library/LaunchAgents/org.nix-community.home.brew-updater.plist 2>/dev/null || true
+ `@echo` "🔄 Restarting brew-upgrader..."
+ `@launchctl` unload ~/Library/LaunchAgents/org.nix-community.home.brew-upgrader.plist 2>/dev/null || true
`@sleep` 3
- `@launchctl` load ~/Library/LaunchAgents/org.nix-community.home.brew-updater.plist
- `@echo` "✅ brew-updater restarted"
+ `@launchctl` load ~/Library/LaunchAgents/org.nix-community.home.brew-upgrader.plist
+ `@echo` "✅ brew-upgrader restarted"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| launchctl-brew-upgrader: ## Restart brew-updater launchd agent. | |
| @echo "🔄 Restarting brew-updater..." | |
| @launchctl unload ~/Library/LaunchAgents/org.nix-community.home.brew-updater.plist 2>/dev/null || true | |
| @sleep 3 | |
| @launchctl load ~/Library/LaunchAgents/org.nix-community.home.brew-upgrader.plist | |
| @echo "✅ brew-upgrader restarted" | |
| @launchctl load ~/Library/LaunchAgents/org.nix-community.home.brew-updater.plist | |
| @echo "✅ brew-updater restarted" | |
| launchctl-brew-upgrader: ## Restart brew-updater launchd agent. | |
| `@echo` "🔄 Restarting brew-upgrader..." | |
| `@launchctl` unload ~/Library/LaunchAgents/org.nix-community.home.brew-upgrader.plist 2>/dev/null || true | |
| `@sleep` 3 | |
| `@launchctl` load ~/Library/LaunchAgents/org.nix-community.home.brew-upgrader.plist | |
| `@echo` "✅ brew-upgrader restarted" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Makefile` around lines 743 - 748, The Makefile target launchctl-brew-upgrader
is pointing at the wrong plist name; update the unload/load commands (and any
user-facing messages if desired) to reference
org.nix-community.home.brew-upgrader.plist instead of
org.nix-community.home.brew-updater.plist so the launchctl unload/load operate
on the Home Manager emitted agent; adjust the two file-path occurrences used in
the `@launchctl` unload and `@launchctl` load invocations within the
launchctl-brew-upgrader target accordingly.
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.
The
upgradetarget now depends on asynctarget, butsyncis not defined anywhere in the Makefile. This will causemake upgradeto fail with an error:make: *** No rule to make target 'sync'. Stop.You should define a
synctarget that aggregates the individual sync commands (e.g.,dotagents-sync,codex-security-sync,rtk-rewrite-sync).