Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure external help options are mentioned in short help where availa…
…ble (#2808)
- Loading branch information
Showing
4 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
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
22 changes: 22 additions & 0 deletions
22
modules/cli/src/main/scala/scala/cli/commands/shared/AllExternalHelpOptions.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,22 @@ | ||
package scala.cli.commands.shared | ||
|
||
import caseapp.core.Scala3Helpers.* | ||
import caseapp.core.help.{Help, HelpFormat} | ||
import caseapp.{Help, *} | ||
import com.github.plokhotnyuk.jsoniter_scala.core.* | ||
import com.github.plokhotnyuk.jsoniter_scala.macros.* | ||
|
||
@HelpMessage("Print help message") | ||
// this is an aggregate for all external and internal help options | ||
case class AllExternalHelpOptions( | ||
@Recurse | ||
scalacExtra: ScalacExtraOptions = ScalacExtraOptions(), | ||
@Recurse | ||
helpGroups: HelpGroupOptions = HelpGroupOptions() | ||
) | ||
|
||
object AllExternalHelpOptions { | ||
implicit lazy val parser: Parser[AllExternalHelpOptions] = Parser.derive | ||
implicit lazy val help: Help[AllExternalHelpOptions] = Help.derive | ||
implicit lazy val jsonCodec: JsonValueCodec[AllExternalHelpOptions] = JsonCodecMaker.make | ||
} |
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