Skip to content

Keep mise's GOROOT out of AUR package builds - #16388

Merged
ryanrhughes merged 3 commits into
omacom:quattrofrom
shbernal:fix/aur-go-toolchain-env
Nov 1, 2026
Merged

ryanrhughes merged 3 commits into
omacom:quattrofrom
shbernal:fix/aur-go-toolchain-env

Conversation

@shbernal

@shbernal shbernal commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #16387.

With mise managing Go, every Go AUR package failed to build during omarchy update with compile: version "go1.27.3" does not match go tool version "go1.27.3-X:nodwarf5". mise's activation exports GOROOT and GOBIN for its own Go. Any caller that runs the AUR step with the system PATH but the caller's environment ends up with Arch's /usr/bin/go driving mise's compiler.

omarchy update used to be that caller. Since #17000 it keeps the caller's PATH, so mise's go and its GOROOT stay paired there. omarchy-upgrade-to-quattro still is: run as the user, it calls omarchy-update-aur-pkgs through run_as_user_omarchy with its system-first package_path and everything else inherited. That's the path a 3.x user with mise's Go and a Go AUR package hits when upgrading.

omarchy-update-aur-pkgs now unsets GOROOT and GOBIN before running yay. Every go binary finds its own root when GOROOT is unset, so this is safe whichever go is on PATH, including when someone runs the command directly from a mise-activated shell. GOBIN goes too, so a PKGBUILD that runs go install doesn't write into mise's install directory.

I put the fix in the AUR step rather than in its callers, so omarchy update, the upgrade and a standalone omarchy-update-aur-pkgs all get it.

Tested on my machine: wacli 0.24.0 and trufflehog 3.99.4 failed in the update and now build with the update's PATH. ./test/cli passes. I wrote a stubbed-yay test that checked the environment it received. It failed on quattro and passed with the change, but I left it out because it only guards this one line.

@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

omarchy-update-aur-pkgs now clears GOROOT and GOBIN before updating AUR packages.

  • AUR package builds no longer inherit mise's Go settings.

Reviews (2) · Last reviewed commit: "Name the upgrade as the caller that pair..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 23, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 711bd25 against quattro 967bbdd. Nothing to fix.

Reproduced on a disposable worker built from the Omarchy ISO. I installed Arch's go (1.27.3-X:nodwarf5) and mise's go@1.27.3, and confirmed that mise activate exports both GOROOT and GOBIN pointing at the mise install. Then I ran omarchy-update-aur-pkgs from that shell with the PATH omarchy-update sets. yay was stubbed to run a real makepkg on a small PKGBUILD whose build() runs go build -a:

Suite on the worker. ./test/cli and the update-* and upgrade-to-quattro shell tests pass. The full ./test/shell run had failures in 11 unrelated files (screenshot, background, lock-view budget, kernel and similar). Each of them either fails the same way on quattro or passes when rerun. CI is green.

Second opinion. Codex Medium and muse-spark-1.3 (via pi, thinking high) reviewed the change separately and found no defect. Both agreed the AUR step is the right place: it covers omarchy update, the standalone command and the post-upgrade call in omarchy-upgrade-to-quattro. Both also agreed that leaving out a dedicated regression test is reasonable. Their independence from this review is not guaranteed. Two points they raised that this change does not need to address:

  • omarchy-pkg-aur-add and omarchy-pkg-aur-install still pass the caller's environment to yay. They also keep the caller's PATH, though, so mise's go and mise's GOROOT stay paired there.
  • A GOROOT persisted with go env -w would survive the unset. That is a separate configuration choice, not what mise does.

This is waiting on the maintainer.

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good

@ryanrhughes ryanrhughes added this to the 4.5 milestone Oct 26, 2026
@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 31, 2026
omacom#17000 dropped the sudo-no-update wrapper this branch sat next to, so the AUR step keeps quattro's plain yay call and adds the unset above it.
omarchy-update keeps the caller's PATH since omacom#17000, so mise's go and GOROOT stay together there. omarchy-upgrade-to-quattro still runs the AUR step with its system-first package_path.
@ryanrhughes
ryanrhughes merged commit c125859 into omacom:quattro Nov 1, 2026
3 checks passed
ryanrhughes added a commit that referenced this pull request Nov 1, 2026
* Keep mise's GOROOT out of AUR package builds

* Name the upgrade as the caller that pairs system PATH with mise's GOROOT

omarchy-update keeps the caller's PATH since #17000, so mise's go and GOROOT stay together there. omarchy-upgrade-to-quattro still runs the AUR step with its system-first package_path.

---------

Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
(cherry picked from commit c125859)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy update fails Go AUR builds when mise manages Go (GOROOT leaks past the PATH reset)

4 participants