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

Why include Scala? #251

Open
charpov opened this issue Jun 12, 2023 · 2 comments
Open

Why include Scala? #251

charpov opened this issue Jun 12, 2023 · 2 comments

Comments

@charpov
Copy link

charpov commented Jun 12, 2023

I've been maintaining my own java+sbt image for a few years, but I'd rather switch to yours to make my life simpler. I'm wondering why you include Scala in the image, given that sbt is all you need to run a project. Also, since sbt can download specific versions of itself, why specify a version at all? If all that was specified is the Java version, it would greatly simplify the tags. For instance, right now, there's no image for the latest LTS Java (17) latest sbt (1.9.0) and latest Scala (3.3.0). (Actually, there is; makes my point about having too many tags...)

@francisdb
Copy link
Collaborator

We try to bootstrap sbt for a certain scala version so that it is ready for use and does not require any further downloads.

I do agree that the separate scala we install is a bit overkill if you only want sbt as sbt will pull in scala in a different folder on bootstrap. Initially the idea was to have an image that could also be used for scala without using sbt. (before the repo was moved over here)

# Prepare sbt (warm cache)
RUN \
sbt sbtVersion && \
mkdir -p project && \
echo "scalaVersion := \"${SCALA_VERSION}\"" > build.sbt && \
echo "sbt.version=${SBT_VERSION}" > project/build.properties && \
echo "// force sbt compiler-bridge download" > project/Dependencies.scala && \
echo "case object Temp" > Temp.scala && \
sbt compile && \
rm -r project && rm build.sbt && rm Temp.scala && rm -r target

Personally I would not mind removing the separate scala install but that will not change anything regarding labeling of sbt-scala image as we still want to bootstrap the sbt/scala combo.

@charpov
Copy link
Author

charpov commented Jun 12, 2023

Understood. I used to do that too (bootstrapping) but I eventually gave up. With good caching/volumes, I don't mind having everything downloaded one time. Smaller image with less frequent updates too.
I guess a plain eclipse-temurin-17 tag (with sbt and Scala set to whatever) would make my life easier, but I can manage without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants