Perf: SourceField, PathGlobs and Filespec in rust#23244
Merged
Conversation
d380619 to
6334dad
Compare
tobni
commented
Apr 12, 2026
| getattr(cls, "PartitionRequest"): cls._requires_snapshot for cls in _all_lint_requests() | ||
| }[type(request)] | ||
| if operates_on_paths: | ||
| return Partitions.single_partition(fs.sources.globs for fs in request.field_sets) |
Contributor
Author
There was a problem hiding this comment.
Passed tuples to something expecting strings. Pyo3 validation of types catches it.
tobni
commented
Apr 12, 2026
| #[derive(Debug)] | ||
| pub struct Globs { | ||
| strings: Box<[String]>, | ||
| py_tuple: OnceLock<Py<PyTuple>>, |
Contributor
Author
There was a problem hiding this comment.
memoizing these may be design overkill, but userland could suffer if their plugin reads globs in python and we copy to python heap every access.
tobni
commented
Apr 12, 2026
8dbcaec to
f61bb10
Compare
benjyw
reviewed
May 18, 2026
Contributor
benjyw
left a comment
There was a problem hiding this comment.
Looks good to me overall! Could use more testing, esp of the functions claiming to emulate Python functionality. It would be good to have tests that run that function via the ffi and run the Python equivalent and compare outputs, across a large number of inputs.
f61bb10 to
3ada403
Compare
Contributor
Author
3ada403 to
4bd44cd
Compare
benjyw
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.