Package
scala.cli.commands.package0.Package
object Package extends ScalaCommand[PackageOptions], BuildCommandHelpers
Attributes
- Graph
-
- Supertypes
-
trait BuildCommandHelpersclass ScalaCommand[PackageOptions]trait CommandHelperstrait NeedsArgvCommandclass Command[PackageOptions]class CaseApp[PackageOptions]class Objecttrait Matchableclass AnyShow all
- Self type
-
Package.type
Members list
Type members
Classlikes
final class NoMainClassFoundForAssemblyError(cause: NoMainClassFoundError) extends BuildException
Attributes
- Supertypes
-
class BuildExceptiontrait Diagnosticclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Inherited classlikes
Attributes
- Inherited from:
- CommandHelpers
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
def assembly(build: Successful, destPath: Path, mainClassOpt: Option[String], extraProvided: Seq[AnyModule], withPreamble: Boolean, alreadyExistsCheck: () => Either[BuildException, Unit], logger: Logger): Either[BuildException, Unit]
def buildNative(build: Successful, mainClass: Option[String], targetType: Native, destPath: Option[Path], logger: Logger): Either[BuildException, Path]
Value parameters
- options
-
command-specific T options
Attributes
- Returns
-
Tries to create BuildOptions based on sharedOptions and exits on error. Override to change this behaviour.
- Definition Classes
Attributes
- Definition Classes
-
Command
Attributes
- Definition Classes
-
ScalaCommand -> CaseApp
def linkJs(build: Successful, dest: Path, mainClassOpt: Option[String], addTestInitializer: Boolean, config: ScalaJsLinkerConfig, fullOpt: Boolean, noOpt: Boolean, logger: Logger, scratchDirOpt: Option[Path]): Either[BuildException, Path]
Attributes
- Definition Classes
-
Command
def providedFiles(build: Successful, provided: Seq[AnyModule], logger: Logger): Either[BuildException, Seq[Path]]
Returns the dependency sub-graph of the provided modules, that is, all their JARs and their transitive dependencies' JARs.
Returns the dependency sub-graph of the provided modules, that is, all their JARs and their transitive dependencies' JARs.
Note that this is not exactly the same as resolving those modules on their own (with their versions): other dependencies in the whole dependency sub-graph may bump versions in the provided dependencies sub-graph here.
Here, among the JARs of the whole dependency graph, we pick the ones that were pulled by the provided modules, and might have been bumped by other modules. This is strictly a subset of the whole dependency graph.
Attributes
def resolvePackageType(build: Successful, forcedPackageTypeOpt: Option[PackageType]): Either[BuildException, PackageType]
This should be overridden instead of run when extending ScalaCommand.
This should be overridden instead of run when extending ScalaCommand.
Value parameters
- options
-
the command's specific set of options
- remainingArgs
-
arguments remaining after parsing options
Attributes
- Definition Classes
Is that command a MUST / SHOULD / NICE TO have for the Scala runner specification?
Is that command a MUST / SHOULD / NICE TO have for the Scala runner specification?
Attributes
- Definition Classes
Attributes
- Definition Classes
def withSourceJar[T](build: Successful, defaultLastModified: Long, fileName: String)(f: Path => T): T
Inherited methods
Attributes
- Inherited from:
- RestrictableCommand
The actual sub-command name that was used. If the sub-command name is a list of strings, space is used as the separator. If argvOpt hasn't been defined, it defaults to name.
The actual sub-command name that was used. If the sub-command name is a list of strings, space is used as the separator. If argvOpt hasn't been defined, it defaults to name.
Attributes
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- ScalaCommand
Attributes
- Returns
-
the actual Scala CLI base runner name, for SIP it is scala otherwise scala-cli
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- CaseApp
Attributes
- Definition Classes
-
ScalaCommand -> CaseApp
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- CaseApp
Attributes
- Definition Classes
-
ScalaCommand -> CaseApp
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- CaseApp
Arguments are expanded then parsed. By default, argument expansion is the identity function. Overriding this method allows plugging in an arbitrary argument expansion logic.
Arguments are expanded then parsed. By default, argument expansion is the identity function. Overriding this method allows plugging in an arbitrary argument expansion logic.
One such expansion logic involves replacing each argument of the form '@
Attributes
- Example
-
import caseapp.core.parser.PlatformArgsExpander override def expandArgs(args: List[String]): List[String] = PlatformArgsExpander.expand(args)
- Inherited from:
- CaseApp
Attributes
- Inherited from:
- CaseApp
Attributes
- Returns
-
the actual Scala CLI runner name which was run
- Inherited from:
- ScalaCommand
Attributes
- Definition Classes
-
ScalaCommand -> CaseApp
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- CaseApp
Attributes
- Inherited from:
- CaseApp
Attributes
- Definition Classes
-
ScalaCommand -> Command
- Inherited from:
- ScalaCommand
Whether to ignore unrecognized arguments.
Whether to ignore unrecognized arguments.
That is, if there are unrecognized arguments, the parsing still succeeds. The unparsed arguments are put in the args
argument of run
.
Attributes
- Inherited from:
- CaseApp
Attributes
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- RestrictableCommand
Attributes
- Inherited from:
- RestrictableCommand
Attributes
- Definition Classes
- Inherited from:
- ScalaCommand
Attributes
- Definition Classes
-
ScalaCommand -> CaseApp
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- CaseApp
Attributes
- Inherited from:
- ScalaCommand
Print scalac
output if passed options imply no inputs are necessary and raw scalac
output is required instead. (i.e. --scalac-option -help
)
Print scalac
output if passed options imply no inputs are necessary and raw scalac
output is required instead. (i.e. --scalac-option -help
)
Value parameters
- options
-
command options
Attributes
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- Command
Attributes
- Definition Classes
- Inherited from:
- RestrictableCommand
Attributes
- Returns
-
the actual Scala CLI program name which was run
- Inherited from:
- ScalaCommand
This implementation is final. Override runCommand instead. This logic is invoked at the start of running every ScalaCommand.
This implementation is final. Override runCommand instead. This logic is invoked at the start of running every ScalaCommand.
Attributes
- Definition Classes
-
ScalaCommand -> CaseApp
- Inherited from:
- ScalaCommand
Attributes
- Definition Classes
- Inherited from:
- ScalaCommand
Attributes
- Definition Classes
- Inherited from:
- ScalaCommand
Whether to stop parsing at the first unrecognized argument.
Whether to stop parsing at the first unrecognized argument.
That is, stop parsing at the first non option (not starting with "-"), or the first unrecognized option. The unparsed arguments are put in the args
argument of run
.
Attributes
- Inherited from:
- CaseApp
Attributes
- Inherited from:
- CaseApp
Inherited fields
Attributes
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- CaseApp
Attributes
- Inherited from:
- ScalaCommand
Attributes
- Inherited from:
- ScalaCommand
Givens
Inherited givens
Attributes
- Inherited from:
- ScalaCommand
Extensions
Inherited extensions
extension (successfulBuild: Successful)
-O -d defaults to --compile-output; if both are defined, --compile-output takes precedence
-O -d defaults to --compile-output; if both are defined, --compile-output takes precedence
Attributes
- Inherited from:
- BuildCommandHelpers
Attributes
- Inherited from:
- BuildCommandHelpers
Implicits
Inherited implicits
final implicit def EitherBuildExceptionOps[E <: BuildException, T](either: Either[E, T]): EitherBuildExceptionOps[E, T]
Attributes
- Inherited from:
- CommandHelpers
Attributes
- Inherited from:
- CaseApp
In this article