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 wrong id being given to doc comments #1118

Merged
merged 4 commits into from
May 24, 2024

Conversation

panglesd
Copy link
Collaborator

@panglesd panglesd commented May 3, 2024

Standalone documentation comments currently do not have an id. In search results, the goal was to give them the id of the signature they are in.
However, there was a confusion in the computation of this signature, resulting in a wrong ID. This PR fixes that.

The commit was originally in #1084 but since this PR does not seem to make a lot of progress, I think it is better to extract it in a standalone PR.

panglesd added a commit to panglesd/odoc that referenced this pull request May 3, 2024
Signed-off-by: Paul-Elliot <peada@free.fr>
@jonludlam
Copy link
Member

Always nice to see PRs that remove more lines than they add :-)

@jonludlam
Copy link
Member

I can't see clearly from the test what was broken before and now fixed? Is it worth having an explicit test? The sea of json in the existing test case is a bit meaningless right now.

panglesd added a commit to panglesd/odoc that referenced this pull request May 6, 2024
Signed-off-by: Paul-Elliot <peada@free.fr>
panglesd added a commit to panglesd/odoc that referenced this pull request May 6, 2024
Signed-off-by: Paul-Elliot <peada@free.fr>
@panglesd
Copy link
Collaborator Author

panglesd commented May 6, 2024

I added a more readable test focusing on the issue.

Exhibit a bug!

Signed-off-by: Paul-Elliot <peada@free.fr>
Standalone documentation comments currently do not have an id. This id was
carried as the accumulator of the field, which yielded wrong results!

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
@panglesd
Copy link
Collaborator Author

Ping @jonludlam @Julow

@jonludlam
Copy link
Member

Thanks!

@jonludlam jonludlam merged commit 74467d8 into ocaml:master May 24, 2024
13 checks passed
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.

None yet

2 participants