Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a welcome screen with common tasks #554

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -524,3 +524,55 @@ lazy val fatjarPackageSettings = List[Def.Setting[_]](
).transform(node).head
}
)

import sbtwelcome._

logo :=
raw"""
| _ _
| (_) (_)
| ___ ___ _ _ __ ______ _ __ ___ ____ _
| / __|/ __| | '_ \______| |/ _` \ \ / / _` |
| \__ \ (__| | |_) | | | (_| |\ V / (_| |
| |___/\___|_| .__/ | |\__,_| \_/ \__,_|
| | | _/ |
| |_| |__/
|
|${version.value}
|
|${scala.Console.YELLOW}Scala ${scalaVersion
.value}${scala.Console.RESET}
|
|""".stripMargin
Comment on lines +528 to +546
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, this block of code breaks scalafmt's idempotency, so it's going to be always broken :D

image

@olafurpg I won't risk upgrading scalafmt to a newer version until we don't have any more pressing PRs in flight.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scalafmt is such a fragile formatter can't imagine what ***** wrote this piece of software 🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:P

Entire Scala community is still looking for that rapscallion! He's going to get it once we find them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This person is doing a good job hiding in some corner

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not an exaggeration when I say that all the weirdly broken stuff in Scalafmt is my fault and if something works it's thanks to Albert (or some other contributor)


usefulTasks :=
Seq(
UsefulTask(
"fixAll",
"Run Scalafmt, Scalafix and Javafmt on all sources. Run this before opening a PR."
).noAlias,
UsefulTask(
"snapshots/run",
"Update snapshot tests. Use this command after you have fixed a bug."
).alias("regenerateSnapshots"),
UsefulTask(
"snapshots/testOnly tests.MinimizedSnapshotSuite",
"Run a small subset of snapshot tests for fast iteration"
).alias("fastSnapshotTests"),
UsefulTask(
"snapshots/testOnly tests.LibrarySnapshotSuite",
"Runs slow snapshot tests. Indexes a corpus of external Java libraries."
).alias("slowSnapshotTests"),
UsefulTask("snapshots/test", "Runs all snapshot tests")
.alias("snapshotTests"),
UsefulTask(
"buildTools/testOnly tests.Gradle*",
"Runs tests for Gradle builds"
).alias("gradleTests"),
UsefulTask(
"buildTools/testOnly tests.Maven*",
"Runs tests for Gradle builds"
).alias("mavenTests")
)

logoColor := scala.Console.MAGENTA
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.6.1")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.github.reibitto" % "sbt-welcome" % "0.3.1")
// sbt-jdi-tools appears to fix an error related to this message:
// [error] (plugin / Compile / compileIncremental) java.lang.NoClassDefFoundError: com/sun/tools/javac/code/Symbol
addSbtPlugin("org.scala-debugger" % "sbt-jdi-tools" % "1.1.1")
Expand Down