-
Notifications
You must be signed in to change notification settings - Fork 6
build: add mise toolchain #1191
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| [env] | ||
| DEVSY_GIT_SIGNING_PRIVATE_KEY = { age = "YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBQTHlMQmxra00yOWRKTUI0bithV0xtNkVwRXVreDFPT1BYR1UzN1VXdHo4CnVSOVdYUDdPeGJFSjFrN0lkQjBVRndheUhwRjdKNitlWVBYSEgrMEp3YzAKLT4gP0xhOi0tZ3JlYXNlIDUoYiBqaFUgbUsjIHooSXM9ajgqCm84VDdsS3ZtcEk0UkhQUHVXQzhCbmxpSXBkSmh0eTVNV25VNGZhYUJ5SER6NUFiZE03WDRFV212YkVRCi0tLSA2dmZZK3QzZFpGRDY5a29hQ2t4dnhyemJjMlFaVU9ncmdmeTlYbUVNTkFRCuB0Lsu02r99Y/DkyFleuWJzSoCVggBIG1Se9AD04rF38nRhmAXSDk5G7s2BGW2fWs8HSsrohaaMS2EmTxFx/FlGXHzaqlxLXhxvDErI2oU/oqXKNtEKVTMYo5LzHTCRovVKVR+ELDpkTpClYoQi17ukjMXelOZRsEQ6wDhiO/3YXqcX738Kh7rzdqA2W3CgYOxLjoYnBtHL0dzsXpFj339mCOI/naDgCn5lfMiNplqlTuGG2RO/f+nfT9/c0+QtibWaAuq2OwNb/kzQctPFFBg4YeAjraMtgWuBYEau6S8juGgF6DsPpC1emUpAIZHibyFaIDuLYBWyjgZ1GJUC4ZztJ+uYHdFewSlgXT2xXNfOS2fASaxi9A1wpkcjbuIXqv6aGIkZL16/JeBBFLzyrPuEy7rIqG/ly1IYWSi7RUJuMay6m02FD6uJzlp8Yo1S+AgAvFFNP1nzlUlE5Cu/+ffhmp1soHqY53LptCf/OyS74Emcu/L9eaa99X1SsZE7J+aOnwatDaPBBR/KCp96q8oTbMxKiEq+ZP6CzAlukzGS9nI" } | ||
|
|
||
| [tasks."setup:agent"] | ||
| run = ''' | ||
| set -eu | ||
| if [ -z "$DEVSY_GIT_SIGNING_PRIVATE_KEY" ]; then | ||
| echo "DEVSY_GIT_SIGNING_PRIVATE_KEY is not set" | ||
| exit 1 | ||
| fi | ||
| if [ -z "$DEVSY_GIT_AUTHOR_NAME" ]; then | ||
| echo "DEVSY_GIT_AUTHOR_NAME is not set" | ||
| exit 1 | ||
| fi | ||
| if [ -z "$DEVSY_GIT_AUTHOR_EMAIL" ]; then | ||
| echo "DEVSY_GIT_AUTHOR_EMAIL is not set" | ||
| exit 1 | ||
| fi | ||
| SIGNING_DIR="$HOME/.local/share/devsy/signing" | ||
| SIGNING_PRIVATE_KEY="$SIGNING_DIR/devsy-agent-signing" | ||
| SIGNING_PUBLIC_KEY="$SIGNING_DIR/devsy-agent-signing.pub" | ||
|
|
||
| mkdir -p "$SIGNING_DIR" | ||
| chmod 700 "$SIGNING_DIR" | ||
|
|
||
| echo "$DEVSY_GIT_SIGNING_PRIVATE_KEY" > "$SIGNING_PRIVATE_KEY" | ||
| chmod 600 "$SIGNING_PRIVATE_KEY" | ||
|
|
||
| ssh-keygen -y -f "$SIGNING_PRIVATE_KEY" > "$SIGNING_PUBLIC_KEY" | ||
|
|
||
| git config --global gpg.format ssh | ||
| git config --global user.signingkey "$SIGNING_PUBLIC_KEY" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- mise.agent.toml ---'
cat -n mise.agent.toml
printf '%s\n' '--- related configuration and references ---'
rg -n --hidden --glob '!node_modules' --glob '!dist' 'SIGNING_(PRIVATE|PUBLIC)_KEY|user\.signingkey|gpg\.format|commit\.gpgsign|tag\.gpgSign|ssh-agent|ssh-add|mise\.agent|setup:agent' .Repository: devsy-org/devsy Length of output: 9319 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- SSH signing tests ---'
sed -n '180,255p' e2e/tests/ssh/ssh.go
sed -n '380,425p' e2e/tests/ssh/ssh.go
printf '%s\n' '--- Git SSH-signing helper and tests ---'
sed -n '1,220p' pkg/gitsshsigning/helper.go
sed -n '1,190p' cmd/internal/git_ssh_signature.goRepository: devsy-org/devsy Length of output: 15598 🌐 Web query:
💡 Result: To sign Git commits using an SSH key managed by ssh-agent, you must configure Git to use the SSH signing format. While official Git configuration documentation focuses primarily on core settings, the standard workflow for enabling SSH commit signing involves setting the following configurations [1][2]. First, set the GPG format to ssh: git config --global gpg.format ssh Next, specify the public key to be used for signing. The user.signingKey value should be the public SSH key content or a path to it (typically ending in.pub). Git will utilize ssh-agent to handle the private key automatically when a commit is signed [1][2]: git config --global user.signingKey /path/to/your/public-key.pub To enable signing for all commits automatically, you can also set the following: git config --global commit.gpgSign true Because your private key is managed by ssh-agent, you do not need to configure the private key path directly in Git; ensure your SSH key is added to the agent using ssh-add before attempting to sign commits [3][4]. Citations:
Load the signing key into an SSH agent before enabling SSH signing.
🤖 Prompt for AI Agents |
||
| git config --global commit.gpgsign true | ||
| git config --global tag.gpgsign true | ||
| git config --global user.name "$DEVSY_GIT_AUTHOR_NAME" | ||
| git config --global user.email "$DEVSY_GIT_AUTHOR_EMAIL" | ||
| ''' | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| [settings] | ||
| experimental = true | ||
| lockfile = true | ||
| lockfile_platforms = ["linux-x64"] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
test -f mise.lock
missing=0
for platform in linux-x64 macos-x64 macos-arm64 windows-x64; do
if ! rg -q --fixed-strings "$platform" mise.lock; then
echo "missing lockfile platform: $platform" >&2
missing=1
fi
done
exit "$missing"Repository: devsy-org/devsy Length of output: 268 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- mise.toml ---'
cat -n mise.toml
printf '%s\n' '--- relevant platform/support references ---'
rg -n -i --glob '!mise.lock' --glob '!vendor/**' \
'macos|darwin|windows|linux|platform|supported|development' \
README.md CONTRIBUTING.md docs .github mise.toml 2>/dev/null || true
printf '%s\n' '--- lockfile platform entries ---'
rg -n -C 2 'linux-x64|macos-x64|macos-arm64|windows-x64|platform' mise.lock 2>/dev/null || trueRepository: devsy-org/devsy Length of output: 20297 🌐 Web query:
💡 Result: In mise, Citations:
🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- tracked files relevant to repository support ---'
git ls-files | rg -i '(^|/)(readme|contributing|support|mise\.toml|mise\.lock)(\.[^/]*)?$|docs/|\.github/' | head -200Repository: devsy-org/devsy Length of output: 5133 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- CONTRIBUTING development setup ---'
sed -n '1,130p' CONTRIBUTING.md
printf '%s\n' '--- CI setup references to mise ---'
rg -n -C 4 'mise|setup.*tool|install.*tool|npm ci|go mod download|prek install' \
.github/workflows/desktop-ci.yml .github/workflows/pr-ci.yml .github/workflows/release.ymlRepository: devsy-org/devsy Length of output: 5114 🌐 Web query:
💡 Result: In mise, the lockfile_platforms setting is used to restrict which platforms are included when auto-locking or running the mise lock command [1]. When defined, this setting helps keep lockfiles smaller and improves the performance of operations like mise install or mise use by avoiding the resolution of checksums and URLs for unnecessary platforms [1]. This configuration is defined within the [settings] table of your mise.toml file [1]. You can specify one or more platforms using the os-arch or os-arch-qualifier format (e.g., linux-x64, linux-x64-musl, macos-arm64) [1]. Example configuration in mise.toml: [settings] lockfile_platforms = ["macos-arm64", "linux-x64"] Key details regarding this setting include: - It can also be configured via the MISE_LOCKFILE_PLATFORMS environment variable (comma-separated) [1]. - If left unset, mise defaults to targeting all common platforms (such as linux-x64, linux-x64-musl, linux-arm64, linux-arm64-musl, macos-x64, macos-arm64, and windows-x64) in addition to the current platform [1]. - The current platform is always included in the lockfile, regardless of this setting [1]. - This setting does not override explicit --platform flags used with the mise lock command [1]. Citations: 🌐 Web query:
💡 Result: In mise, [tool_config] locked = true is a configuration policy used to enforce reproducible tool installations by requiring that tools be resolved and installed from a lockfile [1][2]. When this setting is enabled in your mise.toml file, mise will fail during installation if the required tools do not have pre-resolved versions and asset information recorded in the corresponding lockfile (e.g., mise.lock) [1][3][4]. This ensures that your project uses identical tool versions and binaries across different environments, preventing reliance on external API lookups (like GitHub) during installation [3][4]. Key details regarding this configuration: Scope: The [tool_config] section applies specifically to tools declared within the same configuration root (e.g., in mise.toml and mise.local.toml) [1][4]. It does not override or affect tool policies inherited from global or parent configuration files [1][4]. Lockfiles: To use locked mode, you must have a lockfile present [3]. If you do not have one, you can create an empty file (e.g., touch mise.lock) and run mise install to populate it [5]. Comparison with global settings: While you can set locked = true in global settings, that applies to all tool resolution invocation-wide [3][4]. Using [tool_config] locked = true is the recommended way to enforce strict, reproducible mode only for a specific project's tools [4]. Citations:
🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
python3 - <<'PY'
from urllib.request import urlopen
url = "https://mise.jdx.dev/configuration/settings.html"
text = urlopen(url, timeout=10).read().decode()
for needle in ("lockfile_platforms", "locked", "tool_config"):
print(f"--- {needle} ---")
pos = 0
found = False
while True:
pos = text.find(needle, pos)
if pos < 0:
break
found = True
print(text[max(0, pos-300):pos+500].replace("\n", " ")[:800])
pos += len(needle)
if not found:
print("not found")
PYRepository: devsy-org/devsy Length of output: 2439 Add lockfile entries for all supported platforms.
🤖 Prompt for AI Agents |
||
|
|
||
| [tool_config] | ||
| locked = true | ||
|
|
||
| [tools] | ||
| go = "1.26.5" | ||
| node = "24" | ||
| task = "3.53.1" | ||
| golangci-lint = "2.12.2" | ||
| prek = "0.5.2" | ||
| protoc = "36.1" | ||
| gh = "2.100.0" | ||
|
|
||
| [tasks.setup] | ||
| depends = ["setup:dependencies", "setup:hooks"] | ||
|
|
||
| [tasks."setup:dependencies"] | ||
| run = ''' | ||
| go mod download | ||
| npm ci | ||
| (cd desktop && npm ci) | ||
| ''' | ||
|
|
||
| [tasks."setup:hooks"] | ||
| run = ''' | ||
| prek install | ||
| ''' | ||
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 195
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 8538
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 4755
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 8366
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 1490
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 8382
🏁 Script executed:
Repository: devsy-org/devsy
Length of output: 6792
🌐 Web query:
official mise documentation environment-specific mise.<environment>.toml files -E MISE_ENV💡 Result:
Mise supports environment-specific configuration files using the MISE_ENV environment variable [1][2][3]. When MISE_ENV is set to a specific value (e.g., development or production), mise automatically looks for configuration files with that suffix in the current and parent directories [1]. How it works: 1. Setting MISE_ENV: You can set the MISE_ENV environment variable via your shell, a CLI flag (e.g., --env development), or within a.miserc.toml file for persistent configuration [1]. 2. File Discovery: When MISE_ENV is active, mise searches for files such as mise.{MISE_ENV}.toml or.mise.{MISE_ENV}.toml [1][2]. 3. Multiple Environments: You can specify multiple environments by separating them with commas (e.g., MISE_ENV=ci,test), in which case they are read in the specified order, with the last one taking precedence [4][5]. 4. Precedence: These environment-specific files are integrated into the standard configuration loading hierarchy, allowing them to override broader configuration files like standard mise.toml files [1][2][3]. Note: MISE_ENV itself cannot be defined within a mise.toml file because it determines which configuration files to load before the file is parsed [1]. Additionally, mise also supports environment-specific "local" files (e.g., mise.{MISE_ENV}.local.toml) intended for machine-specific overrides that should not be committed to version control [1].
Citations:
Select the
agentenvironment when runningsetup:agentmise.agent.tomldefinessetup:agent, but the repository has no tracked invocation that setsMISE_ENV=agent. A plainmise run setup:agentcan therefore omit this task. AddMISE_ENV=agent mise run setup:agentto the setup documentation or automation.🤖 Prompt for AI Agents