-
Notifications
You must be signed in to change notification settings - Fork 21
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
Using argument nameMapper in function runOrExit does not compile #154
Comments
Looks like we added it to all the |
https://github.com/com-lihaoyi/mainargs/blob/main/mainargs/src/Parser.scala I found it only in runRaw, no other run* funcs. |
Should be fixed in 0.7.3 which is on its way to Maven Central |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mainargs docs Customization says:
nameMapper: String => Option[String]
: how Scala camelCase names are mapping to CLI command and flag names. Defaults to translation to kebab-case, but you can pass inmainargs.Util.snakeCaseNameMapper
for snake_case CLI names ormainargs.Util.nullNameMapper
to disable mapping.I tried this code:
def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args, allowPositional = true, nameMapper = mainargs.Util.snakeCaseNameMapper)
and got the error:
Mainargs code is
So there is no nameMapper.
Is this error in mainargs code/docs or do I use it somehow incorrectly?
Used mainargs v is 0.7.2
The text was updated successfully, but these errors were encountered: