-
Notifications
You must be signed in to change notification settings - Fork 51
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
Github review comments are on wrong line #216
Comments
I'm investigating this issue at the moment. I need to understand a bit better how |
@RagnarGrootKoerkamp have you made some of these PR comments from the commits tab? Back in the days I've looking at the responses from Github API to actions performed in the Commit tab I got some unexpected results back. This might be a good starting point to investigate this. |
Hmm, no. All the comments were either made in the The ones made on github work fine and end up on the right lines. The issue seems to be that |
Got it, thanks.
Yes, but the wrong line number might be computed due to mis-interpretation of either other comments fetched from Github above the line your are working on or outdated sections. The way we handle outdated comments and threads is not good in anyway right now. Specially because we need to place it in the diff hunk section which is very complicated. I'm considering moving all the outdated comments to a dedicated section before or after the I'll keep looking into it. Do you mind if I push some comments to the PR you linked in the issue here? |
Right, makes sense.
Sure, go ahead.
Hmm. If by outdated you mean 'relating to a line of code that was since changed', yes, that sounds fine. My biggest complaint with Github reviewing is that it's somewhat hard to find old/outdated comments. |
First, thanks for this project! It looks very promising!
Describe the bug
When making comments/suggestions on a PR, sometimes they end up on the wrong line.
To Reproduce
A simple reproduction I tried worked correctly, but comments on a larger PR sometimes end up on the wrong line. see below.
Expected behavior
A comment/suggestion made on a line in emacs ends up on (just below) the same line in github UI.
Screenshots
Comment made just below
fn str_CIGAR
:Same comment as shown on GitHub here:
After refreshing the review, that comment still shows up below the function. Here I also also added a suggestion:
After submitting the comment and refreshing, again it's shifted by 1 line. And GitHub has changed the line to be changed to the
for ...
instead of thestr.push_str(...
.Earlier comments made even larger jumps. E.g. this suggestion was made on line 63 at
fn str_CIGAR
in emacs, but ended up on line 77 in Github, which was then moved to line 22 of the previous commit since the most recent commit does not touch it.Desktop (please complete the following information):
code-review
version: d38fbe5 (just after 0.0.7)The text was updated successfully, but these errors were encountered: