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

The "please choose one" dialogue should accept typing the version name as a way of indicating your choice #1714

Closed
ExplodingCabbage opened this issue Feb 27, 2015 · 18 comments

Comments

@ExplodingCabbage
Copy link

This is amusingly petty, but...

Just now I ran a bower install and got this dialogue:

Unable to find a suitable version for firebase, please choose one:
    1) firebase#2.1.x which resolved to 2.1.2 and is required by angularfire#0.9.2 
    2) firebase#~2.2.1 which resolved to 2.2.1Prefix the choice with ! to persist it to bower.json

? Answer::

with the number at the beginning of each line (1) or 2)) highlighted in pink, the version spec (firebase#2.1.x or firebase#~2.2.1) highlighted in blue, and the concrete version (2.1.2 or 2.2.1) highlighted in green.

Because I am an idiot, I did not notice that the lines were numbered and tried typing the full version number or version spec as my answer instead, repeatedly getting told "Invalid choice!" as bower rejected my attempts to answer. I suspect, though I have no evidence, that others must have been caught out by this dialogue and made the same mistake. It took me a few minutes to figure out how to proceed.

Accepting the user typing in a full version spec, or, where unambiguous, a full version, seems like it would help silly people like me who don't think of typing the line number as their response.

@jazzfog
Copy link

jazzfog commented Apr 15, 2015

Agree, got stuck with the same :)

@sheerun
Copy link
Contributor

sheerun commented Apr 15, 2015

Please send a PR :)

@graciano
Copy link

I just did the exact same thing and got stuck a few minutes searching for a possible bug or thinking the problem could be in the package.

@faceleg
Copy link
Member

faceleg commented Feb 27, 2016

Added labels to indicate this is suitable for a beginner and is of low priority.

@theaverageguy
Copy link
Contributor

Where will you make changes for this? A little help please.

@ptitgraig
Copy link

Instead of letting the user type version, shall we simply clarify the statement.
I suggest : Unable to find a suitable version for firebase, please choose one by typing one of the number below:

@benmann
Copy link
Member

benmann commented Mar 25, 2016

@ptitgraig I'd honestly prefer that, especially because I think it is far more convenient to press one key instead of typing entire version numbers — I guess if we added the option and people knew about both possibilities, most would still just hit the number. Maybe even more important: it might prevent miss-typing the version more often.

@graciano
Copy link

I agree with @benmann, if you show where to change the message in the source code, I can try here (I really want to contribute, even in such a small feature, to learn from it).

@altyaper
Copy link

How can I trigger this conflict message? I would like to do a PR of what @ptitgraig suggested.

@benmann
Copy link
Member

benmann commented Mar 26, 2016

So if you're both interested we could actually do both — your choice :)
The "easier" solution, which I also favor is located in lib/templates/std/conflict.std.
--> Done in #2212

If you want to go and implement the possibility to type the entire version you should have a look at lib/core/Manager.js. To be more specific, conflicts start around here and the actual choice is somewhere around this line or slightly above.

To trigger this message you'd actually have to install a package that requires different versions of a certain package, or has dependencies that require different versions of a package. If the conflict cannot be resolved automatically (by choosing the higher version for example), the user is asked for input.

@zbnauj zbnauj assigned zbnauj and unassigned zbnauj Mar 26, 2016
@zbnauj
Copy link
Member

zbnauj commented Mar 26, 2016

I was about to send a PR but I will leave it to @echavezNS or @theaverageguy

@altyaper
Copy link

Thanks @thinkxl I just sent it.

@benmann
Copy link
Member

benmann commented Mar 27, 2016

So part of this is implemented in #2212, but we can still implement the original idea behind the issue as well. If one of you is interested @thinkxl, @graciano or @theaverageguy just go for it.

@rpunkfu
Copy link
Member

rpunkfu commented Apr 9, 2016

Hi @benmann, I came across this issue and decide to submit PR, I hope nobody was already assigned? :)

@graciano
Copy link

@oskarcieslik I was thinking about doing it, but didn't have the time, so it's ok ;)

@benmann
Copy link
Member

benmann commented Apr 11, 2016

Nice, thank you everybody!
Closed by #2243 🎉

@benmann benmann closed this as completed Apr 11, 2016
@seyisulu
Copy link

seyisulu commented Sep 12, 2016

Hello everyone, I noticed this was closed but while using PowerShell on Windows 10 64 bit I did not even get to see the line numbers (there is nothing there but space and no, not even in yellow) and a Google search brought me here.

I'm not sure if this should be a separate issue.

@graciano
Copy link

@seyisulu Look, I'll especulate a little here and I could be wrong, but here it goes:
I think most of the developers here doesn't even have windows in their computers and will not be available to help you. So I would try to download the source and try to debug it myself if I were you. If it's really necessary for you to keep trying to use it on windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests