Skip to content

fix(build): bundle shellingham so shell completion works in released binaries [DEV-13047] - #47

Merged
manishbisht merged 3 commits into
mainfrom
manishb/dev-13047-cli-dualentry-install-completion-crashes
Nov 17, 2026
Merged

manishbisht merged 3 commits into
mainfrom
manishb/dev-13047-cli-dualentry-install-completion-crashes

Conversation

@manishbisht

Copy link
Copy Markdown
Contributor

Summary

dualentry --install-completion and --show-completion crash in the released binaries with RuntimeError: Shell detection not implemented for 'posix'. Shell completion is step 2 of the CLI quickstart, so anyone following the docs hits it. Every other command works.

Typer detects the shell with shellingham, and shellingham loads its per-OS module (shellingham.posix on macOS/Linux, shellingham.nt on Windows) with importlib.import_module and a name built at runtime. PyInstaller only bundles modules it can see in import statements, and pyinstaller-hooks-contrib has no hook for shellingham. So the binary includes shellingham but not its platform module, and shell detection fails. Running from source isn't affected.

Changes

  • Pass --collect-submodules shellingham to PyInstaller in scripts/build.py, so the platform modules are bundled
  • Add an Unreleased changelog entry for the fix

Test plan

  • Unit tests pass (uv run pytest)
  • Linter passes (uv run ruff check .)
  • Manually tested with dualentry <command> against a real API (see Artifacts)

Artifacts

@manishbisht manishbisht self-assigned this Nov 17, 2026
@manishbisht
manishbisht marked this pull request as ready for review November 17, 2026 15:34
@manishbisht
manishbisht merged commit 03b3326 into main Nov 17, 2026
6 checks passed
@manishbisht
manishbisht deleted the manishb/dev-13047-cli-dualentry-install-completion-crashes branch November 17, 2026 15:42
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