Stream: t-compiler/wg-incr-comp

Topic: Roadmap and projects for incr-comp


view this post on Zulip cjgillot (Feb 10 2021 at 20:29):

Is there a list of projects to make progress on incremental compilation during the year?
Some kind of roadmap for the wg?

view this post on Zulip oliver (Feb 10 2021 at 20:40):

yes: https://github.com/rust-lang/wg-incr-comp/issues/1

view this post on Zulip Wesley Wiser (Feb 10 2021 at 20:44):

This was just something I threw together so if you have input about what you think we should be working on, please feel free to share!

view this post on Zulip cjgillot (Feb 10 2021 at 21:08):

The long-shots I have in mind:
1/ opportunistically drop the HIR;
2/ splitting the query system into several stages;
3/ incremental lowering, resolving and macro-expansion;
4/ transition HIR from a tree to ECS-like data structures.

Those items will require a significant work before being proposable, and will probably take a few month just to reach a design.

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 20:23):

cjgillot said:

The long-shots I have in mind:
1/ opportunistically drop the HIR;
2/ splitting the query system into several stages;
3/ incremental lowering, resolving and macro-expansion;
4/ transition HIR from a tree to ECS-like data structures.

Those items will require a significant work before being proposable, and will probably take a few month just to reach a design.

wouldn't it be a good idea for the wg to start diving those big projects into actionable things and then maybe split the work?

view this post on Zulip cjgillot (Feb 12 2021 at 20:23):

I am still in the brain-dump stage, not yet in the strategic planning :big_smile:

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 20:24):

:)

view this post on Zulip cjgillot (Feb 12 2021 at 20:25):

I developed a bit more in the sprint hack-md, actually.
https://hackmd.io/Br1k5qy0QWuPdbMZMdyeqQ?view

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 20:25):

cool

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 20:26):

yeah, I was kind of clapping and cheering for what you're doing and also asking if wouldn't make sense to try to work on more strategic things like the ones you're saying

view this post on Zulip cjgillot (Feb 12 2021 at 20:38):

I would be happy to help with the design and implementation.

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 20:41):

cjgillot said:

I would be happy to help with the design and implementation.

would be willing to help if you have ideas :)

view this post on Zulip cjgillot (Feb 14 2021 at 19:19):

Started a design document here. Looking for comments https://hackmd.io/@cjgillot/BJlE9Jw-u

view this post on Zulip mw (Feb 16 2021 at 13:26):

I don't know if it fits here but I'd love to see (clean up/simplification/documentation) of the query system implementation on the agenda :)

view this post on Zulip cjgillot (Feb 16 2021 at 17:38):

This is still an early draft with unsanctioned proposals :big_smile:
I added it as the first item.

view this post on Zulip mw (Feb 17 2021 at 16:12):

@cjgillot Sure, I'm mostly commenting from the sidelines here anyway :)

view this post on Zulip cjgillot (Feb 22 2021 at 20:16):

cjgillot said:

Started a design document here. Looking for comments https://hackmd.io/@cjgillot/BJlE9Jw-u

@Vadim Petrochenkov, I would like your input on the above HackMD.
You are the most familiar with AST, expand and resolve, and I fear I am speculating wildly on some parts.

view this post on Zulip Vadim Petrochenkov (Feb 22 2021 at 20:59):

I have no idea honestly.
I have some vague understanding of how the query system and incremental compilation works from the dev guide, but I never tried to connect it to resolve and expansion.
Yes, things can likely be restructured to work in incremental-friendly way to some extent, but I can't say how exactly this should be done without human-months of experiments and design work.

view this post on Zulip Jonas Schievink [he/him] (Feb 22 2021 at 21:15):

I might add that there are some plans for rust-analyzer to refactor how import resolution is performed to be easier to understand and model: https://github.com/rust-analyzer/rust-analyzer/issues/5922

It could also pave the way towards extracting "early" name resolution into a library.

view this post on Zulip Jonas Schievink [he/him] (Feb 22 2021 at 21:16):

Also, rust-analyzer's crate-wide name resolution is a distinct query from name resolution inside of item bodies, which helps with incrementality. It does not solve the fundamental issue that it's a fixed-point algorithm that has to look at every single item-level macro invocation though.

view this post on Zulip Jonas Schievink [he/him] (Feb 22 2021 at 21:18):

Maybe, once we have extracted the name resolution algorithm and made it use a simplified input instead of the full AST, that input could be stored in the incr. comp. cache, since it's probably quite small compared to all the macro expansions that go into nameres.


Last updated: Oct 21 2021 at 21:02 UTC