Repository navigation
sync: say what is actually missing, in the local spelling - #99
Merged
Merged
Conversation
The settings hint was the fixed string "Install python3-nacl and python3-zeroconf to enable sync." It is wrong twice. It names two modules. sync_available() is `_HAVE_NACL and _HAVE_ZC and _HAVE_SPAKE2` -- three. A user who installs exactly what the hint asks for comes back to the same unchanged message, with nothing anywhere telling them spake2 is also wanted. There is no way out of that loop from inside the app. It names Debian packages on every distro. Reported from an Arch/Omarchy install, where the two packages named do not exist under those names at all. Both halves were avoidable: the import guards already record which module failed, and the package names already exist in scripts/install.sh and the packaging depends lists. The hint consulted none of it. So derive it. missing_modules() reports which imports really failed, and missing_packages_hint() maps those to package names for the package manager actually present, in install.sh's own detection order: pacman python-pynacl python-zeroconf python-spake2 apt python3-nacl python3-zeroconf python3-spake2 dnf python3-pynacl python3-zeroconf python3-spake2 nacl is the one that differs between apt and dnf, so a single shared table would have quietly sent Fedora users after a package that is not there. Two routes get their own answer. An unrecognised package manager still names the modules, which is more use than naming packages that may not exist. A Flatpak says the build is missing them rather than asking the user to install into a sandbox they cannot reach -- there, it is our bug, not their setup. scripts/install.sh had the same omission independently: its apt and dnf branches installed nacl and zeroconf but not spake2, so a source install on Debian or Fedora left sync permanently unavailable with no error and no hint that anything was missing. Only the pacman branch was complete. Fixed here, and sync_hint_test.py now derives its expectations from _SYNC_PACKAGES so the script and the hint cannot drift apart again -- which is exactly how they came to disagree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QAnwJ7J3jePDGsQsKB47R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The settings hint was the fixed string
"Install python3-nacl and python3-zeroconf to enable sync."It is wrong twice.It names two modules.
sync_available()is_HAVE_NACL and _HAVE_ZC and _HAVE_SPAKE2— three. A user who installs exactly what the hint asks for comes back to the same unchanged message, with nothing anywhere telling themspake2is also wanted. There is no way out of that loop from inside the app.It names Debian packages on every distro. Reported from an Arch/Omarchy install, where the two packages named do not exist under those names at all.
Both halves were avoidable: the import guards already record which module failed, and the package names already exist in
scripts/install.shand the packaging depends lists. The hint consulted none of it.The fix
missing_modules()reports which imports really failed, andmissing_packages_hint()maps those to package names for the package manager actually present, ininstall.sh's own detection order:python-pynaclpython-zeroconfpython-spake2python3-naclpython3-zeroconfpython3-spake2python3-pynaclpython3-zeroconfpython3-spake2naclis the one that differs between apt and dnf, so a single shared table would have quietly sent Fedora users after a package that is not there.Two routes get their own answer. An unrecognised package manager still names the modules, which is more use than naming packages that may not exist. A Flatpak says the build is missing them rather than asking the user to install into a sandbox they cannot reach — there, it is our bug, not their setup.
A second instance of the same bug
scripts/install.shhad the same omission independently: its apt and dnf branches installed nacl and zeroconf but not spake2, so a source install on Debian or Fedora left sync permanently unavailable with no error and no hint that anything was missing. Only the pacman branch was complete.Fixed here, and
sync_hint_test.pynow derives its expectations from_SYNC_PACKAGESso the script and the hint cannot drift apart again — which is exactly how they came to disagree.🤖 Generated with Claude Code