-
Notifications
You must be signed in to change notification settings - Fork 5
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 scala to language template #14
Open
cheerio-pixel
wants to merge
5
commits into
codecrafters-io:main
Choose a base branch
from
cheerio-pixel:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
127dd44
Add scala to language template
cheerio-pixel 7a335e9
Remove unused dockerfile lines
cheerio-pixel 5483a97
Add missing file extension in run.sh
cheerio-pixel 55f3a8c
Remove unneeded line
cheerio-pixel 957aece
Fix oversight when running scala dockerfile
cheerio-pixel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
# | ||
# This script is used to compile your program on CodeCrafters | ||
# | ||
# This runs before .codecrafters/run.sh | ||
# | ||
# Learn more: https://codecrafters.io/program-interface | ||
|
||
set -e # Exit on failure | ||
|
||
sbt assembly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
# | ||
# This script is used to run your program on CodeCrafters | ||
# | ||
# This runs after .codecrafters/compile.sh | ||
# | ||
# Learn more: https://codecrafters.io/program-interface | ||
|
||
set -e # Exit on failure | ||
|
||
exec java -jar ./target/scala-3.3.5/{{course_slug}}.jar "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**/target | ||
/.bloop/ | ||
/.bsp/ | ||
/.metals/ | ||
/project/.bloop/ | ||
metals.sbt | ||
metals/project/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Dependencies._ | ||
|
||
ThisBuild / scalaVersion := "3.3.5" | ||
ThisBuild / version := "0.1.0-SNAPSHOT" | ||
ThisBuild / organization := "com.CodeCrafters" | ||
ThisBuild / organizationName := "CodeCrafters" | ||
|
||
assembly / assemblyJarName := "{{course_slug}}" | ||
|
||
lazy val root = (project in file(".")) | ||
.settings( | ||
name := "codecrafter-{{course_slug}}", | ||
// List your dependencies here | ||
libraryDependencies ++= Seq( | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.10.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
|
||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
object Main extends App { | ||
// You can use print statements as follows for debugging, they'll be visible when running tests. | ||
System.err.println("Logs from your program will appear here!") | ||
// Uncomment this block to pass the first stage | ||
// println("TODO: Implement starter code") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
attributes: | ||
required_executable: sbt (1.10.7) | ||
user_editable_file: src/main/scala/Main.scala |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# syntax=docker/dockerfile:1.7-labs | ||
FROM maven:3.9.9-eclipse-temurin-17-alpine | ||
|
||
# Ensures the container is re-built if dependency files change | ||
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="build.sbt" | ||
|
||
WORKDIR /app | ||
|
||
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses | ||
COPY --exclude=.git --exclude=README.md . /app | ||
|
||
# Install language-specific dependencies | ||
RUN .codecrafters/compile.sh |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Critical issue with COPY command flags.
The
COPY
command on line 44 uses unsupported--exclude
flags. Docker does not support these flags in the COPY command. Instead, manage exclusions by using a.dockerignore
file (e.g., include.git
andREADME.md
there) and update the command as follows:📝 Committable suggestion
🧰 Tools
🪛 Hadolint (2.12.0)
[error] 44-44: invalid flag: --exclude
(DL1000)