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

defaultDescription behaviour has changed between 1.2.0 and 1.2.0-M2 #119

Open
YannMoisan opened this issue Jun 17, 2019 · 3 comments
Open

Comments

@YannMoisan
Copy link
Contributor

With version 1.2.0, it seems that defaultDescription are always set to None

Here is a small example to reproduce the bug : https://scastie.scala-lang.org/YgickCTpTkWDK7xpoVTOJw

Arg(i,List(Name(i)),None,None,false,false,int,None)
Arg(s,List(Name(s)),None,None,false,false,string,None)
Arg(b,List(Name(b)),None,None,false,true,bool,None)
Arg(li,List(Name(li)),None,None,false,false,int*,None)

And it works with version 1.2.0-M2

Arg(i,List(Name(i)),None,None,false,false,int,Some(2))
Arg(s,List(Name(s)),None,None,false,false,string,Some("defaultt"))
Arg(b,List(Name(b)),None,None,false,true,bool,Some(false))
Arg(li,List(Name(li)),None,None,false,false,int*,Some(List()))
@YannMoisan
Copy link
Contributor Author

YannMoisan commented Jun 17, 2019

After searching a bit, it seems related to this commit d292098

I've just found a workaround by importing import core.Defaults._

But I don't know how to use it with this syntax object Example extends CaseApp[ExampleOptions]

@alexarchambault
Copy link
Owner

@YannMoisan It should work out-of-the-box with it, like

import caseapp._
import caseapp.core.Defaults._

object Example extends CaseApp[ExampleOptions]

(doesn't it for you?) The Parser is derived along CaseApp.

@YannMoisan
Copy link
Contributor Author

It works ! I was misled by IntelliJ that displays unused import.

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

No branches or pull requests

2 participants