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

Replace import iteration with dead code elimination during imports #133

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

udoprog
Copy link
Collaborator

@udoprog udoprog commented Oct 2, 2020

This removes the verify_imports stage of compilation by integrating imports into the indexing/build system.

It's still kinda iffily integrated, in that the get_imports handling is done separately from query_meta. This is because imports can have cycles, and query_meta just doesn't have the necessary plumbing to deal with it. There's also a fair amount of metadata that would have to be awkwardly propagated (like import chains used for diagnostics), so it might not be worth it.

This is what cyclic import checking looks like right now:
image

@udoprog udoprog added the enhancement New feature or request label Oct 2, 2020
@udoprog udoprog merged commit 0bfeeb9 into master Oct 2, 2020
@udoprog udoprog deleted the dead-imports branch October 2, 2020 19:26
@udoprog udoprog added the changelog Issue has been added to the changelog label Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Issue has been added to the changelog enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant