Motivation
With separatesources enabled (the default), a package with the exact
searched name that exists in several sync repos can be listed in the
wrong order. For example, if [cachyos-extra-v3] comes before [extra] in
pacman.conf, extra/chromium can still show up as the top pick instead of
cachyos-extra-v3/chromium. pacman prefers the repo listed first.
separateSourceScore returned a flat 50 for every exact match, whatever
its source. As a result, all exact matches got the same metric
(50 + 1.0). The unstable slices.SortFunc then left their relative order
unspecified, so the ordering added for non-exact results did not apply
to exact ones.
Approach
Move the repo-order scoring into a repoOrderScore helper (same logic and
cache as before). For exact matches, add repoOrderScore/separateSourceMax
to the 50: a bonus between 0 and 1. Exact matches still outrank every
non-exact result (which scores at most 45 + a metric below 1). Among
exact matches, repos earlier in pacman.conf now come first. Exact AUR
matches keep 50, so an exact sync-repo match now ranks strictly above an
exact AUR match instead of tying with it. Scoring for non-exact results
is unchanged, and nothing changes when separatesources is disabled.
Validation
- go test -race ./pkg/query/... -count=1: passes.
- New tests TestSourceQueryBuilderExactMatchSortsByRepoOrder (top-down
and bottom-up) and TestSeparateSourceScore_ExactMatchKeepsRepoOrder
fail with the previous metric.go and pass with this change.
- golangci-lint run ./pkg/query/...: 0 issues; gofmt clean.
- go test ./... on macOS has failures that also occur on the unchanged
base: Linux-only syscall fields in pkg/settings/exe, and a
timezone-dependent test in pkg/text. Not tested against a real
pacman setup with custom repos.
Report: https://github.com/Jguer/yay/issues/2986
Assisted-by: claude-opus-5-5 (via Claude Code)
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Co-authored-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Translate po/en.po in ca
100% translated source file: 'po/en.po'
on 'ca'.
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jo <me@jguer.space>
Follow-up to #2944. When flags are over 21 characters, the description
is printed on a new line to avoid the flag from intersecting with the
description and keeping everything aligned. This mimics what pacman does
for long flags like `--disable-sandbox`.
I decided to add logic to solve this instead of just adding a newline to
the `--completioninterval` description (the only flag currently over 21
characters) so any future long flags added will automatically be aligned
too.
Allow for the help message to be localized. This changes the help
message printing so that every message is wrapped in `gotext.Get()`.
Co-authored-by: Jo <me@jguer.space>
The standalone dl.google.com entry in network.allowed is fully
covered by the java ecosystem identifier, which already includes
Google's Android/JDK distribution mirrors. Using the identifier
keeps the allowlist maintainable as Google's download host layout
shifts.
Refreshed regenerated artifacts from `gh aw compile`
(compiler v0.82.13 -> v0.83.4):
- .github/workflows/repo-assist.lock.yml
- .github/aw/actions-lock.json
- .github/workflows/agentics-maintenance.yml
- .github/skills/agentic-workflows/SKILL.md
The compile pass also normalises repo-assist.md itself: the model
field moves out of the engine block into a top-level `model:`, and
the redundant nested model under safe-outputs.threat-detection
is dropped.
Instead of `yay -<op> --help` printing the entire help message, it will
now print a contextual help message based on the operation being
performed. The top-level help message shows available operations and
global flags as before. It no longer shows operation-specific flags and
`pacman -S --help` output. Like the pacman output, it shows that you can
get operation-specific help by running `yay -<op> --help`.
The operation-specific help message shows the operation's flags and all
pacman operation flags pass through to pacman.
- Join search terms with space instead of empty separator so Jaro-Winkler
similarity compares against realistic strings (e.g. 'linux ck' vs 'linuxck')
- Change matchesSearch symbol check from early return to continue so non-symbol
terms in multi-term queries are still filtered instead of being bypassed
Consolidate Go domains under the 'go' ecosystem identifier and add
dl.google.com for the toolchain zip host so GOTOOLCHAIN can fetch
go1.26.0 when the runner's Go is older. Restore permissions: read-all
with a clarifying comment (strict mode forbids write scopes; writes
go through safe-outputs). Regenerate lock files with gh-aw v0.82.13
and commit the auto-generated agentic maintenance workflow that backs
the hide-older-comments safe-output.
* Initial plan
* ci: add explicit setup-go step to use Go 1.26 matching go.mod
Both testing.yml and testing-git.yml were relying on whatever Go version
shipped in ghcr.io/jguer/yay-builder:latest (Go 1.24.13), which is
incompatible with the go 1.26 / toolchain go1.26.0 declarations in
go.mod and scripts/go.mod, causing build/lint failures in PR #2917.
Add an actions/setup-go step (pinned to the same hash already used in
pages.yml) immediately after checkout so CI always picks up Go 1.26 as
read from go.mod, regardless of what the builder image contains.
Co-authored-by: Jguer <8071073+Jguer@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Jguer <8071073+Jguer@users.noreply.github.com>
* fix(diff): add --no-pager and package header to git diff
Previously, each package's diff was shown via a separate `git diff`
invocation with Show(), allowing git to invoke its own pager (e.g. less)
independently for each package. This caused inconsistent pagination:
large diffs opened a pager, small diffs scrolled past in the terminal.
Changes:
- Add --no-pager flag to git diff so git doesn't open its own pager
per package; all diffs now stream consistently to stdout.
- Print a package name header before each diff so users can easily
identify which package each diff belongs to when reviewing multiple
packages.
Closes#1243
* bunch up diffs and render in one go
Co-authored-by: Jo Garnier <me@jguer.space>
refactor(workdir): remove unnecessary global NoConfirm mutation in removeMake
removeMake always removes packages non-interactively, so it sets
settings.NoConfirm = true, calls BuildPacmanCmd, then restores the
original value. This pattern is thread-unsafe and redundant because
BuildPacmanCmd already accepts a noConfirm bool parameter.
Pass true directly to BuildPacmanCmd, eliminating the global mutation.
* chore(ci): upgrade gh-aw to v0.82.13 for gpt-5.6 model aliases
Pin compiler and setup action to v0.82.13 so repo-assist can keep
using gpt-5.6-luna (aliases were missing from v0.81.6).
* ci: pin actions/checkout to full SHA in copilot-setup-steps
Repo policy requires full-length commit SHAs for all actions.
Translate po/en.po in de
100% translated source file: 'po/en.po'
on 'de'.
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* query: precompute metricScore once per result
Normalize the search term and name/provider/desc at the metric boundary, drop the per-comparison distance cache, and score each result via prepareMetrics before sorting. Adds a search-flow benchmark to track regressions.
* update deps
* feat(lua): add lua-language-server type stubs for the yay global
Ship a meta/yay.meta.lua definition file that declares the `yay` global,
all yay.opt fields, and every autocmd event payload so lua-language-server
users get completion, hover docs, and typo detection without an
"Undefined global `yay`" warning.
- meta/yay.meta.lua: 232-line stub covering opt (45 fields), log, abort,
create_autocmd with per-event overloads, and 14 payload classes for the
5 autocmd events (AURPreInstall, AURPostDownload, UpgradeSelect,
PostInstall, SearchFilter). Return contracts for UpgradeSelect and
SearchFilter are annotated.
- doc/lua.md: add "Editor support" section with .luarc.json setup.
- doc/init.lua: fix PostInstall example referencing pkg.installed, a
field that does not exist on PostInstallPackage.
- Makefile: install/uninstall meta/yay.meta.lua to
$(PREFIX)/share/yay/meta/ so the documented /usr/share/yay/meta path
exists on installed systems.
Closes#2876
* doc(lua): fix api-since version to v13.0.1
* feat(lua): apply review feedback on type stubs
Type opt fields as string unions with descriptions, rename to yay.d.lua
per LuaLS docs, strip redundant comments from doc/init.lua, bump to v13.0.2.
Tested everything again: go build, go test, lua-language-server, gendocs.
* doc(lua): move "editor support", add hyperlinks
added link to `init.lua` example in "location" paragraph
having "editor support" paragraph at the very bottom of document didn't make any sense. user would want to have lsp editor support right after creating a file in config dir if ever.
removed useless paragraph about `.luarc.json` location that already been explained aboved.
added hyperlinks for luals extensions. couldn't find any special info for helix (unlike jetbrains), but it should be already covered by "other editors"
---------
Co-authored-by: danielwerg <35052399+danielwerg@users.noreply.github.com>
* improve topo performance
* fix: Resolve data race in dep_graph_test and clean up local mods
* cleanup
* feat(dep): add split functionality
* cleanup mem allocs