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

Misleading warning messages when .git is missing from locator #100

Open
Theodus opened this issue May 6, 2020 · 2 comments
Open

Misleading warning messages when .git is missing from locator #100

Theodus opened this issue May 6, 2020 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed needs discussion Needs to be discussed further

Comments

@Theodus
Copy link

Theodus commented May 6, 2020

corral.json:

{
  "deps": [
    {
      "locator": "github.com/ponylang/peg",
      "version": "0.1.0"
    }
  ],
  "info": {}
}
$ corral update
update: updating from /home/theodus/src/wip/changelog-tool
update: will load dep: github.com/ponylang/peg @ 0.1.0
Error loading dep bundle: github_com_ponylang_peg

The repo is never fetched, despite the message being identical to the warning printed on success, see #99.

@Theodus Theodus added the enhancement New feature or request label May 6, 2020
@SeanTAllen
Copy link
Member

Another variation I got:

I did an add with an incorrect locator and got:

{
"deps": [
{
"locator": "github.com/ponylang/peg",
"version": "0.1.0"
}
],
"info": {}
}

when I run corral fetch I get:

fetch: fetching from /home/sean/code/ponylang/changelog-tool
fetch: fetching dep: github.com/ponylang/peg @ 0.1.0
No dep bundle for: github.com/ponylang/peg

Which is horribly misleading given that the locator doesn't exist at all.

I propose this is addressed in two parts. Fix the bug of it not indicating the error on fetch.
Enhance to validate a locator on addition.

And reported in #118 which I am going to close.

@SeanTAllen SeanTAllen added bug Something isn't working help wanted Extra attention is needed and removed enhancement New feature or request labels May 18, 2020
@SeanTAllen
Copy link
Member

So the issue is that as the code currently is written, it figures out the VCS to use based on the suffix.

Without a suffix, it resorts to using the NoneVCS which is what you would want for using local dependencies that aren't VCS controlled but otherwise is problematic.

I'm giving serious consideration to saying you have to be explicit about the VCS if on adding, it can't be deduced from the locator. This would also allow for the possibility of validating additions (see #118).

@Theodus as you opened this issue, any thoughts adding another field to a dep for explicitly setting the VCS? It would usually be set automatically when adding.

That would mean that you could edit corral.json by hand and change it to "hg" from "git" without changing the locator which would probably be bad. but, once someone starts editing the file by hand, I think everything is out the window.

@SeanTAllen SeanTAllen added the needs discussion Needs to be discussed further label May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed needs discussion Needs to be discussed further
Projects
None yet
Development

No branches or pull requests

2 participants