diff --git a/compiled_starters/go/README.md b/compiled_starters/go/README.md index ae453b8..beecb0c 100644 --- a/compiled_starters/go/README.md +++ b/compiled_starters/go/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `go (1.24)` installed locally +1. Ensure you have `go (1.25)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `app/main.go`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/compiled_starters/go/codecrafters.yml b/compiled_starters/go/codecrafters.yml index ef27657..9f226c1 100644 --- a/compiled_starters/go/codecrafters.yml +++ b/compiled_starters/go/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Go version used to run your code # on Codecrafters. # -# Available versions: go-1.24 -buildpack: go-1.24 +# Available versions: go-1.25 +buildpack: go-1.25 diff --git a/compiled_starters/go/go.mod b/compiled_starters/go/go.mod index ac2d573..78d8003 100644 --- a/compiled_starters/go/go.mod +++ b/compiled_starters/go/go.mod @@ -1,5 +1,5 @@ module github.com/codecrafters-io/sqlite-starter-go -go 1.24.0 +go 1.25.0 require github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 diff --git a/compiled_starters/rust/Cargo.toml b/compiled_starters/rust/Cargo.toml index 4ade1a4..78b745a 100644 --- a/compiled_starters/rust/Cargo.toml +++ b/compiled_starters/rust/Cargo.toml @@ -2,8 +2,8 @@ name = "codecrafters-sqlite" version = "0.1.0" authors = ["Codecrafters "] -edition = "2021" -rust-version = "1.80" +edition = "2024" +rust-version = "1.91" [dependencies] anyhow = "1.0.68" # error handling diff --git a/compiled_starters/rust/README.md b/compiled_starters/rust/README.md index 6be296f..9b447c4 100644 --- a/compiled_starters/rust/README.md +++ b/compiled_starters/rust/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `cargo (1.87)` installed locally +1. Ensure you have `cargo (1.91)` 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. diff --git a/compiled_starters/rust/codecrafters.yml b/compiled_starters/rust/codecrafters.yml index ce14413..f59e013 100644 --- a/compiled_starters/rust/codecrafters.yml +++ b/compiled_starters/rust/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Rust version used to run your code # on Codecrafters. # -# Available versions: rust-1.88 -buildpack: rust-1.88 +# Available versions: rust-1.91 +buildpack: rust-1.91 diff --git a/compiled_starters/rust/src/main.rs b/compiled_starters/rust/src/main.rs index 6faa32d..fc544d5 100644 --- a/compiled_starters/rust/src/main.rs +++ b/compiled_starters/rust/src/main.rs @@ -1,4 +1,4 @@ -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use std::fs::File; use std::io::prelude::*; diff --git a/dockerfiles/go-1.25.Dockerfile b/dockerfiles/go-1.25.Dockerfile new file mode 100644 index 0000000..6a61df0 --- /dev/null +++ b/dockerfiles/go-1.25.Dockerfile @@ -0,0 +1,17 @@ +# syntax=docker/dockerfile:1.7-labs +FROM golang:1.25-alpine + +# Ensures the container is re-built if go.mod or go.sum changes +ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="go.mod,go.sum" + +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 + +# Starting from Go 1.20, the go standard library is no loger compiled. +# Setting GODEBUG to "installgoroot=all" restores the old behavior +# hadolint ignore=DL3062 +RUN GODEBUG="installgoroot=all" go install std + +RUN go mod download diff --git a/dockerfiles/rust-1.91.Dockerfile b/dockerfiles/rust-1.91.Dockerfile new file mode 100644 index 0000000..af905a2 --- /dev/null +++ b/dockerfiles/rust-1.91.Dockerfile @@ -0,0 +1,13 @@ +# syntax=docker/dockerfile:1.7-labs +FROM rust:1.91-trixie + +# 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 diff --git a/solutions/go/01-dr6/code/README.md b/solutions/go/01-dr6/code/README.md index ae453b8..beecb0c 100644 --- a/solutions/go/01-dr6/code/README.md +++ b/solutions/go/01-dr6/code/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `go (1.24)` installed locally +1. Ensure you have `go (1.25)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `app/main.go`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/solutions/go/01-dr6/code/codecrafters.yml b/solutions/go/01-dr6/code/codecrafters.yml index ef27657..9f226c1 100644 --- a/solutions/go/01-dr6/code/codecrafters.yml +++ b/solutions/go/01-dr6/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Go version used to run your code # on Codecrafters. # -# Available versions: go-1.24 -buildpack: go-1.24 +# Available versions: go-1.25 +buildpack: go-1.25 diff --git a/solutions/go/01-dr6/code/go.mod b/solutions/go/01-dr6/code/go.mod index ac2d573..78d8003 100644 --- a/solutions/go/01-dr6/code/go.mod +++ b/solutions/go/01-dr6/code/go.mod @@ -1,5 +1,5 @@ module github.com/codecrafters-io/sqlite-starter-go -go 1.24.0 +go 1.25.0 require github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 diff --git a/solutions/rust/01-dr6/code/Cargo.toml b/solutions/rust/01-dr6/code/Cargo.toml index 4ade1a4..78b745a 100644 --- a/solutions/rust/01-dr6/code/Cargo.toml +++ b/solutions/rust/01-dr6/code/Cargo.toml @@ -2,8 +2,8 @@ name = "codecrafters-sqlite" version = "0.1.0" authors = ["Codecrafters "] -edition = "2021" -rust-version = "1.80" +edition = "2024" +rust-version = "1.91" [dependencies] anyhow = "1.0.68" # error handling diff --git a/solutions/rust/01-dr6/code/README.md b/solutions/rust/01-dr6/code/README.md index 6be296f..9b447c4 100644 --- a/solutions/rust/01-dr6/code/README.md +++ b/solutions/rust/01-dr6/code/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `cargo (1.87)` installed locally +1. Ensure you have `cargo (1.91)` 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. diff --git a/solutions/rust/01-dr6/code/codecrafters.yml b/solutions/rust/01-dr6/code/codecrafters.yml index ce14413..f59e013 100644 --- a/solutions/rust/01-dr6/code/codecrafters.yml +++ b/solutions/rust/01-dr6/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Rust version used to run your code # on Codecrafters. # -# Available versions: rust-1.88 -buildpack: rust-1.88 +# Available versions: rust-1.91 +buildpack: rust-1.91 diff --git a/solutions/rust/01-dr6/code/src/main.rs b/solutions/rust/01-dr6/code/src/main.rs index 65db771..e387f67 100644 --- a/solutions/rust/01-dr6/code/src/main.rs +++ b/solutions/rust/01-dr6/code/src/main.rs @@ -1,4 +1,4 @@ -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use std::fs::File; use std::io::prelude::*; diff --git a/solutions/rust/01-dr6/diff/src/main.rs.diff b/solutions/rust/01-dr6/diff/src/main.rs.diff index fc99315..242f570 100644 --- a/solutions/rust/01-dr6/diff/src/main.rs.diff +++ b/solutions/rust/01-dr6/diff/src/main.rs.diff @@ -1,5 +1,5 @@ @@ -1,36 +1,32 @@ - use anyhow::{bail, Result}; + use anyhow::{Result, bail}; use std::fs::File; use std::io::prelude::*; diff --git a/starter_templates/go/code/go.mod b/starter_templates/go/code/go.mod index ac2d573..78d8003 100644 --- a/starter_templates/go/code/go.mod +++ b/starter_templates/go/code/go.mod @@ -1,5 +1,5 @@ module github.com/codecrafters-io/sqlite-starter-go -go 1.24.0 +go 1.25.0 require github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 diff --git a/starter_templates/go/config.yml b/starter_templates/go/config.yml index 019425c..7c005d2 100644 --- a/starter_templates/go/config.yml +++ b/starter_templates/go/config.yml @@ -1,3 +1,3 @@ attributes: - required_executable: go (1.24) + required_executable: go (1.25) user_editable_file: app/main.go diff --git a/starter_templates/rust/code/Cargo.toml b/starter_templates/rust/code/Cargo.toml index 4ade1a4..78b745a 100644 --- a/starter_templates/rust/code/Cargo.toml +++ b/starter_templates/rust/code/Cargo.toml @@ -2,8 +2,8 @@ name = "codecrafters-sqlite" version = "0.1.0" authors = ["Codecrafters "] -edition = "2021" -rust-version = "1.80" +edition = "2024" +rust-version = "1.91" [dependencies] anyhow = "1.0.68" # error handling diff --git a/starter_templates/rust/code/src/main.rs b/starter_templates/rust/code/src/main.rs index 6faa32d..fc544d5 100644 --- a/starter_templates/rust/code/src/main.rs +++ b/starter_templates/rust/code/src/main.rs @@ -1,4 +1,4 @@ -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use std::fs::File; use std::io::prelude::*; diff --git a/starter_templates/rust/config.yml b/starter_templates/rust/config.yml index 851e006..99dc344 100644 --- a/starter_templates/rust/config.yml +++ b/starter_templates/rust/config.yml @@ -1,3 +1,3 @@ attributes: - required_executable: cargo (1.87) + required_executable: cargo (1.91) user_editable_file: src/main.rs