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

[llvm-cov][CoverageView] minor fix/improvement to HTML and text coverage output #80952

Merged
merged 4 commits into from
Feb 17, 2024

Conversation

whentojump
Copy link
Member

  1. add the missing condition for MC/DC in hasSubViews()
  2. add style for selected line
  3. remove name="Ln" attribute in the link within MC/DC views
  4. remove color for \n

@evodius96 Comments are appreciated!

Copy link

github-actions bot commented Feb 7, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@whentojump
Copy link
Member Author

I can confirm these commits are breaking two tests, and specifically the HTML part:

  LLVM :: tools/llvm-cov/mcdc-general-none.test
  LLVM :: tools/llvm-cov/mcdc-general.test

I'll investigate and update tests if that's the reason for failure.

@whentojump
Copy link
Member Author

The tests should have be fixed.

Basically change the expected HTML output accordingly (due to commit [llvm-cov][CoverageViewHTML] remove name="Ln" attribute in the link within MC/DC views) and remove the name attribute as well

…bViews()

Otherwise the generated HTML will place elements unpredictably. Most
notably, the MC/DC view boxes are often placed at the page top instead
of inline next to the actual code.
Highlight the selected line. One major benefit is, if the page is
relatively short, the line pointed by #Ln in URL may not be on top, and
this highlight can help quickly locate the line.
…ithin MC/DC views

Or it would conflict with the link at actual lines and jumping via URLs
containing #Ln would fail
@evodius96
Copy link
Contributor

LGTM -- thanks for catching these. It would be great if you could backport this to the 18.x branch.

@whentojump
Copy link
Member Author

if you could backport this to the 18.x branch.

Yes I'm happy to.

I don't know the procedures well. To my preliminary understanding: first let's wait for this one to get merged into main; then I interact with @llvmbot here or somewhere else to do the backport. Is that right?

@evodius96
Copy link
Contributor

if you could backport this to the 18.x branch.

Yes I'm happy to.

I don't know the procedures well. To my preliminary understanding: first let's wait for this one to get merged into main; then I interact with @llvmbot here or somewhere else to do the backport. Is that right?

Yes, I think you can follow the steps outlined here: https://llvm.org/docs/GitHub.html#backporting-fixes-to-the-release-branches

@whentojump
Copy link
Member Author

A gentle bump for more comments. (Which members are the best to include?)

By the way, @evodius96 do you have plans of updating this page https://llvm.org/docs/CoverageMappingFormat.html ? We probably want to include the changes since version 6. I can also do a draft for that. Also could you please take a look at #80531? Much appreciated!

@evodius96
Copy link
Contributor

A gentle bump for more comments. (Which members are the best to include?)

Your fix is minor and straightforward; I don't see the need for additional reviewers, but it's not a problem.

By the way, @evodius96 do you have plans of updating this page https://llvm.org/docs/CoverageMappingFormat.html ? We probably want to include the changes since version 6. I can also do a draft for that.

You're right -- the document needs to be updated for version 7. I did add information about the Decision mapping region in the Mapping Region section, but the discussion of what changed between version 6 and 7 also needs to mention that. If you want to draft that change, that's OK with me.

Also could you please take a look at #80531?

I can take a look, but it does look like you have the right reviewers on it.

@whentojump whentojump merged commit 0bf4f82 into llvm:main Feb 17, 2024
4 checks passed
@whentojump whentojump deleted the coverage-view-fix branch February 17, 2024 05:26
whentojump added a commit to xlab-uiuc/llvm-mcdc that referenced this pull request Feb 22, 2024
…age output (llvm#80952)

1. add the missing condition for MC/DC in hasSubViews()
2. add style for selected line
3. remove name="Ln" attribute in the link within MC/DC views
4. remove color for \n

(cherry picked from commit 0bf4f82)
tstellar pushed a commit that referenced this pull request Feb 24, 2024
Manually cherry-pick 0bf4f82 (#80952)
and resolve conflicts

Closes #82570
@llvm llvm deleted a comment from github-actions bot Feb 25, 2024
@llvm llvm deleted a comment from github-actions bot Feb 25, 2024
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