Skip to content

fix(nix): add watchfiles to flake propagated deps - #542

Merged
Sinity merged 1 commit into
masterfrom
feature/fix/watchfiles-nix
Apr 27, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fix/watchfiles-nix

Conversation

@Sinity

@Sinity Sinity commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

`polylogue watch` (#539, landed in #541) imports `watchfiles` at runtime; the pyproject dep was added but `flake.nix` hardcodes `propagatedBuildInputs` separately and `watchfiles` was missed there. Nix-built binary fails with `ModuleNotFoundError: No module named 'watchfiles'` when `polylogue-watch.service` starts.

Problem

The `polylogue` Nix derivation lists Python deps explicitly, not from pyproject. Anyone deploying via `pkgs.polylogue` (sinnix) gets a binary missing `watchfiles`.

Solution

Add `watchfiles` to the `propagatedBuildInputs` list.

Verification

```bash
nix build .#polylogue
./result/bin/polylogue watch --help # exits 0; previously crashed
```

Repro of the underlying failure: starting `polylogue-watch.service` on a host with the master version pre-fix produces:
```
ModuleNotFoundError: No module named 'watchfiles'
```

The watch command (#539) imports watchfiles at runtime; the pyproject
listing was added in #541 but the flake's hardcoded propagatedBuildInputs
was missed, so the Nix-built binary fails with ModuleNotFoundError when
the live watcher service starts.

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 39 minutes and 30 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 67f5fbaa-64b1-4c74-9aee-499c02931c15

📥 Commits

Reviewing files that changed from the base of the PR and between 1fae27c and 6052200.

📒 Files selected for processing (1)
  • flake.nix
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/watchfiles-nix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity merged commit e2d602c into master Apr 27, 2026
12 checks passed
@Sinity
Sinity deleted the feature/fix/watchfiles-nix branch April 27, 2026 18:41
@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Sinity
Sinity requested a review from Copilot May 1, 2026 01:55
@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:20
Sinity added a commit that referenced this pull request May 7, 2026
## Summary

\`polylogue watch\` (#539, landed in #541) imports \`watchfiles\` at
runtime; the pyproject dep was added but \`flake.nix\` hardcodes
\`propagatedBuildInputs\` separately and \`watchfiles\` was missed
there. Nix-built binary fails with \`ModuleNotFoundError: No module
named 'watchfiles'\` when \`polylogue-watch.service\` starts.

## Problem

The \`polylogue\` Nix derivation lists Python deps explicitly, not from
pyproject. Anyone deploying via \`pkgs.polylogue\` (sinnix) gets a
binary missing \`watchfiles\`.

## Solution

Add \`watchfiles\` to the \`propagatedBuildInputs\` list.

## Verification

\`\`\`bash
nix build .#polylogue
./result/bin/polylogue watch --help   # exits 0; previously crashed
\`\`\`

Repro of the underlying failure: starting \`polylogue-watch.service\` on
a host with the master version pre-fix produces:
\`\`\`
ModuleNotFoundError: No module named 'watchfiles'
\`\`\`

Co-authored-by: Claude <[email protected]>
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.

1 participant