├── .git-blame-ignore-revs ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ ├── new_release.md │ └── other.md ├── dependabot.yml ├── release │ ├── img │ │ ├── apply-regexes-on-release-notes-in-intellij.png │ │ ├── submit-for-malware-analysis-1.png │ │ ├── submit-for-malware-analysis-2.png │ │ ├── submit-for-malware-analysis-3.png │ │ ├── submit-for-malware-analysis-4.png │ │ └── submit-for-malware-analysis-5.png │ ├── release-notes-regexes.md │ ├── release-procedure.md │ └── windows-antimalware-analysis.md ├── scripts │ ├── build-linux-aarch64-from-docker.sh │ ├── build-linux-aarch64.sh │ ├── build-website.sh │ ├── check-cross-version-deps.sc │ ├── choco │ │ ├── logo.ico │ │ ├── scala-cli.nuspec │ │ └── tools │ │ │ └── chocolateyinstall.ps1 │ ├── docker │ │ ├── ScalaCliDockerFile │ │ └── ScalaCliSlimDockerFile │ ├── generate-docker-image.sh │ ├── generate-junit-reports.sc │ ├── generate-native-image.sh │ ├── generate-os-packages.sh │ ├── generate-slim-docker-image.sh │ ├── get-latest-cs.sh │ ├── gpg-setup.sh │ ├── publish-docker-images.sh │ ├── publish-sdkman.sh │ ├── publish-slim-docker-images.sh │ ├── scala-cli.rb.template │ ├── scala.rb.template │ └── update-website.sh └── workflows │ ├── ci.yml │ ├── test-report.yml │ └── website.yaml ├── .gitignore ├── .mill-jvm-opts ├── .mill-version ├── .scala-steward.conf ├── .scalafix.conf ├── .scalafix.legacy.conf ├── .scalafix3.conf ├── .scalafmt.conf ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── DEV.md ├── INTERNALS.md ├── LICENSE ├── README.md ├── build.mill.scala ├── gcbenchmark ├── .gitignore ├── README.md └── gcbenchmark.scala ├── gifs ├── Dockerfile ├── README.md ├── create_missing.sc ├── demo-magic.sh ├── demo-no-magic.sh ├── example.sh ├── run_scenario.sh ├── scenarios │ ├── complete-install.sh │ ├── defaults.sh │ ├── demo.sh │ ├── education.sh │ ├── embeddable_scripts.sh │ ├── fast-scripts.sh │ ├── learning_curve.sh │ ├── powerful_scripts.sh │ ├── projects.sh │ ├── prototyping.sh │ ├── scripting.sh │ ├── self-contained-examples.sh │ ├── todo.sh │ ├── universal_tool.sh │ └── versions.sh └── svg_render │ ├── Dockerfile │ └── README.md ├── logo.png ├── mill ├── mill.bat ├── millw ├── modules ├── build-macros │ └── src │ │ ├── main │ │ └── scala │ │ │ └── scala │ │ │ └── build │ │ │ ├── EitherCps.scala │ │ │ ├── EitherSequence.scala │ │ │ └── Ops.scala │ │ ├── negative-tests │ │ └── MismatchedLeft.scala │ │ └── test │ │ └── scala │ │ └── scala │ │ └── build │ │ └── CPSTest.scala ├── build │ └── src │ │ ├── main │ │ ├── java │ │ │ └── scala │ │ │ │ └── build │ │ │ │ └── internal │ │ │ │ ├── Chdir.java │ │ │ │ ├── ChdirGraalvm.java │ │ │ │ ├── GraalvmUnistdExtras.java │ │ │ │ └── JavaParserProxyMakerSubst.java │ │ └── scala │ │ │ └── scala │ │ │ └── build │ │ │ ├── Bloop.scala │ │ │ ├── BloopBuildClient.scala │ │ │ ├── Build.scala │ │ │ ├── BuildThreads.scala │ │ │ ├── Builds.scala │ │ │ ├── CollectionOps.scala │ │ │ ├── ConsoleBloopBuildClient.scala │ │ │ ├── CrossKey.scala │ │ │ ├── CrossSources.scala │ │ │ ├── Directories.scala │ │ │ ├── GeneratedSource.scala │ │ │ ├── LocalRepo.scala │ │ │ ├── PersistentDiagnosticLogger.scala │ │ │ ├── Project.scala │ │ │ ├── ReplArtifacts.scala │ │ │ ├── ScalaCompilerParams.scala │ │ │ ├── ScalafixArtifacts.scala │ │ │ ├── ScopedSources.scala │ │ │ ├── Sources.scala │ │ │ ├── bsp │ │ │ ├── BloopSession.scala │ │ │ ├── Bsp.scala │ │ │ ├── BspClient.scala │ │ │ ├── BspImpl.scala │ │ │ ├── BspReloadableOptions.scala │ │ │ ├── BspServer.scala │ │ │ ├── BspThreads.scala │ │ │ ├── BuildClientForwardStubs.scala │ │ │ ├── BuildServerForwardStubs.scala │ │ │ ├── BuildServerProxy.scala │ │ │ ├── HasGeneratedSources.scala │ │ │ ├── HasGeneratedSourcesImpl.scala │ │ │ ├── IdeInputs.scala │ │ │ ├── JavaBuildServerForwardStubs.scala │ │ │ ├── JsonRpcErrorCodes.scala │ │ │ ├── JvmBuildServerForwardStubs.scala │ │ │ ├── LoggingBuildClient.scala │ │ │ ├── LoggingBuildServer.scala │ │ │ ├── LoggingBuildServerAll.scala │ │ │ ├── LoggingJavaBuildServer.scala │ │ │ ├── LoggingJvmBuildServer.scala │ │ │ ├── LoggingScalaBuildServer.scala │ │ │ ├── ScalaBuildServerForwardStubs.scala │ │ │ ├── package.scala │ │ │ └── protocol │ │ │ │ └── TextEdit.scala │ │ │ ├── compiler │ │ │ ├── BloopCompiler.scala │ │ │ ├── BloopCompilerMaker.scala │ │ │ ├── ScalaCompiler.scala │ │ │ ├── ScalaCompilerMaker.scala │ │ │ ├── SimpleJavaCompiler.scala │ │ │ ├── SimpleScalaCompiler.scala │ │ │ └── SimpleScalaCompilerMaker.scala │ │ │ ├── input │ │ │ ├── Element.scala │ │ │ ├── ElementsUtils.scala │ │ │ ├── Inputs.scala │ │ │ ├── ScalaCliInvokeData.scala │ │ │ └── WorkspaceOrigin.scala │ │ │ ├── internal │ │ │ ├── AmmUtil.scala │ │ │ ├── AppCodeWrapper.scala │ │ │ ├── ClassCodeWrapper.scala │ │ │ ├── JavaParserProxy.scala │ │ │ ├── JavaParserProxyBinary.scala │ │ │ ├── JavaParserProxyJvm.scala │ │ │ ├── JavaParserProxyMaker.scala │ │ │ ├── MainClass.scala │ │ │ ├── ManifestJar.scala │ │ │ ├── ObjectCodeWrapper.scala │ │ │ ├── Runner.scala │ │ │ ├── WrapperUtils.scala │ │ │ ├── markdown │ │ │ │ ├── MarkdownCodeBlock.scala │ │ │ │ ├── MarkdownCodeWrapper.scala │ │ │ │ └── MarkdownOpenFence.scala │ │ │ ├── resource │ │ │ │ ├── NativeResourceMapper.scala │ │ │ │ └── ResourceMapper.scala │ │ │ ├── util │ │ │ │ ├── RegexUtils.scala │ │ │ │ └── WarningMessages.scala │ │ │ └── zip │ │ │ │ └── WrappedZipInputStream.scala │ │ │ ├── package.scala │ │ │ ├── postprocessing │ │ │ ├── AsmPositionUpdater.scala │ │ │ ├── ByteCodePostProcessor.scala │ │ │ ├── LineConversion.scala │ │ │ ├── PostProcessor.scala │ │ │ ├── SemanticDbPostProcessor.scala │ │ │ ├── SemanticdbProcessor.scala │ │ │ └── TastyPostProcessor.scala │ │ │ └── preprocessing │ │ │ ├── CustomDirectivesReporter.scala │ │ │ ├── DataPreprocessor.scala │ │ │ ├── DeprecatedDirectives.scala │ │ │ ├── DirectivesPreprocessor.scala │ │ │ ├── ExtractedDirectives.scala │ │ │ ├── JarPreprocessor.scala │ │ │ ├── JavaPreprocessor.scala │ │ │ ├── MarkdownCodeBlockProcessor.scala │ │ │ ├── MarkdownPreprocessor.scala │ │ │ ├── PreprocessedMarkdown.scala │ │ │ ├── PreprocessedSource.scala │ │ │ ├── PreprocessingUtil.scala │ │ │ ├── Preprocessor.scala │ │ │ ├── ScalaPreprocessor.scala │ │ │ ├── ScriptPreprocessor.scala │ │ │ ├── SheBang.scala │ │ │ ├── UsingDirectivesOps.scala │ │ │ └── directives │ │ │ ├── DirectivesPreprocessingUtils.scala │ │ │ ├── PartiallyProcessedDirectives.scala │ │ │ └── PreprocessedDirectives.scala │ │ └── test │ │ └── scala │ │ └── scala │ │ └── build │ │ ├── options │ │ └── publish │ │ │ ├── ComputeVersionTests.scala │ │ │ └── VcsParseTest.scala │ │ └── tests │ │ ├── ActionableDiagnosticTests.scala │ │ ├── BspServerTests.scala │ │ ├── BuildOptionsTests.scala │ │ ├── BuildProjectTests.scala │ │ ├── BuildTests.scala │ │ ├── BuildTestsBloop.scala │ │ ├── BuildTestsScalac.scala │ │ ├── DirectiveTests.scala │ │ ├── DistinctByTests.scala │ │ ├── ExcludeTests.scala │ │ ├── InputsTests.scala │ │ ├── OfflineTests.scala │ │ ├── PackagingUsingDirectiveTests.scala │ │ ├── PreprocessingTests.scala │ │ ├── ReplArtifactsTests.scala │ │ ├── ScalaNativeUsingDirectiveTests.scala │ │ ├── ScalaPreprocessorTests.scala │ │ ├── ScriptWrapperTests.scala │ │ ├── SourceGeneratorTests.scala │ │ ├── SourcesTests.scala │ │ ├── TestInputs.scala │ │ ├── TestLogger.scala │ │ ├── TestUtil.scala │ │ ├── markdown │ │ ├── MarkdownCodeBlockTests.scala │ │ ├── MarkdownCodeWrapperTests.scala │ │ └── MarkdownTestUtil.scala │ │ └── util │ │ └── BloopServer.scala ├── cli │ └── src │ │ ├── main │ │ ├── java │ │ │ └── scala │ │ │ │ └── cli │ │ │ │ ├── commands │ │ │ │ ├── pgp │ │ │ │ │ └── PgpCommandsSubst.java │ │ │ │ └── publish │ │ │ │ │ └── PgpProxyMakerSubst.java │ │ │ │ └── internal │ │ │ │ ├── Argv0Subst.java │ │ │ │ ├── Argv0SubstWindows.java │ │ │ │ ├── BouncycastleSignerMakerSubst.java │ │ │ │ ├── CsJniUtilsFeature.java │ │ │ │ ├── LibsodiumjniFeature.java │ │ │ │ ├── PPrintStringPrefixSubst.java │ │ │ │ └── PidSubst.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── native-image │ │ │ │ ├── extras │ │ │ │ ├── coursier │ │ │ │ │ └── reflect-config.json │ │ │ │ └── pprint │ │ │ │ │ └── reflect-config.json │ │ │ │ └── org.virtuslab │ │ │ │ └── scala-cli-core │ │ │ │ ├── jni-config.json │ │ │ │ ├── native-image.properties │ │ │ │ ├── proxy-config.json │ │ │ │ ├── reflect-config.json │ │ │ │ └── resource-config.json │ │ └── scala │ │ │ ├── coursier │ │ │ └── CoursierUtil.scala │ │ │ └── scala │ │ │ └── cli │ │ │ ├── CurrentParams.scala │ │ │ ├── ScalaCli.scala │ │ │ ├── ScalaCliCommands.scala │ │ │ ├── commands │ │ │ ├── CommandUtils.scala │ │ │ ├── CustomWindowsEnvVarUpdater.scala │ │ │ ├── HelpCmd.scala │ │ │ ├── NeedsArgvCommand.scala │ │ │ ├── OptionsHelper.scala │ │ │ ├── RestrictableCommand.scala │ │ │ ├── RestrictedCommandsParser.scala │ │ │ ├── ScalaCommand.scala │ │ │ ├── ScalaCommandWithCustomHelp.scala │ │ │ ├── ScalaVersions.scala │ │ │ ├── WatchUtil.scala │ │ │ ├── addpath │ │ │ │ ├── AddPath.scala │ │ │ │ └── AddPathOptions.scala │ │ │ ├── bloop │ │ │ │ ├── Bloop.scala │ │ │ │ ├── BloopExit.scala │ │ │ │ ├── BloopExitOptions.scala │ │ │ │ ├── BloopJson.scala │ │ │ │ ├── BloopOptions.scala │ │ │ │ ├── BloopOutput.scala │ │ │ │ ├── BloopOutputOptions.scala │ │ │ │ ├── BloopStart.scala │ │ │ │ └── BloopStartOptions.scala │ │ │ ├── bsp │ │ │ │ ├── Bsp.scala │ │ │ │ └── BspOptions.scala │ │ │ ├── clean │ │ │ │ ├── Clean.scala │ │ │ │ └── CleanOptions.scala │ │ │ ├── compile │ │ │ │ ├── Compile.scala │ │ │ │ └── CompileOptions.scala │ │ │ ├── config │ │ │ │ ├── Config.scala │ │ │ │ ├── ConfigOptions.scala │ │ │ │ └── ThrowawayPgpSecret.scala │ │ │ ├── default │ │ │ │ ├── Default.scala │ │ │ │ ├── DefaultFile.scala │ │ │ │ ├── DefaultFileOptions.scala │ │ │ │ ├── DefaultOptions.scala │ │ │ │ └── LegacyScalaOptions.scala │ │ │ ├── dependencyupdate │ │ │ │ ├── DependencyUpdate.scala │ │ │ │ └── DependencyUpdateOptions.scala │ │ │ ├── directories │ │ │ │ ├── Directories.scala │ │ │ │ └── DirectoriesOptions.scala │ │ │ ├── doc │ │ │ │ ├── Doc.scala │ │ │ │ └── DocOptions.scala │ │ │ ├── export0 │ │ │ │ ├── Export.scala │ │ │ │ └── ExportOptions.scala │ │ │ ├── fix │ │ │ │ ├── BuiltInRules.scala │ │ │ │ ├── Fix.scala │ │ │ │ ├── FixOptions.scala │ │ │ │ ├── ScalafixOptions.scala │ │ │ │ └── ScalafixRules.scala │ │ │ ├── fmt │ │ │ │ ├── Fmt.scala │ │ │ │ ├── FmtOptions.scala │ │ │ │ └── FmtUtil.scala │ │ │ ├── github │ │ │ │ ├── GitHubApi.scala │ │ │ │ ├── HasSharedSecretOptions.scala │ │ │ │ ├── LibSodiumJni.scala │ │ │ │ ├── SecretCreate.scala │ │ │ │ ├── SecretCreateOptions.scala │ │ │ │ ├── SecretList.scala │ │ │ │ ├── SecretListOptions.scala │ │ │ │ └── SharedSecretOptions.scala │ │ │ ├── installcompletions │ │ │ │ ├── InstallCompletions.scala │ │ │ │ └── InstallCompletionsOptions.scala │ │ │ ├── installhome │ │ │ │ ├── InstallHome.scala │ │ │ │ └── InstallHomeOptions.scala │ │ │ ├── new │ │ │ │ ├── New.scala │ │ │ │ └── NewOptions.scala │ │ │ ├── package0 │ │ │ │ ├── Package.scala │ │ │ │ ├── PackageOptions.scala │ │ │ │ └── PackagerOptions.scala │ │ │ ├── packaging │ │ │ │ └── Spark.scala │ │ │ ├── pgp │ │ │ │ ├── DummyOptions.scala │ │ │ │ ├── ExternalCommand.scala │ │ │ │ ├── KeyServer.scala │ │ │ │ ├── PgpCommand.scala │ │ │ │ ├── PgpCommandNames.scala │ │ │ │ ├── PgpCommands.scala │ │ │ │ ├── PgpCreate.scala │ │ │ │ ├── PgpCreateExternal.scala │ │ │ │ ├── PgpExternalCommand.scala │ │ │ │ ├── PgpExternalOptions.scala │ │ │ │ ├── PgpKeyId.scala │ │ │ │ ├── PgpKeyIdExternal.scala │ │ │ │ ├── PgpProxy.scala │ │ │ │ ├── PgpProxyJvm.scala │ │ │ │ ├── PgpProxyMaker.scala │ │ │ │ ├── PgpPull.scala │ │ │ │ ├── PgpPullOptions.scala │ │ │ │ ├── PgpPush.scala │ │ │ │ ├── PgpPushOptions.scala │ │ │ │ ├── PgpScalaSigningOptions.scala │ │ │ │ ├── PgpSign.scala │ │ │ │ ├── PgpSignExternal.scala │ │ │ │ ├── PgpVerify.scala │ │ │ │ ├── PgpVerifyExternal.scala │ │ │ │ └── SharedPgpPushPullOptions.scala │ │ │ ├── publish │ │ │ │ ├── ConfigUtil.scala │ │ │ │ ├── GitRepo.scala │ │ │ │ ├── GitRepoError.scala │ │ │ │ ├── Ivy.scala │ │ │ │ ├── OptionCheck.scala │ │ │ │ ├── OptionChecks.scala │ │ │ │ ├── Publish.scala │ │ │ │ ├── PublishConnectionOptions.scala │ │ │ │ ├── PublishLocal.scala │ │ │ │ ├── PublishLocalOptions.scala │ │ │ │ ├── PublishOptions.scala │ │ │ │ ├── PublishParamsOptions.scala │ │ │ │ ├── PublishRepositoryOptions.scala │ │ │ │ ├── PublishSetup.scala │ │ │ │ ├── PublishSetupOptions.scala │ │ │ │ ├── PublishUtils.scala │ │ │ │ ├── RepoParams.scala │ │ │ │ ├── RepositoryParser.scala │ │ │ │ ├── SetSecret.scala │ │ │ │ ├── SharedPublishOptions.scala │ │ │ │ └── checks │ │ │ │ │ ├── CheckUtils.scala │ │ │ │ │ ├── ComputeVersionCheck.scala │ │ │ │ │ ├── DeveloperCheck.scala │ │ │ │ │ ├── LicenseCheck.scala │ │ │ │ │ ├── NameCheck.scala │ │ │ │ │ ├── OrganizationCheck.scala │ │ │ │ │ ├── PasswordCheck.scala │ │ │ │ │ ├── PgpSecretKeyCheck.scala │ │ │ │ │ ├── RepositoryCheck.scala │ │ │ │ │ ├── ScmCheck.scala │ │ │ │ │ ├── UrlCheck.scala │ │ │ │ │ └── UserCheck.scala │ │ │ ├── repl │ │ │ │ ├── Repl.scala │ │ │ │ ├── ReplOptions.scala │ │ │ │ └── SharedReplOptions.scala │ │ │ ├── run │ │ │ │ ├── Run.scala │ │ │ │ ├── RunMode.scala │ │ │ │ ├── RunOptions.scala │ │ │ │ └── SharedRunOptions.scala │ │ │ ├── setupide │ │ │ │ ├── SetupIde.scala │ │ │ │ └── SetupIdeOptions.scala │ │ │ ├── shared │ │ │ │ ├── AllExternalHelpOptions.scala │ │ │ │ ├── ArgSplitter.scala │ │ │ │ ├── BenchmarkingOptions.scala │ │ │ │ ├── CoursierOptions.scala │ │ │ │ ├── CrossOptions.scala │ │ │ │ ├── GlobalOptions.scala │ │ │ │ ├── GlobalSuppressWarningOptions.scala │ │ │ │ ├── HasGlobalOptions.scala │ │ │ │ ├── HasSharedOptions.scala │ │ │ │ ├── HelpGroupOptions.scala │ │ │ │ ├── HelpGroups.scala │ │ │ │ ├── HelpMessages.scala │ │ │ │ ├── HelpOptions.scala │ │ │ │ ├── JavaPropOptions.scala │ │ │ │ ├── LoggingOptions.scala │ │ │ │ ├── MainClassOptions.scala │ │ │ │ ├── MarkdownOptions.scala │ │ │ │ ├── ScalaCliHelp.scala │ │ │ │ ├── ScalaJsOptions.scala │ │ │ │ ├── ScalaNativeOptions.scala │ │ │ │ ├── ScalacExtraOptions.scala │ │ │ │ ├── ScalacOptions.scala │ │ │ │ ├── ScopeOptions.scala │ │ │ │ ├── SemanticDbOptions.scala │ │ │ │ ├── SharedBspFileOptions.scala │ │ │ │ ├── SharedCompilationServerOptions.scala │ │ │ │ ├── SharedDebugOptions.scala │ │ │ │ ├── SharedDependencyOptions.scala │ │ │ │ ├── SharedInputOptions.scala │ │ │ │ ├── SharedJavaOptions.scala │ │ │ │ ├── SharedJvmOptions.scala │ │ │ │ ├── SharedOptions.scala │ │ │ │ ├── SharedPythonOptions.scala │ │ │ │ ├── SharedVersionOptions.scala │ │ │ │ ├── SharedWatchOptions.scala │ │ │ │ ├── SharedWorkspaceOptions.scala │ │ │ │ ├── SnippetOptions.scala │ │ │ │ ├── SourceGeneratorOptions.scala │ │ │ │ ├── SuppressWarningOptions.scala │ │ │ │ └── VerbosityOptions.scala │ │ │ ├── shebang │ │ │ │ ├── Shebang.scala │ │ │ │ └── ShebangOptions.scala │ │ │ ├── test │ │ │ │ ├── Test.scala │ │ │ │ └── TestOptions.scala │ │ │ ├── uninstall │ │ │ │ ├── Uninstall.scala │ │ │ │ └── UninstallOptions.scala │ │ │ ├── uninstallcompletions │ │ │ │ ├── SharedUninstallCompletionsOptions.scala │ │ │ │ ├── UninstallCompletions.scala │ │ │ │ └── UninstallCompletionsOptions.scala │ │ │ ├── update │ │ │ │ ├── Update.scala │ │ │ │ └── UpdateOptions.scala │ │ │ ├── util │ │ │ │ ├── BuildCommandHelpers.scala │ │ │ │ ├── CommandHelpers.scala │ │ │ │ ├── HelpUtils.scala │ │ │ │ ├── JvmUtils.scala │ │ │ │ ├── RunHadoop.scala │ │ │ │ ├── RunSpark.scala │ │ │ │ ├── ScalaCliSttpBackend.scala │ │ │ │ └── ScalacOptionsUtil.scala │ │ │ └── version │ │ │ │ ├── Version.scala │ │ │ │ └── VersionOptions.scala │ │ │ ├── errors │ │ │ ├── FailedToSignFileError.scala │ │ │ ├── FoundVirtualInputsError.scala │ │ │ ├── GitHubApiError.scala │ │ │ ├── GraalVMNativeImageError.scala │ │ │ ├── InvalidSonatypePublishCredentials.scala │ │ │ ├── MalformedChecksumsError.scala │ │ │ ├── MalformedOptionError.scala │ │ │ ├── MissingConfigEntryError.scala │ │ │ ├── MissingPublishOptionError.scala │ │ │ ├── PgpError.scala │ │ │ ├── ScalaJsLinkingError.scala │ │ │ ├── ScaladocGenerationFailedError.scala │ │ │ ├── UploadError.scala │ │ │ └── WrongSonatypeServerError.scala │ │ │ ├── exportCmd │ │ │ ├── JsonProject.scala │ │ │ ├── JsonProjectDescriptor.scala │ │ │ ├── MavenProject.scala │ │ │ ├── MavenProjectDescriptor.scala │ │ │ ├── MillProject.scala │ │ │ ├── MillProjectDescriptor.scala │ │ │ ├── Project.scala │ │ │ ├── ProjectDescriptor.scala │ │ │ ├── SbtProject.scala │ │ │ └── SbtProjectDescriptor.scala │ │ │ ├── internal │ │ │ ├── Argv0.scala │ │ │ ├── CachedBinary.scala │ │ │ ├── CliLogger.scala │ │ │ ├── PPrintStringPrefixHelper.scala │ │ │ ├── Pid.scala │ │ │ ├── ProcUtil.scala │ │ │ ├── ProfileFileUpdater.scala │ │ │ └── ScalaJsLinker.scala │ │ │ ├── javaLauncher │ │ │ └── JavaLauncherCli.scala │ │ │ ├── launcher │ │ │ ├── LauncherCli.scala │ │ │ ├── LauncherOptions.scala │ │ │ ├── PowerOptions.scala │ │ │ └── ScalaRunnerLauncherOptions.scala │ │ │ ├── packaging │ │ │ ├── Library.scala │ │ │ └── NativeImage.scala │ │ │ ├── publish │ │ │ ├── BouncycastleExternalSigner.scala │ │ │ └── BouncycastleSignerMaker.scala │ │ │ └── util │ │ │ ├── ArgHelpers.scala │ │ │ ├── ArgParsers.scala │ │ │ ├── ConfigDbUtils.scala │ │ │ ├── ConfigPasswordOptionHelpers.scala │ │ │ ├── MaybeConfigPasswordOption.scala │ │ │ └── SeqHelpers.scala │ │ └── test │ │ └── scala │ │ └── cli │ │ ├── commands │ │ └── tests │ │ │ ├── ReplOptionsTests.scala │ │ │ └── RunOptionsTests.scala │ │ └── tests │ │ ├── ArgSplitterTest.scala │ │ ├── CachedBinaryTests.scala │ │ ├── HelpCheck.scala │ │ ├── LauncherCliTest.scala │ │ ├── OptionsCheck.scala │ │ ├── PackageTests.scala │ │ ├── ScalafmtTest.scala │ │ ├── SetupScalaCLITests.scala │ │ └── TestUtil.scala ├── config │ └── src │ │ └── main │ │ ├── scala-2.12 │ │ └── scala │ │ │ └── cli │ │ │ └── config │ │ │ └── Util.scala │ │ ├── scala-2.13 │ │ └── scala │ │ │ └── cli │ │ │ └── config │ │ │ └── Util.scala │ │ ├── scala-3 │ │ └── scala │ │ │ └── cli │ │ │ └── config │ │ │ └── Util.scala │ │ └── scala │ │ └── scala │ │ └── cli │ │ └── config │ │ ├── ConfigDb.scala │ │ ├── CredentialsValue.scala │ │ ├── ErrorMessages.scala │ │ ├── Key.scala │ │ ├── Keys.scala │ │ ├── PasswordOption.scala │ │ ├── PublishCredentials.scala │ │ ├── RawJson.scala │ │ ├── RepositoryCredentials.scala │ │ ├── Secret.scala │ │ └── internal │ │ └── JavaHelper.scala ├── core │ └── src │ │ └── main │ │ └── scala │ │ └── scala │ │ └── build │ │ ├── CsUtils.scala │ │ ├── Logger.scala │ │ ├── Os.scala │ │ ├── Position.scala │ │ ├── errors │ │ ├── AmbiguousPlatformError.scala │ │ ├── BuildException.scala │ │ ├── BuildInfoGenerationError.scala │ │ ├── CantDownloadAmmoniteError.scala │ │ ├── CheckScalaCliVersionError.scala │ │ ├── CompositeBuildException.scala │ │ ├── ConfigDbException.scala │ │ ├── DependencyFormatError.scala │ │ ├── Diagnostic.scala │ │ ├── DirectiveErrors.scala │ │ ├── ExcludeDefinitionError.scala │ │ ├── FetchingDependenciesError.scala │ │ ├── FileNotFoundException.scala │ │ ├── ForbiddenPathReferenceError.scala │ │ ├── InputsException.scala │ │ ├── InvalidBinaryScalaVersionError.scala │ │ ├── JmhBuildFailedError.scala │ │ ├── JvmDownloadError.scala │ │ ├── MainClassError.scala │ │ ├── MalformedCliInputError.scala │ │ ├── MalformedDirectiveError.scala │ │ ├── MalformedInputError.scala │ │ ├── MalformedPlatformError.scala │ │ ├── MarkdownUnclosedBackticksError.scala │ │ ├── ModuleFormatError.scala │ │ ├── MultipleScalaVersionsError.scala │ │ ├── NoDocBuildError.scala │ │ ├── NoFrameworkFoundByBridgeError.scala │ │ ├── NoMainClassFoundError.scala │ │ ├── NoScalaVersionProvidedError.scala │ │ ├── NoTestFrameworkFoundError.scala │ │ ├── NoTestFrameworkValueProvidedError.scala │ │ ├── NoTestsRun.scala │ │ ├── NoValidScalaVersionFoundError.scala │ │ ├── NoValueProvidedError.scala │ │ ├── NodeNotFoundError.scala │ │ ├── ParsingInputsException.scala │ │ ├── RepositoryFormatError.scala │ │ ├── ScalaNativeBuildError.scala │ │ ├── ScalaNativeCompatibilityError.scala │ │ ├── ScalaVersionError.scala │ │ ├── SeveralMainClassesFoundError.scala │ │ ├── Severity.scala │ │ ├── TestError.scala │ │ ├── TooManyFrameworksFoundByBridgeError.scala │ │ ├── ToolkitVersionError.scala │ │ ├── UnexpectedDirectiveError.scala │ │ ├── UnexpectedJvmPlatformVersionError.scala │ │ ├── UnrecognizedDebugModeError.scala │ │ ├── UnrecognizedJsOptModeError.scala │ │ ├── UnsupportedScalaVersionError.scala │ │ ├── UnusedDirectiveError.scala │ │ └── WorkspaceError.scala │ │ ├── internals │ │ ├── CodeWrapper.scala │ │ ├── ConsoleUtils.scala │ │ ├── CsLoggerUtil.scala │ │ ├── CustomProgressBarRefreshDisplay.scala │ │ ├── EnvVar.scala │ │ ├── FeatureType.scala │ │ ├── License.scala │ │ ├── Licenses.scala │ │ ├── Name.scala │ │ ├── OsLibc.scala │ │ ├── Regexes.scala │ │ └── StableScalaVersion.scala │ │ └── warnings │ │ └── DeprecatedWarning.scala ├── directives │ └── src │ │ └── main │ │ └── scala │ │ └── scala │ │ └── build │ │ ├── directives │ │ ├── DirectiveDescription.scala │ │ ├── DirectiveExamples.scala │ │ ├── DirectiveGroupDetails.scala │ │ ├── DirectiveGroupName.scala │ │ ├── DirectiveLevel.scala │ │ ├── DirectiveName.scala │ │ ├── DirectiveSpecialSyntax.scala │ │ ├── DirectiveUsage.scala │ │ ├── DirectiveValueParser.scala │ │ ├── HasBuildOptions.scala │ │ ├── HasBuildOptionsWithRequirements.scala │ │ ├── HasBuildRequirements.scala │ │ └── ScopedValue.scala │ │ ├── errors │ │ ├── ScalaJsLinkingError.scala │ │ ├── SingleValueExpectedError.scala │ │ ├── UsingDirectiveExpectationError.scala │ │ ├── UsingFileFromUriError.scala │ │ ├── WrongJarPathError.scala │ │ ├── WrongJavaHomePathError.scala │ │ └── WrongSourcePathError.scala │ │ └── preprocessing │ │ ├── ScopePath.scala │ │ ├── Scoped.scala │ │ └── directives │ │ ├── Benchmarking.scala │ │ ├── BuildInfo.scala │ │ ├── ClasspathUtils.scala │ │ ├── ComputeVersion.scala │ │ ├── CustomJar.scala │ │ ├── Dependency.scala │ │ ├── Directive.scala │ │ ├── DirectiveHandler.scala │ │ ├── DirectivePrefix.scala │ │ ├── DirectiveUtil.scala │ │ ├── Exclude.scala │ │ ├── JavaHome.scala │ │ ├── JavaOptions.scala │ │ ├── JavaProps.scala │ │ ├── JavacOptions.scala │ │ ├── Jvm.scala │ │ ├── MainClass.scala │ │ ├── ObjectWrapper.scala │ │ ├── Packaging.scala │ │ ├── Platform.scala │ │ ├── Plugin.scala │ │ ├── ProcessedDirective.scala │ │ ├── Publish.scala │ │ ├── PublishContextual.scala │ │ ├── Python.scala │ │ ├── Repository.scala │ │ ├── RequirePlatform.scala │ │ ├── RequireScalaVersion.scala │ │ ├── RequireScalaVersionBounds.scala │ │ ├── RequireScope.scala │ │ ├── Resources.scala │ │ ├── ScalaJs.scala │ │ ├── ScalaNative.scala │ │ ├── ScalaVersion.scala │ │ ├── ScalacOptions.scala │ │ ├── ScopedDirective.scala │ │ ├── Sources.scala │ │ ├── StrictDirective.scala │ │ ├── Tests.scala │ │ └── Toolkit.scala ├── docs-tests │ ├── README.md │ └── src │ │ ├── main │ │ └── scala │ │ │ └── sclicheck │ │ │ └── sclicheck.scala │ │ └── test │ │ ├── resources │ │ └── test.md │ │ └── scala │ │ └── sclicheck │ │ ├── DocTests.scala │ │ ├── GifTests.scala │ │ ├── SclicheckTests.scala │ │ └── TestUtil.scala ├── dummy │ ├── amm │ │ └── src │ │ │ └── main │ │ │ └── scala │ │ │ └── AmmDummy.scala │ └── scalafmt │ │ └── src │ │ └── main │ │ └── scala │ │ └── ScalafmtDummy.scala ├── generate-reference-doc │ └── src │ │ └── main │ │ └── scala │ │ └── scala │ │ └── cli │ │ └── doc │ │ ├── GenerateReferenceDoc.scala │ │ ├── InternalDocOptions.scala │ │ └── ReferenceDocUtils.scala ├── integration │ ├── docker │ │ └── src │ │ │ └── test │ │ │ └── scala │ │ │ └── scala │ │ │ └── cli │ │ │ └── integration │ │ │ └── RunDockerTests.scala │ └── src │ │ ├── main │ │ └── scala │ │ │ └── scala │ │ │ └── cli │ │ │ └── integration │ │ │ └── TestInputs.scala │ │ └── test │ │ ├── resources │ │ └── test-keys │ │ │ ├── key.asc │ │ │ └── key.skr │ │ └── scala │ │ └── scala │ │ └── cli │ │ └── integration │ │ ├── ArgsFileTests.scala │ │ ├── BloopTests.scala │ │ ├── BspSuite.scala │ │ ├── BspTestDefinitions.scala │ │ ├── BspTests212.scala │ │ ├── BspTests213.scala │ │ ├── BspTests2Definitions.scala │ │ ├── BspTests3Definitions.scala │ │ ├── BspTests3Lts.scala │ │ ├── BspTests3NextRc.scala │ │ ├── BspTestsDefault.scala │ │ ├── CleanTests.scala │ │ ├── CompileScalacCompatTestDefinitions.scala │ │ ├── CompileTestDefinitions.scala │ │ ├── CompileTests212.scala │ │ ├── CompileTests213.scala │ │ ├── CompileTests3Lts.scala │ │ ├── CompileTests3NextRc.scala │ │ ├── CompileTests3StableDefinitions.scala │ │ ├── CompileTestsDefault.scala │ │ ├── CompilerPluginTestDefinitions.scala │ │ ├── CompleteTests.scala │ │ ├── ConfigTests.scala │ │ ├── CoursierScalaInstallationTestHelper.scala │ │ ├── DefaultFileTests.scala │ │ ├── DefaultTests.scala │ │ ├── DependencyUpdateTests.scala │ │ ├── DirectoriesTests.scala │ │ ├── DocTestDefinitions.scala │ │ ├── DocTests212.scala │ │ ├── DocTests213.scala │ │ ├── DocTests3Lts.scala │ │ ├── DocTests3NextRc.scala │ │ ├── DocTestsDefault.scala │ │ ├── ExportCommonTestDefinitions.scala │ │ ├── ExportJsonTestDefinitions.scala │ │ ├── ExportJsonTestsDefault.scala │ │ ├── ExportMavenTest3NextRc.scala │ │ ├── ExportMavenTestDefinitions.scala │ │ ├── ExportMavenTestJava.scala │ │ ├── ExportMavenTests212.scala │ │ ├── ExportMavenTests213.scala │ │ ├── ExportMavenTests3Lts.scala │ │ ├── ExportMillTestDefinitions.scala │ │ ├── ExportMillTests212.scala │ │ ├── ExportMillTests213.scala │ │ ├── ExportMillTests3Lts.scala │ │ ├── ExportMillTests3NextRc.scala │ │ ├── ExportMillTestsDefault.scala │ │ ├── ExportSbtTestDefinitions.scala │ │ ├── ExportSbtTests212.scala │ │ ├── ExportSbtTests213.scala │ │ ├── ExportSbtTests3Lts.scala │ │ ├── ExportSbtTests3NextRc.scala │ │ ├── ExportSbtTestsDefault.scala │ │ ├── ExportScalaOrientedBuildToolsTestDefinitions.scala │ │ ├── ExportTestProjects.scala │ │ ├── FixBuiltInRulesTestDefinitions.scala │ │ ├── FixScalafixRulesTestDefinitions.scala │ │ ├── FixTestDefinitions.scala │ │ ├── FixTests212.scala │ │ ├── FixTests213.scala │ │ ├── FixTests3Lts.scala │ │ ├── FixTests3NextRc.scala │ │ ├── FixTestsDefault.scala │ │ ├── FmtTests.scala │ │ ├── GitHubTests.scala │ │ ├── HadoopTests.scala │ │ ├── HelpTests.scala │ │ ├── InstallAndUninstallCompletionsTests.scala │ │ ├── InstallHomeTests.scala │ │ ├── JmhSuite.scala │ │ ├── JmhTests.scala │ │ ├── LegacyScalaRunnerTestDefinitions.scala │ │ ├── LoggingTests.scala │ │ ├── MarkdownTests.scala │ │ ├── MavenTestHelper.scala │ │ ├── MetaCheck.scala │ │ ├── MillTestHelper.scala │ │ ├── NativePackagerTests.scala │ │ ├── NewTests.scala │ │ ├── PackageTestDefinitions.scala │ │ ├── PackageTests212.scala │ │ ├── PackageTests213.scala │ │ ├── PackageTests3Lts.scala │ │ ├── PackageTests3NextRc.scala │ │ ├── PackageTestsDefault.scala │ │ ├── PgpTests.scala │ │ ├── PublishLocalTestDefinitions.scala │ │ ├── PublishLocalTests212.scala │ │ ├── PublishLocalTests213.scala │ │ ├── PublishLocalTests3Lts.scala │ │ ├── PublishLocalTests3NextRc.scala │ │ ├── PublishLocalTestsDefault.scala │ │ ├── PublishSetupTests.scala │ │ ├── PublishTestDefinitions.scala │ │ ├── PublishTests212.scala │ │ ├── PublishTests213.scala │ │ ├── PublishTests3Lts.scala │ │ ├── PublishTests3NextRc.scala │ │ ├── PublishTestsDefault.scala │ │ ├── ReplAmmoniteTestDefinitions.scala │ │ ├── ReplAmmoniteTests3StableDefinitions.scala │ │ ├── ReplTestDefinitions.scala │ │ ├── ReplTests212.scala │ │ ├── ReplTests213.scala │ │ ├── ReplTests3Lts.scala │ │ ├── ReplTests3NextRc.scala │ │ ├── ReplTestsDefault.scala │ │ ├── RunGistTestDefinitions.scala │ │ ├── RunJdkTestDefinitions.scala │ │ ├── RunPipedSourcesTestDefinitions.scala │ │ ├── RunScalaJsTestDefinitions.scala │ │ ├── RunScalaNativeTestDefinitions.scala │ │ ├── RunScalaPyTestDefinitions.scala │ │ ├── RunScalacCompatTestDefinitions.scala │ │ ├── RunScriptTestDefinitions.scala │ │ ├── RunSnippetTestDefinitions.scala │ │ ├── RunTestDefinitions.scala │ │ ├── RunTests212.scala │ │ ├── RunTests213.scala │ │ ├── RunTests3Lts.scala │ │ ├── RunTests3NextRc.scala │ │ ├── RunTestsDefault.scala │ │ ├── RunWithWatchTestDefinitions.scala │ │ ├── RunZipTestDefinitions.scala │ │ ├── SbtTestHelper.scala │ │ ├── ScalaCliSuite.scala │ │ ├── ScriptWrapperTestDefinitions.scala │ │ ├── SemanticDbTestDefinitions.scala │ │ ├── SharedRunTests.scala │ │ ├── SipScalaTests.scala │ │ ├── SparkTestDefinitions.scala │ │ ├── SparkTests212.scala │ │ ├── SparkTests213.scala │ │ ├── StandaloneLauncherTests.scala │ │ ├── TestBspClient.scala │ │ ├── TestNativeImageOnScala3.scala │ │ ├── TestScalaVersionArgs.scala │ │ ├── TestTestDefinitions.scala │ │ ├── TestTests212.scala │ │ ├── TestTests213.scala │ │ ├── TestTests3Lts.scala │ │ ├── TestTests3NextRc.scala │ │ ├── TestTestsDefault.scala │ │ ├── TestUtil.scala │ │ ├── UpdateTests.scala │ │ ├── VersionTests.scala │ │ ├── WithWarmUpScalaCliSuite.scala │ │ ├── package.scala │ │ └── util │ │ ├── BloopUtil.scala │ │ ├── CompilerPluginUtil.scala │ │ └── DockerServer.scala ├── options │ └── src │ │ ├── main │ │ └── scala │ │ │ └── scala │ │ │ └── build │ │ │ ├── Artifacts.scala │ │ │ ├── CoursierUtils.scala │ │ │ ├── Positioned.scala │ │ │ ├── ScalaArtifacts.scala │ │ │ ├── TemporaryInMemoryRepository.scala │ │ │ ├── actionable │ │ │ ├── ActionableDependencyHandler.scala │ │ │ ├── ActionableDiagnostic.scala │ │ │ ├── ActionableHandler.scala │ │ │ ├── ActionablePreprocessor.scala │ │ │ └── errors │ │ │ │ └── ActionableHandlerError.scala │ │ │ ├── info │ │ │ ├── BuildInfo.scala │ │ │ └── ScopedBuildInfo.scala │ │ │ ├── interactive │ │ │ ├── Interactive.scala │ │ │ └── InteractiveFileOps.scala │ │ │ ├── internal │ │ │ ├── ExternalBinary.scala │ │ │ ├── ExternalBinaryParams.scala │ │ │ ├── FetchExternalBinary.scala │ │ │ ├── ScalaJsLinkerConfig.scala │ │ │ └── StdInConcurrentReader.scala │ │ │ ├── internals │ │ │ └── Util.scala │ │ │ └── options │ │ │ ├── BuildOptions.scala │ │ │ ├── BuildRequirements.scala │ │ │ ├── ClassPathOptions.scala │ │ │ ├── ComputeVersion.scala │ │ │ ├── ConfigMonoid.scala │ │ │ ├── HasHashData.scala │ │ │ ├── HasScope.scala │ │ │ ├── HashedType.scala │ │ │ ├── InternalDependenciesOptions.scala │ │ │ ├── InternalOptions.scala │ │ │ ├── JavaOpt.scala │ │ │ ├── JavaOptions.scala │ │ │ ├── JmhOptions.scala │ │ │ ├── MaybeScalaVersion.scala │ │ │ ├── PackageOptions.scala │ │ │ ├── PackageType.scala │ │ │ ├── Platform.scala │ │ │ ├── PostBuildOptions.scala │ │ │ ├── PublishContextualOptions.scala │ │ │ ├── PublishOptions.scala │ │ │ ├── ReplOptions.scala │ │ │ ├── SNNumeralVersion.scala │ │ │ ├── ScalaJsOptions.scala │ │ │ ├── ScalaNativeOptions.scala │ │ │ ├── ScalaOptions.scala │ │ │ ├── ScalaSigningCliOptions.scala │ │ │ ├── ScalaVersionUtil.scala │ │ │ ├── ScalacOpt.scala │ │ │ ├── Scope.scala │ │ │ ├── ScriptOptions.scala │ │ │ ├── SemanticDbOptions.scala │ │ │ ├── ShadowingSeq.scala │ │ │ ├── SourceGeneratorOptions.scala │ │ │ ├── SuppressWarningOptions.scala │ │ │ ├── TestOptions.scala │ │ │ ├── WithBuildRequirements.scala │ │ │ ├── packaging │ │ │ ├── DebianOptions.scala │ │ │ ├── DockerOptions.scala │ │ │ ├── NativeImageOptions.scala │ │ │ ├── RedHatOptions.scala │ │ │ └── WindowsOptions.scala │ │ │ ├── publish │ │ │ ├── ConfigPasswordOption.scala │ │ │ ├── Developer.scala │ │ │ ├── License.scala │ │ │ ├── Signer.scala │ │ │ └── Vcs.scala │ │ │ ├── scalajs │ │ │ └── ScalaJsLinkerOptions.scala │ │ │ └── validation │ │ │ └── BuildOptionsRule.scala │ │ └── test │ │ └── scala │ │ └── scala │ │ └── build │ │ └── options │ │ └── ConfigMonoidTest.scala ├── runner │ └── src │ │ └── main │ │ └── scala │ │ └── scala │ │ └── cli │ │ └── runner │ │ ├── Runner.scala │ │ └── StackTracePrinter.scala ├── scala-cli-bsp │ └── src │ │ └── main │ │ └── java │ │ └── scala │ │ └── build │ │ └── bsp │ │ ├── ScalaScriptBuildServer.java │ │ ├── WrappedSourceItem.java │ │ ├── WrappedSourcesItem.java │ │ ├── WrappedSourcesParams.java │ │ └── WrappedSourcesResult.java ├── scala3-graal-processor │ └── src │ │ └── scala │ │ └── cli │ │ └── graal │ │ └── CoursierCacheProcessor.scala ├── scala3-graal │ └── src │ │ └── main │ │ └── scala │ │ └── scala │ │ └── cli │ │ └── graal │ │ ├── BytecodeProcessor.scala │ │ ├── ClassPathEntry.scala │ │ ├── CoursierCache.scala │ │ └── JarCache.scala ├── scala3-runtime │ └── src │ │ └── main │ │ └── scala │ │ └── scala │ │ └── cli │ │ └── runtime │ │ └── SafeLazyVals.scala ├── scalaparse │ └── src │ │ └── main │ │ └── scala │ │ └── build │ │ └── internal │ │ ├── ImportTree.scala │ │ └── ScalaParse.scala ├── specification-level │ └── src │ │ └── main │ │ └── scala │ │ └── scala │ │ └── cli │ │ └── commands │ │ └── SpecificationLevel.scala ├── tasty-lib │ └── src │ │ └── main │ │ └── scala │ │ └── scala │ │ └── build │ │ └── tastylib │ │ ├── TastyBuffer.scala │ │ ├── TastyData.scala │ │ ├── TastyFormat.scala │ │ ├── TastyHeaderUnpickler.scala │ │ ├── TastyName.scala │ │ ├── TastyReader.scala │ │ ├── TastyUnpickler.scala │ │ ├── TastyVersions.scala │ │ └── UnpickleException.scala └── test-runner │ └── src │ └── main │ └── scala │ └── scala │ └── build │ └── testrunner │ ├── AsmTestRunner.scala │ ├── DynamicTestRunner.scala │ ├── FrameworkUtils.scala │ ├── Logger.scala │ └── TestRunner.scala ├── project ├── deps │ └── package.mill.scala ├── musl-image │ ├── Dockerfile │ └── setup.sh ├── package.mill.scala ├── publish │ └── package.mill.scala ├── settings │ └── package.mill.scala ├── utils │ └── package.mill.scala └── website │ └── package.mill.scala ├── scala-cli ├── scala-cli-src ├── scala-cli.bat ├── scala-cli.sh └── website ├── .gitignore ├── README.md ├── babel.config.js ├── docs ├── _advanced_install.mdx ├── _misc │ ├── _category_.json │ ├── benchmarking.md │ └── browse.md ├── _scala-ecosystem.md ├── commands │ ├── _category_.json │ ├── basics.md │ ├── clean.md │ ├── compile.md │ ├── completions.md │ ├── config.md │ ├── doc.md │ ├── export.md │ ├── fix.md │ ├── fmt.md │ ├── misc │ │ ├── _category_.json │ │ ├── bloop.md │ │ ├── default-file.md │ │ └── pgp.md │ ├── package.md │ ├── publishing │ │ ├── _category_.json │ │ ├── publish-local.md │ │ ├── publish-setup.md │ │ └── publish.md │ ├── repl.md │ ├── run.md │ ├── setup-ide.md │ ├── shebang.md │ ├── test.md │ └── version.md ├── cookbooks │ ├── _category_.json │ ├── ide │ │ ├── _category_.json │ │ ├── emacs.md │ │ ├── intellij-multi-bsp.md │ │ ├── intellij-sbt-with-bsp.md │ │ ├── intellij.md │ │ └── vscode.md │ ├── intro.md │ ├── introduction │ │ ├── _category_.json │ │ ├── debugging.md │ │ ├── formatting.md │ │ ├── gh-action.md │ │ ├── gists.md │ │ ├── instant-startup-scala-scripts.md │ │ ├── scala-jvm.md │ │ ├── scala-scripts.md │ │ ├── scala-versions.md │ │ └── test-only.md │ └── package │ │ ├── _category_.json │ │ ├── native-images.md │ │ ├── scala-docker.md │ │ └── scala-package.md ├── getting_started.md ├── guides │ ├── _category_.json │ ├── advanced │ │ ├── _category_.json │ │ ├── custom-toolkit.md │ │ ├── internals.md │ │ ├── java-properties.md │ │ ├── piping.md │ │ ├── scala-js.md │ │ ├── scala-native.md │ │ ├── snippets.md │ │ └── verbosity.md │ ├── intro.md │ ├── introduction │ │ ├── _category_.json │ │ ├── configuration.md │ │ ├── dependencies.md │ │ ├── ide.md │ │ ├── old-runner-migration.md │ │ ├── toolkit.md │ │ ├── update-dependencies.md │ │ └── using-directives.md │ ├── power │ │ ├── _category_.json │ │ ├── markdown.md │ │ ├── offline.md │ │ ├── proxy.md │ │ ├── python.md │ │ ├── repositories.md │ │ └── sbt-mill.md │ └── scripting │ │ ├── _category_.json │ │ ├── scripts.md │ │ └── shebang.md ├── overview.md ├── reference │ ├── _category_.json │ ├── build-info.md │ ├── cli-options.md │ ├── commands.md │ ├── dependency.md │ ├── directives.md │ ├── env-vars.md │ ├── password-options.md │ ├── root-dir.md │ ├── scala-command │ │ ├── cli-options.md │ │ ├── commands.md │ │ ├── directives.md │ │ ├── env-vars.md │ │ ├── index.md │ │ └── runner-specification.md │ └── scala-versions.md ├── release_notes.md └── under-the-hood.md ├── docusaurus.config.js ├── package.json ├── safe-yarn.sh ├── sidebars.js ├── src ├── components │ ├── BasicInstall.js │ ├── BigHeader.js │ ├── DownloadButton.js │ ├── IconBox.js │ ├── ImageBox.js │ ├── Layouts.js │ ├── MarkdownComponents.js │ ├── Section.js │ ├── SectionAbout.js │ ├── SectionImageBox.js │ ├── SmallHeader.js │ ├── TitleSection.js │ ├── UseCase.js │ ├── UseCaseTile.js │ ├── YellowBanner.js │ ├── features.js │ └── osUtils.js ├── css │ ├── custom copy.css │ ├── custom.css │ └── custom.css.map ├── pages │ ├── education.js │ ├── index.js │ ├── index.module.css │ ├── install.js │ ├── markdown-page.md │ ├── projects.js │ ├── prototyping.js │ ├── scripting.js │ └── spark.md ├── scss │ ├── components │ │ ├── runnable-sample.scss │ │ ├── section-about.scss │ │ ├── section-base.scss │ │ ├── section-features.scss │ │ ├── section-image-box.scss │ │ ├── section-install-cli.scss │ │ ├── section-use-tiles.scss │ │ ├── section-yellow-banner.scss │ │ └── tooltip.scss │ └── style.scss └── theme │ └── Root.js ├── static ├── .nojekyll ├── CNAME └── img │ ├── buildtools.png │ ├── cmd.svg │ ├── commands.png │ ├── complete-install.svg │ ├── dark │ ├── buildtools.png │ ├── complete-install.svg │ ├── defaults.svg │ ├── demo.gif │ ├── demo.svg │ ├── education.svg │ ├── embeddable_scripts.svg │ ├── envs.gif │ ├── fast-scala-cli.gif │ ├── fast-scripts.svg │ ├── features.gif │ ├── gifs │ │ ├── complete-install.gif │ │ ├── defaults.gif │ │ ├── demo.gif │ │ ├── education.gif │ │ ├── embeddable_scripts.gif │ │ ├── fast-scripts.gif │ │ ├── learning_curve.gif │ │ ├── powerful_scripts.gif │ │ ├── projects.gif │ │ ├── prototyping.gif │ │ ├── scripting.gif │ │ ├── self-contained-examples.gif │ │ ├── todo.gif │ │ ├── universal_tool.gif │ │ └── versions.gif │ ├── learning_curve.svg │ ├── powerful_scripts.svg │ ├── projects.svg │ ├── prototyping.svg │ ├── scala-cli-install.gif │ ├── scripting.svg │ ├── self-contained-examples.svg │ ├── todo.svg │ ├── universal_tool.svg │ └── versions.svg │ ├── debugging_attach_to_process.png │ ├── debugging_configuration_dropdown.png │ ├── debugging_listen_mode_config.png │ ├── debugging_run_doctor_view.png │ ├── debugging_running_debug_configuration.png │ ├── debugging_running_debugger.png │ ├── debugging_setting_breakpoints_intellij.png │ ├── debugging_setting_breakpoints_vs_code.png │ ├── defaults.svg │ ├── demo.svg │ ├── diagnostics.gif │ ├── docusaurus.png │ ├── education.svg │ ├── embeddable_scripts.svg │ ├── envs.gif │ ├── fast-scala-cli.gif │ ├── fast-scripts.svg │ ├── fast.svg │ ├── favicon.ico │ ├── features.gif │ ├── gifs │ ├── complete-install.gif │ ├── convert_ivy_to_using.gif │ ├── defaults.gif │ ├── demo.gif │ ├── education.gif │ ├── embeddable_scripts.gif │ ├── fast-scripts.gif │ ├── learning_curve.gif │ ├── powerful_scripts.gif │ ├── projects.gif │ ├── prototyping.gif │ ├── scripting.gif │ ├── self-contained-examples.gif │ ├── todo.gif │ ├── universal_tool.gif │ └── versions.gif │ ├── hand.png │ ├── ico-education.png │ ├── ico-projects.png │ ├── ico-prototyping.png │ ├── ico-scripting.png │ ├── ico-yours-dark.png │ ├── ico-yours.png │ ├── installation.png │ ├── intellij_bsp_build_scripts_found.png │ ├── intellij_bsp_external_model.png │ ├── intellij_bsp_icon.png │ ├── intellij_flat_sources_layout.png │ ├── intellij_import_bsp_module.png │ ├── intellij_imported_project_layout.png │ ├── intellij_module_settings.png │ ├── intellij_module_settings_import_module.png │ ├── intellij_multi_bsp_setup.png │ ├── intellij_open_dir.png │ ├── intellij_project_from_existing_sources.png │ ├── intellij_project_layout_with_extra_dir.png │ ├── intellij_refresh_bsp.png │ ├── intellij_run_code_with_bsp.png │ ├── intellij_sbt_alongside_bsp.png │ ├── intellij_sbt_module_settings.png │ ├── intuitive.svg │ ├── learning_curve.svg │ ├── lift_off.png │ ├── loga.png │ ├── logo.png │ ├── logo.svg │ ├── monitor.png │ ├── powerful_scripts.svg │ ├── projects.svg │ ├── prototyping.svg │ ├── rocket.png │ ├── scala-cli-getting-started-1.mp4 │ ├── scala-cli-getting-started-2.mp4 │ ├── scala-cli-install.gif │ ├── scala-cli-repl.jpg │ ├── scala-doc-main-method.png │ ├── scala-spiral.png │ ├── scripting.svg │ ├── self-contained-examples.svg │ ├── source_layout.png │ ├── todo.gif │ ├── todo.svg │ ├── tutorial │ ├── docsVersionDropdown.png │ └── localeDropdown.png │ ├── undraw_docusaurus_mountain.svg │ ├── undraw_docusaurus_react.svg │ ├── undraw_docusaurus_tree.svg │ ├── universal_tool.svg │ ├── versions.svg │ ├── vl_logo_small.png │ ├── vscode-run.png │ └── vscode-test.png └── yarn.lock /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Scala Steward: Reformat with scalafmt 3.7.3 2 | 34ae72e8cf5878dccb44ac3f864cbf4892f18354 3 | 4 | # Scala Steward: Reformat with scalafmt 3.8.2 5 | 6d2639650f6e0b941840b995cc30b7de7afff5a0 6 | 7 | # Scala Steward: Reformat with scalafmt 3.8.3 8 | 52b913a12d8abdff1b340db668ebe38c59b423e4 9 | 10 | # Scala Steward: Reformat with scalafmt 3.8.5 11 | 74f069ccdaa91872cb77dc1f902752221d588db1 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Version(s)** 11 | Please provide the version(s) of Scala CLI that is affected by this bug 12 | 13 | **Describe the bug** 14 | A clear and concise description of what the bug is. 15 | 16 | **To Reproduce** 17 | Please provide us with steps on how to reproduce the bug. Code snippets (or link to the used codebase) and used commands are especially useful. 18 | 19 | **Expected behaviour** 20 | A clear and concise description of what you expected to happen. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Other 3 | about: Request a change that is neither a new feature nor related to a bug. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Version(s)** 11 | Please provide the version(s) of Scala CLI for which the proposed change is necessary (if at all relevant). 12 | 13 | **Describe what needs to be done and why** 14 | A clear and concise description of what you want to happen - and why. 15 | 16 | **Is your feature request related to a past ticket or discussion?** 17 | Please mention any other issues or discussions relevant to this one. 18 | 19 | **Describe alternatives you've considered** 20 | A clear and concise description of any alternative solutions you've considered. 21 | 22 | **Additional context** 23 | Add any other context or screenshots that might be relevant in this section. 24 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | - package-ecosystem: "npm" 8 | directory: "/website" 9 | schedule: 10 | interval: "weekly" 11 | -------------------------------------------------------------------------------- /.github/release/img/apply-regexes-on-release-notes-in-intellij.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/.github/release/img/apply-regexes-on-release-notes-in-intellij.png -------------------------------------------------------------------------------- /.github/release/img/submit-for-malware-analysis-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/.github/release/img/submit-for-malware-analysis-1.png -------------------------------------------------------------------------------- /.github/release/img/submit-for-malware-analysis-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/.github/release/img/submit-for-malware-analysis-2.png -------------------------------------------------------------------------------- /.github/release/img/submit-for-malware-analysis-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/.github/release/img/submit-for-malware-analysis-3.png -------------------------------------------------------------------------------- /.github/release/img/submit-for-malware-analysis-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/.github/release/img/submit-for-malware-analysis-4.png -------------------------------------------------------------------------------- /.github/release/img/submit-for-malware-analysis-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/.github/release/img/submit-for-malware-analysis-5.png -------------------------------------------------------------------------------- /.github/scripts/build-linux-aarch64-from-docker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copied from https://github.com/VirtusLab/coursier-m1/blob/6e54dca5e775c9ed57861ae8d0e2b45602c6d053/.github/scripts/build-linux-aarch64-from-docker.sh 3 | set -e 4 | 5 | apt-get update -q -y 6 | apt-get install -q -y build-essential libz-dev zlib1g-dev git python3-pip curl zip 7 | 8 | export PATH="$(pwd)/utils:$PATH" 9 | 10 | eval "$(cs java --env --jvm temurin:17 --jvm-index https://github.com/coursier/jvm-index/raw/master/index.json)" 11 | 12 | git config --global --add safe.directory "$(pwd)" 13 | 14 | ./mill -i show 'cli[]'.nativeImage 15 | ./mill -i copyDefaultLauncher --directory ./artifacts 16 | if "true" == $(./mill -i ci.shouldPublish); then 17 | .github/scripts/generate-os-packages.sh 18 | fi 19 | -------------------------------------------------------------------------------- /.github/scripts/build-linux-aarch64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copied from https://github.com/VirtusLab/coursier-m1/blob/6e54dca5e775c9ed57861ae8d0e2b45602c6d053/.github/scripts/build-linux-aarch64.sh 3 | set -euv 4 | 5 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" 6 | 7 | mkdir -p artifacts 8 | mkdir -p utils 9 | cp "$(cs get https://github.com/VirtusLab/coursier-m1/releases/download/v2.1.24/cs-aarch64-pc-linux.gz --archive)" utils/cs 10 | chmod +x utils/cs 11 | 12 | cp "$DIR/build-linux-aarch64-from-docker.sh" utils/ 13 | 14 | docker run $(if test -t 1; then echo "-it"; fi) --rm \ 15 | --volume "$(pwd):/data" \ 16 | -w /data \ 17 | -e "CI=$CI" \ 18 | -e "JAVA_OPTS=-Djdk.lang.Process.launchMechanism=vfork" \ 19 | ubuntu:24.04 \ 20 | /data/utils/build-linux-aarch64-from-docker.sh 21 | -------------------------------------------------------------------------------- /.github/scripts/build-website.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | yarn --cwd website install 5 | yarn --cwd website build 6 | -------------------------------------------------------------------------------- /.github/scripts/choco/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/.github/scripts/choco/logo.ico -------------------------------------------------------------------------------- /.github/scripts/choco/tools/chocolateyinstall.ps1: -------------------------------------------------------------------------------- 1 | $ErrorActionPreference = 'Stop'; 2 | $url64 = '@LAUNCHER_URL@' 3 | $packageArgs = @{ 4 | packageName = 'scala-cli' 5 | fileType = 'MSI' 6 | url64bit = $url64 7 | 8 | softwareName = 'Scala CLI' 9 | checksum64 = '@LAUNCHER_SHA256@' 10 | checksumType64= 'sha256' 11 | 12 | silentArgs = "/qn /norestart" 13 | validExitCodes= @(0) 14 | } 15 | 16 | Install-ChocolateyPackage @packageArgs -------------------------------------------------------------------------------- /.github/scripts/docker/ScalaCliDockerFile: -------------------------------------------------------------------------------- 1 | FROM debian:stable-slim 2 | RUN apt update && apt install build-essential libz-dev clang procps -y 3 | ADD scala-cli /usr/bin/ 4 | RUN \ 5 | echo "println(1)" | scala-cli -S 3 - -v -v -v && \ 6 | echo "println(1)" | scala-cli -S 2.13 - -v -v -v && \ 7 | echo "println(1)" | scala-cli -S 2.12 - -v -v -v 8 | RUN \ 9 | echo "println(1)" | scala-cli --power package --native _.sc --force && \ 10 | echo "println(1)" | scala-cli --power package --native-image _.sc --force 11 | ENTRYPOINT ["scala-cli"] 12 | -------------------------------------------------------------------------------- /.github/scripts/docker/ScalaCliSlimDockerFile: -------------------------------------------------------------------------------- 1 | FROM debian:stable-slim AS build-env 2 | 3 | FROM gcr.io/distroless/base-debian12 4 | ADD scala-cli /usr/local/bin/scala-cli 5 | COPY --from=build-env /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1 6 | ENTRYPOINT ["/usr/local/bin/scala-cli"] 7 | -------------------------------------------------------------------------------- /.github/scripts/generate-docker-image.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | ROOT="$(cd "$(dirname "$0")/../.." && pwd)" 5 | WORKDIR="$ROOT/out/docker-workdir" 6 | 7 | mkdir -p "$WORKDIR" 8 | ./mill -i copyTo --task 'cli[]'.nativeImageStatic --dest "$WORKDIR/scala-cli" 1>&2 9 | 10 | cd "$WORKDIR" 11 | docker build -t scala-cli -f "$ROOT/.github/scripts/docker/ScalaCliDockerFile" . 12 | -------------------------------------------------------------------------------- /.github/scripts/generate-slim-docker-image.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | ROOT="$(cd "$(dirname "$0")/../.." && pwd)" 5 | WORKDIR="$ROOT/out/docker-slim-workdir" 6 | 7 | mkdir -p "$WORKDIR" 8 | ./mill -i copyTo --task 'cli[]'.nativeImageMostlyStatic --dest "$WORKDIR/scala-cli" 1>&2 9 | 10 | cd "$WORKDIR" 11 | docker build -t scala-cli-slim -f "$ROOT/.github/scripts/docker/ScalaCliSlimDockerFile" . 12 | -------------------------------------------------------------------------------- /.github/scripts/get-latest-cs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | CS_VERSION="2.1.24" 5 | 6 | DIR="$(cs get --archive "https://github.com/coursier/coursier/releases/download/v$CS_VERSION/cs-x86_64-pc-win32.zip")" 7 | 8 | cp "$DIR/"*.exe cs.exe 9 | -------------------------------------------------------------------------------- /.github/scripts/gpg-setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # from https://github.com/coursier/apps/blob/f1d2bf568bf466a98569a85c3f23c5f3a8eb5360/.github/scripts/gpg-setup.sh 4 | 5 | echo "$PGP_SECRET" | base64 --decode | gpg --import --no-tty --batch --yes 6 | 7 | echo "allow-loopback-pinentry" >>~/.gnupg/gpg-agent.conf 8 | echo "pinentry-mode loopback" >>~/.gnupg/gpg.conf 9 | 10 | gpg-connect-agent reloadagent /bye 11 | -------------------------------------------------------------------------------- /.github/scripts/publish-docker-images.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | RAW_VERSION="$(./mill -i ci.publishVersion)" 5 | SCALA_CLI_VERSION="${RAW_VERSION##* }" 6 | 7 | docker tag scala-cli virtuslab/scala-cli:latest 8 | docker tag scala-cli virtuslab/scala-cli:"$SCALA_CLI_VERSION" 9 | docker push virtuslab/scala-cli:latest 10 | docker push virtuslab/scala-cli:"$SCALA_CLI_VERSION" 11 | -------------------------------------------------------------------------------- /.github/scripts/publish-slim-docker-images.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | RAW_VERSION="$(./mill -i ci.publishVersion)" 5 | SCALA_CLI_VERSION="${RAW_VERSION##* }" 6 | 7 | docker tag scala-cli-slim virtuslab/scala-cli-slim:latest 8 | docker tag scala-cli-slim virtuslab/scala-cli-slim:"$SCALA_CLI_VERSION" 9 | docker push virtuslab/scala-cli-slim:latest 10 | docker push virtuslab/scala-cli-slim:"$SCALA_CLI_VERSION" 11 | -------------------------------------------------------------------------------- /.github/scripts/update-website.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git config --global user.name "gh-actions" 5 | git config --global user.email "actions@github.com" 6 | 7 | cd website 8 | yarn install 9 | yarn build 10 | yarn deploy 11 | -------------------------------------------------------------------------------- /.github/workflows/test-report.yml: -------------------------------------------------------------------------------- 1 | name: 'Test Report' 2 | on: 3 | workflow_run: 4 | workflows: ['CI'] 5 | types: 6 | - completed 7 | permissions: 8 | statuses: write 9 | checks: write 10 | contents: write 11 | pull-requests: write 12 | actions: write 13 | jobs: 14 | report: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: dorny/test-reporter@v2 18 | with: 19 | artifact: /test-results-(.*)/ 20 | name: 'Test report $1' 21 | path: '*.xml' 22 | reporter: java-junit -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | .bloop/ 3 | .metals/ 4 | .vscode/ 5 | .idea/ 6 | 7 | .bsp 8 | .scala-build 9 | dest/ 10 | target/ 11 | 12 | */scoverage.coverage 13 | 14 | # ignore vim backup files 15 | *.sw[op] 16 | .DS_Store 17 | 18 | -------------------------------------------------------------------------------- /.mill-jvm-opts: -------------------------------------------------------------------------------- 1 | -Xmx2048m 2 | -Xms128m 3 | -Xss8m 4 | -Dxsbt.skip.cp.lookup=true 5 | -------------------------------------------------------------------------------- /.mill-version: -------------------------------------------------------------------------------- 1 | 0.12.14 2 | -------------------------------------------------------------------------------- /.scala-steward.conf: -------------------------------------------------------------------------------- 1 | updates.ignore = [ 2 | { groupId = "com.github.plokhotnyuk.jsoniter-scala", artifactId="jsoniter-scala-macros", version="2.13.5.2" }, 3 | { groupId = "com.github.plokhotnyuk.jsoniter-scala", artifactId="jsoniter-scala-core", version="2.13.5.2" } 4 | ] 5 | postUpdateHooks = [{ 6 | command = ["./mill", "-i", "generate-reference-doc[].run"], 7 | commitMessage = "Generate the reference doc" 8 | }] 9 | -------------------------------------------------------------------------------- /.scalafix.conf: -------------------------------------------------------------------------------- 1 | rules = [ 2 | DisableSyntax, 3 | RemoveUnused, 4 | OrganizeImports, 5 | NoValInForComprehension, 6 | ProcedureSyntax 7 | ] 8 | DisableSyntax.noFinalize = true 9 | DisableSyntax.noIsInstanceOf = true 10 | DisableSyntax.noReturns = true 11 | 12 | // `rules` on compilation 13 | triggered.rules = [ 14 | DisableSyntax 15 | ] 16 | 17 | OrganizeImports { 18 | coalesceToWildcardImportThreshold = 6 19 | expandRelative = true 20 | groups = ["*", "re:javax?\\.", "scala."] 21 | groupedImports = AggressiveMerge 22 | } 23 | -------------------------------------------------------------------------------- /.scalafix.legacy.conf: -------------------------------------------------------------------------------- 1 | # Same as .scalafix3.conf, but targets Scala2 2 | rules = [ 3 | DisableSyntax, 4 | # RemoveUnused, 5 | OrganizeImports, 6 | NoValInForComprehension, 7 | # ProcedureSyntax 8 | ] 9 | DisableSyntax.noFinalize = true 10 | DisableSyntax.noIsInstanceOf = true 11 | DisableSyntax.noReturns = true 12 | 13 | // `rules` on compilation 14 | triggered.rules = [ 15 | DisableSyntax 16 | ] 17 | 18 | OrganizeImports { 19 | coalesceToWildcardImportThreshold = 6 20 | expandRelative = true 21 | groups = ["*", "re:javax?\\.", "scala."] 22 | groupedImports = AggressiveMerge 23 | removeUnused = false # added for Scala 3 24 | targetDialect = Scala2 25 | } 26 | -------------------------------------------------------------------------------- /.scalafix3.conf: -------------------------------------------------------------------------------- 1 | rules = [ 2 | DisableSyntax, 3 | RemoveUnused, 4 | OrganizeImports, 5 | NoValInForComprehension, 6 | # ProcedureSyntax 7 | ] 8 | DisableSyntax.noFinalize = true 9 | DisableSyntax.noIsInstanceOf = true 10 | DisableSyntax.noReturns = true 11 | 12 | // `rules` on compilation 13 | triggered.rules = [ 14 | DisableSyntax 15 | ] 16 | 17 | OrganizeImports { 18 | coalesceToWildcardImportThreshold = 6 19 | expandRelative = true 20 | groups = ["*", "re:javax?\\.", "scala."] 21 | groupedImports = AggressiveMerge 22 | targetDialect = Scala3 23 | } 24 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | Scala CLI uses the [Scala Code of Conduct](https://scala-lang.org/conduct/) for all communication and discussion. This includes both GitHub, Discord and other more direct lines of communication such as email. 2 | -------------------------------------------------------------------------------- /gcbenchmark/.gitignore: -------------------------------------------------------------------------------- 1 | tmp-* 2 | -------------------------------------------------------------------------------- /gcbenchmark/README.md: -------------------------------------------------------------------------------- 1 | Simple tool to analyze memory usage of bloop running with certain JVM options 2 | -------------------------------------------------------------------------------- /gifs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:24.04 2 | 3 | RUN curl -fsSL https://deb.nodesource.com/setup_12.x | bash - 4 | RUN apt-get update 5 | RUN apt-get install ca-certificates-java openjdk-17-jdk openjdk-17-jre -y 6 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y pv curl clang rubygems nodejs python3-pip &&\ 7 | rm -rf /var/lib/apt/lists/* &&\ 8 | gem install rouge &&\ 9 | pip3 install --break-system-packages asciinema==2.1.0 10 | 11 | RUN mkdir /data 12 | WORKDIR /data 13 | 14 | COPY scala-cli-jvm /usr/bin/scala-cli 15 | # Preload scala-cli 16 | RUN cd /data 17 | RUN echo 'def a = 123' > a.scala 18 | RUN scala-cli compile a.scala || echo "Problems with bloop" 19 | 20 | COPY *.sh /data/ 21 | COPY scenarios /data/scenarios 22 | 23 | ENTRYPOINT ./run_scenario.sh "$1" -------------------------------------------------------------------------------- /gifs/demo-no-magic.sh: -------------------------------------------------------------------------------- 1 | # Mock of demo magic, for running on CI 2 | 3 | function p() { 4 | echo "running: $@" 5 | } 6 | 7 | function pe() { 8 | p "$@" 9 | run_cmd "$@" 10 | } 11 | 12 | function pei { 13 | NO_WAIT=true pe "$@" 14 | } 15 | 16 | function cmd() { 17 | run_cmd "${command}" 18 | } 19 | 20 | function run_cmd() { 21 | eval "$@" 22 | } 23 | 24 | function updateFile(){ 25 | rm -f $1 26 | if [ $# -eq 1 ]; then 27 | while IFS= read -r data; do echo "$data" >> $1 ; done; 28 | else 29 | echo $2 > $1 30 | fi 31 | 32 | p "cat $1" 33 | rougify --theme tulip $1 34 | 35 | doSleep 1 36 | } 37 | 38 | function clearConsole(){ 39 | echo clear 40 | } 41 | 42 | function doSleep(){ 43 | echo sleep $1 44 | } -------------------------------------------------------------------------------- /gifs/example.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ######################## 4 | # include the magic 5 | ######################## 6 | 7 | SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd) 8 | 9 | if [[ -z "${ASCIINEMA_REC}" ]]; then 10 | # Code here will be run before the recording session 11 | # Warm up scala-cli 12 | echo "println(1)" | scala-cli - 13 | # or do other preparation (e.g. create code) 14 | else 15 | . $SCRIPT_DIR/../demo-magic.sh 16 | # hide the evidence 17 | clear 18 | 19 | # Put your stuff here 20 | pe "echo 'println(\"\")' | scala-cli -" 21 | 22 | # Wait a bit to read output of last command 23 | sleep 2 24 | echo " " && echo "ok" > status.txt 25 | fi -------------------------------------------------------------------------------- /gifs/scenarios/defaults.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | ######################## 6 | # include the magic 7 | ######################## 8 | 9 | SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd) 10 | 11 | if [[ -z "${ASCIINEMA_REC}" ]]; then 12 | # Warm up scala-cli 13 | echo "println(1)" | scala-cli - 14 | scala-cli fmt . 15 | # or do other preparation (e.g. create code) 16 | else 17 | . $SCRIPT_DIR/../demo-magic.sh 18 | # # hide the evidence 19 | clearConsole 20 | 21 | # Put your stuff here 22 | cat < status.txt 33 | fi 34 | -------------------------------------------------------------------------------- /gifs/scenarios/fast-scripts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | ######################## 6 | # include the magic 7 | ######################## 8 | 9 | SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd) 10 | 11 | if [[ -z "${ASCIINEMA_REC}" ]]; then 12 | # Warm up scala-cli 13 | echo "println(1)" | scala-cli - 14 | # or do other preparation (e.g. create code) 15 | else 16 | . $SCRIPT_DIR/../demo-magic.sh 17 | # # hide the evidence 18 | clearConsole 19 | 20 | # Put your stuff here 21 | pe "echo 'println(\"TODO: turn gifs/scenarios/fast-scripts.sh into proper scenario showing Fast Scripts" key="fast-scripts" scripting="true\")' | scala-cli -" 22 | 23 | # Wait a bit to read output of last command 24 | doSleep 2 25 | echo " " && echo "ok" > status.txt 26 | fi -------------------------------------------------------------------------------- /gifs/scenarios/todo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | ######################## 6 | # include the magic 7 | ######################## 8 | 9 | SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd) 10 | 11 | if [[ -z "${ASCIINEMA_REC}" ]]; then 12 | # Warm up scala-cli 13 | echo "println(1)" | scala-cli - 14 | else 15 | . $SCRIPT_DIR/../demo-magic.sh 16 | # # hide the evidence 17 | clearConsole 18 | 19 | # Put your stuff here 20 | 21 | pe "scala-cli version" 22 | pe "echo 'println(\"TODO\")' | scala-cli -" 23 | 24 | # Wait a bit to read output of last command 25 | doSleep 2 26 | echo " " && echo "ok" > status.txt 27 | fi 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /gifs/svg_render/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12.18.1 2 | 3 | RUN npm install -g svg-term-cli 4 | 5 | RUN mkdir /profiles 6 | 7 | # Terminal themes for light and dark mode of the site 8 | # Based on https://iterm2colorschemes.com/ 9 | RUN curl -fLo /profiles/dark https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Chester.itermcolors 10 | RUN curl -fLo /profiles/light https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Jackie%20Brown.itermcolors 11 | 12 | 13 | ENTRYPOINT svg-term $* -------------------------------------------------------------------------------- /gifs/svg_render/README.md: -------------------------------------------------------------------------------- 1 | This is docker image that is used to generate our scripts. 2 | 3 | The image is based on amazing svg-term-cli project by marionebl: https://github.com/marionebl/svg-term-cli 4 | 5 | The themes are based on https://iterm2colorschemes.com/. -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/logo.png -------------------------------------------------------------------------------- /modules/build-macros/src/main/scala/scala/build/EitherSequence.scala: -------------------------------------------------------------------------------- 1 | package scala.build 2 | 3 | import scala.collection.mutable.ListBuffer 4 | 5 | object EitherSequence { 6 | def sequence[E, T](eithers: Seq[Either[E, T]]): Either[::[E], Seq[T]] = { 7 | val errors = new ListBuffer[E] 8 | val values = new ListBuffer[T] 9 | eithers.foreach { 10 | case Left(e) => errors += e 11 | case Right(t) => 12 | if (errors.isEmpty) 13 | values += t 14 | } 15 | errors.result() match { 16 | case Nil => Right(values.result()) 17 | case h :: t => Left(::(h, t)) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/build-macros/src/negative-tests/MismatchedLeft.scala: -------------------------------------------------------------------------------- 1 | import scala.build.EitherCps.* 2 | 3 | class E 4 | class EE1 extends E 5 | class EE2 extends E 6 | class E2 7 | class V 8 | class VV extends V 9 | 10 | val vv: Either[E, VV] = Right(new VV) 11 | 12 | def ee3: Either[E2, V] = either { 13 | value(Left(new EE1)) 14 | value(vv.left.map(_ => new EE2)) 15 | new V 16 | } 17 | -------------------------------------------------------------------------------- /modules/build/src/main/java/scala/build/internal/Chdir.java: -------------------------------------------------------------------------------- 1 | package scala.build.internal; 2 | 3 | import coursier.jvm.ErrnoException; 4 | 5 | public final class Chdir { 6 | 7 | public static boolean available() { 8 | return false; 9 | } 10 | 11 | public static void chdir(String path) throws ErrnoException { 12 | // Not supported on the JVM, returning immediately 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /modules/build/src/main/java/scala/build/internal/GraalvmUnistdExtras.java: -------------------------------------------------------------------------------- 1 | package scala.build.internal; 2 | 3 | import com.oracle.svm.core.posix.headers.PosixDirectives; 4 | import org.graalvm.nativeimage.Platform; 5 | import org.graalvm.nativeimage.Platforms; 6 | import org.graalvm.nativeimage.c.CContext; 7 | import org.graalvm.nativeimage.c.function.CFunction; 8 | import org.graalvm.nativeimage.c.type.CCharPointer; 9 | import org.graalvm.nativeimage.c.type.CCharPointerPointer; 10 | 11 | @CContext(PosixDirectives.class) 12 | @Platforms({Platform.LINUX.class, Platform.DARWIN.class}) 13 | public class GraalvmUnistdExtras { 14 | 15 | @CFunction 16 | public static native int chdir(CCharPointer path); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/BloopBuildClient.scala: -------------------------------------------------------------------------------- 1 | package scala.build 2 | 3 | import ch.epfl.scala.bsp4j 4 | 5 | import scala.build.options.Scope 6 | 7 | trait BloopBuildClient extends bsp4j.BuildClient { 8 | def setProjectParams(newParams: Seq[String]): Unit 9 | def setGeneratedSources(scope: Scope, newGeneratedSources: Seq[GeneratedSource]): Unit 10 | def diagnostics: Option[Seq[(Either[String, os.Path], bsp4j.Diagnostic)]] 11 | def clear(): Unit 12 | } 13 | 14 | object BloopBuildClient { 15 | def create( 16 | logger: Logger, 17 | keepDiagnostics: Boolean 18 | ): BloopBuildClient = 19 | new ConsoleBloopBuildClient( 20 | logger, 21 | keepDiagnostics 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/BuildThreads.scala: -------------------------------------------------------------------------------- 1 | package scala.build 2 | 3 | import java.util.concurrent.{Executors, ScheduledExecutorService} 4 | 5 | import scala.build.internal.Util 6 | 7 | final case class BuildThreads( 8 | bloop: _root_.bloop.rifle.BloopThreads, 9 | fileWatcher: ScheduledExecutorService 10 | ) { 11 | def shutdown(): Unit = { 12 | bloop.shutdown() 13 | fileWatcher.shutdown() 14 | } 15 | } 16 | 17 | object BuildThreads { 18 | def create(): BuildThreads = { 19 | val bloop = _root_.bloop.rifle.BloopThreads.create() 20 | val fileWatcher = Executors.newSingleThreadScheduledExecutor( 21 | Util.daemonThreadFactory("scala-cli-file-watcher") 22 | ) 23 | BuildThreads(bloop, fileWatcher) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/CrossKey.scala: -------------------------------------------------------------------------------- 1 | package scala.build 2 | 3 | import scala.build.options.{BuildOptions, MaybeScalaVersion, Platform, Scope} 4 | 5 | final case class CrossKey( 6 | optionsKey: Option[BuildOptions.CrossKey], 7 | scope: Scope 8 | ) { 9 | def scalaVersion: MaybeScalaVersion = 10 | optionsKey 11 | .map(k => MaybeScalaVersion(k.scalaVersion)) 12 | .getOrElse(MaybeScalaVersion.none) 13 | def platform: Option[Platform] = 14 | optionsKey.map(_.platform) 15 | } 16 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/ScalaCompilerParams.scala: -------------------------------------------------------------------------------- 1 | package scala.build 2 | 3 | final case class ScalaCompilerParams( 4 | scalaVersion: String, 5 | scalaBinaryVersion: String, 6 | scalacOptions: Seq[String], 7 | compilerClassPath: Seq[os.Path], 8 | bridgeJarsOpt: Option[Seq[os.Path]] 9 | ) 10 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/bsp/IdeInputs.scala: -------------------------------------------------------------------------------- 1 | package scala.build.bsp 2 | 3 | import com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec 4 | import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker 5 | 6 | final case class IdeInputs(args: Seq[String]) 7 | 8 | object IdeInputs { 9 | implicit lazy val codec: JsonValueCodec[IdeInputs] = JsonCodecMaker.make 10 | } 11 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/bsp/JavaBuildServerForwardStubs.scala: -------------------------------------------------------------------------------- 1 | package scala.build.bsp 2 | 3 | import ch.epfl.scala.bsp4j as b 4 | import ch.epfl.scala.bsp4j.{JavacOptionsParams, JavacOptionsResult} 5 | 6 | import java.util.concurrent.CompletableFuture 7 | 8 | trait JavaBuildServerForwardStubs extends b.JavaBuildServer { 9 | protected def forwardTo: b.JavaBuildServer 10 | 11 | override def buildTargetJavacOptions( 12 | params: JavacOptionsParams 13 | ): CompletableFuture[JavacOptionsResult] = 14 | forwardTo.buildTargetJavacOptions(params) 15 | } 16 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/bsp/JsonRpcErrorCodes.scala: -------------------------------------------------------------------------------- 1 | package scala.build.bsp 2 | 3 | /** Response error codes as defined in JSON RPC. 4 | * [[https://www.jsonrpc.org/specification#error_object]] 5 | */ 6 | object JsonRpcErrorCodes { 7 | val ParseError: Int = -32700 // Invalid JSON was received by the server. 8 | val InvalidRequest: Int = -32600 // The JSON sent is not a valid Request object. 9 | val MethodNotFound: Int = -32601 // The method does not exist / is not available. 10 | val InvalidParams: Int = -32602 // Invalid method parameter(s). 11 | val InternalError: Int = -32603 // Internal JSON-RPC error. 12 | } 13 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/bsp/JvmBuildServerForwardStubs.scala: -------------------------------------------------------------------------------- 1 | package scala.build.bsp 2 | 3 | import ch.epfl.scala.bsp4j as b 4 | 5 | import java.util.concurrent.CompletableFuture 6 | 7 | trait JvmBuildServerForwardStubs extends b.JvmBuildServer { 8 | protected def forwardTo: b.JvmBuildServer 9 | 10 | override def buildTargetJvmRunEnvironment(params: b.JvmRunEnvironmentParams) 11 | : CompletableFuture[b.JvmRunEnvironmentResult] = 12 | forwardTo.buildTargetJvmRunEnvironment(params) 13 | 14 | override def buildTargetJvmTestEnvironment(params: b.JvmTestEnvironmentParams) 15 | : CompletableFuture[b.JvmTestEnvironmentResult] = 16 | forwardTo.buildTargetJvmTestEnvironment(params) 17 | } 18 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/bsp/LoggingJavaBuildServer.scala: -------------------------------------------------------------------------------- 1 | package scala.build.bsp 2 | 3 | import ch.epfl.scala.bsp4j as b 4 | 5 | import java.util.concurrent.CompletableFuture 6 | 7 | trait LoggingJavaBuildServer extends b.JavaBuildServer { 8 | protected def underlying: b.JavaBuildServer 9 | override def buildTargetJavacOptions( 10 | params: b.JavacOptionsParams 11 | ): CompletableFuture[b.JavacOptionsResult] = 12 | underlying.buildTargetJavacOptions(pprint.err.log(params)).logF 13 | } 14 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/bsp/LoggingJvmBuildServer.scala: -------------------------------------------------------------------------------- 1 | package scala.build.bsp 2 | 3 | import ch.epfl.scala.bsp4j as b 4 | 5 | import java.util.concurrent.CompletableFuture 6 | 7 | trait LoggingJvmBuildServer extends b.JvmBuildServer { 8 | protected def underlying: b.JvmBuildServer 9 | 10 | override def buildTargetJvmRunEnvironment(params: b.JvmRunEnvironmentParams) 11 | : CompletableFuture[b.JvmRunEnvironmentResult] = 12 | underlying.buildTargetJvmRunEnvironment(pprint.err.log(params)).logF 13 | 14 | override def buildTargetJvmTestEnvironment(params: b.JvmTestEnvironmentParams) 15 | : CompletableFuture[b.JvmTestEnvironmentResult] = 16 | underlying.buildTargetJvmTestEnvironment(pprint.err.log(params)).logF 17 | } 18 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/bsp/protocol/TextEdit.scala: -------------------------------------------------------------------------------- 1 | package scala.build.bsp.protocol 2 | 3 | import ch.epfl.scala.bsp4j as b 4 | import com.google.gson.Gson 5 | 6 | case class TextEdit(range: b.Range, newText: String) { 7 | def toJsonTree() = new Gson().toJsonTree(this) 8 | } 9 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/compiler/SimpleScalaCompilerMaker.scala: -------------------------------------------------------------------------------- 1 | package scala.build.compiler 2 | 3 | import ch.epfl.scala.bsp4j.BuildClient 4 | 5 | import scala.build.Logger 6 | import scala.build.errors.BuildException 7 | import scala.build.options.BuildOptions 8 | 9 | final case class SimpleScalaCompilerMaker( 10 | defaultJavaCommand: String, 11 | defaultJavaOptions: Seq[String], 12 | scaladoc: Boolean = false 13 | ) extends ScalaCompilerMaker { 14 | def create( 15 | workspace: os.Path, 16 | classesDir: os.Path, 17 | buildClient: BuildClient, 18 | logger: Logger, 19 | buildOptions: BuildOptions 20 | ): Either[BuildException, ScalaCompiler] = 21 | Right(SimpleScalaCompiler(defaultJavaCommand, defaultJavaOptions, scaladoc)) 22 | } 23 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/input/WorkspaceOrigin.scala: -------------------------------------------------------------------------------- 1 | package scala.build.input 2 | 3 | sealed abstract class WorkspaceOrigin extends Product with Serializable 4 | 5 | object WorkspaceOrigin { 6 | case object Forced extends WorkspaceOrigin 7 | 8 | case object SourcePaths extends WorkspaceOrigin 9 | 10 | case object ResourcePaths extends WorkspaceOrigin 11 | 12 | case object HomeDir extends WorkspaceOrigin 13 | case object VirtualForced extends WorkspaceOrigin 14 | } 15 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/internal/JavaParserProxyJvm.scala: -------------------------------------------------------------------------------- 1 | package scala.build.internal 2 | 3 | import scala.build.errors.BuildException 4 | import scala.cli.javaclassname.JavaParser 5 | 6 | /** A [[JavaParserProxy]] that relies on java-class-name in the class path, rather than downloading 7 | * it and running it as an external binary. 8 | * 9 | * Should be used from Scala CLI when it's run on the JVM. 10 | */ 11 | class JavaParserProxyJvm extends JavaParserProxy { 12 | override def className(content: Array[Byte]): Either[BuildException, Option[String]] = 13 | Right(JavaParser.parseRootPublicClassName(content)) 14 | } 15 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/postprocessing/ByteCodePostProcessor.scala: -------------------------------------------------------------------------------- 1 | package scala.build.postprocessing 2 | 3 | import scala.build.options.BuildOptions 4 | import scala.build.{GeneratedSource, Logger} 5 | import scala.util.{Either, Right} 6 | 7 | case object ByteCodePostProcessor extends PostProcessor { 8 | def postProcess( 9 | generatedSources: Seq[GeneratedSource], 10 | mappings: Map[String, (String, Int)], 11 | workspace: os.Path, 12 | output: os.Path, 13 | logger: Logger, 14 | scalaVersion: String, 15 | buildOptions: BuildOptions 16 | ): Either[String, Unit] = 17 | Right(AsmPositionUpdater.postProcess(mappings, output, logger)) 18 | } 19 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/postprocessing/LineConversion.scala: -------------------------------------------------------------------------------- 1 | package scala.build.postprocessing 2 | 3 | import scala.build.internal.WrapperParams 4 | 5 | object LineConversion { 6 | def scalaLineToScLine(lineScala: Int, wrapperParamsOpt: Option[WrapperParams]): Option[Int] = 7 | wrapperParamsOpt match { 8 | case Some(wrapperParams) => 9 | val lineSc = lineScala - wrapperParams.topWrapperLineCount 10 | 11 | if (lineSc >= 0 && lineSc < wrapperParams.userCodeLineCount) Some(lineSc) else None 12 | case _ => None 13 | } 14 | 15 | def scalaLineToScLineShift(wrapperParamsOpt: Option[WrapperParams]): Int = 16 | wrapperParamsOpt match { 17 | case Some(wrapperParams) => wrapperParams.topWrapperLineCount * -1 18 | case _ => 0 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/postprocessing/PostProcessor.scala: -------------------------------------------------------------------------------- 1 | package scala.build.postprocessing 2 | 3 | import scala.build.options.BuildOptions 4 | import scala.build.{GeneratedSource, Logger} 5 | 6 | trait PostProcessor { 7 | def postProcess( 8 | generatedSources: Seq[GeneratedSource], 9 | mappings: Map[String, (String, Int)], 10 | workspace: os.Path, 11 | output: os.Path, 12 | logger: Logger, 13 | scalaVersion: String, 14 | buildOptions: BuildOptions 15 | ): Either[String, Unit] 16 | } 17 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/preprocessing/PreprocessingUtil.scala: -------------------------------------------------------------------------------- 1 | package scala.build.preprocessing 2 | 3 | import java.nio.charset.StandardCharsets 4 | 5 | import scala.build.errors.{BuildException, FileNotFoundException} 6 | 7 | object PreprocessingUtil { 8 | private def defaultCharSet = StandardCharsets.UTF_8 9 | def maybeRead(f: os.Path): Either[BuildException, String] = 10 | if (os.isFile(f)) Right(os.read(f, defaultCharSet)) 11 | else Left(new FileNotFoundException(f)) 12 | } 13 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/preprocessing/Preprocessor.scala: -------------------------------------------------------------------------------- 1 | package scala.build.preprocessing 2 | 3 | import scala.build.Logger 4 | import scala.build.errors.BuildException 5 | import scala.build.input.{ScalaCliInvokeData, SingleElement} 6 | import scala.build.options.SuppressWarningOptions 7 | 8 | trait Preprocessor { 9 | def preprocess( 10 | input: SingleElement, 11 | logger: Logger, 12 | maybeRecoverOnError: BuildException => Option[BuildException] = e => Some(e), 13 | allowRestrictedFeatures: Boolean, 14 | suppressWarningOptions: SuppressWarningOptions 15 | )(using ScalaCliInvokeData): Option[Either[BuildException, Seq[PreprocessedSource]]] 16 | } 17 | -------------------------------------------------------------------------------- /modules/build/src/main/scala/scala/build/preprocessing/directives/PartiallyProcessedDirectives.scala: -------------------------------------------------------------------------------- 1 | package scala.build.preprocessing.directives 2 | 3 | import scala.build.preprocessing.Scoped 4 | 5 | case class PartiallyProcessedDirectives[T]( 6 | global: T, 7 | scoped: Seq[Scoped[T]], 8 | unused: Seq[StrictDirective] 9 | ) 10 | -------------------------------------------------------------------------------- /modules/build/src/test/scala/scala/build/tests/BuildTestsBloop.scala: -------------------------------------------------------------------------------- 1 | package scala.build.tests 2 | 3 | class BuildTestsBloop extends BuildTests(server = true) 4 | -------------------------------------------------------------------------------- /modules/build/src/test/scala/scala/build/tests/BuildTestsScalac.scala: -------------------------------------------------------------------------------- 1 | package scala.build.tests 2 | 3 | class BuildTestsScalac extends BuildTests(server = false) 4 | -------------------------------------------------------------------------------- /modules/build/src/test/scala/scala/build/tests/markdown/MarkdownTestUtil.scala: -------------------------------------------------------------------------------- 1 | package scala.build.tests.markdown 2 | 3 | object MarkdownTestUtil { 4 | val PlainScalaInfo = Seq("scala") 5 | val RawScalaInfo = Seq("scala", "raw") 6 | val TestScalaInfo = Seq("scala", "test") 7 | val ResetScalaInfo = Seq("scala", "reset") 8 | } 9 | -------------------------------------------------------------------------------- /modules/cli/src/main/java/scala/cli/commands/pgp/PgpCommandsSubst.java: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp; 2 | 3 | import com.oracle.svm.core.annotate.Substitute; 4 | import com.oracle.svm.core.annotate.TargetClass; 5 | import scala.cli.commands.pgp.ExternalCommand; 6 | import scala.cli.commands.pgp.PgpCommand; 7 | 8 | @TargetClass(className = "scala.cli.commands.pgp.PgpCommands") 9 | public final class PgpCommandsSubst { 10 | @Substitute 11 | public PgpCommand[] allScalaCommands() { 12 | return new PgpCommand[0]; 13 | } 14 | @Substitute 15 | public ExternalCommand[] allExternalCommands() { 16 | return new ExternalCommand[] { 17 | new PgpCreateExternal(), 18 | new PgpKeyIdExternal(), 19 | new PgpSignExternal(), 20 | new PgpVerifyExternal() 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /modules/cli/src/main/java/scala/cli/commands/publish/PgpProxyMakerSubst.java: -------------------------------------------------------------------------------- 1 | package scala.cli.internal; 2 | 3 | import com.oracle.svm.core.annotate.Substitute; 4 | import com.oracle.svm.core.annotate.TargetClass; 5 | import scala.cli.commands.pgp.PgpProxy; 6 | 7 | /** Used for choosing the right PGP proxy implementation when Scala CLI is run as a native image. 8 | * This class is used to substitute scala.cli.commands.pgp.PgpProxyMaker. 9 | * This decouples Scala CLI native image from BouncyCastle used by scala-cli-signing. 10 | */ 11 | @TargetClass(className = "scala.cli.commands.pgp.PgpProxyMaker") 12 | public final class PgpProxyMakerSubst { 13 | @Substitute 14 | public PgpProxy get(Boolean forceSigningExternally) { 15 | return new PgpProxy(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/cli/src/main/java/scala/cli/internal/Argv0Subst.java: -------------------------------------------------------------------------------- 1 | package scala.cli.internal; 2 | 3 | import com.oracle.svm.core.annotate.Substitute; 4 | import com.oracle.svm.core.annotate.TargetClass; 5 | import org.graalvm.nativeimage.Platform; 6 | import org.graalvm.nativeimage.Platforms; 7 | 8 | import java.nio.file.Path; 9 | 10 | @TargetClass(className = "scala.cli.internal.Argv0") 11 | @Platforms({Platform.LINUX.class, Platform.DARWIN.class}) 12 | final class Argv0Subst { 13 | 14 | @Substitute 15 | String get(String defaultValue) { 16 | return com.oracle.svm.core.JavaMainWrapper.getCRuntimeArgument0(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /modules/cli/src/main/java/scala/cli/internal/Argv0SubstWindows.java: -------------------------------------------------------------------------------- 1 | package scala.cli.internal; 2 | 3 | import com.oracle.svm.core.annotate.Substitute; 4 | import com.oracle.svm.core.annotate.TargetClass; 5 | import org.graalvm.nativeimage.Platform; 6 | import org.graalvm.nativeimage.Platforms; 7 | 8 | import java.nio.file.Path; 9 | 10 | @TargetClass(className = "scala.cli.internal.Argv0") 11 | @Platforms({Platform.WINDOWS.class}) 12 | final class Argv0SubstWindows { 13 | 14 | @Substitute 15 | String get(String defaultValue) { 16 | return coursier.jniutils.ModuleFileName.get(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /modules/cli/src/main/java/scala/cli/internal/PPrintStringPrefixSubst.java: -------------------------------------------------------------------------------- 1 | package scala.cli.internal; 2 | 3 | import com.oracle.svm.core.annotate.Substitute; 4 | import com.oracle.svm.core.annotate.TargetClass; 5 | 6 | // Remove once we can use https://github.com/com-lihaoyi/PPrint/pull/80 7 | 8 | @TargetClass(className = "pprint.StringPrefix$") 9 | final class PPrintStringPrefixSubst { 10 | 11 | @Substitute 12 | String apply(scala.collection.Iterable i) { 13 | String name = (new PPrintStringPrefixHelper()).apply((scala.collection.Iterable) i); 14 | return name; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /modules/cli/src/main/java/scala/cli/internal/PidSubst.java: -------------------------------------------------------------------------------- 1 | package scala.cli.internal; 2 | 3 | import com.oracle.svm.core.annotate.Substitute; 4 | import com.oracle.svm.core.annotate.TargetClass; 5 | import com.oracle.svm.core.posix.headers.Unistd; 6 | import org.graalvm.nativeimage.Platform; 7 | import org.graalvm.nativeimage.Platforms; 8 | 9 | import java.nio.file.Path; 10 | 11 | @TargetClass(className = "scala.cli.internal.Pid") 12 | @Platforms({Platform.LINUX.class, Platform.DARWIN.class}) 13 | final class PidSubst { 14 | 15 | @Substitute 16 | Integer get() { 17 | return Unistd.getpid(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /modules/cli/src/main/resources/META-INF/native-image/extras/pprint/reflect-config.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "scala.collection.AbstractIterable", 4 | "methods": [ 5 | { 6 | "name": "collectionClassName", 7 | "parameterTypes": [] 8 | } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /modules/cli/src/main/resources/META-INF/native-image/org.virtuslab/scala-cli-core/native-image.properties: -------------------------------------------------------------------------------- 1 | Args = --no-fallback \ 2 | --enable-url-protocols=http,https \ 3 | --initialize-at-build-time=com.google.common.jimfs.SystemJimfsFileSystemProvider \ 4 | --initialize-at-build-time=com.google.common.base.Preconditions \ 5 | -H:IncludeResources=bootstrap.*.jar \ 6 | -H:IncludeResources=coursier/coursier.properties \ 7 | -H:IncludeResources=coursier/launcher/coursier.properties \ 8 | -H:IncludeResources=coursier/launcher/.*.bat \ 9 | --report-unsupported-elements-at-runtime \ 10 | -H:+ReportExceptionStackTraces \ 11 | -Djdk.http.auth.tunneling.disabledSchemes= 12 | -------------------------------------------------------------------------------- /modules/cli/src/main/resources/META-INF/native-image/org.virtuslab/scala-cli-core/proxy-config.json: -------------------------------------------------------------------------------- 1 | [ 2 | [ 3 | "bloop.rifle.BuildServer", 4 | "org.eclipse.lsp4j.jsonrpc.Endpoint" 5 | ], 6 | [ 7 | "ch.epfl.scala.bsp4j.BuildClient", 8 | "org.eclipse.lsp4j.jsonrpc.Endpoint" 9 | ] 10 | ] 11 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/coursier/CoursierUtil.scala: -------------------------------------------------------------------------------- 1 | package coursier 2 | 3 | import coursier.util.WebPage 4 | 5 | object CoursierUtil { 6 | 7 | def rawVersions(repoUrl: String, page: String) = WebPage.listDirectories(repoUrl, page) 8 | 9 | } 10 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/CurrentParams.scala: -------------------------------------------------------------------------------- 1 | package scala.cli 2 | 3 | // Kind of meh to keep stuff in a global mutable state like this. 4 | // This is only used by the stacktrace persisting stuff in ScalaCli.main 5 | object CurrentParams { 6 | var workspaceOpt = Option.empty[os.Path] 7 | var verbosity = 0 8 | } 9 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/HelpCmd.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands 2 | 3 | import caseapp.* 4 | import caseapp.core.help.RuntimeCommandsHelp 5 | 6 | import scala.build.Logger 7 | import scala.cli.commands.shared.HelpOptions 8 | 9 | class HelpCmd(actualHelp: => RuntimeCommandsHelp) 10 | extends ScalaCommandWithCustomHelp[HelpOptions](actualHelp) { 11 | override def names = List(List("help")) 12 | override def scalaSpecificationLevel = SpecificationLevel.IMPLEMENTATION 13 | 14 | override def runCommand(options: HelpOptions, args: RemainingArgs, logger: Logger): Unit = 15 | customHelpAsked(showHidden = false) 16 | } 17 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/NeedsArgvCommand.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands 2 | 3 | trait NeedsArgvCommand { 4 | def setArgv(argv: Array[String]): Unit 5 | } 6 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/OptionsHelper.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands 2 | 3 | object OptionsHelper { 4 | implicit class Mandatory[A](x: Option[A]) { 5 | def mandatory(parameter: String, group: String): A = 6 | x match { 7 | case Some(v) => v 8 | case None => 9 | System.err.println( 10 | s"${parameter.toLowerCase.capitalize} parameter is mandatory for ${group.toLowerCase.capitalize}" 11 | ) 12 | sys.exit(1) 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/ScalaVersions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands 2 | 3 | final case class ScalaVersions( 4 | version: String, 5 | binaryVersion: String 6 | ) 7 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/addpath/AddPathOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.addpath 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions} 6 | import scala.cli.commands.tags 7 | 8 | // format: off 9 | @HelpMessage("Add entries to the PATH environment variable.") 10 | final case class AddPathOptions( 11 | @Recurse 12 | global: GlobalOptions = GlobalOptions(), 13 | @Tag(tags.restricted) 14 | title: String = "" 15 | ) extends HasGlobalOptions 16 | // format: on 17 | 18 | object AddPathOptions { 19 | implicit lazy val parser: Parser[AddPathOptions] = Parser.derive 20 | implicit lazy val help: Help[AddPathOptions] = Help.derive 21 | } 22 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/bloop/BloopJson.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.bloop 2 | 3 | import com.github.plokhotnyuk.jsoniter_scala.core.* 4 | import com.github.plokhotnyuk.jsoniter_scala.macros.* 5 | 6 | final case class BloopJson(javaOptions: List[String] = Nil) 7 | 8 | object BloopJson { 9 | val codec: JsonValueCodec[BloopJson] = JsonCodecMaker.make 10 | } 11 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/bloop/BloopOutputOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.bloop 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions, HelpMessages, SharedCompilationServerOptions} 6 | 7 | // format: off 8 | @HelpMessage( 9 | s"""Print Bloop output. 10 | | 11 | |${HelpMessages.bloopInfo}""".stripMargin) 12 | final case class BloopOutputOptions( 13 | @Recurse 14 | global: GlobalOptions = GlobalOptions(), 15 | @Recurse 16 | compilationServer: SharedCompilationServerOptions = SharedCompilationServerOptions(), 17 | ) extends HasGlobalOptions 18 | // format: on 19 | 20 | object BloopOutputOptions { 21 | implicit lazy val parser: Parser[BloopOutputOptions] = Parser.derive 22 | implicit lazy val help: Help[BloopOutputOptions] = Help.derive 23 | } 24 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/directories/DirectoriesOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.directories 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.ScalaCli.fullRunnerName 6 | import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions} 7 | 8 | // format: off 9 | @HelpMessage(s"Prints directories used by $fullRunnerName.") 10 | final case class DirectoriesOptions( 11 | @Recurse 12 | global: GlobalOptions = GlobalOptions(), 13 | ) extends HasGlobalOptions 14 | // format: on 15 | 16 | object DirectoriesOptions { 17 | implicit lazy val parser: Parser[DirectoriesOptions] = Parser.derive 18 | implicit lazy val help: Help[DirectoriesOptions] = Help.derive 19 | } 20 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/github/HasSharedSecretOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.github 2 | 3 | import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions} 4 | 5 | trait HasSharedSecretOptions extends HasGlobalOptions { 6 | def shared: SharedSecretOptions 7 | 8 | override def global: GlobalOptions = shared.global 9 | } 10 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/github/SecretListOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.github 2 | 3 | import caseapp.* 4 | 5 | // format: off 6 | @HelpMessage("Lists secrets for a given GitHub repository.") 7 | final case class SecretListOptions( 8 | @Recurse 9 | shared: SharedSecretOptions 10 | ) extends HasSharedSecretOptions 11 | // format: on 12 | 13 | object SecretListOptions { 14 | implicit lazy val parser: Parser[SecretListOptions] = Parser.derive 15 | implicit lazy val help: Help[SecretListOptions] = Help.derive 16 | } 17 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/DummyOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import caseapp.* 4 | 5 | final case class DummyOptions() 6 | 7 | object DummyOptions { 8 | implicit lazy val parser: Parser[DummyOptions] = Parser.derive 9 | implicit lazy val help: Help[DummyOptions] = Help.derive 10 | } 11 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/ExternalCommand.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.util.CommandHelpers 6 | 7 | abstract class ExternalCommand extends Command[DummyOptions] with CommandHelpers { 8 | override def hasHelp = false 9 | override def stopAtFirstUnrecognized = true 10 | 11 | def actualHelp: Help[_] 12 | 13 | def run(options: DummyOptions, args: RemainingArgs): Unit = { 14 | val unparsedPart = 15 | if (args.unparsed.isEmpty) Nil 16 | else Seq("--") ++ args.unparsed 17 | val allArgs = args.remaining ++ unparsedPart 18 | run(allArgs) 19 | } 20 | 21 | def run(args: Seq[String]): Unit 22 | } 23 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpCommandNames.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | object PgpCommandNames { 4 | def pgpCreate = List( 5 | List("pgp", "create") 6 | ) 7 | def pgpKeyId = List( 8 | List("pgp", "key-id") 9 | ) 10 | def pgpSign = List( 11 | List("pgp", "sign") 12 | ) 13 | def pgpVerify = List( 14 | List("pgp", "verify") 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpCommands.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | class PgpCommands { 4 | def allScalaCommands: Array[PgpCommand[_]] = 5 | Array(PgpCreate, PgpKeyId, PgpSign, PgpVerify) 6 | def allExternalCommands: Array[ExternalCommand] = 7 | Array.empty 8 | } 9 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpCreate.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import caseapp.core.RemainingArgs 4 | 5 | import scala.cli.signing.commands.{PgpCreate as OriginalPgpCreate, PgpCreateOptions} 6 | 7 | object PgpCreate extends PgpCommand[PgpCreateOptions] { 8 | override def names = PgpCommandNames.pgpCreate 9 | 10 | override def run(options: PgpCreateOptions, args: RemainingArgs): Unit = 11 | OriginalPgpCreate.run(options, args) 12 | } 13 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpCreateExternal.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import scala.cli.signing.commands.PgpCreateOptions 4 | 5 | class PgpCreateExternal extends PgpExternalCommand { 6 | override def hidden = true 7 | def actualHelp = PgpCreateOptions.help 8 | def externalCommand = Seq("pgp", "create") 9 | 10 | override def names = PgpCommandNames.pgpCreate 11 | } 12 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpExternalOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.shared.{ 6 | CoursierOptions, 7 | GlobalOptions, 8 | HasGlobalOptions, 9 | SharedJvmOptions 10 | } 11 | 12 | // format: off 13 | final case class PgpExternalOptions( 14 | @Recurse 15 | global: GlobalOptions = GlobalOptions(), 16 | @Recurse 17 | jvm: SharedJvmOptions = SharedJvmOptions(), 18 | @Recurse 19 | coursier: CoursierOptions = CoursierOptions(), 20 | @Recurse 21 | scalaSigning: PgpScalaSigningOptions = PgpScalaSigningOptions() 22 | ) extends HasGlobalOptions 23 | // format: on 24 | 25 | object PgpExternalOptions { 26 | implicit lazy val parser: Parser[PgpExternalOptions] = Parser.derive 27 | implicit lazy val help: Help[PgpExternalOptions] = Help.derive 28 | } 29 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpKeyId.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import caseapp.core.RemainingArgs 4 | 5 | import scala.cli.signing.commands.{PgpKeyId as OriginalPgpKeyId, PgpKeyIdOptions} 6 | 7 | object PgpKeyId extends PgpCommand[PgpKeyIdOptions] { 8 | override def names: List[List[String]] = PgpCommandNames.pgpKeyId 9 | 10 | override def run(options: PgpKeyIdOptions, args: RemainingArgs): Unit = 11 | OriginalPgpKeyId.run(options, args) 12 | } 13 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpKeyIdExternal.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import scala.cli.signing.commands.PgpKeyIdOptions 4 | 5 | class PgpKeyIdExternal extends PgpExternalCommand { 6 | override def hidden = true 7 | def actualHelp = PgpKeyIdOptions.help 8 | def externalCommand = Seq("pgp", "key-id") 9 | 10 | override def names = PgpCommandNames.pgpKeyId 11 | } 12 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpProxyMaker.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | /** Used for choosing the right PGP proxy implementation when Scala CLI is run on JVM.
4 | * 5 | * See [[scala.cli.internal.PgpProxyMakerSubst PgpProxyMakerSubst]] 6 | */ 7 | class PgpProxyMaker { 8 | def get(forceSigningExternally: java.lang.Boolean): PgpProxy = 9 | if (forceSigningExternally) 10 | new PgpProxy 11 | else 12 | new PgpProxyJvm 13 | } 14 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpPullOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions, HelpGroup} 6 | 7 | // format: off 8 | final case class PgpPullOptions( 9 | @Recurse 10 | global: GlobalOptions = GlobalOptions(), 11 | @Recurse 12 | shared: SharedPgpPushPullOptions = SharedPgpPushPullOptions(), 13 | @Group(HelpGroup.PGP.toString) 14 | @HelpMessage("Whether to exit with code 0 if no key is passed") 15 | allowEmpty: Boolean = false 16 | ) extends HasGlobalOptions 17 | // format: on 18 | 19 | object PgpPullOptions { 20 | implicit lazy val parser: Parser[PgpPullOptions] = Parser.derive 21 | implicit lazy val help: Help[PgpPullOptions] = Help.derive 22 | } 23 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpSign.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import caseapp.core.RemainingArgs 4 | 5 | import scala.cli.signing.commands.{PgpSign as OriginalPgpSign, PgpSignOptions} 6 | 7 | object PgpSign extends PgpCommand[PgpSignOptions] { 8 | override def names = PgpCommandNames.pgpSign 9 | 10 | override def run(options: PgpSignOptions, args: RemainingArgs): Unit = 11 | OriginalPgpSign.run(options, args) 12 | } 13 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpSignExternal.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import scala.cli.signing.commands.PgpSignOptions 4 | 5 | class PgpSignExternal extends PgpExternalCommand { 6 | override def hidden = true 7 | def actualHelp = PgpSignOptions.help 8 | def externalCommand = Seq("pgp", "sign") 9 | 10 | override def names = PgpCommandNames.pgpSign 11 | } 12 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpVerify.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import caseapp.core.RemainingArgs 4 | 5 | import scala.cli.signing.commands.{PgpVerify as OriginalPgpVerify, PgpVerifyOptions} 6 | 7 | object PgpVerify extends PgpCommand[PgpVerifyOptions] { 8 | override def names = PgpCommandNames.pgpVerify 9 | 10 | override def run(options: PgpVerifyOptions, args: RemainingArgs): Unit = 11 | OriginalPgpVerify.run(options, args) 12 | } 13 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/pgp/PgpVerifyExternal.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.pgp 2 | 3 | import scala.cli.signing.commands.PgpVerifyOptions 4 | 5 | class PgpVerifyExternal extends PgpExternalCommand { 6 | override def hidden = true 7 | def actualHelp = PgpVerifyOptions.help 8 | def externalCommand = Seq("pgp", "verify") 9 | 10 | override def names = PgpCommandNames.pgpVerify 11 | } 12 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/publish/GitRepoError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.publish 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class GitRepoError(message: String) extends BuildException(message) 6 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/publish/SetSecret.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.publish 2 | 3 | import scala.cli.config.Secret 4 | 5 | final case class SetSecret( 6 | name: String, 7 | value: Secret[String], 8 | force: Boolean 9 | ) 10 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/shared/CrossOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.shared 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.tags 6 | 7 | // format: off 8 | final case class CrossOptions( 9 | @Tag(tags.experimental) 10 | @HelpMessage("Run given command against all provided Scala versions and/or platforms") 11 | cross: Option[Boolean] = None 12 | ) 13 | // format: on 14 | 15 | object CrossOptions { 16 | implicit lazy val parser: Parser[CrossOptions] = Parser.derive 17 | implicit lazy val help: Help[CrossOptions] = Help.derive 18 | } 19 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/shared/HasGlobalOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.shared 2 | 3 | trait HasGlobalOptions { 4 | def global: GlobalOptions 5 | } 6 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/shared/HasSharedOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.shared 2 | 3 | trait HasSharedOptions extends HasGlobalOptions { 4 | def shared: SharedOptions 5 | override def global: GlobalOptions = shared.global 6 | } 7 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/shared/HelpOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.shared 2 | 3 | import caseapp.* 4 | 5 | // format: off 6 | @HelpMessage("Print help message") 7 | case class HelpOptions( 8 | @Recurse 9 | global: GlobalOptions = GlobalOptions(), 10 | ) extends HasGlobalOptions 11 | // format: on 12 | 13 | object HelpOptions { 14 | implicit lazy val parser: Parser[HelpOptions] = Parser.derive 15 | implicit lazy val help: Help[HelpOptions] = Help.derive 16 | } 17 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/shared/MarkdownOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.shared 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.tags 6 | 7 | // format: off 8 | final case class MarkdownOptions( 9 | @Group(HelpGroup.Markdown.toString) 10 | @Tag(tags.experimental) 11 | @HelpMessage("Enable markdown support.") 12 | @Name("md") 13 | @Name("markdown") 14 | enableMarkdown: Boolean = false // TODO: add a separate scope for Markdown and remove this option once it's stable 15 | ) 16 | // format: on 17 | 18 | object MarkdownOptions { 19 | implicit lazy val parser: Parser[MarkdownOptions] = Parser.derive 20 | implicit lazy val help: Help[MarkdownOptions] = Help.derive 21 | } 22 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/shared/ScopeOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.shared 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.tags 6 | 7 | case class ScopeOptions( 8 | @Group(HelpGroup.Compilation.toString) 9 | @HelpMessage("Include test scope") 10 | @Tag(tags.should) 11 | @Tag(tags.inShortHelp) 12 | @Name("testScope") 13 | @Name("withTestScope") 14 | @Name("withTest") 15 | test: Option[Boolean] = None 16 | ) 17 | object ScopeOptions { 18 | implicit lazy val parser: Parser[ScopeOptions] = Parser.derive 19 | implicit lazy val help: Help[ScopeOptions] = Help.derive 20 | } 21 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/shared/SharedBspFileOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.shared 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.tags 6 | 7 | // format: off 8 | final case class SharedBspFileOptions( 9 | @Group(HelpGroup.BSP.toString) 10 | @Name("bspDir") 11 | @HelpMessage("Custom BSP configuration location") 12 | @Tag(tags.implementation) 13 | @Hidden 14 | bspDirectory: Option[String] = None, 15 | @Group(HelpGroup.BSP.toString) 16 | @Name("name") 17 | @HelpMessage("Name of BSP") 18 | @Hidden 19 | @Tag(tags.implementation) 20 | bspName: Option[String] = None 21 | ) 22 | // format: on 23 | 24 | object SharedBspFileOptions { 25 | implicit lazy val parser: Parser[SharedBspFileOptions] = Parser.derive 26 | implicit lazy val help: Help[SharedBspFileOptions] = Help.derive 27 | } 28 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/shared/SharedInputOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.shared 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.tags 6 | 7 | // format: off 8 | final case class SharedInputOptions( 9 | @Hidden 10 | @Tag(tags.implementation) 11 | defaultForbiddenDirectories: Boolean = true, 12 | @Hidden 13 | @Tag(tags.implementation) 14 | forbid: List[String] = Nil 15 | ) 16 | // format: on 17 | 18 | object SharedInputOptions { 19 | implicit lazy val parser: Parser[SharedInputOptions] = Parser.derive 20 | implicit lazy val help: Help[SharedInputOptions] = Help.derive 21 | } 22 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/shared/SourceGeneratorOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.shared 2 | 3 | import caseapp.* 4 | 5 | import scala.cli.commands.tags 6 | 7 | // format: off 8 | final case class SourceGeneratorOptions( 9 | @Group(HelpGroup.SourceGenerator.toString) 10 | @Tag(tags.restricted) 11 | @HelpMessage("Generate BuildInfo for project") 12 | @Name("buildInfo") 13 | useBuildInfo: Option[Boolean] = None 14 | ) 15 | // format: on 16 | 17 | object SourceGeneratorOptions { 18 | implicit lazy val parser: Parser[SourceGeneratorOptions] = Parser.derive 19 | implicit lazy val help: Help[SourceGeneratorOptions] = Help.derive 20 | } 21 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/util/CommandHelpers.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.util 2 | 3 | import scala.build.Logger 4 | import scala.build.errors.BuildException 5 | 6 | trait CommandHelpers { 7 | 8 | implicit class EitherBuildExceptionOps[E <: BuildException, T](private val either: Either[E, T]) { 9 | def orReport(logger: Logger): Option[T] = 10 | either match { 11 | case Left(ex) => 12 | logger.log(ex) 13 | None 14 | case Right(t) => Some(t) 15 | } 16 | def orExit(logger: Logger): T = 17 | either match { 18 | case Left(ex) => logger.exit(ex) 19 | case Right(t) => t 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/commands/util/HelpUtils.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.commands.util 2 | 3 | import caseapp.core.help.{Help, HelpFormat} 4 | 5 | object HelpUtils { 6 | extension (help: Help[_]) { 7 | private def abstractHelp( 8 | format: HelpFormat, 9 | showHidden: Boolean 10 | )(f: (StringBuilder, HelpFormat, Boolean) => Unit): String = { 11 | val b = new StringBuilder 12 | f(b, format, showHidden) 13 | b.result() 14 | } 15 | 16 | def optionsHelp(format: HelpFormat, showHidden: Boolean = false): String = 17 | abstractHelp(format, showHidden)(help.printOptions) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/FailedToSignFileError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class FailedToSignFileError(val path: Either[String, os.Path], val error: String) 6 | extends BuildException(s"Failed to sign ${path.fold(identity, _.toString)}: $error") 7 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/FoundVirtualInputsError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | import scala.build.input.Virtual 5 | 6 | final class FoundVirtualInputsError( 7 | val virtualInputs: Seq[Virtual] 8 | ) extends BuildException( 9 | s"Found virtual inputs: ${virtualInputs.map(_.source).mkString(", ")}" 10 | ) { 11 | assert(virtualInputs.nonEmpty) 12 | } 13 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/GitHubApiError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class GitHubApiError(msg: String) extends BuildException(msg) 6 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/GraalVMNativeImageError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class GraalVMNativeImageError() 6 | extends BuildException(s"Error building native image with GraalVM") 7 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/MalformedChecksumsError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class MalformedChecksumsError(input: Seq[String], errors: ::[String]) 6 | extends BuildException(s"Malformed checksums: ${errors.mkString(", ")}") 7 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/MalformedOptionError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class MalformedOptionError( 6 | val optionName: String, 7 | val optionValue: String, 8 | val expected: String 9 | ) extends BuildException( 10 | { 11 | val q = "\"" 12 | s"Malformed option $optionName: got $q$optionValue$q, expected $q$expected$q" 13 | } 14 | ) 15 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/MissingConfigEntryError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class MissingConfigEntryError(key: String) 6 | extends BuildException(s"Missing config entry $key") 7 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/PgpError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class PgpError(message: String) extends BuildException(message) 6 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/ScalaJsLinkingError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class ScalaJsLinkingError( 6 | val expected: os.RelPath, 7 | val foundFiles: Seq[os.RelPath] 8 | ) extends BuildException( 9 | s"Error: $expected not found after Scala.js linking " + 10 | (if (foundFiles.isEmpty) "(no files found)" else s"(found ${foundFiles.mkString(", ")})") 11 | ) 12 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/ScaladocGenerationFailedError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class ScaladocGenerationFailedError(val retCode: Int) 6 | extends BuildException(s"Scaladoc generation failed (exit code: $retCode)") { 7 | assert(retCode != 0) 8 | } 9 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/UploadError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import coursier.publish.Content 4 | import coursier.publish.fileset.Path 5 | import coursier.publish.upload.Upload 6 | 7 | import scala.build.errors.BuildException 8 | 9 | final class UploadError(errors: ::[(Path, Content, Upload.Error)]) extends BuildException( 10 | s"Error uploading ${errors.length} file(s):" + 11 | errors 12 | .map { 13 | case (path, _, err) => 14 | System.lineSeparator() + s" ${path.repr}: ${err.getMessage}" 15 | } 16 | .mkString 17 | ) 18 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/errors/WrongSonatypeServerError.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class WrongSonatypeServerError(legacyChosen: Boolean) 6 | extends BuildException( 7 | s"Wrong Sonatype server, try ${if legacyChosen then "'central-s01'" else "'central'"}" 8 | ) 9 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/exportCmd/Project.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.exportCmd 2 | 3 | abstract class Project extends Product with Serializable { 4 | def writeTo(dir: os.Path): Unit 5 | } 6 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/internal/Argv0.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.internal 2 | 3 | class Argv0 { 4 | def get(defaultValue: String): String = defaultValue 5 | } 6 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/internal/PPrintStringPrefixHelper.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.internal 2 | 3 | // Remove once we can use https://github.com/com-lihaoyi/PPrint/pull/80 4 | 5 | final class PPrintStringPrefixHelper { 6 | def apply(i: Iterable[Object]): String = 7 | i.collectionClassName 8 | } 9 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/internal/Pid.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.internal 2 | 3 | import java.lang.management.ManagementFactory 4 | 5 | class Pid { 6 | def get(): Integer = 7 | try { 8 | val pid = ManagementFactory.getRuntimeMXBean.getName.takeWhile(_ != '@').toInt 9 | pid: Integer 10 | } 11 | catch { 12 | case _: NumberFormatException => null 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/cli/src/main/scala/scala/cli/util/SeqHelpers.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.util 2 | 3 | object SeqHelpers { 4 | implicit class StringSeqOpt(val seq: Seq[String]) extends AnyVal { 5 | def appendOnInit(s: String): Seq[String] = 6 | if seq.isEmpty || seq.tail.isEmpty then seq 7 | else (seq.head + s) +: seq.tail.appendOnInit(s) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/cli/src/test/scala/cli/tests/ArgSplitterTest.scala: -------------------------------------------------------------------------------- 1 | package cli.tests 2 | 3 | import scala.cli.commands.shared.ArgSplitter 4 | 5 | class ArgSplitterTest extends munit.FunSuite { 6 | 7 | test("test scalac options are split correctly") { 8 | val args = List( 9 | List("-arg", "-other-arg"), 10 | List("-yet-another-arg", "dir/path\\ with\\ space", "'another arg with space'"), 11 | List("\"yet another arg with space\"") 12 | ) 13 | val input = args.map(_.mkString(" ", " ", "")).mkString(" ", "\n", "") 14 | assertEquals(ArgSplitter.splitToArgs(input), args.flatten) 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /modules/cli/src/test/scala/cli/tests/OptionsCheck.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.tests 2 | 3 | import scala.cli.ScalaCliCommands 4 | import scala.cli.commands.shared.HasGlobalOptions 5 | 6 | class OptionsCheck extends munit.FunSuite { 7 | 8 | for ( 9 | command <- 10 | new ScalaCliCommands("scala-cli", "scala-cli", "Scala CLI").commands 11 | ) 12 | test(s"No duplicated options in ${command.names.head.mkString(" ")}") { 13 | command.ensureNoDuplicates() 14 | } 15 | 16 | test(s"--power option present in $command") { 17 | command.parser.stopAtFirstUnrecognized.parse(Seq("--power")) match { 18 | case Right((_: HasGlobalOptions, _ +: _)) => fail("Expected --power to be recognized") 19 | case _ => () 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/cli/src/test/scala/cli/tests/TestUtil.scala: -------------------------------------------------------------------------------- 1 | package cli.tests 2 | 3 | import coursier.cache.{ArtifactError, FileCache} 4 | import coursier.util.{Artifact, Task} 5 | 6 | import java.io.File 7 | 8 | import scala.concurrent.duration.DurationInt 9 | import scala.util.control.NonFatal 10 | 11 | object TestUtil { 12 | def downloadFile(url: String): Either[ArtifactError, Array[Byte]] = { 13 | val artifact = Artifact(url).withChanging(true) 14 | val cache = FileCache() 15 | 16 | val file: Either[ArtifactError, File] = cache.logger.use { 17 | try cache.withTtl(0.seconds).file(artifact).run.unsafeRun()(cache.ec) 18 | catch { 19 | case NonFatal(e) => throw new Exception(e) 20 | } 21 | } 22 | 23 | file.map(f => os.read.bytes(os.Path(f, os.pwd))) 24 | } 25 | val isCI: Boolean = System.getenv("CI") != null 26 | } 27 | -------------------------------------------------------------------------------- /modules/config/src/main/scala-2.12/scala/cli/config/Util.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.config 2 | 3 | private[config] object Util { 4 | 5 | implicit class ConfigStringOps(private val s: String) extends AnyVal { 6 | def toBooleanOption: Option[Boolean] = 7 | try Some(s.toBoolean) 8 | catch { 9 | case _: IllegalArgumentException => 10 | None 11 | } 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /modules/config/src/main/scala-2.13/scala/cli/config/Util.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.config 2 | 3 | private[config] object Util 4 | -------------------------------------------------------------------------------- /modules/config/src/main/scala-3/scala/cli/config/Util.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.config 2 | 3 | private[config] object Util 4 | -------------------------------------------------------------------------------- /modules/config/src/main/scala/scala/cli/config/ErrorMessages.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.config 2 | 3 | object ErrorMessages { 4 | val inlineCredentialsError = 5 | "Inline credentials not accepted, please edit the config file manually." 6 | 7 | } 8 | -------------------------------------------------------------------------------- /modules/config/src/main/scala/scala/cli/config/Secret.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.config 2 | 3 | final class Secret[+T]( 4 | value0: T 5 | ) { 6 | def value: T = value0 7 | 8 | def map[U](f: T => U): Secret[U] = 9 | Secret(f(value0)) 10 | 11 | override def equals(obj: Any): Boolean = 12 | obj match { 13 | case other: Secret[_] => value == other.value 14 | case _ => false 15 | } 16 | 17 | // not leaking details about the secret here 18 | override def hashCode(): Int = 0 19 | override def toString: String = "****" 20 | } 21 | 22 | object Secret { 23 | def apply[T](value: T): Secret[T] = 24 | new Secret(value) 25 | } 26 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/CsUtils.scala: -------------------------------------------------------------------------------- 1 | package scala.build 2 | 3 | import coursier.core.Version 4 | 5 | extension (s: String) def coursierVersion: Version = Version(s) 6 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/Os.scala: -------------------------------------------------------------------------------- 1 | package scala.build 2 | 3 | import java.util.Locale 4 | 5 | import scala.util.Properties 6 | 7 | object Os { 8 | lazy val pwd: os.Path = 9 | if (Properties.isWin) 10 | os.Path(os.pwd.toIO.getCanonicalFile) 11 | else 12 | os.pwd 13 | lazy val isArmArchitecture: Boolean = 14 | sys.props.getOrElse("os.arch", "").toLowerCase(Locale.ROOT) == "aarch64" 15 | } 16 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/AmbiguousPlatformError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class AmbiguousPlatformError(passedPlatformTypes: Seq[String]) extends BuildException( 4 | s"Ambiguous platform: more than one type of platform has been passed: ${passedPlatformTypes.mkString(", ")}." 5 | ) 6 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/BuildInfoGenerationError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class BuildInfoGenerationError(msg: String, positions: Seq[Position], cause: Exception) 6 | extends BuildException( 7 | s"BuildInfo generation error: $msg", 8 | positions = positions, 9 | cause = cause 10 | ) 11 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/CheckScalaCliVersionError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | class CheckScalaCliVersionError(val message: String, val cause: Throwable) 4 | extends Exception(message, cause) 5 | 6 | object CheckScalaCliVersionError { 7 | def apply(message: String, cause: Throwable = null): CheckScalaCliVersionError = 8 | new CheckScalaCliVersionError(message, cause) 9 | } 10 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/ConfigDbException.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class ConfigDbException(cause: Exception) 4 | extends BuildException(s"Config DB error: ${cause.getMessage}", cause = cause) 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/DependencyFormatError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class DependencyFormatError( 6 | val dependencyString: String, 7 | val error: String, 8 | positions: Seq[Position] 9 | ) extends BuildException( 10 | s"Error parsing dependency '$dependencyString': $error", 11 | positions = positions 12 | ) 13 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/DirectiveErrors.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class DirectiveErrors(errors: ::[String], positions: Seq[Position]) extends BuildException( 6 | "Directives errors: " + errors.mkString(", "), 7 | positions = positions 8 | ) 9 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/ExcludeDefinitionError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class ExcludeDefinitionError(positions: Seq[Position], expectedProjectFilePath: os.Path) 6 | extends BuildException( 7 | s"""Found exclude directives in files: 8 | | ${positions.map(_.render()).distinct.mkString(", ")} 9 | |exclude directive must be defined in project configuration file: $expectedProjectFilePath.""".stripMargin 10 | ) 11 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/FetchingDependenciesError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import coursier.error.CoursierError 4 | 5 | import scala.build.Position 6 | 7 | final class FetchingDependenciesError( 8 | val underlying: CoursierError, 9 | override val positions: Seq[Position] 10 | ) extends BuildException( 11 | underlying.getMessage, 12 | positions, 13 | underlying 14 | ) 15 | 16 | object FetchingDependenciesError { 17 | def unapply(e: FetchingDependenciesError): Option[(CoursierError, Seq[Position])] = 18 | Some(e.underlying -> e.positions) 19 | } 20 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/FileNotFoundException.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class FileNotFoundException(val path: os.Path) 4 | extends BuildException(s"File not found: $path") 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/ForbiddenPathReferenceError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class ForbiddenPathReferenceError( 6 | val virtualRoot: String, 7 | val positionOpt: Option[Position] 8 | ) extends BuildException( 9 | s"Can't reference paths from sources from $virtualRoot", 10 | positionOpt.toSeq 11 | ) 12 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/InputsException.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | class InputsException(message: String) 4 | extends BuildException( 5 | message = message 6 | ) 7 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/InvalidBinaryScalaVersionError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class InvalidBinaryScalaVersionError(val invalidBinaryVersion: String) 4 | extends ScalaVersionError(s"Cannot find matching Scala version for '$invalidBinaryVersion'") 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/JmhBuildFailedError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class JmhBuildFailedError extends BuildException("JMH build failed") 4 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/JvmDownloadError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class JvmDownloadError(jvmId: String, cause: Throwable) 4 | extends BuildException( 5 | s"Cannot download JVM: $jvmId", 6 | cause = cause 7 | ) 8 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/MainClassError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | abstract class MainClassError( 6 | message: String, 7 | positions: Seq[Position] 8 | ) extends BuildException(message, positions = positions) 9 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/MalformedCliInputError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class MalformedCliInputError(message: String) 4 | extends BuildException(message) 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/MalformedDirectiveError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class MalformedDirectiveError(message: String, positions: Seq[Position]) 6 | extends BuildException(message, positions) 7 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/MalformedInputError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class MalformedInputError( 6 | val inputType: String, 7 | val input: String, 8 | val expectedShape: String, 9 | positions: Seq[Position] = Nil, 10 | cause: Option[Throwable] = None 11 | ) extends BuildException( 12 | { 13 | val q = "\"" 14 | s"Malformed $inputType $q$input$q, expected $expectedShape" 15 | }, 16 | positions = positions, 17 | cause = cause.orNull 18 | ) 19 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/MalformedPlatformError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class MalformedPlatformError( 6 | marformedInput: String, 7 | positions: Seq[Position] = Nil 8 | ) extends BuildException( 9 | s"Unrecognized platform: $marformedInput", 10 | positions = positions 11 | ) 12 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/MarkdownUnclosedBackticksError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | import scala.build.Position 3 | 4 | class MarkdownUnclosedBackticksError( 5 | backticks: String, 6 | positions: Seq[Position] 7 | ) extends BuildException(s"Unclosed $backticks code block in a Markdown input", positions) 8 | 9 | object MarkdownUnclosedBackticksError { 10 | def apply(backticks: String, positions: Seq[Position]) = 11 | new MarkdownUnclosedBackticksError(backticks, positions) 12 | } 13 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/ModuleFormatError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class ModuleFormatError( 6 | val moduleString: String, 7 | val error: String, 8 | val originOpt: Option[String] = None, 9 | positions: Seq[Position] = Nil 10 | ) extends BuildException( 11 | s"Error parsing ${originOpt.getOrElse("")}module '$moduleString': $error", 12 | positions = positions 13 | ) 14 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/MultipleScalaVersionsError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class MultipleScalaVersionsError(scalaVersions: Seq[String]) 4 | extends BuildException( 5 | message = 6 | s"Multiple Scala versions are present in the build (${scalaVersions.mkString(" ")}), even though only one is allowed in this context.", 7 | positions = Nil 8 | ) 9 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NoDocBuildError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class NoDocBuildError extends BuildException( 4 | "Doc build not present. It may have been cancelled." 5 | ) 6 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NoFrameworkFoundByBridgeError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class NoFrameworkFoundByBridgeError 4 | extends TestError("No framework found by Scala.js test bridge") 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NoMainClassFoundError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class NoMainClassFoundError extends MainClassError("No main class found", Nil) 4 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NoScalaVersionProvidedError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class NoScalaVersionProvidedError( 6 | val depOrModule: Either[dependency.AnyModule, dependency.AnyDependency], 7 | positions: Seq[Position] = Nil 8 | ) extends BuildException( 9 | { 10 | val str = depOrModule match { 11 | case Left(mod) => "module " + mod.render 12 | case Right(dep) => "dependency " + dep.render 13 | } 14 | s"Got Scala $str, but no Scala version is provided" 15 | }, 16 | positions = positions 17 | ) 18 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NoTestFrameworkFoundError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class NoTestFrameworkFoundError extends TestError("No test framework found") 4 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NoTestFrameworkValueProvidedError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class NoTestFrameworkValueProvidedError extends BuildException( 4 | "No test framework value provided to using test-framework directive" 5 | ) 6 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NoTestsRun.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class NoTestsRun extends TestError("No tests were run") 4 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NoValidScalaVersionFoundError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class NoValidScalaVersionFoundError(val versionString: String = "") 4 | extends ScalaVersionError({ 5 | val suffix = if versionString.nonEmpty then s" for $versionString" else "" 6 | s"Cannot find a valid matching Scala version$suffix." 7 | }) 8 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NoValueProvidedError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class NoValueProvidedError(val key: String) extends BuildException( 4 | s"Expected a value for directive $key", 5 | // TODO - this seems like outdated thing 6 | positions = Nil // I wish using_directives provided the key position… 7 | ) 8 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/NodeNotFoundError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class NodeNotFoundError extends BuildException( 4 | "The Node was not found on the PATH. Please ensure that Node is installed correctly and then try again" 5 | ) 6 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/ParsingInputsException.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | class ParsingInputsException(exceptionMessage: String, cause: Throwable) 4 | extends BuildException( 5 | message = exceptionMessage, 6 | cause = cause 7 | ) 8 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/RepositoryFormatError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class RepositoryFormatError(errors: ::[String]) extends BuildException( 4 | s"Error parsing repositories: ${errors.mkString(", ")}" 5 | ) 6 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/ScalaNativeBuildError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class ScalaNativeBuildError() 4 | extends BuildException(s"Error compiling with Scala Native") 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/ScalaNativeCompatibilityError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class ScalaNativeCompatibilityError( 4 | val scalaVersion: String, 5 | val scalaNativeVersion: String 6 | ) extends BuildException( 7 | s"""Used Scala Native version $scalaNativeVersion is incompatible with Scala $scalaVersion. 8 | |Please try one of the following combinations: 9 | | Scala Native version >= 0.4.4 for Scala 3.1 (*.sc & *.scala files) 10 | | Scala Native version >= 0.4.0 for Scala 2.13 (*.sc & *.scala files) 11 | | Scala Native version >= 0.4.0 for Scala 2.12 (*.scala files) 12 | |Windows is supported since Scala Native 0.4.1. 13 | |""".stripMargin 14 | ) 15 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/SeveralMainClassesFoundError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class SeveralMainClassesFoundError( 6 | mainClasses: ::[String], 7 | commandString: String, 8 | positions: Seq[Position] 9 | ) extends MainClassError( 10 | s"""Found several main classes: ${mainClasses.mkString(", ")} 11 | |You can run one of them by passing it with the --main-class option, e.g. 12 | | ${Console.BOLD}$commandString --main-class ${mainClasses.head}${Console.RESET} 13 | | 14 | |You can pick the main class interactively by passing the --interactive option. 15 | | ${Console.BOLD}$commandString --interactive${Console.RESET}""".stripMargin, 16 | positions = positions 17 | ) 18 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/Severity.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import ch.epfl.scala.bsp4j as b 4 | 5 | sealed abstract class Severity extends Product with Serializable { 6 | def toBsp4j: b.DiagnosticSeverity 7 | } 8 | 9 | object Severity { 10 | case object Error extends Severity { 11 | override def toBsp4j: b.DiagnosticSeverity = b.DiagnosticSeverity.ERROR 12 | } 13 | case object Warning extends Severity { 14 | override def toBsp4j: b.DiagnosticSeverity = b.DiagnosticSeverity.WARNING 15 | } 16 | case object Hint extends Severity { 17 | override def toBsp4j: b.DiagnosticSeverity = b.DiagnosticSeverity.HINT 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/TestError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | abstract class TestError(message: String) extends BuildException(message) 4 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/TooManyFrameworksFoundByBridgeError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class TooManyFrameworksFoundByBridgeError 4 | extends TestError("Too many frameworks found by Scala.js test bridge") 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/ToolkitVersionError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class ToolkitVersionError(msg: String, positions: Seq[Position]) 6 | extends BuildException(msg, positions) 7 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/UnexpectedDirectiveError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class UnexpectedDirectiveError(val key: String) 4 | extends BuildException(s"Unexpected directive: $key}") 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/UnexpectedJvmPlatformVersionError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class UnexpectedJvmPlatformVersionError( 6 | version: String, 7 | positions: Seq[Position] 8 | ) extends BuildException( 9 | s"Unexpected version '$version' specified for JVM platform", 10 | positions = positions 11 | ) 12 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/UnrecognizedDebugModeError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class UnrecognizedDebugModeError(mode: String) extends BuildException( 4 | s"Unrecognized debug mode: $mode." 5 | ) 6 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/UnrecognizedJsOptModeError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class UnrecognizedJsOptModeError( 4 | mode: String, 5 | aliasesForFullLink: Seq[String], 6 | aliasesForFastLink: Seq[String] 7 | ) extends BuildException( 8 | s"""Unrecognized JS optimization mode: $mode. 9 | |Available options: 10 | |- for fastLinkJs: ${aliasesForFastLink.mkString(", ")} 11 | |- for fullLinkJs: ${aliasesForFullLink.mkString(", ")}""".stripMargin 12 | ) 13 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/UnsupportedScalaVersionError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class UnsupportedScalaVersionError(val binaryVersion: String) 4 | extends ScalaVersionError(s"Unsupported Scala version: $binaryVersion") 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/UnusedDirectiveError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | final class UnusedDirectiveError(key: String, values: Seq[String], position: Position) 6 | extends BuildException( 7 | s"Unrecognized directive: $key${ 8 | if values.isEmpty then "" else s" with values: ${values.mkString(", ")}" 9 | }", 10 | positions = List(position) 11 | ) 12 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/errors/WorkspaceError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class WorkspaceError(message: String) 4 | extends BuildException(message) 5 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/internals/FeatureType.scala: -------------------------------------------------------------------------------- 1 | package scala.build.internals 2 | 3 | enum FeatureType(stringRepr: String) { 4 | override def toString: String = stringRepr 5 | 6 | case Option extends FeatureType("option") 7 | case Directive extends FeatureType("directive") 8 | case Subcommand extends FeatureType("sub-command") 9 | case ConfigKey extends FeatureType("configuration key") 10 | } 11 | 12 | object FeatureType { 13 | private val ordering = Map( 14 | FeatureType.Subcommand -> 0, 15 | FeatureType.Option -> 1, 16 | FeatureType.Directive -> 2, 17 | FeatureType.ConfigKey -> 3 18 | ) 19 | 20 | given Ordering[FeatureType] = Ordering.by(ordering) 21 | } 22 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/internals/License.scala: -------------------------------------------------------------------------------- 1 | package scala.build.internal 2 | 3 | final case class License( 4 | id: String, 5 | name: String, 6 | url: String 7 | ) 8 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/internals/Regexes.scala: -------------------------------------------------------------------------------- 1 | package scala.build.internal 2 | 3 | object Regexes { 4 | val scala2NightlyRegex = raw"""2\.(\d+)\.(\d+)-bin-[a-f0-9]*""".r 5 | val scala3NightlyNicknameRegex = raw"""3\.([0-9]*)\.nightly""".r 6 | val scala3LtsRegex = raw"""3\.3\.[0-9]+""".r 7 | } 8 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/internals/StableScalaVersion.scala: -------------------------------------------------------------------------------- 1 | package scala.build.internal 2 | 3 | import com.github.plokhotnyuk.jsoniter_scala.core.* 4 | import com.github.plokhotnyuk.jsoniter_scala.macros.* 5 | import coursier.core.Version 6 | 7 | final case class StableScalaVersion( 8 | scalaCliVersion: String, 9 | supportedScalaVersions: Seq[String] 10 | ) { 11 | lazy val scalaCliVersion0 = Version(scalaCliVersion) 12 | } 13 | 14 | object StableScalaVersion { 15 | val seqCodec: JsonValueCodec[Seq[StableScalaVersion]] = JsonCodecMaker.make 16 | } 17 | -------------------------------------------------------------------------------- /modules/core/src/main/scala/scala/build/warnings/DeprecatedWarning.scala: -------------------------------------------------------------------------------- 1 | package scala.build.warnings 2 | 3 | import scala.build.Position 4 | import scala.build.errors.Diagnostic.TextEdit 5 | import scala.build.errors.{Diagnostic, Severity} 6 | 7 | final case class DeprecatedWarning( 8 | message: String, 9 | positions: Seq[Position], 10 | override val textEdit: Option[TextEdit] 11 | ) extends Diagnostic { 12 | def severity: Severity = Severity.Warning 13 | } 14 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/DirectiveDescription.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.annotation.StaticAnnotation 4 | 5 | final case class DirectiveDescription(description: String, descriptionMd: String = "") 6 | extends StaticAnnotation 7 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/DirectiveExamples.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.annotation.StaticAnnotation 4 | 5 | final case class DirectiveExamples(examples: String) extends StaticAnnotation 6 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/DirectiveGroupDetails.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | final case class DirectiveGroupDetails( 4 | name: String, 5 | description: String, 6 | usage: String, 7 | descriptionMdOpt: Option[String] = None, 8 | usageMdOpt: Option[String] = None, 9 | examples: Seq[String] = Nil 10 | ) { 11 | def descriptionMd: String = 12 | descriptionMdOpt.getOrElse(description) 13 | def usageMd: String = 14 | usageMdOpt.getOrElse(s"`$usage`") 15 | } 16 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/DirectiveGroupName.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.annotation.StaticAnnotation 4 | 5 | final case class DirectiveGroupName(name: String) extends StaticAnnotation 6 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/DirectiveLevel.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.annotation.StaticAnnotation 4 | import scala.cli.commands.SpecificationLevel 5 | 6 | final case class DirectiveLevel(level: SpecificationLevel) extends StaticAnnotation 7 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/DirectiveName.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.annotation.StaticAnnotation 4 | 5 | final case class DirectiveName(name: String) extends StaticAnnotation 6 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/DirectiveUsage.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.annotation.StaticAnnotation 4 | 5 | final case class DirectiveUsage(usage: String, usageMd: String = "") extends StaticAnnotation 6 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/HasBuildOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.build.errors.BuildException 4 | import scala.build.options.BuildOptions 5 | 6 | trait HasBuildOptions { 7 | def buildOptions: Either[BuildException, BuildOptions] 8 | } 9 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/HasBuildOptionsWithRequirements.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.build.Ops.* 4 | import scala.build.errors.{BuildException, CompositeBuildException} 5 | import scala.build.options.{BuildOptions, WithBuildRequirements} 6 | 7 | trait HasBuildOptionsWithRequirements { 8 | def buildOptionsList: List[Either[BuildException, WithBuildRequirements[BuildOptions]]] 9 | final def buildOptionsWithRequirements 10 | : Either[BuildException, List[WithBuildRequirements[BuildOptions]]] = 11 | buildOptionsList 12 | .sequence 13 | .left.map(CompositeBuildException(_)) 14 | .map(_.toList) 15 | } 16 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/HasBuildRequirements.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.build.errors.BuildException 4 | import scala.build.options.BuildRequirements 5 | 6 | trait HasBuildRequirements { 7 | def buildRequirements: Either[BuildException, BuildRequirements] 8 | } 9 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/directives/ScopedValue.scala: -------------------------------------------------------------------------------- 1 | package scala.build.preprocessing.directives 2 | 3 | import com.virtuslab.using_directives.custom.model.Value 4 | 5 | import scala.build.Positioned 6 | import scala.build.preprocessing.ScopePath 7 | 8 | case class ScopedValue[T <: Value[_]]( 9 | positioned: Positioned[String], 10 | maybeScopePath: Option[ScopePath] = None 11 | ) 12 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/errors/ScalaJsLinkingError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | final class ScalaJsLinkingError extends BuildException("Error linking Scala.js") 4 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/errors/SingleValueExpectedError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.preprocessing.directives.{DirectiveUtil, StrictDirective} 4 | 5 | final class SingleValueExpectedError( 6 | val directive: StrictDirective, 7 | val path: Either[String, os.Path] 8 | ) extends BuildException( 9 | s"Expected a single value for directive ${directive.key} " + 10 | s"(got ${directive.values.length} values: ${directive.values.map(_.get().toString).mkString(", ")})", 11 | positions = DirectiveUtil.positions(directive.values, path) 12 | ) { 13 | assert(directive.stringValuesCount > 1) 14 | } 15 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/errors/UsingFileFromUriError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import java.net.URI 4 | 5 | import scala.build.Position 6 | 7 | final class UsingFileFromUriError(uri: URI, positions: Seq[Position], description: String) 8 | extends BuildException( 9 | message = s"Error using file from $uri - $description", 10 | positions = positions 11 | ) 12 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/errors/WrongJarPathError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | class WrongJarPathError(cause: Throwable) extends BuildException( 4 | message = s"""The jar path argument in the using directives at could not be found! 5 | |${cause.getLocalizedMessage}""".stripMargin, 6 | cause = cause 7 | ) 8 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/errors/WrongJavaHomePathError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | class WrongJavaHomePathError(javaHomeValue: String, cause: Throwable) 4 | extends BuildException( 5 | message = 6 | s"""The java home path argument in the using directives at $javaHomeValue could not be found! 7 | |${cause.getLocalizedMessage}""".stripMargin, 8 | cause = cause 9 | ) 10 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/errors/WrongSourcePathError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.errors 2 | 3 | import scala.build.Position 4 | 5 | class WrongSourcePathError(path: String, cause: Throwable, positions: Seq[Position]) 6 | extends BuildException( 7 | message = s"Invalid path argument '$path' in using directives".stripMargin, 8 | cause = cause, 9 | positions = positions 10 | ) 11 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/preprocessing/ScopePath.scala: -------------------------------------------------------------------------------- 1 | package scala.build.preprocessing 2 | 3 | final case class ScopePath( 4 | root: Either[String, os.Path], 5 | subPath: os.SubPath 6 | ) { 7 | def /(subPath: os.PathChunk): ScopePath = 8 | copy(subPath = this.subPath / subPath) 9 | def path: Either[String, os.Path] = 10 | root 11 | .left.map(r => s"$r/$subPath") 12 | .map(_ / subPath) 13 | } 14 | 15 | object ScopePath { 16 | def fromPath(path: os.Path): ScopePath = { 17 | def root(p: os.Path): os.Path = 18 | if (p.segmentCount > 0) root(p / os.up) else p 19 | val root0 = root(path) 20 | ScopePath(Right(root0), path.subRelativeTo(root0)) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/preprocessing/Scoped.scala: -------------------------------------------------------------------------------- 1 | package scala.build.preprocessing 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final case class Scoped[+T](path: ScopePath, value: T) { 6 | def appliesTo(candidate: ScopePath): Boolean = 7 | path.root == candidate.root && 8 | candidate.subPath.startsWith(path.subPath) 9 | def valueFor(candidate: ScopePath): Option[T] = 10 | if (appliesTo(candidate)) Some(value) else None 11 | 12 | def map[U](f: T => U): Scoped[U] = 13 | copy(value = f(value)) 14 | def mapE[U](f: T => Either[BuildException, U]): Either[BuildException, Scoped[U]] = 15 | f(value).map(u => copy(value = u)) 16 | } 17 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/preprocessing/directives/ClasspathUtils.scala: -------------------------------------------------------------------------------- 1 | package scala.build.preprocessing.directives 2 | 3 | object ClasspathUtils { 4 | extension (classpathItem: os.Path) { 5 | def hasSourceJarSuffix: Boolean = classpathItem.last.endsWith("-sources.jar") 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/preprocessing/directives/DirectivePrefix.scala: -------------------------------------------------------------------------------- 1 | package scala.build.directives 2 | 3 | import scala.annotation.StaticAnnotation 4 | 5 | final case class DirectivePrefix(prefix: String) 6 | extends StaticAnnotation 7 | -------------------------------------------------------------------------------- /modules/directives/src/main/scala/scala/build/preprocessing/directives/ScopedDirective.scala: -------------------------------------------------------------------------------- 1 | package scala.build.preprocessing.directives 2 | 3 | import scala.build.Position 4 | import scala.build.errors.UnusedDirectiveError 5 | import scala.build.preprocessing.ScopePath 6 | 7 | case class ScopedDirective( 8 | directive: StrictDirective, 9 | maybePath: Either[String, os.Path], 10 | cwd: ScopePath 11 | ) { 12 | def unusedDirectiveError: UnusedDirectiveError = { 13 | val values = DirectiveUtil.concatAllValues(this) 14 | val keyPos = Position.File( 15 | maybePath, 16 | (directive.startLine, directive.startColumn), 17 | (directive.startLine, directive.startColumn + directive.key.length()) 18 | ) 19 | new UnusedDirectiveError( 20 | directive.key, 21 | values, 22 | keyPos 23 | ) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /modules/docs-tests/src/test/resources/test.md: -------------------------------------------------------------------------------- 1 | # Testing cat command 2 | 3 | This is test document for Sclicheck 4 | 5 | Cat command can print a content of a file. Let's start with simple file 6 | 7 | ```md title=a.txt 8 | A text 9 | ``` 10 | 11 | Let's read it using `cat`: 12 | 13 | ```bash 14 | cat a.txt 15 | ``` 16 | 17 | 20 | 21 | `cat` fails if file does not exists: 22 | 23 | ```bash fail 24 | cat no_a_file 25 | ``` 26 | -------------------------------------------------------------------------------- /modules/dummy/amm/src/main/scala/AmmDummy.scala: -------------------------------------------------------------------------------- 1 | /** Create an empty class to enforce resolving ivy deps by mill for `amm` module 2 | */ 3 | class AmmDummy 4 | -------------------------------------------------------------------------------- /modules/dummy/scalafmt/src/main/scala/ScalafmtDummy.scala: -------------------------------------------------------------------------------- 1 | /** Create an empty class to enforce resolving ivy deps by mill for `scalafmt` module 2 | */ 3 | class ScalafmtDummy 4 | -------------------------------------------------------------------------------- /modules/generate-reference-doc/src/main/scala/scala/cli/doc/InternalDocOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.doc 2 | 3 | import caseapp.* 4 | 5 | final case class InternalDocOptions( 6 | outputDir: String = "website/docs/reference", 7 | check: Boolean = false 8 | ) { 9 | lazy val outputPath: os.Path = 10 | os.Path(outputDir, os.pwd) 11 | } 12 | 13 | object InternalDocOptions { 14 | implicit lazy val parser: Parser[InternalDocOptions] = Parser.derive 15 | implicit lazy val help: Help[InternalDocOptions] = Help.derive 16 | } 17 | -------------------------------------------------------------------------------- /modules/integration/src/test/resources/test-keys/key.skr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/modules/integration/src/test/resources/test-keys/key.skr -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/BspTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class BspTests212 extends BspTestDefinitions with BspTests2Definitions with Test212 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/BspTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class BspTests3Lts extends BspTestDefinitions with BspTests3Definitions with Test3Lts 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/BspTestsDefault.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class BspTestsDefault extends BspTestDefinitions with BspTests3Definitions with TestDefault 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/CompileTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class CompileTests3Lts extends CompileTestDefinitions with CompileTests3StableDefinitions 4 | with Test3Lts 5 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/CompileTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class CompileTests3NextRc extends CompileTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/CompileTestsDefault.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class CompileTestsDefault extends CompileTestDefinitions with CompileTests3StableDefinitions 4 | with TestDefault { 5 | test( 6 | s"compile --cross $actualScalaVersion with ${Constants.scala213} and ${Constants.scala212}" 7 | ) { 8 | val crossVersions = Seq(actualScalaVersion, Constants.scala213, Constants.scala212) 9 | simpleInputs 10 | .add(os.rel / "project.scala" -> s"//> using scala ${crossVersions.mkString(" ")}") 11 | .fromRoot { root => 12 | os.proc(TestUtil.cli, "compile", ".", "--cross", "--power", extraOptions).call(cwd = root) 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/DocTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class DocTests212 extends DocTestDefinitions with Test212 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/DocTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class DocTests213 extends DocTestDefinitions with Test213 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/DocTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class DocTests3Lts extends DocTestDefinitions with Test3Lts 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/DocTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class DocTests3NextRc extends DocTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportJsonTestsDefault.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportJsonTestsDefault extends ExportJsonTestDefinitions with TestDefault 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMavenTest3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportMavenTest3NextRc extends ExportMavenTestDefinitions with Test3NextRc with MavenScala {} 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMavenTestJava.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | import scala.util.Properties 4 | 5 | class ExportMavenTestJava extends ExportMavenTestDefinitions with Test3Lts with MavenJava { 6 | // disable running scala tests in java maven export 7 | override def runExportTests: Boolean = false 8 | if (!Properties.isWin) test("pure java") { 9 | simpleTest( 10 | ExportTestProjects.pureJavaTest("ScalaCliJavaTest"), 11 | mainClass = Some("ScalaCliJavaTest") 12 | ) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMavenTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportMavenTests212 extends ExportMavenTestDefinitions with Test212 with MavenScala 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMavenTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportMavenTests213 extends ExportMavenTestDefinitions with Test213 with MavenScala 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMavenTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportMavenTests3Lts extends ExportMavenTestDefinitions with Test3Lts with MavenScala 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMillTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportMillTests212 extends ExportMillTestDefinitions with Test212 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMillTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportMillTests213 extends ExportMillTestDefinitions with Test213 { 4 | if (runExportTests) { 5 | test("scalac options") { 6 | simpleTest(ExportTestProjects.scalacOptionsScala2Test(actualScalaVersion), mainClass = None) 7 | } 8 | test("pure java") { 9 | simpleTest(ExportTestProjects.pureJavaTest("ScalaCliJavaTest"), mainClass = None) 10 | } 11 | test("custom JAR") { 12 | simpleTest(ExportTestProjects.customJarTest(actualScalaVersion), mainClass = None) 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMillTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportMillTests3Lts extends ExportMillTestDefinitions with Test3Lts 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMillTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportMillTests3NextRc extends ExportMillTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportMillTestsDefault.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportMillTestsDefault extends ExportMillTestDefinitions with TestDefault 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportSbtTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportSbtTests212 extends ExportSbtTestDefinitions with Test212 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportSbtTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportSbtTests213 extends ExportSbtTestDefinitions with Test213 { 4 | if (runExportTests) { 5 | test("scalac options") { 6 | simpleTest(ExportTestProjects.scalacOptionsScala2Test(actualScalaVersion), mainClass = None) 7 | } 8 | test("pure java") { 9 | simpleTest( 10 | ExportTestProjects.pureJavaTest("ScalaCliJavaTest"), 11 | mainClass = None, 12 | extraExportArgs = Seq("--sbt-setting=fork := true") 13 | ) 14 | } 15 | test("custom JAR") { 16 | simpleTest(ExportTestProjects.customJarTest(actualScalaVersion), mainClass = None) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportSbtTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportSbtTests3Lts extends ExportSbtTestDefinitions with Test3Lts 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportSbtTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportSbtTests3NextRc extends ExportSbtTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ExportSbtTestsDefault.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ExportSbtTestsDefault extends ExportSbtTestDefinitions with TestDefault 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/FixTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class FixTests212 extends FixTestDefinitions with Test212 { 4 | override val scalafixUnusedRuleOption: String = "-Ywarn-unused" 5 | } 6 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/FixTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class FixTests213 extends FixTestDefinitions with Test213 { 4 | override val scalafixUnusedRuleOption: String = "-Wunused" 5 | } 6 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/FixTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class FixTests3Lts extends FixTestDefinitions with Test3Lts { 4 | override val scalafixUnusedRuleOption: String = "-Wunused:all" 5 | } 6 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/FixTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class FixTests3NextRc extends FixTestDefinitions with Test3NextRc { 4 | override val scalafixUnusedRuleOption: String = "-Wunused:all" 5 | } 6 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/FixTestsDefault.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class FixTestsDefault extends FixTestDefinitions with TestDefault { 4 | override val scalafixUnusedRuleOption: String = "-Wunused:all" 5 | } 6 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/MavenTestHelper.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | trait MavenTestHelper { 4 | 5 | protected def mavenCommand(args: String*): os.proc = os.proc(maven, args) 6 | 7 | protected lazy val maven: os.Shellable = 8 | Seq[os.Shellable]( 9 | "mvn", 10 | "clean", 11 | "compile" 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PackageTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PackageTests212 extends PackageTestDefinitions with Test212 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PackageTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PackageTests213 extends PackageTestDefinitions with Test213 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PackageTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PackageTests3Lts extends PackageTestDefinitions with Test3Lts 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PackageTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PackageTests3NextRc extends PackageTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PublishLocalTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PublishLocalTests212 extends PublishLocalTestDefinitions with Test212 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PublishLocalTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PublishLocalTests213 extends PublishLocalTestDefinitions with Test213 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PublishLocalTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PublishLocalTests3Lts extends PublishLocalTestDefinitions with Test3Lts 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PublishLocalTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PublishLocalTests3NextRc extends PublishLocalTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PublishTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PublishTests212 extends PublishTestDefinitions with Test212 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PublishTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PublishTests213 extends PublishTestDefinitions with Test213 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PublishTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PublishTests3Lts extends PublishTestDefinitions with Test3Lts 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/PublishTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class PublishTests3NextRc extends PublishTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ReplTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ReplTests212 extends ReplTestDefinitions with ReplAmmoniteTestDefinitions with Test212 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ReplTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ReplTests213 extends ReplTestDefinitions with ReplAmmoniteTestDefinitions with Test213 { 4 | test("repl custom repositories work".flaky) { 5 | TestInputs.empty.fromRoot { root => 6 | os.proc( 7 | TestUtil.cli, 8 | "repl", 9 | "--repl-dry-run", 10 | "--scala", 11 | Constants.scalaSnapshot213, 12 | "--repository", 13 | "https://scala-ci.typesafe.com/artifactory/scala-integration" 14 | ).call(cwd = root) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ReplTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ReplTests3Lts extends ReplTestDefinitions with Test3Lts 4 | with ReplAmmoniteTestDefinitions 5 | with ReplAmmoniteTests3StableDefinitions 6 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/ReplTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class ReplTests3NextRc extends ReplTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/RunTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class RunTests3Lts extends RunTestDefinitions with Test3Lts 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/RunTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class RunTests3NextRc extends RunTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/SparkTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class SparkTests213 extends SparkTestDefinitions with Test213 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/TestTests212.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class TestTests212 extends TestTestDefinitions with Test212 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/TestTests213.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class TestTests213 extends TestTestDefinitions with Test213 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/TestTests3Lts.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class TestTests3Lts extends TestTestDefinitions with Test3Lts 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/TestTests3NextRc.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.integration 2 | 3 | class TestTests3NextRc extends TestTestDefinitions with Test3NextRc 4 | -------------------------------------------------------------------------------- /modules/integration/src/test/scala/scala/cli/integration/package.scala: -------------------------------------------------------------------------------- 1 | package scala.cli 2 | 3 | import coursier.core.Version 4 | 5 | import java.util.concurrent.CompletableFuture 6 | 7 | import scala.concurrent.{Future, Promise} 8 | import scala.util.{Failure, Success} 9 | 10 | package object integration { 11 | 12 | implicit class CompletableFutureToScala[T](private val cf: CompletableFuture[T]) extends AnyVal { 13 | def asScala: Future[T] = { 14 | val p = Promise[T]() 15 | cf.handle { (t, ex) => 16 | val res = 17 | if (ex == null) Success(t) 18 | else Failure(ex) 19 | p.complete(res) 20 | } 21 | p.future 22 | } 23 | } 24 | 25 | implicit class VersionString(private val s: String) { 26 | def coursierVersion: Version = Version(s) 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/ScalaArtifacts.scala: -------------------------------------------------------------------------------- 1 | package scala.build 2 | 3 | import dependency.{AnyDependency, ScalaParameters} 4 | 5 | final case class ScalaArtifacts( 6 | compilerDependencies: Seq[AnyDependency], 7 | compilerArtifacts: Seq[(String, os.Path)], 8 | compilerPlugins: Seq[(AnyDependency, String, os.Path)], 9 | scalaJsCli: Seq[os.Path], 10 | scalaNativeCli: Seq[os.Path], 11 | internalDependencies: Seq[AnyDependency], 12 | extraDependencies: Seq[AnyDependency], 13 | params: ScalaParameters, 14 | bridgeJarsOpt: Option[Seq[os.Path]] 15 | ) { 16 | 17 | lazy val compilerClassPath: Seq[os.Path] = 18 | compilerArtifacts.map(_._2) 19 | } 20 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/actionable/ActionablePreprocessor.scala: -------------------------------------------------------------------------------- 1 | package scala.build.actionable 2 | 3 | import scala.build.Ops.* 4 | import scala.build.errors.{BuildException, CompositeBuildException, Diagnostic} 5 | import scala.build.options.BuildOptions 6 | 7 | object ActionablePreprocessor { 8 | val actionableHandlers = Seq[ActionableHandler[_]]( 9 | ActionableDependencyHandler 10 | ) 11 | 12 | def generateActionableDiagnostics( 13 | options: BuildOptions 14 | ): Either[BuildException, Seq[Diagnostic]] = 15 | actionableHandlers 16 | .map(handler => handler.createActionableDiagnostics(options)) 17 | .sequence 18 | .left.map(CompositeBuildException(_)) 19 | .map(_.flatten) 20 | 21 | } 22 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/actionable/errors/ActionableHandlerError.scala: -------------------------------------------------------------------------------- 1 | package scala.build.actionable.errors 2 | 3 | import scala.build.errors.BuildException 4 | 5 | final class ActionableHandlerError(message: String) 6 | extends BuildException(message) 7 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/internal/ExternalBinary.scala: -------------------------------------------------------------------------------- 1 | package scala.build.internal 2 | 3 | import java.io.File 4 | 5 | sealed abstract class ExternalBinary extends Product with Serializable { 6 | def command: Seq[String] 7 | } 8 | 9 | object ExternalBinary { 10 | final case class Native(path: os.Path) extends ExternalBinary { 11 | def command: Seq[String] = 12 | Seq(path.toString) 13 | } 14 | final case class ClassPath( 15 | java: String, 16 | classPath: Seq[os.Path], 17 | mainClass: String 18 | ) extends ExternalBinary { 19 | def command: Seq[String] = 20 | Seq(java, "-cp", classPath.map(_.toString).mkString(File.pathSeparator), mainClass) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/internal/ExternalBinaryParams.scala: -------------------------------------------------------------------------------- 1 | package scala.build.internal 2 | 3 | import coursier.core.Repository 4 | 5 | final case class ExternalBinaryParams( 6 | binaryUrl: String, 7 | changing: Boolean, 8 | launcherPrefix: String, 9 | dependencies: Seq[dependency.Dependency], 10 | mainClass: String, 11 | forcedVersions: Seq[(dependency.Module, String)] = Nil, 12 | extraRepos: Seq[Repository] = Nil 13 | ) 14 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/HasScope.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options 2 | 3 | final case class HasScope[+T]( 4 | scope: Scope, 5 | value: T 6 | ) { 7 | def valueFor(currentScope: Scope): Option[T] = 8 | if (currentScope == scope) Some(value) 9 | else None 10 | def valueForInheriting(currentScope: Scope): Option[T] = 11 | if (currentScope.allScopes.contains(scope)) Some(value) 12 | else None 13 | def map[U](f: T => U): HasScope[U] = 14 | copy(value = f(value)) 15 | } 16 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/InternalDependenciesOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options 2 | 3 | final case class InternalDependenciesOptions( 4 | addTestRunnerDependencyOpt: Option[Boolean] = None 5 | ) { 6 | def addTestRunnerDependency: Boolean = 7 | addTestRunnerDependencyOpt.getOrElse(false) 8 | } 9 | 10 | object InternalDependenciesOptions { 11 | implicit val hasHashData: HasHashData[InternalDependenciesOptions] = HasHashData.derive 12 | implicit val monoid: ConfigMonoid[InternalDependenciesOptions] = ConfigMonoid.derive 13 | } 14 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/MaybeScalaVersion.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options 2 | 3 | final case class MaybeScalaVersion(versionOpt: Option[String] = None) { 4 | def asString = versionOpt.getOrElse(MaybeScalaVersion.noneStr) 5 | } 6 | 7 | object MaybeScalaVersion { 8 | 9 | private def noneStr = "none" 10 | 11 | def none: MaybeScalaVersion = 12 | MaybeScalaVersion(noneStr) 13 | 14 | def apply(s: String): MaybeScalaVersion = 15 | if (s == noneStr) MaybeScalaVersion(None) 16 | else MaybeScalaVersion(Some(s)) 17 | 18 | implicit lazy val hashedType: HashedType[MaybeScalaVersion] = { v => 19 | HashedType.string.hashedValue(v.versionOpt.getOrElse("no-scala-version")) 20 | } 21 | implicit lazy val hasHashData: HasHashData[MaybeScalaVersion] = 22 | HasHashData.derive 23 | } 24 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/ScalaSigningCliOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options 2 | 3 | final case class ScalaSigningCliOptions( 4 | javaArgs: Seq[String] = Nil, 5 | forceExternal: Option[Boolean] = None, 6 | forceJvm: Option[Boolean] = None, 7 | signingCliVersion: Option[String] = None 8 | ) 9 | 10 | object ScalaSigningCliOptions { 11 | implicit val hasHashData: HasHashData[ScalaSigningCliOptions] = HasHashData.derive 12 | implicit val monoid: ConfigMonoid[ScalaSigningCliOptions] = ConfigMonoid.derive 13 | } 14 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/Scope.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options 2 | 3 | sealed abstract class Scope(val name: String, private val index: Int) extends Product 4 | with Serializable { 5 | def inherits: Seq[Scope] = Nil 6 | lazy val allScopes: Set[Scope] = inherits.toSet + this 7 | def asScopeRequirement: BuildRequirements.ScopeRequirement = 8 | BuildRequirements.ScopeRequirement(this) 9 | } 10 | object Scope { 11 | case object Main extends Scope("main", 0) 12 | case object Test extends Scope("test", 1) { 13 | override def inherits: Seq[Scope] = 14 | Seq(Main) 15 | } 16 | 17 | val all: Seq[Scope] = Seq(Main, Test) 18 | 19 | implicit val ordering: Ordering[Scope] = 20 | Ordering.Int.on(_.index) 21 | } 22 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/ScriptOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options 2 | 3 | final case class ScriptOptions( 4 | forceObjectWrapper: Option[Boolean] = None 5 | ) 6 | 7 | object ScriptOptions { 8 | implicit val hasHashData: HasHashData[ScriptOptions] = HasHashData.derive 9 | implicit val monoid: ConfigMonoid[ScriptOptions] = ConfigMonoid.derive 10 | } 11 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/SemanticDbOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options 2 | 3 | case class SemanticDbOptions( 4 | generateSemanticDbs: Option[Boolean] = None, 5 | semanticDbTargetRoot: Option[os.Path] = None, 6 | semanticDbSourceRoot: Option[os.Path] = None 7 | ) 8 | 9 | object SemanticDbOptions { 10 | implicit val hasHashData: HasHashData[SemanticDbOptions] = HasHashData.derive 11 | implicit val monoid: ConfigMonoid[SemanticDbOptions] = ConfigMonoid.derive 12 | } 13 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/SourceGeneratorOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options 2 | 3 | final case class SourceGeneratorOptions( 4 | useBuildInfo: Option[Boolean] = None, 5 | projectVersion: Option[String] = None, 6 | computeVersion: Option[ComputeVersion] = None 7 | ) 8 | 9 | object SourceGeneratorOptions { 10 | /* Using HasHashData.nop here (SourceGeneratorOptions values are not used during compilation) */ 11 | implicit val hasHashData: HasHashData[SourceGeneratorOptions] = HasHashData.nop 12 | implicit val monoid: ConfigMonoid[SourceGeneratorOptions] = ConfigMonoid.derive 13 | } 14 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/TestOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options 2 | 3 | import scala.build.Positioned 4 | 5 | final case class TestOptions( 6 | frameworks: Seq[Positioned[String]] = Nil, 7 | testOnly: Option[String] = None 8 | ) 9 | 10 | object TestOptions { 11 | implicit val hasHashData: HasHashData[TestOptions] = HasHashData.derive 12 | implicit val monoid: ConfigMonoid[TestOptions] = ConfigMonoid.derive 13 | } 14 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/packaging/DebianOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options.packaging 2 | 3 | import scala.build.options.ConfigMonoid 4 | 5 | final case class DebianOptions( 6 | conflicts: List[String] = Nil, 7 | dependencies: List[String] = Nil, 8 | architecture: Option[String] = None, 9 | priority: Option[String] = None, 10 | section: Option[String] = None 11 | ) 12 | 13 | object DebianOptions { 14 | implicit val monoid: ConfigMonoid[DebianOptions] = ConfigMonoid.derive 15 | } 16 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/packaging/DockerOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options.packaging 2 | 3 | import scala.build.options.ConfigMonoid 4 | 5 | final case class DockerOptions( 6 | from: Option[String] = None, 7 | imageRegistry: Option[String] = None, 8 | imageRepository: Option[String] = None, 9 | imageTag: Option[String] = None, 10 | cmd: Option[String] = None, 11 | isDockerEnabled: Option[Boolean] = None 12 | ) 13 | 14 | object DockerOptions { 15 | 16 | implicit val monoid: ConfigMonoid[DockerOptions] = ConfigMonoid.derive 17 | 18 | } 19 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/packaging/RedHatOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options.packaging 2 | 3 | import scala.build.options.ConfigMonoid 4 | 5 | final case class RedHatOptions( 6 | license: Option[String] = None, 7 | release: Option[String] = None, 8 | architecture: Option[String] = None 9 | ) 10 | 11 | object RedHatOptions { 12 | implicit val monoid: ConfigMonoid[RedHatOptions] = ConfigMonoid.derive 13 | } 14 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/packaging/WindowsOptions.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options.packaging 2 | 3 | import scala.build.options.ConfigMonoid 4 | 5 | final case class WindowsOptions( 6 | licensePath: Option[os.Path] = None, 7 | productName: Option[String] = None, 8 | exitDialog: Option[String] = None, 9 | suppressValidation: Option[Boolean] = None, 10 | extraConfig: List[String] = Nil, 11 | is64Bits: Option[Boolean] = None, 12 | installerVersion: Option[String] = None, 13 | wixUpgradeCodeGuid: Option[String] = None 14 | ) 15 | 16 | object WindowsOptions { 17 | implicit val monoid: ConfigMonoid[WindowsOptions] = ConfigMonoid.derive 18 | } 19 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/publish/ConfigPasswordOption.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options.publish 2 | 3 | import scala.cli.signing.shared.PasswordOption 4 | 5 | /** Can be either a [[PasswordOption]], or something like "config:…" pointing at a config entry */ 6 | sealed abstract class ConfigPasswordOption extends Product with Serializable 7 | 8 | object ConfigPasswordOption { 9 | final case class ActualOption(option: PasswordOption) extends ConfigPasswordOption 10 | final case class ConfigOption(fullName: String) extends ConfigPasswordOption { 11 | private lazy val split = fullName.split('.') 12 | def prefix: Seq[String] = split.dropRight(1).toSeq 13 | def name: String = split.last 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/options/src/main/scala/scala/build/options/publish/Signer.scala: -------------------------------------------------------------------------------- 1 | package scala.build.options.publish 2 | 3 | import scala.build.Positioned 4 | import scala.build.errors.MalformedInputError 5 | 6 | sealed abstract class Signer extends Product with Serializable 7 | 8 | object Signer { 9 | case object Gpg extends Signer 10 | case object BouncyCastle extends Signer 11 | case object Nop extends Signer 12 | 13 | def parse(input: Positioned[String]): Either[MalformedInputError, Signer] = 14 | input.value match { 15 | case "gpg" => Right(Signer.Gpg) 16 | case "bc" | "bouncycastle" => Right(Signer.BouncyCastle) 17 | case "nop" | "none" => Right(Signer.Nop) 18 | case _ => Left(new MalformedInputError("signer", input.value, "gpg|bc", input.positions)) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/scala-cli-bsp/src/main/java/scala/build/bsp/ScalaScriptBuildServer.java: -------------------------------------------------------------------------------- 1 | package scala.build.bsp; 2 | 3 | import org.eclipse.lsp4j.jsonrpc.services.JsonRequest; 4 | 5 | import java.util.concurrent.CompletableFuture; 6 | 7 | public interface ScalaScriptBuildServer { 8 | 9 | @JsonRequest("buildTarget/wrappedSources") 10 | CompletableFuture buildTargetWrappedSources(WrappedSourcesParams params); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/scala3-graal-processor/src/scala/cli/graal/CoursierCacheProcessor.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.graal 2 | 3 | import java.io.File 4 | import java.nio.channels.FileChannel 5 | 6 | object CoursierCacheProcessor { 7 | def main(args: Array[String]) = { 8 | val List(cacheDir, classpath) = args.toList 9 | val cache = DirCache(os.Path(cacheDir, os.pwd)) 10 | 11 | val newCp = BytecodeProcessor.processClassPath(classpath, cache).map(_.nioPath) 12 | 13 | println(newCp.mkString(File.pathSeparator)) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/scala3-graal/src/main/scala/scala/cli/graal/ClassPathEntry.scala: -------------------------------------------------------------------------------- 1 | package scala.cli.graal 2 | 3 | import java.nio.file.Path 4 | 5 | sealed trait ClassPathEntry { 6 | def nioPath: Path = path.toNIO 7 | def path: os.Path 8 | def modified = true 9 | } 10 | 11 | case class Unmodified(path: os.Path) extends ClassPathEntry { 12 | override def modified: Boolean = false 13 | } 14 | case class Processed(path: os.Path, original: os.Path, cache: JarCache) extends ClassPathEntry 15 | case class CreatedEntry(path: os.Path) extends ClassPathEntry 16 | 17 | case class PathingJar(jar: ClassPathEntry, entries: Seq[ClassPathEntry]) extends ClassPathEntry { 18 | override def path: os.Path = jar.path 19 | } 20 | -------------------------------------------------------------------------------- /modules/scalaparse/src/main/scala/build/internal/ImportTree.scala: -------------------------------------------------------------------------------- 1 | package scala.build.internal 2 | 3 | // adapted from https://github.com/com-lihaoyi/Ammonite/blob/9be39debc367abad5f5541ef58f4b986b2a8d045/amm/util/src/main/scala/ammonite/util/Model.scala#L256-L266 4 | 5 | case class ImportTree( 6 | prefix: Seq[String], 7 | mappings: Option[ImportTree.ImportMapping], 8 | start: Int, 9 | end: Int 10 | ) { 11 | lazy val strippedPrefix: Seq[String] = 12 | prefix.takeWhile(_(0) == '$').map(_.stripPrefix("$")) 13 | } 14 | 15 | object ImportTree { 16 | type ImportMapping = Seq[(String, Option[String])] 17 | } 18 | -------------------------------------------------------------------------------- /modules/tasty-lib/src/main/scala/scala/build/tastylib/TastyFormat.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Scala (https://www.scala-lang.org) 3 | * 4 | * Copyright EPFL and Lightbend, Inc. 5 | * 6 | * Licensed under Apache License 2.0 7 | * (http://www.apache.org/licenses/LICENSE-2.0). 8 | * 9 | * See the NOTICE file distributed with this work for 10 | * additional information regarding copyright ownership. 11 | */ 12 | 13 | // Originally adapted from https://github.com/scala/scala/blob/20ac944346a93ba747811e80f8f67a09247cb987/src/compiler/scala/tools/tasty/TastyFormat.scala 14 | 15 | package scala.build.tastylib 16 | 17 | object TastyFormat { 18 | 19 | final val header: Array[Int] = Array(0x5c, 0xa1, 0xab, 0x1f) 20 | 21 | final val MajorVersion: Int = 28 22 | 23 | object NameTags { 24 | final val UTF8 = 1 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /modules/tasty-lib/src/main/scala/scala/build/tastylib/TastyName.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Scala (https://www.scala-lang.org) 3 | * 4 | * Copyright EPFL and Lightbend, Inc. 5 | * 6 | * Licensed under Apache License 2.0 7 | * (http://www.apache.org/licenses/LICENSE-2.0). 8 | * 9 | * See the NOTICE file distributed with this work for 10 | * additional information regarding copyright ownership. 11 | */ 12 | 13 | // Originally adapted from https://github.com/scala/scala/blob/20ac944346a93ba747811e80f8f67a09247cb987/src/compiler/scala/tools/tasty/TastyName.scala 14 | 15 | package scala.build.tastylib 16 | 17 | object TastyName { 18 | final case class SimpleName(raw: String) extends TastyName { 19 | override def toString: String = raw 20 | } 21 | } 22 | 23 | sealed abstract class TastyName extends Product with Serializable 24 | -------------------------------------------------------------------------------- /modules/tasty-lib/src/main/scala/scala/build/tastylib/UnpickleException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Scala (https://www.scala-lang.org) 3 | * 4 | * Copyright EPFL and Lightbend, Inc. 5 | * 6 | * Licensed under Apache License 2.0 7 | * (http://www.apache.org/licenses/LICENSE-2.0). 8 | * 9 | * See the NOTICE file distributed with this work for 10 | * additional information regarding copyright ownership. 11 | */ 12 | 13 | // Adapted from https://github.com/scala/scala/blob/20ac944346a93ba747811e80f8f67a09247cb987/src/compiler/scala/tools/tasty/UnpickleException.scala 14 | 15 | package scala.build.tastylib 16 | 17 | class UnpickleException(msg: String) extends Exception(msg) 18 | -------------------------------------------------------------------------------- /project/musl-image/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM messense/rust-musl-cross@sha256:47a3721b3e186abfd705feb1e03bf1d5212357ea26762cceef11530e0a2f2c7c 2 | ADD setup.sh /setup.sh 3 | RUN /setup.sh 4 | -------------------------------------------------------------------------------- /project/musl-image/setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | cd /usr/local/musl/bin 5 | 6 | for i in x86_64-unknown-linux-musl-*; do 7 | dest="$(echo "$i" | sed 's/-unknown//')" 8 | ln -s "$i" "$dest" 9 | done 10 | -------------------------------------------------------------------------------- /project/package.mill.scala: -------------------------------------------------------------------------------- 1 | package build.project 2 | -------------------------------------------------------------------------------- /project/utils/package.mill.scala: -------------------------------------------------------------------------------- 1 | package build.project.utils 2 | import java.util.Locale 3 | 4 | lazy val isArmArchitecture: Boolean = 5 | sys.props.getOrElse("os.arch", "").toLowerCase(Locale.ROOT) == "aarch64" 6 | -------------------------------------------------------------------------------- /scala-cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | READLINK="readlink" 5 | if [ "$(uname)" = "Darwin" ]; then 6 | READLINK="greadlink" 7 | if ! which "$READLINK" >/dev/null 2>&1; then 8 | echo "greadlink not found. Install it with" 9 | echo " brew install coreutils" 10 | exit 1 11 | fi 12 | fi 13 | DIR="$(dirname "$("$READLINK" -f "${BASH_SOURCE[0]}")")" 14 | LAUNCHER_DIR="$DIR/out/cli/base-image/nativeImage.dest" 15 | 16 | if [ ! -x "$LAUNCHER_DIR/scala-cli" ]; then 17 | echo "native-image launcher not built yet." 1>&2 18 | echo "In order to build it, go in $DIR, and run" 1>&2 19 | echo 1>&2 20 | echo " ./mill 'cli[]'.nativeImage" 1>&2 21 | exit 1 22 | fi 23 | 24 | export PATH="$LAUNCHER_DIR:$PATH" 25 | exec scala-cli "$@" 26 | -------------------------------------------------------------------------------- /scala-cli-src: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" 4 | LAUNCHER="$(cd "$SCRIPT_DIR" && ./mill show 'cli[]'.launcher /dev/null && pwd) 6 | 7 | docker image inspect node:16 > /dev/null || docker pull node:16 8 | 9 | if [ "$1" == "start" ]; then 10 | args="$1 -h 0.0.0.0 ${@:2}" 11 | else 12 | args="$@" 13 | fi 14 | 15 | docker run -p 127.0.0.1:3000:3000 -it -v $SCRIPT_DIR:/data -w /data node:16 yarn $args -------------------------------------------------------------------------------- /website/sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | module.exports = { 13 | // By default, Docusaurus generates a sidebar from the docs folder structure 14 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], 15 | 16 | // But you can create a sidebar manually 17 | /* 18 | tutorialSidebar: [ 19 | { 20 | type: 'category', 21 | label: 'Tutorial', 22 | items: ['hello'], 23 | }, 24 | ], 25 | */ 26 | }; 27 | -------------------------------------------------------------------------------- /website/src/components/BigHeader.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function BigHeader(props){ 4 | return
5 |

6 | {props.title} 7 |

8 |
9 | } -------------------------------------------------------------------------------- /website/src/components/DownloadButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | class DownloadButton extends React.Component { 4 | 5 | constructor(props) { 6 | super(props); 7 | 8 | this.handleClick = this.handleClick.bind(this); 9 | } 10 | 11 | handleClick(e) { 12 | window.location.href=this.props.href; 13 | } 14 | 15 | render() { 16 | return ( 17 | 23 | ); 24 | } 25 | } 26 | 27 | export default DownloadButton; -------------------------------------------------------------------------------- /website/src/components/IconBox.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function IconBox(props){ 4 | return
5 |
6 |
7 | {!props.icon ? "" : {props.title}} 8 |
9 |
{props.title}
10 |
{props.children}
11 |
12 |
13 | } -------------------------------------------------------------------------------- /website/src/components/Layouts.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export function HeaderSection(props){ 4 | return
5 |
6 | {props.children} 7 |
8 |
9 | {props.image ? : ""} 10 |
11 |
12 | } 13 | 14 | export function TitledSection(props){ 15 | return
16 |
17 |

{props.title}

18 |
19 |
20 | {props.children} 21 |
22 |
23 | } 24 | 25 | -------------------------------------------------------------------------------- /website/src/components/MarkdownComponents.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactPlayer from 'react-player' 3 | 4 | export function ChainedSnippets({children}){ 5 | return ( 6 |
7 | {children} 8 |
9 | ) 10 | } 11 | 12 | export function GiflikeVideo({url}){ 13 | return 17 | } -------------------------------------------------------------------------------- /website/src/components/Section.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function Section(props){ 4 | return
5 | {props.children} 6 |
7 | } -------------------------------------------------------------------------------- /website/src/components/SectionAbout.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function SectionAbout(props){ 4 | const id = props.title.toLowerCase().split(" ").join("-") 5 | const colBigTitle = props.colBigTitle || 3 6 | const link = >_ 7 | return
8 |
{link}
9 |
10 | {link} {props.title} 11 |
12 |
13 | {props.children} 14 |
15 |
16 | } -------------------------------------------------------------------------------- /website/src/components/SmallHeader.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function SmallHeader(props){ 4 | return
5 |

{props.title}

6 |
7 | {props.children} 8 |
9 |
10 | } -------------------------------------------------------------------------------- /website/src/components/TitleSection.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function TitleSection(props){ 4 | return
5 |
6 | {props.children} 7 |
8 |
9 | {props.right} 10 |
11 |
12 | } -------------------------------------------------------------------------------- /website/src/components/UseCase.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Section from './Section'; 3 | import YellowBanner from './YellowBanner'; 4 | import allFeatures from './features'; 5 | import Layout from '@theme/Layout'; 6 | import BigHeader from './BigHeader'; 7 | 8 | export default function UseCase(props){ 9 | return 10 |
11 | 12 | {props.children} 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | {allFeatures().filter(f => f.props[props.id])} 21 |
22 |
23 |
24 | } -------------------------------------------------------------------------------- /website/src/components/YellowBanner.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Section from './Section'; 3 | import ThemedImage from '@theme/ThemedImage'; 4 | 5 | export default function YellowBanner(props){ 6 | return
7 |
8 |
9 |

{props.title}

10 |
11 | {props.children} 12 |
13 |
14 |
15 |
16 | 24 |
25 |
26 |
27 |
28 | } -------------------------------------------------------------------------------- /website/src/components/osUtils.js: -------------------------------------------------------------------------------- 1 | export const currentOs = () => { 2 | const isCurrentOsEqual = (osShortName) => { 3 | if(typeof window !== "undefined") { 4 | return window.navigator.userAgent.indexOf(osShortName) !== -1 5 | } 6 | return false 7 | } 8 | if(isCurrentOsEqual("Win")) return "windows" 9 | if(isCurrentOsEqual("Mac")) return "mac" 10 | else return "linux" 11 | } -------------------------------------------------------------------------------- /website/src/css/custom.css: -------------------------------------------------------------------------------- 1 | .section { 2 | margin-top: 130px; 3 | margin-bottom: 130px; 4 | } 5 | 6 | .section-image-box.image-left .section-image-box__row-text { 7 | order: 2; 8 | } 9 | .section-image-box.image-left .section-image-box__row-image { 10 | order: 1; 11 | } 12 | .section-image-box__row { 13 | margin-bottom: 80px; 14 | } 15 | 16 | .section-image-box__row:nth-child(even) { 17 | flex-direction: row-reverse; 18 | } 19 | 20 | /*TODO*/ 21 | .feature-row:nth-child(even) .col--1:first-child { 22 | display: none; 23 | } 24 | 25 | /*# sourceMappingURL=custom.css.map */ 26 | -------------------------------------------------------------------------------- /website/src/css/custom.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["../scss/style.scss","../scss/components/section-image-box.scss"],"names":[],"mappings":"AACA;EAEI;EACA;;;ACCI;EACI;;AAEJ;EACI;;AAIR;EACI","file":"custom.css"} -------------------------------------------------------------------------------- /website/src/pages/education.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import UseCase from "../components/UseCase" 4 | 5 | const Index = (props) => { 6 | return 13 |

Scala CLI is designed in a way so you can focus on learning, not struggle with installation or build tool.

14 |
; 15 | }; 16 | 17 | export default Index; 18 | -------------------------------------------------------------------------------- /website/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /* stylelint-disable docusaurus/copyright-header */ 2 | 3 | /** 4 | * CSS files with the .module.css suffix will be treated as CSS modules 5 | * and scoped locally. 6 | */ 7 | 8 | .heroBanner { 9 | padding: 4rem 0; 10 | text-align: center; 11 | position: relative; 12 | overflow: hidden; 13 | } 14 | 15 | @media screen and (max-width: 966px) { 16 | .heroBanner { 17 | padding: 2rem; 18 | } 19 | } 20 | 21 | .buttons { 22 | display: flex; 23 | align-items: center; 24 | justify-content: center; 25 | } 26 | -------------------------------------------------------------------------------- /website/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /website/src/pages/projects.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import UseCase from "../components/UseCase" 4 | 5 | const Index = (props) => { 6 | return 13 |

Scala CLI provides all the functionality to easily maintain single module projects like cli apps or simple microservices.

14 |
; 15 | }; 16 | 17 | export default Index; 18 | -------------------------------------------------------------------------------- /website/src/pages/prototyping.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import UseCase from "../components/UseCase" 4 | 5 | const Index = (props) => { 6 | return 13 |

Have you ever wasted time prototyping, experimenting or reproducing a nasty bug by testing in a different environment than you intended?

14 | 15 |

With Scala CLI you can explicitly define Scala or JVM versions, platform, compiler options and dependencies by setting them as arguments.

16 |
; 17 | }; 18 | 19 | export default Index; 20 | -------------------------------------------------------------------------------- /website/src/theme/Root.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Head from '@docusaurus/Head'; 3 | 4 | 5 | // Default implementation, that you can customize 6 | function Root({children}) { 7 | return <> 8 | 9 | 16 | 17 | {children} 18 | ; 19 | } 20 | 21 | export default Root; -------------------------------------------------------------------------------- /website/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/.nojekyll -------------------------------------------------------------------------------- /website/static/CNAME: -------------------------------------------------------------------------------- 1 | scala-cli.virtuslab.org -------------------------------------------------------------------------------- /website/static/img/buildtools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/buildtools.png -------------------------------------------------------------------------------- /website/static/img/commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/commands.png -------------------------------------------------------------------------------- /website/static/img/dark/buildtools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/buildtools.png -------------------------------------------------------------------------------- /website/static/img/dark/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/demo.gif -------------------------------------------------------------------------------- /website/static/img/dark/envs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/envs.gif -------------------------------------------------------------------------------- /website/static/img/dark/fast-scala-cli.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/fast-scala-cli.gif -------------------------------------------------------------------------------- /website/static/img/dark/features.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/features.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/complete-install.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/complete-install.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/defaults.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/defaults.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/demo.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/education.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/education.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/embeddable_scripts.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/embeddable_scripts.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/fast-scripts.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/fast-scripts.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/learning_curve.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/learning_curve.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/powerful_scripts.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/powerful_scripts.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/projects.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/projects.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/prototyping.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/prototyping.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/scripting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/scripting.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/self-contained-examples.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/self-contained-examples.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/todo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/todo.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/universal_tool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/universal_tool.gif -------------------------------------------------------------------------------- /website/static/img/dark/gifs/versions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/gifs/versions.gif -------------------------------------------------------------------------------- /website/static/img/dark/scala-cli-install.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/dark/scala-cli-install.gif -------------------------------------------------------------------------------- /website/static/img/debugging_attach_to_process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/debugging_attach_to_process.png -------------------------------------------------------------------------------- /website/static/img/debugging_configuration_dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/debugging_configuration_dropdown.png -------------------------------------------------------------------------------- /website/static/img/debugging_listen_mode_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/debugging_listen_mode_config.png -------------------------------------------------------------------------------- /website/static/img/debugging_run_doctor_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/debugging_run_doctor_view.png -------------------------------------------------------------------------------- /website/static/img/debugging_running_debug_configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/debugging_running_debug_configuration.png -------------------------------------------------------------------------------- /website/static/img/debugging_running_debugger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/debugging_running_debugger.png -------------------------------------------------------------------------------- /website/static/img/debugging_setting_breakpoints_intellij.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/debugging_setting_breakpoints_intellij.png -------------------------------------------------------------------------------- /website/static/img/debugging_setting_breakpoints_vs_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/debugging_setting_breakpoints_vs_code.png -------------------------------------------------------------------------------- /website/static/img/diagnostics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/diagnostics.gif -------------------------------------------------------------------------------- /website/static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/docusaurus.png -------------------------------------------------------------------------------- /website/static/img/envs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/envs.gif -------------------------------------------------------------------------------- /website/static/img/fast-scala-cli.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/fast-scala-cli.gif -------------------------------------------------------------------------------- /website/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/favicon.ico -------------------------------------------------------------------------------- /website/static/img/features.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/features.gif -------------------------------------------------------------------------------- /website/static/img/gifs/complete-install.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/complete-install.gif -------------------------------------------------------------------------------- /website/static/img/gifs/convert_ivy_to_using.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/convert_ivy_to_using.gif -------------------------------------------------------------------------------- /website/static/img/gifs/defaults.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/defaults.gif -------------------------------------------------------------------------------- /website/static/img/gifs/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/demo.gif -------------------------------------------------------------------------------- /website/static/img/gifs/education.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/education.gif -------------------------------------------------------------------------------- /website/static/img/gifs/embeddable_scripts.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/embeddable_scripts.gif -------------------------------------------------------------------------------- /website/static/img/gifs/fast-scripts.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/fast-scripts.gif -------------------------------------------------------------------------------- /website/static/img/gifs/learning_curve.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/learning_curve.gif -------------------------------------------------------------------------------- /website/static/img/gifs/powerful_scripts.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/powerful_scripts.gif -------------------------------------------------------------------------------- /website/static/img/gifs/projects.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/projects.gif -------------------------------------------------------------------------------- /website/static/img/gifs/prototyping.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/prototyping.gif -------------------------------------------------------------------------------- /website/static/img/gifs/scripting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/scripting.gif -------------------------------------------------------------------------------- /website/static/img/gifs/self-contained-examples.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/self-contained-examples.gif -------------------------------------------------------------------------------- /website/static/img/gifs/todo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/todo.gif -------------------------------------------------------------------------------- /website/static/img/gifs/universal_tool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/universal_tool.gif -------------------------------------------------------------------------------- /website/static/img/gifs/versions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/gifs/versions.gif -------------------------------------------------------------------------------- /website/static/img/hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/hand.png -------------------------------------------------------------------------------- /website/static/img/ico-education.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/ico-education.png -------------------------------------------------------------------------------- /website/static/img/ico-projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/ico-projects.png -------------------------------------------------------------------------------- /website/static/img/ico-prototyping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/ico-prototyping.png -------------------------------------------------------------------------------- /website/static/img/ico-scripting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/ico-scripting.png -------------------------------------------------------------------------------- /website/static/img/ico-yours-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/ico-yours-dark.png -------------------------------------------------------------------------------- /website/static/img/ico-yours.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/ico-yours.png -------------------------------------------------------------------------------- /website/static/img/installation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/installation.png -------------------------------------------------------------------------------- /website/static/img/intellij_bsp_build_scripts_found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_bsp_build_scripts_found.png -------------------------------------------------------------------------------- /website/static/img/intellij_bsp_external_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_bsp_external_model.png -------------------------------------------------------------------------------- /website/static/img/intellij_bsp_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_bsp_icon.png -------------------------------------------------------------------------------- /website/static/img/intellij_flat_sources_layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_flat_sources_layout.png -------------------------------------------------------------------------------- /website/static/img/intellij_import_bsp_module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_import_bsp_module.png -------------------------------------------------------------------------------- /website/static/img/intellij_imported_project_layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_imported_project_layout.png -------------------------------------------------------------------------------- /website/static/img/intellij_module_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_module_settings.png -------------------------------------------------------------------------------- /website/static/img/intellij_module_settings_import_module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_module_settings_import_module.png -------------------------------------------------------------------------------- /website/static/img/intellij_multi_bsp_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_multi_bsp_setup.png -------------------------------------------------------------------------------- /website/static/img/intellij_open_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_open_dir.png -------------------------------------------------------------------------------- /website/static/img/intellij_project_from_existing_sources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_project_from_existing_sources.png -------------------------------------------------------------------------------- /website/static/img/intellij_project_layout_with_extra_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_project_layout_with_extra_dir.png -------------------------------------------------------------------------------- /website/static/img/intellij_refresh_bsp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_refresh_bsp.png -------------------------------------------------------------------------------- /website/static/img/intellij_run_code_with_bsp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_run_code_with_bsp.png -------------------------------------------------------------------------------- /website/static/img/intellij_sbt_alongside_bsp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_sbt_alongside_bsp.png -------------------------------------------------------------------------------- /website/static/img/intellij_sbt_module_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/intellij_sbt_module_settings.png -------------------------------------------------------------------------------- /website/static/img/lift_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/lift_off.png -------------------------------------------------------------------------------- /website/static/img/loga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/loga.png -------------------------------------------------------------------------------- /website/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/logo.png -------------------------------------------------------------------------------- /website/static/img/monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/monitor.png -------------------------------------------------------------------------------- /website/static/img/rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/rocket.png -------------------------------------------------------------------------------- /website/static/img/scala-cli-getting-started-1.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/scala-cli-getting-started-1.mp4 -------------------------------------------------------------------------------- /website/static/img/scala-cli-getting-started-2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/scala-cli-getting-started-2.mp4 -------------------------------------------------------------------------------- /website/static/img/scala-cli-install.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/scala-cli-install.gif -------------------------------------------------------------------------------- /website/static/img/scala-cli-repl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/scala-cli-repl.jpg -------------------------------------------------------------------------------- /website/static/img/scala-doc-main-method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/scala-doc-main-method.png -------------------------------------------------------------------------------- /website/static/img/scala-spiral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/scala-spiral.png -------------------------------------------------------------------------------- /website/static/img/source_layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/source_layout.png -------------------------------------------------------------------------------- /website/static/img/todo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/todo.gif -------------------------------------------------------------------------------- /website/static/img/tutorial/docsVersionDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/tutorial/docsVersionDropdown.png -------------------------------------------------------------------------------- /website/static/img/tutorial/localeDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/tutorial/localeDropdown.png -------------------------------------------------------------------------------- /website/static/img/vl_logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/vl_logo_small.png -------------------------------------------------------------------------------- /website/static/img/vscode-run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/vscode-run.png -------------------------------------------------------------------------------- /website/static/img/vscode-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VirtusLab/scala-cli/d81d78ac2308e7d4f011a9b35a3416f786c27095/website/static/img/vscode-test.png --------------------------------------------------------------------------------