Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect .gitignore #22

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Respect .gitignore #22

merged 3 commits into from
Jan 20, 2025

Conversation

oyarsa
Copy link
Contributor

@oyarsa oyarsa commented Jan 20, 2025

Instead of using walkdir to gather the files to sure, we use ripgrep's .gitignore crate.

Closes #20.

@oyarsa
Copy link
Contributor Author

oyarsa commented Jan 20, 2025

Every time I run just dev, it resets the anot version in uv.lock to 0.0.3. Any idea why?

@rorybyrne
Copy link
Collaborator

I noticed this too, couldn't figure out why. I think it has to do with dynamic = ["version"] in pyproject.toml. This makes uv look somewhere else to find the version - probably the git tags?

It doesn't affect the PyPi package so I just git restore it before committing. Sorry it's annoying. I'll open an issue for it.

@oyarsa
Copy link
Contributor Author

oyarsa commented Jan 20, 2025

uv docs says that the build system is responsible for dynamic metadata. maturin docs says:

version - From package.version in Cargo.toml (converted from SemVer to PEP 440 format)

Which is obviously not true. I have no idea what else it could be. However, deleting the version line from uv.lock makes uv stop changing it. Maybe that's enough?

It was being updated to the wrong version, and removing it seems to stop
that.
@rorybyrne
Copy link
Collaborator

rorybyrne commented Jan 20, 2025

Let's try that then, if you want to commit the deletion here? Then I'll merge the PR and cut a release, and we'll see if anything blows up!

Also,

version - From package.version in Cargo.toml (converted from SemVer to PEP 440 format)

I believe this is true when building the wheel. You can run uv run maturin build --release and check the wheel to see. I have no idea where the uv.lock version is coming from.

@oyarsa
Copy link
Contributor Author

oyarsa commented Jan 20, 2025

Deleted the line, ran just dev and uv lock, and nothing got added to uv.lock again.

@rorybyrne rorybyrne merged commit 3e40481 into flywhl:main Jan 20, 2025
1 check passed
@oyarsa oyarsa deleted the ignore-gitignore branch January 20, 2025 22:18
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.

feat: respect .gitignore
2 participants