chore(dev/onboarding): set up mise-based workflow for initial codebase setup#5761
chore(dev/onboarding): set up mise-based workflow for initial codebase setup#5761kanadgupta wants to merge 8 commits into
mise-based workflow for initial codebase setup#5761Conversation
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@68862e363e45cdc26b174c70f942616cbde5d1aaPreview package for commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3820f1b03c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| [hooks] | ||
| # installs the package manager (e.g., pnpm) for the project, if it is not already installed | ||
| postinstall = "corepack enable" |
There was a problem hiding this comment.
Declare the mise version needed for the hook
For contributors who already have a mise release that still gates hooks behind the experimental flag (for example 2026.4.28), this postinstall entry is refused with hooks is experimental unless experimental=true is enabled, so the corepack enable step never runs and the documented mise install flow can leave them without the pinned pnpm/Corepack setup. Please either enable the required setting for those versions or declare a minimum mise version where install hooks are stable.
Useful? React with 👍 / 👎.
|
|
||
| [tools] | ||
| # extracts the go version from `apps/cli-go/go.mod` | ||
| go = "{{ exec(command=`awk '/^go / {print $2}' apps/cli-go/go.mod`) }}" |
There was a problem hiding this comment.
Avoid Unix-only parsing for the Go version
On native Windows setups using the mise installer path linked from CONTRIBUTING, awk is not available by default, so this template command fails while mise is parsing [tools] before it can install Go. That blocks the documented mise install onboarding flow for Windows contributors; use a cross-platform version source or provide a Windows-specific config path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@supabase/cli how much do we accommodate non-Unix developers in this repo? mise supports OS-specific tool installation so I'm happy to split this out to be more OS-specific if needed.
| [tools] | ||
| # extracts the go version from `apps/cli-go/go.mod` | ||
| go = "{{ exec(command=`awk '/^go / {print $2}' apps/cli-go/go.mod`) }}" | ||
| golangci-lint = "2" |
There was a problem hiding this comment.
Pin golangci-lint to the repo's recorded version
I checked mise install --help, which describes major-only specs such as node@20 as fuzzy versions; with golangci-lint = "2", contributors will get whichever 2.x release mise resolves at install time instead of the v2.1.6 already recorded in apps/cli-go/go.mod. When a later 2.x release changes or adds checks, mise install users can see different lint behavior from the repo-pinned Go tool dependency, so this should use the exact version or derive it from go.mod.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Few minor comments and nitpicks, leaving approval to @Coly010 given my comment about NX/monorepo.
Thanks for this PR !
Also, the PR title I think should be chore: as it's only adding dev tools for contributors, nothing user facing in a release.
| - name: Resolve Bun version | ||
| shell: bash | ||
| run: echo "BUN_VERSION=1.3.13" >> "$GITHUB_ENV" | ||
| run: echo "BUN_VERSION=$(cat .bun-version)" >> "$GITHUB_ENV" |
mise-based workflow for initial codebase setupmise-based workflow for initial codebase setup
Co-Authored-By: Andrew Valleteau <avallete@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68862e363e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| From the repo root: | ||
|
|
||
| ```sh | ||
| mise install |
There was a problem hiding this comment.
Document the required mise trust step
Because this config contains [settings] and exec(...) templates, mise treats it as a trusted-only config; the mise trust docs describe templates/settings as outside the safe config set, and a fresh non-interactive mise install stops with an untrusted-config error before installing anything. In the onboarding flow documented here, users who run only this command from a fresh clone in an IDE task/script/non-TTY shell will be blocked, so add the mise trust step or avoid trusted-only features.
Useful? React with 👍 / 👎.
| go = "{{ exec(command=`awk '/^go / {print $2}' apps/cli-go/go.mod`) }}" | ||
| golangci-lint = "2" | ||
| # extracts the pnpm version from `package.json` (in the root) | ||
| pnpm = """{{ exec(command=`jq -r '.packageManager | split("@")[1]' package.json`) }}""" |
There was a problem hiding this comment.
Avoid requiring jq before mise can install tools
This template runs jq while mise is parsing the config, before it has installed any of the repo tools, but jq is not listed as a prerequisite and is not present by default on fresh macOS or native Windows setups. In those environments the documented mise install path fails while resolving the pnpm version, so either use a mise/native file parser or document/install jq before relying on it here.
Useful? React with 👍 / 👎.
What kind of change does this PR introduce?
Adds a
mise.tomlalong with enhancements to ourCONTRIBUTING.mdso first-time contributors have a quick and easy way to install all the correct versions of all of the required software (Node, Bun, Go,golangci-lint, pnpm) to get tests running.I tried to minimize the amount of additional configuration, utilizing existing files (e.g.,
.nvmrc,go.mod,package.json) as the respective versioning sources of truth where applicable.I also chose not to commit a
mise.locklockfile for simplicity's sake but I'm happy to add it if folks want to lean intomisefurther in this repo.What is the current behavior?
If someone clones the repo for the first time, they'll need to manually download all of the executables (Node, Bun, Go, golangci-lint) and look in a few different places to determine which versions to use.
What is the new behavior?
Now, users can install
miseand runmise installand it'll install the correct versions of all the required software:CleanShot.2026-07-02.at.08.04.14.mp4