-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): stop blocking Bun — it is tier 1, not an anti-pattern #196
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -9,10 +9,10 @@ jobs: | |
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - name: Block npm/bun | ||
| - name: Block npm/pnpm/yarn lockfiles | ||
| run: | | ||
| if [ -f "package-lock.json" ] || [ -f "bun.lockb" ] || [ -f ".npmrc" ]; then | ||
| echo "❌ npm/bun artifacts detected. Use Deno instead." | ||
| if [ -f "package-lock.json" ] || [ -f "pnpm-lock.yaml" ] || [ -f "yarn.lock" ]; then | ||
|
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' '== Repository conventions =='
for f in /tmp/coderabbit-repo-knowledge/hyperpolymath-developer-ecosystem-676f233f/*/*.md; do
[ -f "$f" ] || continue
printf '%s\n' "--- $f"
head -80 "$f"
done
printf '%s\n' '== Workflow files =='
for f in \
rescript-ecosystem/packages/bindings/redis/.github/workflows/npm-bun-blocker.yml \
rescript-ecosystem/packages/bindings/postgres/.github/workflows/npm-bun-blocker.yml \
rescript-ecosystem/packages/core/early-return/.github/workflows/npm-bun-blocker.yml \
rescript-ecosystem/packages/core/env/.github/workflows/npm-bun-blocker.yml \
rescript-ecosystem/packages/core/poly-core/.github/workflows/npm-bun-blocker.yml \
v-ecosystem/v-grpc/.github/workflows/npm-bun-blocker.yml \
v-ecosystem/v-idris-abi/.github/workflows/npm-bun-blocker.yml \
v-ecosystem/v-middleware/.github/workflows/npm-bun-blocker.yml \
v-ecosystem/v-rest/.github/workflows/npm-bun-blocker.yml \
v-ecosystem/v-telemetry/.github/workflows/npm-bun-blocker.yml
do
printf '%s\n' "--- $f"
cat -n "$f"
doneRepository: hyperpolymath/developer-ecosystem Length of output: 50391 🏁 Script executed: #!/bin/bash
set -eu
files=(
rescript-ecosystem/packages/bindings/redis/.github/workflows/npm-bun-blocker.yml
rescript-ecosystem/packages/bindings/postgres/.github/workflows/npm-bun-blocker.yml
rescript-ecosystem/packages/core/early-return/.github/workflows/npm-bun-blocker.yml
rescript-ecosystem/packages/core/env/.github/workflows/npm-bun-blocker.yml
rescript-ecosystem/packages/core/poly-core/.github/workflows/npm-bun-blocker.yml
v-ecosystem/v-grpc/.github/workflows/npm-bun-blocker.yml
v-ecosystem/v-idris-abi/.github/workflows/npm-bun-blocker.yml
v-ecosystem/v-middleware/.github/workflows/npm-bun-blocker.yml
v-ecosystem/v-rest/.github/workflows/npm-bun-blocker.yml
v-ecosystem/v-telemetry/.github/workflows/npm-bun-blocker.yml
)
for file in "${files[@]}"; do
printf '%s\n' "--- $file"
cat -n "$file"
done
printf '%s\n' '== Working-directory configuration in these workflows =='
rg -n -i 'working-directory|defaults:|run:' "${files[@]}" || true
printf '%s\n' '== Lockfiles at each package root and below =='
for root in \
rescript-ecosystem/packages/bindings/redis \
rescript-ecosystem/packages/bindings/postgres \
rescript-ecosystem/packages/core/early-return \
rescript-ecosystem/packages/core/env \
rescript-ecosystem/packages/core/poly-core \
v-ecosystem/v-grpc \
v-ecosystem/v-idris-abi \
v-ecosystem/v-middleware \
v-ecosystem/v-rest \
v-ecosystem/v-telemetry
do
printf '%s\n' "--- $root"
find "$root" -type f \( \
-name package-lock.json -o \
-name npm-shrinkwrap.json -o \
-name pnpm-lock.yaml -o \
-name yarn.lock \
\) -print | sort
doneRepository: hyperpolymath/developer-ecosystem Length of output: 9633 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '== Repository lockfiles =='
git ls-files | rg '(^|/)(package-lock\.json|npm-shrinkwrap\.json|pnpm-lock\.yaml|yarn\.lock)$' | sort
printf '%s\n' '== Package manifests and workflow locations =='
git ls-files | rg '(^|/)(package\.json|npm-bun-blocker\.yml)$' | sort
printf '%s\n' '== Relevant package-root entries =='
for root in \
rescript-ecosystem/packages/bindings/redis \
rescript-ecosystem/packages/bindings/postgres \
rescript-ecosystem/packages/core/early-return \
rescript-ecosystem/packages/core/env \
rescript-ecosystem/packages/core/poly-core \
v-ecosystem/v-grpc \
v-ecosystem/v-idris-abi \
v-ecosystem/v-middleware \
v-ecosystem/v-rest \
v-ecosystem/v-telemetry
do
printf '%s\n' "--- $root"
find "$root" -mindepth 1 -maxdepth 2 -type f -print | sort
doneRepository: hyperpolymath/developer-ecosystem Length of output: 34696 🌐 Web query:
💡 Result: In GitHub Actions, the default working directory for all run steps on a runner is the GITHUB_WORKSPACE environment variable [1][2][3]. This path represents the default location of your repository when using the actions/checkout action, typically structured as /home/runner/work/repo-name/repo-name on Linux-based runners [1][2]. You can change the working directory for run steps using the working-directory keyword [4][5]. This can be configured at two levels: 1. Workflow level: By using the defaults.run key at the top level of your workflow file, you can set a default working directory for all run steps in all jobs [4][5]. 2. Job level: By using the defaults.run key within a specific job (jobs.<job_id>.defaults.run), you can set a default working directory for all run steps in that specific job, which will override any workflow-level default [4][5]. Note that you cannot use contexts or expressions (such as ${{ github.workspace }}) directly within the defaults.run.working-directory keyword [4][5][6]. If you need to specify a working directory for a single, specific step rather than as a default for multiple steps, you can use the working-directory keyword directly on that step [4][5]. When using Docker actions, it is recommended not to use the WORKDIR instruction in your Dockerfile, as GitHub Actions automatically mounts the GITHUB_WORKSPACE directory and sets it as the working directory before execution [7]. Always ensure that any custom working directory you specify exists on the runner before executing commands within it [5]. Citations:
Run each blocker check from its package root. All ten workflows omit 📍 Affects 10 files
🤖 Prompt for AI Agents |
||
| echo "❌ npm/pnpm/yarn artifacts detected. Use Bun (package.json + bun.lock) instead." | ||
| exit 1 | ||
| fi | ||
| echo "✅ No npm/bun violations" | ||
| echo "✅ No npm/pnpm/yarn violations" | ||
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 | 🟠 Major | 🏗️ Heavy lift
Set the working directory for each blocker workflow.
These workflows run relative checks from
$GITHUB_WORKSPACE, so they inspect only the repository root and can miss forbidden package-manager files in nested project directories. Setworking-directoryordefaults.run.working-directoryto the relevant project directory in all affected workflows.📍 Affects 2 files
rescript-ecosystem/packages/bindings/postgres/.github/workflows/npm-bun-blocker.yml#L13-L15(this comment)rescript-ecosystem/packages/tooling/alib-for-rescript/.github/workflows/npm-bun-blocker.yml#L12-L18🤖 Prompt for AI Agents