-
Notifications
You must be signed in to change notification settings - Fork 0
[PER-123] - improvement/ project template proposal #3
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
base: main
Are you sure you want to change the base?
Conversation
…le, project/target
My code follows the code style of this project. My change requires a change to the documentation.
Add PR template
My code follows the code style of this project. My change requires a change to the documentation.
[SPI-123] - feature/ pull requests title naming conventions
|
Question @ffakenz @Ignacio-Rocca Regarding scalafix My experience with it was that it marked as errors unused imports and unused variables. That is the advantage of using it. My experience with it was that it also marked errors for files created during the akka-serverless development cycle. My opinion is that this experience is both not awe-inspiring regarding the pros (scalafmt = wow! scalafix = meh), and very cumbersome regarding the cons (basically its not compatible with akka-serverless) So I put the opinion on the table and let you guys provide your opinions as well. |
testagrossa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to add following plugins:
// Versioning
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
// Packing and Publishing
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1")
addSbtPlugin("com.mintbeans" % "sbt-ecr" % "0.16.0")
// Linting & Styling
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34")
addDependencyTreePlugin
testagrossa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we miss .scalafix.conf file
# https://scalacenter.github.io/scalafix/docs/rules/overview.html
rules = [
DisableSyntax
]
DisableSyntax.noThrows = true
testagrossa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add .sbtops file
-J-Xms1G
-J-Xmx8G
-J-Xss1024M
-J-XX:MaxMetaspaceSize=2048M
|
@testagrossa did you read the comment regarding scalafix? |
yes > akka-serverless projects will have to remove .scalafix if causes inconveniences, but it should be part of our template |
same opinion here @miguelemosreverte |
|
@testagrossa @Ignacio-Rocca Roger Roger! scala-fix added then! |
[SPA-123] - feature/improving project template
|
@testagrossa @Ignacio-Rocca ready! |
| .settings( | ||
| name := "template", | ||
| libraryDependencies += Testing.scalaTest | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we miss to add the following settings to the project:
lazy val scalafixSettings: Seq[Setting[_]] = Seq(
addCompilerPlugin(scalafixSemanticdb),
semanticdbEnabled := true,
scalafixOnCompile := true
)
and then do
.enablePlugins(DockerPlugin, AshScriptPlugin)
.settings(scalafixSettings)
and would be also nice to add
run / fork := true
Test / fork := true
to the build.sbt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also would be nice to add the docker publish as part of the GHA
testagrossa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app packaging is missing
testagrossa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also need to add the followings below scalaVersion and organization on build.sbt
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / dynverSeparator := "-"
ThisBuild / conflictManager := ConflictManager.latestRevision
ThisBuild / javacOptions ++= Seq("-source", "11", "-target", "11")
ThisBuild / scalacOptions += "-Ymacro-annotations"
|
|
||
| // Packing and Publishing | ||
| addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1") | ||
| addSbtPlugin("com.mintbeans" % "sbt-ecr" % "0.16.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed right now (the ecr plugin)
[SIP-123] - improvement/ small refactor
|
In general all the feedback is welcomed, expect for the macro annotations. I have not used them not even once in all my career. They will be not added to the project settings because they are clearly never used. |
[SIP-123] - feature/defaults settings for project
Add our versioning workflows and code, remove plugins from third-parties
[SPI-123] - improvement/ add our versioning workflows and code, remove plugins from third-parties
[SPI-123] - improvement/
Ticket
https://jira/PER-123
Description
This is the project template
Types of changes
Checklist: