-
Notifications
You must be signed in to change notification settings - Fork 17
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
wrong --parser
version leads to a strange error message
#253
Comments
--parser
version doesn't lead to runtime exception--parser
version leads to a strange error message
it does not seem to be a javascript error, more like maven stuff. Seems like the plugin cant be found. Here is possible explanation. |
@antonbashmakov we should report a proper message to the user, something like: "There is no 9.9.9 version of the parser in Maven Central" |
@yegor256 what we could do is to fetch versions from maven central and compare provided
|
@antonbashmakov maybe we can run |
@yegor256 do not really like such approach, what if it is some thing else but version failing? I suggest to implement the full check then:
If there is no such version in either of repos we can show a meaningful message. |
@antonbashmakov we will have to re-implement the entire logic of Maven dependency management, which is pretty complex. What else may fail in case of |
@yegor256 it's probably a solution, but feels patchy, its like to validate a numeric format string using Implementing a check is not that much of work, we just use existing mechanism to fetch version from two different sources and do a simple check. But there is another way, we could read from command output and react on phrases like |
@antonbashmakov what about proxies? What about custom location of Maven home? Checking the presence of |
I tried to implement the We run a command which we cant control exactly the same way we cant control any other command. It could fail by any other reason but the parser version, exactly the same way any other command will. And we will still guess the reason, so what is the point then? I would put it like that, if we wont consider at least to try to check the version against repositories there is no point of doing it at all. It will be just an extra effort for a blind guess. We could rather add a warning in case of any error asking if the parser version is ok. |
@antonbashmakov what about proxies? What about custom location of Maven home? you will implement this functionality in the "checker"? |
@yegor256 I can definitely try. The question if it is worth it. BTW I cant see proxies to be taken care of when One more thing, I think we only need to warn the user about version mismatch not stop script from running. |
@antonbashmakov indeed, the implementation of As for this feature, I still believe that we should avoid complex solutions and simply use |
@yegor256 what exactly you want to archive calling |
@yegor256 my point is that you cant be sure if We could use |
@antonbashmakov |
@yegor256 Anyhow, this issue is far from critical, I see no real value in discussing it further, Ill add a preflight and assume that if it is failed it failed because of the version mismatch. |
@yegor256 am I able to push a MR? |
@antonbashmakov please, use forks |
If I run
eoc parse --parser=9.9.9
, I get a weird error:Let's try to report it a bit better.
The text was updated successfully, but these errors were encountered: