Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Confusing error message when you hover over things with an outdated revision #759

@ggilmore

Description

@ggilmore

I was visiting https://github.com/sourcegraph/src-cli/blob/master/cmd/src/repos_enable_disable.go#L74 and hovering over this token:

screen shot 2018-10-12 at 11 42 24 am

I got an error in the tooltip that said something like "character position is past end of line for line 73".

After visiting https://sourcegraph.sgdev.org/github.com/sourcegraph/src-cli@master/-/blob/cmd/src/repos_enable_disable.go?diff=bd3f07326b9b287ef3cba74807f7f7f08db757e3, hovering over the token on github.com worked again.


Here's my guess for what happened:

I made a commit that changed this file recently:
sourcegraph/src-cli@bd3f073#diff-209313ebbe93f08471dc927fd86dd079 (notice how the line 74 in the diff is actually shorter in the previous commit)

screen shot 2018-10-12 at 11 41 01 am

So, I'm guessing that the revision was outdated on our Sourcegraph instance until I directly navigated to the file on sgdev (which forced a hard refresh).


I can't think of a great solution to fix this off the top of my head.

In the URL https://github.com/sourcegraph/src-cli/blob/master/cmd/src/repos_enable_disable.go, there isn't any information that the browser extension could use to infer what that revision is other than just the master branch. This is too ambiguous for repo-updater to know that the revision is outdated (otherwise, we'd need to query the code host for every rev that looks like a branch, which is super-expensive).

Metadata

Metadata

Assignees

No one assigned

    Labels

    browser-extensionbugAn error, flaw or fault that produces an incorrect or unexpected result, or behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions