-
Notifications
You must be signed in to change notification settings - Fork 51
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
update to zig 0.14 #291
base: main
Are you sure you want to change the base?
update to zig 0.14 #291
Conversation
WalkthroughThe pull request updates the Zig programming language version requirements and associated configuration across multiple files. It raises the minimum version from 0.13 (or 0.11 in some cases) to 0.14 in READMEs, build files, configuration files, and Docker setup. Additionally, it changes package names from hardcoded strings to symbolic references and introduces a fingerprint field in build configuration files for package identity. Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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: 0
🧹 Nitpick comments (1)
starter_templates/zig/config.yml (1)
1-4
: Modify Executable Requirement for ZigThe
required_executable
attribute has been updated fromzig (0.13+)
tozig (0.14)
. While this meets the new specification, consider whether a strict version or a minimum version would be more appropriate to allow users with later Zig releases.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
compiled_starters/zig/README.md
(1 hunks)compiled_starters/zig/build.zig.zon
(2 hunks)compiled_starters/zig/codecrafters.yml
(1 hunks)dockerfiles/zig-0.14.Dockerfile
(1 hunks)solutions/zig/01-jm1/code/README.md
(1 hunks)solutions/zig/01-jm1/code/build.zig.zon
(2 hunks)solutions/zig/01-jm1/code/codecrafters.yml
(1 hunks)starter_templates/zig/code/build.zig.zon
(2 hunks)starter_templates/zig/config.yml
(1 hunks)
🧰 Additional context used
🪛 Hadolint (2.12.0)
dockerfiles/zig-0.14.Dockerfile
[error] 20-20: invalid flag: --exclude
(DL1000)
⏰ Context from checks skipped due to timeout of 90000ms (13)
- GitHub Check: test_course_definition / test (typescript)
- GitHub Check: test_course_definition / test (zig)
- GitHub Check: test_course_definition / test (swift)
- GitHub Check: test_course_definition / test (kotlin)
- GitHub Check: test_course_definition / test (ocaml)
- GitHub Check: test_course_definition / test (scala)
- GitHub Check: test_course_definition / test (rust)
- GitHub Check: test_course_definition / test (java)
- GitHub Check: test_course_definition / test (haskell)
- GitHub Check: test_course_definition / test (go)
- GitHub Check: test_course_definition / test (c)
- GitHub Check: test_course_definition / test (cpp)
- GitHub Check: test_course_definition / test (clojure)
🔇 Additional comments (17)
compiled_starters/zig/README.md (1)
29-33
: Update Zig Version Requirement in InstructionsThe instruction now clearly specifies that users must have
zig (0.14)
installed locally. This aligns with the new PR objective and ensures consistency with configuration changes across the repository.solutions/zig/01-jm1/code/README.md (1)
29-33
: Refresh Zig Version in README InstructionsThe updated line now instructs users to ensure they have
zig (0.14)
installed locally. This modification is consistent with the updates in other parts of the project and meets the PR objective.solutions/zig/01-jm1/code/codecrafters.yml (1)
10-11
: Update Language Pack Version in ConfigurationThe configuration now explicitly states
language_pack: zig-0.14
and includes a comment indicating the available version. This change is straightforward and matches the new requirements for Zig.compiled_starters/zig/codecrafters.yml (1)
10-11
: Synchronize Language Pack VersionThe header comment and the
language_pack
setting have been updated tozig-0.14
, ensuring that the configuration aligns with the rest of the changes across the codebase.starter_templates/zig/code/build.zig.zon (3)
2-2
: Package name updated to symbolic reference formatThe change from a string literal to a symbolic reference format (.codecrafters_redis) aligns with Zig 0.14's preferred syntax for package names.
11-11
: Updated minimum Zig versionThe commented minimum Zig version has been properly updated from 0.11.0 to 0.14.0 to match the target version of this PR.
13-25
: Added fingerprint field with appropriate documentationThe addition of the fingerprint field along with comprehensive documentation is a good practice. This field serves as a unique package identifier in Zig 0.14 and helps with package identity verification.
compiled_starters/zig/build.zig.zon (3)
2-2
: Package name updated to symbolic reference formatThe change from a string literal to a symbolic reference format (.codecrafters_redis) aligns with Zig 0.14's preferred syntax for package names.
11-11
: Updated minimum Zig versionThe commented minimum Zig version has been properly updated from 0.11.0 to 0.14.0 to match the target version of this PR.
13-25
: Added fingerprint field with appropriate documentationThe addition of the fingerprint field along with comprehensive documentation is a good practice. This field serves as a unique package identifier in Zig 0.14 and helps with package identity verification.
solutions/zig/01-jm1/code/build.zig.zon (3)
2-2
: Package name updated to symbolic reference formatThe change from a string literal to a symbolic reference format (.codecrafters_redis) aligns with Zig 0.14's preferred syntax for package names.
11-11
: Updated minimum Zig versionThe commented minimum Zig version has been properly updated from 0.11.0 to 0.14.0 to match the target version of this PR.
13-25
: Added fingerprint field with appropriate documentationThe addition of the fingerprint field along with comprehensive documentation is a good practice. This field serves as a unique package identifier in Zig 0.14 and helps with package identity verification.
dockerfiles/zig-0.14.Dockerfile (4)
1-14
: Well-structured Docker setup for Zig 0.14The Dockerfile correctly sets up Zig 0.14.0 on Alpine 3.20 with appropriate version constraints for dependencies. The path configuration is properly set to make the Zig compiler available.
15-15
: Dependency file paths environment variableThe CODECRAFTERS_DEPENDENCY_FILE_PATHS environment variable correctly specifies the build.zig and build.zig.zon files that are required for the build process.
19-20
: Potential issue with COPY --exclude flagThe
--exclude
flag isn't part of standard Docker COPY instruction. While this may work with the specified Docker syntax version (1.7-labs), it might not be compatible with standard Docker implementations.Consider using a .dockerignore file instead for better compatibility:
- COPY --exclude=.git --exclude=README.md . /app + # Add .dockerignore file with .git and README.md entries + COPY . /app🧰 Tools
🪛 Hadolint (2.12.0)
[error] 20-20: invalid flag: --exclude
(DL1000)
22-27
: Build and cache setupThe approach to run the build and cache the Zig build artifacts is well-implemented. The use of
|| true
ensures the command doesn't fail if the directory doesn't exist.
Zig 0.14 was recently released with some breaking changes to the
build.zig.zon
file.Summary by CodeRabbit