Skip to content
Merged
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
4 changes: 2 additions & 2 deletions compiled_starters/elixir/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Elixir version used to run your code
# on Codecrafters.
#
# Available versions: elixir-1.17
language_pack: elixir-1.17
# Available versions: elixir-1.18
language_pack: elixir-1.18
2 changes: 1 addition & 1 deletion compiled_starters/elixir/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule App.MixProject do
[
app: :codecrafters_http_server,
version: "1.0.0",
elixir: "~> 1.17",
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: [main_module: CLI]
Expand Down
2 changes: 1 addition & 1 deletion compiled_starters/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Time to move on to the next stage!

Note: This section is for stages 2 and beyond.

1. Ensure you have `cargo (1.85)` installed locally
1. Ensure you have `cargo (1.86)` installed locally
1. Run `./your_program.sh` to run your program, which is implemented in
`src/main.rs`. This command compiles your Rust project, so it might be slow
the first time you run it. Subsequent runs will be fast.
Expand Down
4 changes: 2 additions & 2 deletions compiled_starters/rust/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Rust version used to run your code
# on Codecrafters.
#
# Available versions: rust-1.85
language_pack: rust-1.85
# Available versions: rust-1.86
language_pack: rust-1.86
2 changes: 1 addition & 1 deletion compiled_starters/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Time to move on to the next stage!

Note: This section is for stages 2 and beyond.

1. Ensure you have `bun (1.1)` installed locally
1. Ensure you have `bun (1.2)` installed locally
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.ts`.
1. Commit your changes and run `git push origin master` to submit your solution
Expand Down
4 changes: 2 additions & 2 deletions compiled_starters/typescript/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the TypeScript version used to run your code
# on Codecrafters.
#
# Available versions: bun-1.1
language_pack: bun-1.1
# Available versions: bun-1.2
language_pack: bun-1.2
18 changes: 18 additions & 0 deletions dockerfiles/bun-1.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# syntax=docker/dockerfile:1.7-labs
FROM oven/bun:1.2-alpine

ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="package.json,bun.lockb"

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

# For reproducible builds.
# This will install the exact versions of each package specified in the lockfile.
# If package.json disagrees with bun.lockb, Bun will exit with an error. The lockfile will not be updated.
RUN bun install --frozen-lockfile

# If the node_modules directory exists, move it to /app-cached
RUN mkdir -p /app-cached
RUN if [ -d "/app/node_modules" ]; then mv /app/node_modules /app-cached; fi
25 changes: 25 additions & 0 deletions dockerfiles/elixir-1.18.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# syntax=docker/dockerfile:1.7-labs
FROM elixir:1.18.3-alpine

# Ensures the container is re-built if dependency files change
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="mix.exs"

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 hex + rebar
RUN mix local.hex --force && \
mix local.rebar --force

# install and compile mix dependencies
RUN mix deps.get && \
mix deps.compile

# Install & cache deps
RUN .codecrafters/compile.sh

RUN mkdir -p /app-cached
RUN if [ -d "/app/_build" ]; then mv /app/_build /app-cached; fi
RUN if [ -d "/app/deps" ]; then mv /app/deps /app-cached; fi
13 changes: 13 additions & 0 deletions dockerfiles/rust-1.86.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# syntax=docker/dockerfile:1.7-labs
FROM rust:1.86-bookworm

# Rebuild the container if these files change
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Cargo.toml,Cargo.lock"

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

# This runs cargo build
RUN .codecrafters/compile.sh
4 changes: 2 additions & 2 deletions solutions/elixir/01-at4/code/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Elixir version used to run your code
# on Codecrafters.
#
# Available versions: elixir-1.17
language_pack: elixir-1.17
# Available versions: elixir-1.18
language_pack: elixir-1.18
2 changes: 1 addition & 1 deletion solutions/elixir/01-at4/code/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule App.MixProject do
[
app: :codecrafters_http_server,
version: "1.0.0",
elixir: "~> 1.17",
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: [main_module: CLI]
Expand Down
2 changes: 1 addition & 1 deletion solutions/rust/01-at4/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Time to move on to the next stage!

Note: This section is for stages 2 and beyond.

1. Ensure you have `cargo (1.85)` installed locally
1. Ensure you have `cargo (1.86)` installed locally
1. Run `./your_program.sh` to run your program, which is implemented in
`src/main.rs`. This command compiles your Rust project, so it might be slow
the first time you run it. Subsequent runs will be fast.
Expand Down
4 changes: 2 additions & 2 deletions solutions/rust/01-at4/code/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Rust version used to run your code
# on Codecrafters.
#
# Available versions: rust-1.85
language_pack: rust-1.85
# Available versions: rust-1.86
language_pack: rust-1.86
2 changes: 1 addition & 1 deletion solutions/typescript/01-at4/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Time to move on to the next stage!

Note: This section is for stages 2 and beyond.

1. Ensure you have `bun (1.1)` installed locally
1. Ensure you have `bun (1.2)` installed locally
1. Run `./your_program.sh` to run your program, which is implemented in
`app/main.ts`.
1. Commit your changes and run `git push origin master` to submit your solution
Expand Down
4 changes: 2 additions & 2 deletions solutions/typescript/01-at4/code/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the TypeScript version used to run your code
# on Codecrafters.
#
# Available versions: bun-1.1
language_pack: bun-1.1
# Available versions: bun-1.2
language_pack: bun-1.2
2 changes: 1 addition & 1 deletion starter_templates/elixir/code/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule App.MixProject do
[
app: :codecrafters_http_server,
version: "1.0.0",
elixir: "~> 1.17",
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: [main_module: CLI]
Expand Down
2 changes: 1 addition & 1 deletion starter_templates/rust/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
attributes:
required_executable: cargo (1.85)
required_executable: cargo (1.86)
user_editable_file: src/main.rs
2 changes: 1 addition & 1 deletion starter_templates/typescript/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
attributes:
required_executable: bun (1.1)
required_executable: bun (1.2)
user_editable_file: app/main.ts
Loading