🛟 Arrumador: Configure mise, workspaced, and CI#50
Conversation
Co-authored-by: lucasew <15693688+lucasew@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a foundational development environment and continuous integration setup for the monorepo using Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a mise.toml configuration to standardize tasks across a monorepo for Go, Node.js, and Rust projects. The approach of using find to discover and execute tasks is flexible. My review focuses on improving the robustness of these find commands to prevent them from running in unintended directories, such as build artifact folders or vendored dependency directories. I have provided suggestions to add exclusions for vendor directories in Go-related tasks and target directories for Rust tasks. Additionally, I've suggested a performance improvement for the Rust installation task.
| depends = ["lint", "test"] | ||
|
|
||
| [tasks."install:go"] | ||
| run = "find . -name go.mod -execdir go mod tidy \\;" |
There was a problem hiding this comment.
The find command for the Go install task could inadvertently run on go.mod files within a vendor directory if the project uses vendoring. This can lead to unexpected behavior. It's best to explicitly exclude the vendor directory from the search.
run = "find . -name go.mod -not -path '*/vendor/*' -execdir go mod tidy \;"
| run = "find . -name package.json -not -path '*/node_modules/*' -execdir npm install \\;" | ||
|
|
||
| [tasks."install:rust"] | ||
| run = "find . -name Cargo.toml -execdir cargo build \\;" |
There was a problem hiding this comment.
This task can be improved in two ways:
- The
findcommand should exclude thetargetdirectory by adding-not -path '*/target/*'to avoid runningcargoon build artifacts, which can cause errors. - For an
installtask,cargo buildperforms a full compilation. Usingcargo checkis often more appropriate as it's faster. It verifies compilation and fetches dependencies without generating final artifacts.
run = "find . -name Cargo.toml -not -path '*/target/*' -execdir cargo check \;"
| run = "find . -name Cargo.toml -execdir cargo build \\;" | ||
|
|
||
| [tasks."test:go"] | ||
| run = "find . -name go.mod -execdir go test ./... \\;" |
There was a problem hiding this comment.
The find command for the Go test task could inadvertently run on go.mod files within a vendor directory if the project uses vendoring. This can lead to unexpected behavior or test failures. It's best to explicitly exclude the vendor directory from the search.
run = "find . -name go.mod -not -path '*/vendor/*' -execdir go test ./... \;"
| run = "find . -name package.json -not -path '*/node_modules/*' -execdir npm test --if-present \\;" | ||
|
|
||
| [tasks."test:rust"] | ||
| run = "find . -name Cargo.toml -execdir cargo test \\;" |
There was a problem hiding this comment.
The find command should exclude the target directory to avoid running cargo on build artifacts or dependencies within it, which can cause unexpected errors during testing. Please add -not -path '*/target/*' to the find command.
run = "find . -name Cargo.toml -not -path '*/target/*' -execdir cargo test \;"
Assumptions
test:*,install:*,codegen:*).npm,go,cargo,make) can be executed contextually within subdirectories containing matching files (package.json,go.mod,Cargo.toml,Makefile) via thefind ... -execdir ...pattern.dispatchortag.Alternatives Not Chosen
workspaced codebase lint.install:go,test:npm, etc., insidedepends. Decided against it per strict requirement to usewildcards.How To Pivot
findcauses unexpected behaviors on non-Unix systems, update the commands inmise.tomlto a cross-platform alternative or define specific tasks explicitly for known subdirectories.Next Knobs
mise.toml[tools]: Update tool pins.mise.toml[tasks.*]: Adjustfindparameters or add/remove languages like Python or Ruby..github/workflows/autorelease.yml: Add actual artifact paths inside theUpload Artifactsstep.PR created automatically by Jules for task 5507031256308492343 started by @lucasew