Conversation
Summary
--
I ran into this earlier when trying to run
```shell
$ cargo test -p ruff_source_file --all-features
error[E0277]: the trait bound `TextSize: GetSize` is not satisfied
--> crates/ruff_source_file/src/line_index.rs:23:41
```
It looks like we just needed to activate the `get-size` feature of
`ruff_text_size` when `ruff_source_file` activates its feature of the same name.
While I was at it, I ran this shell command to look for other cases with the
same problem:
```shell
for crate in crates/*; do
if ! cargo test -p ${crate#*/} --all-features > /dev/null; then
echo "$crate failed"
break
fi
done
```
and fixed those too. I also tried with no features enabled, since I know we've
run into similar problems with that before, but that didn't find anything except
for some unreachable `pub` warnings in for `TestDb` in `ty_project`. But
`TestDb` is conditionally re-exported, so I don't think we can get rid of those
warnings easily.
Should we consider throwing something like that into a daily/weekly cron job in
CI? I don't think we necessarily need to run it on every PR.
Test Plan
--
Same command above, which now works
Contributor
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
Contributor
|
Contributor
|
dcreager
added a commit
that referenced
this pull request
Aug 21, 2025
second-ed
pushed a commit
to second-ed/ruff
that referenced
this pull request
Sep 9, 2025
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.
Summary
I ran into a problem earlier when trying to run this command:
It looks like we just needed to activate the
get-sizefeature ofruff_text_sizewhenruff_source_fileactivates its feature of the same name.While I was at it, I looked for other cases with the same problem:
and fixed those too. I also tried with no features enabled, since I know we've run into similar problems with that before, but that didn't find anything except for some unreachable
pubwarnings forTestDbinty_project. ButTestDbis conditionally re-exported, so I don't think we can get rid of those warnings easily, unless we just want toallowthe warnings.Should we consider throwing something like the script above into a daily/weekly cron job in CI? I don't think we necessarily need to run it on every PR.
Test Plan
Same commands above, which now succeed