-
Notifications
You must be signed in to change notification settings - Fork 36
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
Unable to pass arguments starting with a dash to ceylon run #1228
Comments
This used to work before we moved to git-like tools. |
Btw, I think that if you put |
Perhaps, but it shouldn't have to |
Sure, but it was so @loicrouchon knows there is a "work-around" so he can continue what he was doing. |
@tombentley if this is more than an hour's work, it will have to wait for 1.0 |
@quintesse want to take a look at this one? |
@tombentley I didn't take too good a look at this, but at far as I can tell I deduce this because I can write So this is most likely not an easy fix, right? |
Of course another option would be to do what the language module does with its |
Of course this still won't be able to fix the problem for something like |
We could (I suppose should) fix the parsing so that it treated the |
Can't we just stop processing arguments the minute one doesn't start with |
@FroMage the thing is that the parser doesn't know anything about arguments (at least that's how I understand things) so it doesn't know what "following the module name" means. |
We could use an
|
But that wouldn't be correct, the program we're running might have any number of similar options. The parser should be clever enough to figure out that it should stop parsing at the first non-option argument. |
I would imagine the parser to behave somewhat like this:
what's left over should be the non-option arguments to the tool. |
Ok, I'm seeing a situation where we actually allow option to appear after arguments to the tool. An example is |
I don't get your comment. In |
Well actually what you call the "tool name" is an argument to the toplevel tool "ceylon". But later thinking about it I thought this should actually be passed on to the sub tool and for that one the option should actually be it's first argument, so I'm not sure why it doesn't work the way I thought it would. I need to study it some more. |
Ok, the actual example is something like this: |
The only solution I can see is to require that any options appear before the first non-option argument. (eg. |
Maybe there's another option: for tools that do not define a |
…ould definitely take a look at this
Ok, seems to work just fine. Closing. |
@quintesse this is roughly the way I was expecting to fix this, though I was thinking of adding a flag to |
Launching command
ceylon run mymodule/1.0.0 -Dfoo=bar
ends with the following error:(same issue with
ceylon run-js
)However, without the dash (ceylon run mymodule/1.0.0 foo=bar), it's working fine
This is an issue because it means that you can't use parameters starting with a dash in a ceylon applications
The text was updated successfully, but these errors were encountered: