Skip to content

Scala 3 migration #32

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

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft
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
7 changes: 5 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
version=2.7.5
version = 3.8.2

runner.dialect = Scala3
runner.dialectOverride.allowSignificantIndentation = false
runner.dialectOverride.allowQuietSyntax = true
maxColumn = 120
style = IntelliJ
align = most
align.openParenCallSite = true
align.tokens.add = ["=",":"]
align.tokens."+" = ["=", ":"]
assumeStandardLibraryStripMargin = true
newlines.sometimesBeforeColonInMethodReturnType = false
optIn.breakChainOnFirstMethodDot = false
Expand Down
2 changes: 1 addition & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=22.1.0.r17-grl
java=22.0.2-graalce
53 changes: 53 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# common variables

set shell := ["zsh", "--login", "-c"]

network-prefix := `basename "$PWD"`
config-dir := justfile_directory() + "/docker-compose"
dev-configs := "--file " + config-dir + "/monolith-deps.yml --file " + config-dir + "/monolith-setup.yml"
local-configs := dev-configs + " --file " + config-dir + "/monolith-app.yml"

# fetch dependencies
pull:
docker compose --project-directory . {{dev-configs}} pull

# dev environment to use with sbt
dev-bg:
docker compose --project-directory . {{dev-configs}} up --detach --quiet-pull
dev-up:
docker compose --project-directory . {{dev-configs}} up
dev-stop:
docker compose --project-directory . {{dev-configs}} stop
dev-down:
docker-compose --project-directory . {{dev-configs}} down --remove-orphans || \
(docker container rm {{network-prefix}}_kafka_1 {{network-prefix}}_postgres_1 -f && \
docker network disconnect {{network-prefix}}_branchtalk-monolith {{network-prefix}}_kafka_1 -f && \
docker network disconnect {{network-prefix}}_branchtalk-monolith {{network-prefix}}_postgres_1 -f && \
docker network rm {{network-prefix}}_branchtalk-monolith)
dev-ps:
docker compose --project-directory . {{dev-configs}} ps
dev-logs:
docker compose --project-directory . {{dev-configs}} logs -f ${LOGS}

# whole monolithic app setup for e.g. local frontend development
local-bg:
(docker compose --project-directory . {{local-configs}} up --detach --quiet-pull) || (echo "publish application with sbt application/docker:publishLocal!")
local-up:
(docker compose --project-directory . {{local-configs}} up) || (echo "publish application with sbt application/docker:publishLocal!")
local-stop:
docker compose --project-directory . {{local-configs}} stop
local-down:
docker compose --project-directory . {{local-configs}} down --remove-orphans || \
(docker container rm {{network-prefix}}_kafka_1 {{network-prefix}}_postgres_1 -f && \
docker network disconnect {{network-prefix}}_branchtalk-monolith {{network-prefix}}_kafka_1 -f && \
docker network disconnect {{network-prefix}}_branchtalk-monolith {{network-prefix}}_postgres_1 -f && \
docker network rm {{network-prefix}}_branchtalk-monolith)
local-ps:
docker compose --project-directory . {{local-configs}} ps
local-logs:
docker compose --project-directory . {{local-configs}} logs -f ${LOGS}

clean-volumes:
docker volume rm {{network-prefix}}_postgres_data -f
docker volume rm {{network-prefix}}_kafka_data -f
docker volume rm {{network-prefix}}_zookeeper_data -f
Loading
Loading