Stream: t-compiler/rust-analyzer

Topic: chalk-ir move


Florian Diebold (Mar 11 2021 at 15:42, on Zulip):

@Lukas Wirth are you working on any further hir_ty refactorings currently? just so we don't conflict unnecessarily

Lukas Wirth (Mar 11 2021 at 15:55, on Zulip):

I've got nothing more in progress right now no

Florian Diebold (Mar 19 2021 at 13:50, on Zulip):

slightly annoying that we can't implement InternKey for chalk types, so we have to add a bunch of proxy ID types that just exist to be converted: https://github.com/rust-analyzer/rust-analyzer/blob/dc8e2fea98aecbba0c587e5999b9e09533e0091c/crates/hir_ty/src/db.rs#L154-L170

detrumi (Mar 19 2021 at 14:06, on Zulip):

Haven't looked into it, but maybe something like InternedId<..> is possible?

Florian Diebold (Mar 19 2021 at 14:08, on Zulip):

a somewhat related problem is that we have to convert between our IDs and Chalk's in other case where there are corresponding ones: https://github.com/rust-analyzer/rust-analyzer/blob/dc8e2fea98aecbba0c587e5999b9e09533e0091c/crates/hir_ty/src/lib.rs#L1172-L1186

Florian Diebold (Mar 19 2021 at 14:09, on Zulip):

I mean, it's not really a _problem_, just somewhat annoying

Florian Diebold (Mar 19 2021 at 14:10, on Zulip):

it might be nice to have an associated type in the interner for every ID, but that might make everything much more annoying in Chalk

Florian Diebold (Mar 19 2021 at 14:10, on Zulip):

it's not possible to define type ForeignDefId<Interner> = Interner::ForeignDefId;, is it? :thinking:

Florian Diebold (Mar 19 2021 at 14:11, on Zulip):

OTOH that isn't really a big difference anyway

Florian Diebold (Apr 03 2021 at 16:28, on Zulip):

we're slowly getting there, I made a tracking issue: rust-analyzer/rust-analyzer#8313

detrumi (Apr 03 2021 at 16:36, on Zulip):

(https://github.com/rust-analyzer/rust-analyzer/issues/8313)

Florian Diebold (Apr 08 2021 at 12:09, on Zulip):

https://github.com/rust-analyzer/rust-analyzer/pull/8419

detrumi (Apr 08 2021 at 12:19, on Zulip):

image.png :heart_eyes:

detrumi (Apr 08 2021 at 12:21, on Zulip):

Removing ToChalk should simplify things even more I hope

Florian Diebold (Apr 08 2021 at 12:40, on Zulip):

interestingly, this has only marginal impact on performance, but seems to fix a few unknown types for some reason

Laurențiu (Apr 08 2021 at 12:45, on Zulip):

Maybe they're unknown types in the code you removed?

Florian Diebold (Apr 08 2021 at 12:48, on Zulip):

I ran both on the same RA code

Laurențiu (Apr 08 2021 at 12:50, on Zulip):

Oh

Last update: Jul 29 2021 at 09:00UTC