-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #434 from alexarchambault/fix-with-full-help
Fix WithFullHelp runtime issues
- Loading branch information
Showing
11 changed files
with
218 additions
and
82 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
core/shared/src/main/scala-2/caseapp/core/help/WithFullHelpCompanion.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package caseapp.core.help | ||
|
||
import caseapp.core.parser.Parser | ||
import caseapp.{ExtraName, HelpMessage} | ||
|
||
abstract class WithFullHelpCompanion { | ||
|
||
implicit def parser[T, D](implicit underlying: Parser.Aux[T, D]): Parser[WithFullHelp[T]] = | ||
Parser.nil | ||
.addAll[WithHelp[T]].apply | ||
.add[Boolean]( | ||
"helpFull", | ||
default = Some(false), | ||
extraNames = Seq(ExtraName("fullHelp")), | ||
helpMessage = Some(HelpMessage("Print help message, including hidden options, and exit")) | ||
) | ||
.as[WithFullHelp[T]] | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
core/shared/src/main/scala-3/caseapp/core/help/WithFullHelpCompanion.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package caseapp.core.help | ||
|
||
import caseapp.core.parser.Parser | ||
import caseapp.{ExtraName, HelpMessage} | ||
|
||
abstract class WithFullHelpCompanion { | ||
|
||
implicit def parser[T: Parser]: Parser[WithFullHelp[T]] = | ||
Parser.nil | ||
.addAll[WithHelp[T]](using WithHelp.parser[T]) | ||
.add[Boolean]( | ||
"helpFull", | ||
default = Some(false), | ||
extraNames = Seq(ExtraName("fullHelp")), | ||
helpMessage = Some(HelpMessage("Print help message, including hidden options, and exit")) | ||
) | ||
.as[WithFullHelp[T]] | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
core/shared/src/main/scala/caseapp/core/parser/ParserMethods.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.