Skip to content

[Shell] CC-1745: Upgrade Bun to v1.2, Rust to v1.86, and Elixir to v1.18 #87

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

Merged
merged 1 commit into from
May 15, 2025

Conversation

andy1li
Copy link
Member

@andy1li andy1li commented May 15, 2025

Summary by CodeRabbit

  • New Features

    • Added new Dockerfiles for Elixir 1.18, Rust 1.86, and Bun 1.2 environments to support updated language versions and improved build caching.
  • Bug Fixes

    • Improved script reliability by ensuring TypeScript run and compile scripts exit on failure and resolve paths relative to the script location.
  • Documentation

    • Updated README and configuration files to require newer versions of Elixir (1.18), Rust (1.86), and Bun (1.2).
    • Clarified package metadata and instructions across TypeScript, Elixir, and Rust templates.
  • Style

    • Added trailing newlines to .gitignore files for consistency.
  • Chores

    • Updated TypeScript, Elixir, and Rust configuration files to reflect new language/runtime versions and enhanced TypeScript compiler options.
    • Switched TypeScript dev dependencies from Node to Bun types and improved package naming conventions.

…cript projects; enhance TypeScript configuration and scripts for improved functionality.
@andy1li andy1li self-assigned this May 15, 2025
Copy link

linear bot commented May 15, 2025

Copy link

coderabbitai bot commented May 15, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update synchronizes language versions and tooling across Elixir, Rust, and TypeScript starter templates, solutions, and configuration files. It introduces new Dockerfiles for updated language versions, enhances TypeScript configuration for modern ECMAScript features, and improves script robustness by refining execution paths and error handling. Minor documentation and metadata adjustments are also included.

Changes

Files/Paths Change Summary
compiled_starters/elixir/codecrafters.yml, solutions/elixir/01-oo8/code/codecrafters.yml Updated Elixir version from 1.17 to 1.18 in configuration files and comments.
compiled_starters/elixir/mix.exs, solutions/elixir/01-oo8/code/mix.exs, starter_templates/elixir/code/mix.exs Updated Elixir version requirement from "> 1.17" to "> 1.18".
compiled_starters/rust/codecrafters.yml, solutions/rust/01-oo8/code/codecrafters.yml, solutions/rust/02-cz2/code/codecrafters.yml Updated Rust version from 1.85 to 1.86 in configuration files and comments.
compiled_starters/rust/README.md, solutions/rust/01-oo8/code/README.md, solutions/rust/02-cz2/code/README.md Updated required Cargo version from 1.85 to 1.86 in documentation.
compiled_starters/typescript/codecrafters.yml, solutions/typescript/01-oo8/code/codecrafters.yml Updated TypeScript runtime (bun) version from 1.1 to 1.2 in configuration files and comments.
compiled_starters/typescript/README.md, solutions/typescript/01-oo8/code/README.md Updated bun version requirement from 1.1 to 1.2 in documentation.
compiled_starters/typescript/.codecrafters/compile.sh, solutions/typescript/01-oo8/code/.codecrafters/compile.sh, starter_templates/typescript/code/.codecrafters/compile.sh Added set -e for strict error handling in compile scripts.
compiled_starters/typescript/.codecrafters/run.sh, solutions/typescript/01-oo8/code/.codecrafters/run.sh, starter_templates/typescript/code/.codecrafters/run.sh, compiled_starters/typescript/your_program.sh, solutions/typescript/01-oo8/code/your_program.sh Changed script execution to use dynamic path resolution ($(dirname $0)/app/main.ts) and improved inline comments for error handling.
compiled_starters/typescript/.gitignore, solutions/typescript/01-oo8/code/.gitignore, starter_templates/typescript/code/.gitignore Added trailing newline to .gitignore files.
compiled_starters/typescript/package.json, solutions/typescript/01-oo8/code/package.json, starter_templates/typescript/code/package.json Renamed package, capitalized "CodeCrafters" in description, switched devDependency from @types/node to @types/bun.
compiled_starters/typescript/tsconfig.json, solutions/typescript/01-oo8/code/tsconfig.json, starter_templates/typescript/code/tsconfig.json Upgraded TypeScript config: target/module to ESNext, added modern libs, enabled JSX, allowed JS, switched to bundler module resolution, added strictness flags, removed esModuleInterop and ts-node settings.
dockerfiles/bun-1.2.Dockerfile Added new Dockerfile for bun 1.2 with dependency caching and optimized copy steps.
dockerfiles/elixir-1.18.Dockerfile Added new Dockerfile for Elixir 1.18.3 with dependency caching and build optimizations.
dockerfiles/rust-1.86.Dockerfile Added new Dockerfile for Rust 1.86 with dependency tracking and build script execution.
starter_templates/rust/config.yml Updated required Cargo version from 1.85 to 1.86.
starter_templates/typescript/config.yml Updated required bun version from 1.1 to 1.2.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Script
    participant Bun/Node/Elixir/Rust Runtime

    User->>Script: Execute run.sh/your_program.sh
    Script->>Script: set -e # Exit on failure
    Script->>Script: Resolve main.ts path with $(dirname $0)/app/main.ts
    Script->>Bun/Node/Elixir/Rust Runtime: Run main program with correct version/runtime
Loading

Poem

🐇
Versions hop and scripts align,
Dockerfiles fresh, configurations fine.
TypeScript now with modern flair,
Elixir, Rust—new builds to share!
With every tweak, our code feels bright—
The rabbit leaps in pure delight!
🌱✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between c8aa03f and ed6bb08.

⛔ Files ignored due to path filters (3)
  • compiled_starters/typescript/bun.lockb is excluded by !**/bun.lockb
  • solutions/typescript/01-oo8/code/bun.lockb is excluded by !**/bun.lockb
  • starter_templates/typescript/code/bun.lockb is excluded by !**/bun.lockb
📒 Files selected for processing (37)
  • compiled_starters/elixir/codecrafters.yml (1 hunks)
  • compiled_starters/elixir/mix.exs (1 hunks)
  • compiled_starters/rust/README.md (1 hunks)
  • compiled_starters/rust/codecrafters.yml (1 hunks)
  • compiled_starters/typescript/.codecrafters/compile.sh (1 hunks)
  • compiled_starters/typescript/.codecrafters/run.sh (1 hunks)
  • compiled_starters/typescript/.gitignore (1 hunks)
  • compiled_starters/typescript/README.md (1 hunks)
  • compiled_starters/typescript/codecrafters.yml (1 hunks)
  • compiled_starters/typescript/package.json (1 hunks)
  • compiled_starters/typescript/tsconfig.json (1 hunks)
  • compiled_starters/typescript/your_program.sh (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-oo8/code/codecrafters.yml (1 hunks)
  • solutions/elixir/01-oo8/code/mix.exs (1 hunks)
  • solutions/rust/01-oo8/code/README.md (1 hunks)
  • solutions/rust/01-oo8/code/codecrafters.yml (1 hunks)
  • solutions/rust/02-cz2/code/README.md (1 hunks)
  • solutions/rust/02-cz2/code/codecrafters.yml (1 hunks)
  • solutions/typescript/01-oo8/code/.codecrafters/compile.sh (1 hunks)
  • solutions/typescript/01-oo8/code/.codecrafters/run.sh (1 hunks)
  • solutions/typescript/01-oo8/code/.gitignore (1 hunks)
  • solutions/typescript/01-oo8/code/README.md (1 hunks)
  • solutions/typescript/01-oo8/code/codecrafters.yml (1 hunks)
  • solutions/typescript/01-oo8/code/package.json (1 hunks)
  • solutions/typescript/01-oo8/code/tsconfig.json (1 hunks)
  • solutions/typescript/01-oo8/code/your_program.sh (1 hunks)
  • starter_templates/elixir/code/mix.exs (1 hunks)
  • starter_templates/rust/config.yml (1 hunks)
  • starter_templates/typescript/code/.codecrafters/compile.sh (1 hunks)
  • starter_templates/typescript/code/.codecrafters/run.sh (1 hunks)
  • starter_templates/typescript/code/.gitignore (1 hunks)
  • starter_templates/typescript/code/package.json (1 hunks)
  • starter_templates/typescript/code/tsconfig.json (1 hunks)
  • starter_templates/typescript/config.yml (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@andy1li andy1li merged commit 24ed5c8 into main May 15, 2025
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant