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

TY&RES: ignore impls from non-dependency crates #9229

Merged
merged 3 commits into from Sep 7, 2022
Merged

Conversation

vlad20012
Copy link
Member

No description provided.

@dima74
Copy link
Member

dima74 commented Sep 1, 2022

Btw there are some regressions

@vlad20012
Copy link
Member Author

vlad20012 commented Sep 1, 2022

I just checked the tokio regression. The regression occurs because there is a file included into 2 crates.
Minimized:

//- tests/foo.rs
    pub struct Foo;
    impl Foo {
        pub fn foo(&self) {}
    }
//- tests/a.rs
    mod foo;
    fn main() {
        foo::Foo.foo();
    }          //^ tests/foo.rs
//- tests/b.rs
    mod foo;
    fn main() {
        foo::Foo.foo();
    }

UPD: I've added a test with this case #9283

@dima74
Copy link
Member

dima74 commented Sep 1, 2022

The regression occurs because there is a file included into 2 crates.

I think it is ok because currently we don't fully support files included in module tree multiple times in resolve, etc. What about amethyst regressions?

@vlad20012
Copy link
Member Author

What about amethyst regressions?

It seems like there are a lot of fixed unresolved references false-positives that lead to the fact that more types has been inferred that in turn lead some new false-positives with these types. So this seems pretty fine

I think it is ok because currently we don't fully support files included in module tree multiple times in resolve, etc

I'm going to fix it soon anyway

@vlad20012 vlad20012 assigned vlad20012 and unassigned dima74 Sep 2, 2022
Now `TyFingerprint`-based cache is global, but `Ty`-based caches are local.
The new design helps with `impl`s filtering based on a crate where located
a function in which we infer types
@vlad20012
Copy link
Member Author

bors r=dima74

@bors
Copy link
Contributor

bors bot commented Sep 7, 2022

Build succeeded:

@bors bors bot merged commit e03e2e1 into master Sep 7, 2022
@bors bors bot deleted the perf-impl-index-cache branch September 7, 2022 08:23
@github-actions github-actions bot added this to the v179 milestone Sep 7, 2022
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.

None yet

2 participants