fix(build): include missing setuptools subpackages#110
Conversation
The [tool.setuptools].packages list omitted four subpackages that exist on disk, so they were silently dropped from the built wheel: - repowise.core.analysis.dead_code - repowise.core.ingestion.extractors.bindings - repowise.core.ingestion.extractors.heritage - repowise.core.ingestion.resolvers.dotnet The dotnet drop is the proximate cause of issue repowise-dev#109: csharp.py does 'from .dotnet import get_or_build_index' at import time, so any pipx/pip install of 0.4.0 fails before the CLI can start. Fixes repowise-dev#109
|
Second time I've had to come in. First was because of Luau support, but now it's a bug. |
Seanathon
left a comment
There was a problem hiding this comment.
Nice! And agreed, this logic will definitely benefit from auto-discovering subpackages.
If I have to keep a Claude around every time something comes up with repowise, I will if things are breaking this regularly. 😆 |
|
@ Verified all four subpackage dirs exist on disk and the import chain you traced from cli.main down to resolvers/dotnet matches what we are seeing on 0.4.0 from pipx. Merging now and cutting 0.4.1 right after so pipx users are unblocked today. You are right that this is the second drift in two weeks. Going to pick up the find: switch as a separate PR after 0.4.1 is out, want to keep the patch release strictly to this fix. |
Summary
The
[tool.setuptools].packageslist got out of sync with the source tree again — same failure mode as #97. Four subpackages exist on disk but are missing from the explicit list, so they get silently dropped from the built wheel:repowise.core.analysis.dead_coderepowise.core.ingestion.extractors.bindingsrepowise.core.ingestion.extractors.heritagerepowise.core.ingestion.resolvers.dotnetThe
dotnetdrop is the proximate cause of #109:csharp.py:34doesfrom .dotnet import get_or_build_indexat import time, so anypipx/pip installof 0.4.0 fails on firstrepowise initbefore the CLI can start. The other three were never reported because nothing imports them at startup, but they're still being dropped from the wheel.Fixes #109.
What changed
Added the four missing subpackages to
[tool.setuptools].packagesinpyproject.toml. No source changes.Verification
Built locally with
uv build --wheeland confirmed all four subpackages now ship in the wheel:The original failing import chain from #109 (
repowise.cli.main→cost_estimator→core.ingestion→graph→resolvers→csharp→dotnet) now resolves cleanly from a wheel install.Re Python 3.14
The reporter hit this on 3.14, but the bug is not 3.14-specific — any Python
>=3.11install of 0.4.0 from the published wheel will hit the sameModuleNotFoundError. 3.14 classifier coverage is a separate concern and not addressed here.Suggested follow-up (out of scope)
This is the second time in two weeks the explicit
packageslist has drifted from the tree (see #97). Worth considering a switch to[tool.setuptools.packages.find]with the existingpackage-dirmapping so newly-added subpackages get picked up automatically. Happy to file that as a separate PR if there's interest — keeping this one strictly to the fix for #109.