-
Notifications
You must be signed in to change notification settings - Fork 53
[Redis] CC-1745: Upgrade Bun to v1.2, Rust to v1.86, and Elixir to v1.18 #305
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
Conversation
- Added .gitignore to ignore compiled binary. - Updated codecrafters.yml to use Elixir version 1.18. - Renamed application from :redis to :codecrafters_redis in mix.exs. - Updated Elixir version in mix.exs to "~> 1.18". - Created main.ex as the entry point for the Redis server implementation. - Modified your_program.sh and compile.sh for new build and run processes.
WalkthroughThis update introduces a series of coordinated changes across Elixir, Rust, and TypeScript starter templates and solutions. The Elixir projects now use escript builds with a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI (escript)
participant Application
participant Server
User->>CLI (escript): Run compiled binary
CLI (escript)->>Application: Application.ensure_all_started(:codecrafters_redis)
Application->>Server: Start server logic
CLI (escript)->>CLI (escript): Process.sleep(:infinity)
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. ✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 5
♻️ Duplicate comments (4)
compiled_starters/elixir/.gitignore (1)
1-3
: Ignore compiled escript binary
Added/codecrafters_redis
to exclude the built escript binary from version control.starter_templates/elixir/code/.gitignore (1)
1-3
: Ignore compiled escript binary
Added/codecrafters_redis
to exclude the built escript binary from version control.compiled_starters/typescript/README.md (1)
29-29
: Duplicate: bumpbun
version in compiled-starter README.
Same runtime requirement update as in other documentation—no further action needed.compiled_starters/typescript/codecrafters.yml (1)
10-11
: Duplicate: bumpbun
version in compiled-starter config.
Matches the same version upgrade in related solution and starter files.
🧹 Nitpick comments (4)
solutions/elixir/01-jm1/code/.codecrafters/compile.sh (1)
11-12
: Add escript build and move steps
Themix escript.build
followed by movingcodecrafters_redis
to/tmp
aligns with the compiled-starter pattern. Consider adding anrm -f /tmp/codecrafters-build-redis-elixir
before themv
to handle repeated runs, though it’s optional.solutions/elixir/01-jm1/code/lib/main.ex (1)
22-31
: New CLI module added for escript entry point.The
CLI
module provides the necessary entry point for the escript executable, which aligns with the overall changes to the build and run process in this PR.Using
Process.sleep(:infinity)
to keep the application running is a common pattern in Elixir CLI applications, though there are alternatives like using a simple receive block that would achieve the same result while potentially being more responsive to system signals.Consider using a receive block instead of
Process.sleep(:infinity)
for better signal handling:def main(_args) do # Start the Server application {:ok, _pid} = Application.ensure_all_started(:codecrafters_redis) # Run forever - Process.sleep(:infinity) + receive do + _ -> :ok + end enddockerfiles/elixir-1.18.Dockerfile (1)
23-25
: Effective caching of build artifacts.The approach for caching build artifacts by moving directories to
/app-cached
is good for performance, but could be improved with better conditional checks.Consider simplifying the conditional directory moves:
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 + RUN for dir in _build deps; do \ + if [ -d "/app/$dir" ]; then \ + mv "/app/$dir" /app-cached/; \ + fi \ + doneThis reduces the number of RUN instructions and improves readability.
dockerfiles/bun-1.2.Dockerfile (1)
17-18
: Optimize Dockerfile layers.
You can combine the twoRUN
steps into one to reduce image layers and speed up builds.Example:
- RUN mkdir -p /app-cached - RUN if [ -d "/app/node_modules" ]; then mv /app/node_modules /app-cached; fi + RUN mkdir -p /app-cached && \ + if [ -d "/app/node_modules" ]; then mv /app/node_modules /app-cached; fi
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (41)
compiled_starters/elixir/.codecrafters/compile.sh
(1 hunks)compiled_starters/elixir/.codecrafters/run.sh
(1 hunks)compiled_starters/elixir/.gitignore
(1 hunks)compiled_starters/elixir/README.md
(2 hunks)compiled_starters/elixir/codecrafters.yml
(1 hunks)compiled_starters/elixir/lib/main.ex
(2 hunks)compiled_starters/elixir/mix.exs
(1 hunks)compiled_starters/elixir/your_program.sh
(1 hunks)compiled_starters/rust/README.md
(1 hunks)compiled_starters/rust/codecrafters.yml
(1 hunks)compiled_starters/typescript/README.md
(1 hunks)compiled_starters/typescript/codecrafters.yml
(1 hunks)dockerfiles/bun-1.2.Dockerfile
(1 hunks)dockerfiles/elixir-1.18.Dockerfile
(1 hunks)dockerfiles/rust-1.86.Dockerfile
(1 hunks)solutions/elixir/01-jm1/code/.codecrafters/compile.sh
(1 hunks)solutions/elixir/01-jm1/code/.codecrafters/run.sh
(1 hunks)solutions/elixir/01-jm1/code/.gitignore
(1 hunks)solutions/elixir/01-jm1/code/README.md
(2 hunks)solutions/elixir/01-jm1/code/codecrafters.yml
(1 hunks)solutions/elixir/01-jm1/code/lib/main.ex
(2 hunks)solutions/elixir/01-jm1/code/mix.exs
(1 hunks)solutions/elixir/01-jm1/code/your_program.sh
(1 hunks)solutions/elixir/01-jm1/diff/lib/main.ex.diff
(2 hunks)solutions/elixir/01-jm1/explanation.md
(1 hunks)solutions/rust/01-jm1/code/README.md
(1 hunks)solutions/rust/01-jm1/code/codecrafters.yml
(1 hunks)solutions/rust/02-rg2/code/codecrafters.yml
(1 hunks)solutions/rust/02-rg2/diff/README.md.diff
(1 hunks)solutions/typescript/01-jm1/code/README.md
(1 hunks)solutions/typescript/01-jm1/code/codecrafters.yml
(1 hunks)solutions/typescript/02-rg2/code/codecrafters.yml
(1 hunks)solutions/typescript/02-rg2/diff/README.md.diff
(1 hunks)starter_templates/elixir/code/.codecrafters/compile.sh
(1 hunks)starter_templates/elixir/code/.codecrafters/run.sh
(1 hunks)starter_templates/elixir/code/.gitignore
(1 hunks)starter_templates/elixir/code/lib/main.ex
(2 hunks)starter_templates/elixir/code/mix.exs
(1 hunks)starter_templates/elixir/config.yml
(1 hunks)starter_templates/rust/config.yml
(1 hunks)starter_templates/typescript/config.yml
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
compiled_starters/elixir/lib/main.ex (2)
solutions/elixir/01-jm1/code/lib/main.ex (1)
main
(24-30)starter_templates/elixir/code/lib/main.ex (1)
main
(29-35)
starter_templates/elixir/code/lib/main.ex (2)
compiled_starters/elixir/lib/main.ex (1)
main
(29-35)solutions/elixir/01-jm1/code/lib/main.ex (1)
main
(24-30)
🪛 Hadolint (2.12.0)
dockerfiles/rust-1.86.Dockerfile
[error] 10-10: invalid flag: --exclude
(DL1000)
dockerfiles/elixir-1.18.Dockerfile
[error] 10-10: invalid flag: --exclude
(DL1000)
dockerfiles/bun-1.2.Dockerfile
[error] 9-9: invalid flag: --exclude
(DL1000)
🔇 Additional comments (57)
solutions/elixir/01-jm1/explanation.md (1)
1-1
:✅ Verification successful
Update entry point reference
Changed the documentation to point tolib/main.ex
instead of the oldlib/server.ex
. Please verify no remaining references tolib/server.ex
across the codebase using a command like:
🏁 Script executed:
rg -n "lib/server.ex"
Length of output: 21
Entry point reference updated correctly
Verified withrg -n "lib/server.ex"
—no matches found, confirming all references have been updated tolib/main.ex
.solutions/elixir/01-jm1/code/.gitignore (1)
1-3
: Ignore compiled escript binary
Added/codecrafters_redis
to exclude the built escript binary from version control, ensuring no build artifacts are committed.solutions/elixir/01-jm1/code/codecrafters.yml (1)
10-11
: Bump Elixir version
Updated thelanguage_pack
toelixir-1.18
, aligning with the Mix configuration inmix.exs
and matching the targeted Elixir runtime.compiled_starters/elixir/codecrafters.yml (1)
10-11
: Update Elixir version in the platform configuration
You've correctly bumped both the “Available versions” comment and thelanguage_pack
toelixir-1.18
. Ensure that the CodeCrafters environment supports this new version and that no other YAML entries reference the oldelixir-1.16
.compiled_starters/elixir/README.md (2)
15-15
: Corrected entry point reference tolib/main.ex
Good catch updating the first-stage instructions to point atlib/main.ex
. This aligns with the newCLI
module.
31-31
: Aligned run instructions with the new entry point
Nice—the Stage 2+ instructions now correctly referencelib/main.ex
. No stale references remain.compiled_starters/elixir/.codecrafters/run.sh (1)
11-11
: Switch to executing precompiled escript binary
The change toexec /tmp/codecrafters-build-redis-elixir "$@"
ensures we run the compiled escript directly. This is exactly what we want—no leftovermix run
.solutions/elixir/01-jm1/code/README.md (2)
15-15
: Updated first-stage instructions to new entry point
The entry point note now correctly points atlib/main.ex
, matching the solution’sCLI.main/1
. Excellent.
31-31
: Fixed run step to referencelib/main.ex
Stage 2+ docs now refer tolib/main.ex
—all references are consistent.compiled_starters/elixir/.codecrafters/compile.sh (1)
11-12
: Good implementation of the escript build process.The script now builds the Elixir escript and moves it to a consistent temporary location for execution. This aligns well with the upgrade to Elixir 1.18 and the new execution approach.
Consider these minor improvements for robustness:
mix escript.build +mkdir -p /tmp/codecrafters-build-redis-elixir mv codecrafters_redis /tmp/codecrafters-build-redis-elixir
starter_templates/elixir/code/.codecrafters/run.sh (1)
11-11
: Proper execution of the compiled escript.The use of
exec
is appropriate here as it replaces the current process with the executable, avoiding an extra shell process. Passing all arguments ($@
) ensures flexibility for future extensions.solutions/elixir/01-jm1/code/.codecrafters/run.sh (1)
11-11
: Consistent execution approach with the starter template.The solution script correctly uses the same execution pattern as the starter template, maintaining consistency throughout the codebase.
compiled_starters/elixir/lib/main.ex (2)
5-5
: Minor formatting change.Added whitespace has no functional impact.
27-36
: Well-structured CLI module for escript entry point.The new
CLI
module withmain/1
function serves as a clean entry point for the escript, properly starting the application and keeping it running. This approach aligns with Elixir best practices for standalone applications.For future maintainability, consider these enhancements:
defmodule CLI do + @moduledoc """ + Command-line interface entry point for the Redis server escript + """ + + @doc """ + Main entry point for the escript + + Starts the application and keeps it running indefinitely + """ def main(_args) do # Start the Server application - {:ok, _pid} = Application.ensure_all_started(:codecrafters_redis) + case Application.ensure_all_started(:codecrafters_redis) do + {:ok, _started} -> + # Run forever + Process.sleep(:infinity) + {:error, reason} -> + IO.puts(:stderr, "Failed to start application: #{inspect(reason)}") + System.halt(1) + end - - # Run forever - Process.sleep(:infinity) end endstarter_templates/elixir/config.yml (1)
2-3
: Configuration values properly quoted for consistency.The changes correctly quote the
required_executable
anduser_editable_file
values, which aligns with best practices for YAML configuration files. These changes also match the broader updates in this PR where the main entry point has been renamed fromlib/server.ex
tolib/main.ex
.starter_templates/elixir/code/.codecrafters/compile.sh (1)
11-12
: Build process improved to use escript.The script now properly builds the Elixir project as an escript executable and moves it to a temporary directory for later execution. This aligns with the new approach of using a compiled binary instead of running through the Mix runtime, which should improve startup performance.
solutions/elixir/01-jm1/code/lib/main.ex (1)
5-5
: Whitespace added for better readability.The added whitespace after the module documentation improves code readability and maintains consistent spacing throughout the file.
dockerfiles/elixir-1.18.Dockerfile (3)
13-14
: Proper installation of Hex and Rebar.The Dockerfile correctly installs Hex and Rebar package managers with the
--force
flag, ensuring they are installed even if they already exist, which helps prevent build failures.
17-18
: Dependency management looks good.The Dockerfile correctly fetches and compiles dependencies using Mix commands, which is the standard approach for Elixir projects.
21-21
: Build script execution.Running the
.codecrafters/compile.sh
script is consistent with the changes made to the script itself, which now builds the escript executable.solutions/elixir/01-jm1/diff/lib/main.ex.diff (3)
6-6
: Trivial whitespace changeThis is just a minor change adding a whitespace line after the module documentation. It improves readability slightly but has no functional impact.
26-29
: Server implementation now enabledThe previously commented code for the TCP server functionality has been uncommented, enabling the core Redis server functionality. This change properly enables the TCP socket with appropriate options including
reuseaddr: true
to prevent "Address already in use" errors during frequent restarts.
33-41
: Well-implemented CLI entrypoint for escriptThe new
CLI
module provides a clean entrypoint for the escript binary. The implementation correctly:
- Starts the Redis server application using
Application.ensure_all_started/1
- Keeps the process running indefinitely with
Process.sleep(:infinity)
This pattern aligns with Elixir best practices for escript executables.
compiled_starters/elixir/your_program.sh (2)
11-19
: Proper implementation of escript build processThe script now correctly builds an escript executable with
mix escript.build
and then moves it to a consistent location/tmp/codecrafters-build-redis-elixir
. Good use of a subshell with proper directory handling viacd "$(dirname "$0")"
to ensure the script runs in the correct context.
25-25
: Updated execution to use compiled binaryThe execution command now correctly runs the compiled escript binary instead of using
mix run
. Usingexec
properly replaces the current process, and"$@"
correctly passes all command-line arguments to the executable.solutions/elixir/01-jm1/code/your_program.sh (2)
11-19
: Proper implementation of escript build processThe script now correctly builds an escript executable with
mix escript.build
and then moves it to a consistent location/tmp/codecrafters-build-redis-elixir
. Good use of a subshell with proper directory handling viacd "$(dirname "$0")"
to ensure the script runs in the correct context.
25-25
: Updated execution to use compiled binaryThe execution command now correctly runs the compiled escript binary instead of using
mix run
. Usingexec
properly replaces the current process, and"$@"
correctly passes all command-line arguments to the executable.starter_templates/elixir/code/lib/main.ex (2)
5-5
: Trivial whitespace changeThis is just a minor change adding a whitespace line after the module documentation. It improves readability slightly but has no functional impact.
28-36
: Well-implemented CLI entrypoint for escriptThe new
CLI
module provides a clean entrypoint for the escript binary. The implementation correctly:
- Starts the Redis server application using
Application.ensure_all_started/1
- Keeps the process running indefinitely with
Process.sleep(:infinity)
This pattern aligns with Elixir best practices for escript executables and matches the implementation in the solution file.
compiled_starters/elixir/mix.exs (5)
7-7
: App name update aligns with project requirements.Renaming from
:redis
to:codecrafters_redis
provides better namespace isolation for the package, avoiding potential conflicts with other Redis-related packages.
9-9
: Elixir version constraint update.Appropriate version constraint update to align with the PR objective of upgrading to Elixir 1.18.
10-12
: Project configuration enhancements.Good addition of escript configuration with CLI as the main module, supporting the new build approach. Also, nice to explicitly reference the deps function for better maintainability.
16-16
: Helpful inline documentation.Useful reference to Mix help for better developer experience.
24-30
: Well-structured dependencies function.Clean implementation of the deps function with helpful commented examples for adding dependencies from Hex or Git.
solutions/elixir/01-jm1/code/mix.exs (5)
7-7
: App name update aligns with project requirements.Renaming from
:redis
to:codecrafters_redis
provides better namespace isolation for the package, avoiding potential conflicts with other Redis-related packages.
9-9
: Elixir version constraint update.Appropriate version constraint update to align with the PR objective of upgrading to Elixir 1.18.
10-12
: Project configuration enhancements.Good addition of escript configuration with CLI as the main module, supporting the new build approach. Also, nice to explicitly reference the deps function for better maintainability.
16-16
: Helpful inline documentation.Useful reference to Mix help for better developer experience.
24-30
: Well-structured dependencies function.Clean implementation of the deps function with helpful commented examples for adding dependencies from Hex or Git.
starter_templates/elixir/code/mix.exs (5)
7-7
: App name update aligns with project requirements.Renaming from
:redis
to:codecrafters_redis
provides better namespace isolation for the package, avoiding potential conflicts with other Redis-related packages.
9-9
: Elixir version constraint update.Appropriate version constraint update to align with the PR objective of upgrading to Elixir 1.18.
10-12
: Project configuration enhancements.Good addition of escript configuration with CLI as the main module, supporting the new build approach. Also, nice to explicitly reference the deps function for better maintainability.
16-16
: Helpful inline documentation.Useful reference to Mix help for better developer experience.
24-30
: Well-structured dependencies function.Clean implementation of the deps function with helpful commented examples for adding dependencies from Hex or Git.
starter_templates/rust/config.yml (1)
2-2
: Consistent version bump to Cargo 1.86
Therequired_executable
value has been correctly updated from the previouscargo (1.82)
tocargo (1.86)
, aligning this starter template with the new Rust toolchain version.solutions/rust/01-jm1/code/README.md (1)
29-29
: README Cargo version updated to 1.86
The instruction now correctly specifiescargo (1.86)
for stages 2 and beyond, matching the updated toolchain across your Rust templates and solutions.solutions/rust/01-jm1/code/codecrafters.yml (1)
10-11
: Rustlanguage_pack
bumped to 1.86
The comment and thelanguage_pack: rust-1.86
setting have been updated from1.85
to1.86
, ensuring the runner uses the intended Rust version.compiled_starters/rust/README.md (1)
29-29
: Compiled starter docs require Cargo 1.86
The README for the compiled starter now instructs users to havecargo (1.86)
installed, keeping documentation in sync with the new version.compiled_starters/rust/codecrafters.yml (1)
10-11
: Compiled starterlanguage_pack
updated to rust-1.86
Both the available versions comment andlanguage_pack: rust-1.86
have been adjusted, aligning this configuration with the rest of the Rust ecosystem updates.solutions/rust/02-rg2/code/codecrafters.yml (1)
10-11
: Consistent Rust version bump is correctThe
Available versions
comment andlanguage_pack
setting have been updated fromrust-1.85
torust-1.86
, matching the rest of the Rust configurations in this PR.dockerfiles/rust-1.86.Dockerfile (1)
1-2
: Verify BuildKit support for Dockerfile syntaxYou're specifying
# syntax=docker/dockerfile:1.7-labs
to leverage BuildKit features. Ensure your CI and local build environments enable BuildKit, otherwise this Dockerfile may fail to parse.solutions/rust/02-rg2/diff/README.md.diff (1)
27-28
:⚠️ Potential issueCargo version requirement is inconsistent
The README still instructs users to install
cargo (1.82)
, but all tooling and Docker images in this PR target Rust/Cargo 1.86. This mismatch will confuse users and lead to setup failures.Proposed fix:
- 1. Ensure you have `cargo (1.82)` installed locally + 1. Ensure you have `cargo (1.86)` installed locallyLikely an incorrect or invalid review comment.
starter_templates/typescript/config.yml (1)
2-2
: Upgradebun
version in starter template.
Therequired_executable
field has been bumped from1.1
to1.2
, aligning this template with the updated runtime in the PR objectives.solutions/typescript/01-jm1/code/README.md (1)
29-29
: Bumpbun
runtime requirement to 1.2 in solution README.
This change ensures that the documentation matches the updated starter and solution configurations.solutions/typescript/02-rg2/code/codecrafters.yml (1)
10-11
: Updatelanguage_pack
tobun-1.2
.
The available versions comment andlanguage_pack
setting have been updated frombun-1.1
tobun-1.2
, keeping the environment definition in sync with the rest of the TS solutions.solutions/typescript/01-jm1/code/codecrafters.yml (1)
10-11
: Runtime version update applied correctly.
The# Available versions
comment andlanguage_pack
value have been updated tobun-1.2
, aligning with the PR objective to upgrade the runtime to v1.2.dockerfiles/bun-1.2.Dockerfile (1)
2-2
: Base image version aligns with PR objective.
Usingoven/bun:1.2-alpine
correctly reflects the upgrade to Bun v1.2.
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 |
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.
Fix invalid Docker COPY flag.
The --exclude
flag is not supported by Docker's COPY instruction. Docker's official documentation recommends using .dockerignore
file instead to exclude files from the build context.
- COPY --exclude=.git --exclude=README.md . /app
+ COPY . /app
Create a .dockerignore
file with the following contents:
.git
README.md
🧰 Tools
🪛 Hadolint (2.12.0)
[error] 10-10: invalid flag: --exclude
(DL1000)
@@ -1,3 +1,3 @@ | |||
attributes: | |||
required_executable: cargo (1.82) | |||
required_executable: cargo (1.86) |
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.
💡 Verification agent
🧩 Analysis chain
Verify no residual references to Cargo 1.82
To ensure full consistency, please search the repo for any lingering mentions of 1.82
in other configs or docs.
Run this from the repository root:
🏁 Script executed:
#!/usr/bin/env bash
# Check for any remaining references to Cargo 1.82
rg -n "1\\.82"
Length of output: 264
Update remaining Cargo 1.82 references
The repo still contains references to Cargo 1.82. Please update them to 1.86 to match the new requirement:
- solutions/rust/02-rg2/diff/README.md.diff (line 28):
Change “cargo (1.82)
” to “cargo (1.86)
” - solutions/rust/02-rg2/code/README.md (line 29):
Change “cargo (1.82)
” to “cargo (1.86)
” - dockerfiles/rust-1.82.Dockerfile (line 2):
ChangeFROM rust:1.82-bookworm
toFROM rust:1.86-bookworm
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 |
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.
Invalid Docker COPY flags will break the build
The --exclude
flags on COPY
are not supported in standard Dockerfile syntax (Hadolint DL1000). Instead, use a .dockerignore
file to exclude unwanted files and simplify the instruction.
Proposed fix:
- COPY --exclude=.git --exclude=README.md . /app
+ COPY . /app
Add a .dockerignore
alongside your Dockerfile:
.git
README.md
🧰 Tools
🪛 Hadolint (2.12.0)
[error] 10-10: invalid flag: --exclude
(DL1000)
-1. Ensure you have `bun (1.2)` installed locally | ||
+1. Ensure you have `bun (1.1)` installed locally |
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.
Inconsistent bun
version requirement in README.
This diff reverts the local setup instruction back to bun (1.1)
, conflicting with the rest of the PR which upgrades to bun-1.2
. Please update this line to match the new runtime requirement.
Suggested fix:
-1. Ensure you have `bun (1.1)` installed locally
+1. Ensure you have `bun (1.2)` installed locally
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
-1. Ensure you have `bun (1.2)` installed locally | |
+1. Ensure you have `bun (1.1)` installed locally | |
1. Ensure you have `bun (1.2)` installed locally |
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 |
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.
Invalid --exclude
flags in COPY instruction.
The Docker COPY
command doesn’t support --exclude
flags (Hadolint DL1000). To prevent copying .git
and README.md
, use a .dockerignore
file instead of flags.
Proposed change:
-COPY --exclude=.git --exclude=README.md . /app
+COPY . /app
And add a .dockerignore
in the repo root:
.git
README.md
🧰 Tools
🪛 Hadolint (2.12.0)
[error] 9-9: invalid flag: --exclude
(DL1000)
Summary by CodeRabbit
New Features
Improvements
Documentation
Chores
.gitignore
files to exclude new compiled binaries.