-
Notifications
You must be signed in to change notification settings - Fork 16
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
WIP: Parse endpoints using argparse #76
base: main
Are you sure you want to change the base?
Conversation
Happy to re-add |
This is really coincidental; I've run into this issue also the last few days, and just last night (shortly before this issue), I opened a PR to fix this as well #74 I take a different approach though, just adding a patter to match window's drive letters and ignore, similar to how it already did for |
|
||
args, unknown = parser.parse_known_args(argv[:endpoint_index]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found a regression caused by this. If the program args contains hyphenated args, e.g. ["com.pinterest:ktlint", "-F", "/c/path/to/file.kt"]
, the hyphenated arg becomes a JVM arg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A workaround for this is for people to use --
, i.e. ["com.pinterest:ktlint", "--", "-F", "/c/path/to/file.kt"]
Requiring that workaround would mean this is a breaking change.
Looking for other solutions ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using --
isnt enough.
["--add-opens", "java.base/java.lang=ALL-UNNAMED", "com.pinterest:ktlint", "--", "-F", "/c/path/to/file.kt"]
ends up with jvm arg ["--add-opens"]
and endpoint java.base/java.lang=ALL-UNNAMED
. :-(
I think there are benefits in where I was going with this, but I want to first get tests in place for the current behaviour, before attempting to take this approach further. I'll get a WIP up shortly. |
additional endpoints and shortcuts fail
6819b3a
to
133601a
Compare
@ctrueden, I am pretty confident that I can get this working correctly, resulting in no more attempt to parse the program_args and all the problems that can cause. OTOH, complexity goes through the roof, and we'd be using 'private' parts of the Should I keep going? |
No description provided.