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

refactor: generic symbol graph #317

Merged
merged 4 commits into from
Nov 6, 2023

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Nov 1, 2023

Example update in deno_doc: denoland/deno_doc#387

Closes #316

@dsherret dsherret requested a review from bartlomieju November 1, 2023 21:04
src/type_tracer/analyzer.rs Outdated Show resolved Hide resolved
@dsherret dsherret changed the title refactor: generic symbol graph (part 1) refactor: generic symbol graph Nov 1, 2023
pub struct RootSymbol<'a> {
module_graph: &'a ModuleGraph,
parser: &'a CapturingModuleParser<'a>,
specifiers_to_ids: AdditiveOnlyMap<ModuleSpecifier, ModuleId>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not ideal performance-wise to store the ModuleId boxed here (internally in AdditiveOnlyMap). I will fix this in a future PR.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but why remove is_public field from Symbol?

@dsherret
Copy link
Member Author

dsherret commented Nov 6, 2023

@bartlomieju it no longer does "tracing" so it doesn't figure that out. The is_public is not used in deno_doc as it figures it out itself.

@dsherret dsherret merged commit 099c0a3 into denoland:main Nov 6, 2023
3 checks passed
@dsherret dsherret deleted the refactor_generic_symbol_graph branch November 6, 2023 14:25
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.

Refactor type tracing to lazy symbol graph
2 participants