You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
valid uri's are flagged as errors in git resource #194
The lang server uses github-specific parsing for the uri on the git resource, but that uri can be any valid uri that points to a git instance. Usually not a problem, but if your github url is at eg github.computer.com, that uri gets flagged as
Expecting a ':'
or
Expecting a '/'
on the p.
It's a rare circumstance, but that value is a uri, not necessarily a github address, so it is a bug. Not huge, but a minor annoyance.
It'll show up for any uri that starts with [email protected] and not[email protected]: or https://github.com and nothttps://github.com/.
is it an attempt to guess what the user meant and give some better suggestion for a common error? How common is it to mess up a github address in that specific way? Everything is right except the ':' or '/' missing?
The logic is just written because we have some special support for github addresses. (It does more than just check the format, but actually uses github rest api, provided you have it setup correctly, to verify the repo exists, it also gives some completion support for repo names etc.).
We (or better, blame that on me personally, who wrote this code) just didn't think much about the other cases.
And no, obviously it isn't correct or logical. But isn't that usually the case when there is a bug? I mean if it was correct and logical then it wouldn't be a bug, would it now :-).
Anyhow, thanks for reporting, it shouldn't be too hard to fix.
Thanks for the generous offer. I already pushed a small change that I think fixes it so your urls no longer get flagged. But we still detect that something like this: [email protected]/spring-projects/sts4.git is wrong. Basically I just added a extra condition so the error is not raised if the character after the 'github.com' is not a '/' or ':'. Turns out this does have a common mistake in mind. I.e. mixing up whether the 'separator' is ':' (for ssh style) or a '/' (for https style).
Activity
shua commentedon Jan 31, 2019
I'm a little confused at the logic here:
https://github.com/spring-projects/sts4/blob/master/headless-services/concourse-language-server/src/main/java/org/springframework/ide/vscode/concourse/github/GithubValueParsers.java#L90
and why it's not just a simple:
is it an attempt to guess what the user meant and give some better suggestion for a common error? How common is it to mess up a github address in that specific way? Everything is right except the ':' or '/' missing?
kdvolder commentedon Jan 31, 2019
The logic is just written because we have some special support for github addresses. (It does more than just check the format, but actually uses github rest api, provided you have it setup correctly, to verify the repo exists, it also gives some completion support for repo names etc.).
We (or better, blame that on me personally, who wrote this code) just didn't think much about the other cases.
And no, obviously it isn't correct or logical. But isn't that usually the case when there is a bug? I mean if it was correct and logical then it wouldn't be a bug, would it now :-).
Anyhow, thanks for reporting, it shouldn't be too hard to fix.
shua commentedon Jan 31, 2019
neat, thanks. I can take a stab at it if you'd like. Just need to know what's expected.
Fix for #194
kdvolder commentedon Jan 31, 2019
@shua
Thanks for the generous offer. I already pushed a small change that I think fixes it so your urls no longer get flagged. But we still detect that something like this:
[email protected]/spring-projects/sts4.gitis wrong. Basically I just added a extra condition so the error is not raised if the character after the 'github.com' is not a '/' or ':'. Turns out this does have a common mistake in mind. I.e. mixing up whether the 'separator' is ':' (for ssh style) or a '/' (for https style).kdvolder commentedon Jan 31, 2019
If you want to try it out you can download a snapshot .vsix file from here:
http://dist.springsource.com/snapshot/STS4/nightly-distributions.html
shua commentedon Feb 1, 2019
thanks, tried it out, and it looks like it's fixed