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

fix(graindoc): Avoid singletons when building ordered comments #1208

Merged
merged 1 commit into from
May 10, 2022

Conversation

phated
Copy link
Member

@phated phated commented May 8, 2022

While working on #972, I found that the singleton used for ordering the comments of a file doesn't work when you try to handle multiple files. It would inject more comments in the map, which could cause bugs or throw errors on multiple module definitions, etc.

This switches the implementation to using a first-class module OrderedComments which is then passed to the functions that operate on comments.

@phated phated requested a review from a team May 8, 2022 22:03
Copy link
Member

@marcusroberts marcusroberts left a comment

Choose a reason for hiding this comment

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

Nice work

@phated phated merged commit 3f28e6e into main May 10, 2022
@phated phated deleted the phated/comments-singleton branch May 10, 2022 00:12
@github-actions github-actions bot mentioned this pull request May 16, 2022
@github-actions github-actions bot mentioned this pull request May 31, 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.

3 participants