prefix-dev / rip

Solve and install Python packages quickly with rip (pip in Rust)
https://prefix.dev
BSD 3-Clause "New" or "Revised" License
655 stars 23 forks source link

fix: error in archive file matching functionality for sdists #138

Closed tdejager closed 10 months ago

tdejager commented 10 months ago

The wrong file could be selected searching for file 'a' in archive could also potentially find foo/bar/a while you were trying to find a file in the root

Fixes #132, because a wrong pyproject.toml file was found for the ruff source distribution, as we were using ends_with to match the path of the entry in the archive. A pyproject.toml from a sub-crate was selected instead of the root pyproject.toml.

Fixes #132, however exposes a new bug: #137.

tdejager commented 10 months ago

@baszalmstra @orhun do you know a better way to re-write the strip_until_starts_with_prefix ideally without the PathBuf allocation?

wolfv commented 10 months ago

LGTM!