Skip to content

Conversation

@thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Oct 22, 2025

The Bun build issue was caused by Turborepo passing through USERPROFILE from the env. Probably need to file a bug with Bun:

Works:
env: USERPROFILE: undefined
CWD: `D:\a\tailwindcss\tailwindcss\packages\@tailwindcss-standalone`

Fails:
env: USERPROFILE: "C:\Users\runneradmin"
CWD: `D:\a\tailwindcss\tailwindcss\packages\@tailwindcss-standalone`

@thecrypticace thecrypticace changed the title temp lock turbo dep bump turbo Oct 22, 2025
@thecrypticace thecrypticace marked this pull request as ready for review November 18, 2025 19:00
@thecrypticace thecrypticace requested a review from a team as a code owner November 18, 2025 19:00
@coderabbitai
Copy link

coderabbitai bot commented Nov 18, 2025

Walkthrough

The git utility isRepoDirty now accepts an optional cwd?: string parameter. Tests in integrations/upgrade/index.test.ts were updated to include a root parameter and call isRepoDirty(root). The Bun build in packages/@tailwindcss-standalone/scripts/build.ts adds USERPROFILE: '' to the environment. package.json updates the devDependency turbo from ^2.5.4 to ^2.6.1.

Pre-merge checks

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive Title 'bump turbo' is too vague and doesn't reflect the full scope of changes; the PR includes env variable workarounds, git utility updates, and test signature changes beyond just a turbo version bump. Use a more descriptive title that captures the main focus, such as 'Fix Bun build on Windows with USERPROFILE env variable' or detail what 'bump turbo' entails.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description explains the Bun build issue caused by Turborepo passing USERPROFILE, with clear examples of working vs failing cases.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/@tailwindcss-standalone/scripts/build.ts (2)

10-11: Consider removing debug logs or gating them behind an environment variable.

These console.log statements appear to be temporary debug logs added to diagnose the USERPROFILE issue mentioned in the PR description. Before merging, consider either:

  • Removing them if they're no longer needed for debugging
  • Gating them behind a debug environment variable (e.g., if (process.env.DEBUG_BUILD)) if they provide ongoing value for troubleshooting build issues

Apply this diff to gate the logs behind a debug flag:

+  if (process.env.DEBUG_BUILD) {
     console.log({ USERPROFILE: process.env.USERPROFILE })
     console.log({ cwd: process.cwd() })
+  }

22-24: Document the USERPROFILE workaround more thoroughly.

This workaround addresses the Windows CI build failures mentioned in the PR description. To improve maintainability and facilitate future removal of this workaround:

  1. Expand the comment to reference the specific issue (e.g., link to a GitHub issue if one was filed with Bun)
  2. Note any known side effects or limitations of setting USERPROFILE to an empty string
  3. Consider adding a TODO comment to track when this workaround can be removed

Apply this diff to improve the documentation:

-        // This is a fix for binary downloads failing on Windows CI
+        // Workaround for Bun binary downloads failing on Windows CI when USERPROFILE
+        // is passed through by Turborepo. See: [issue-link]
+        // TODO: Remove this workaround once Bun fixes the underlying issue
         USERPROFILE: '',
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e4b6c67 and e411e5a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • integrations/upgrade/index.test.ts (2 hunks)
  • package.json (1 hunks)
  • packages/@tailwindcss-standalone/scripts/build.ts (2 hunks)
  • packages/@tailwindcss-upgrade/src/utils/git.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
packages/@tailwindcss-upgrade/src/utils/git.ts (1)
playgrounds/v3/scripts/upgrade.mjs (1)
  • cwd (7-7)
integrations/upgrade/index.test.ts (1)
packages/@tailwindcss-upgrade/src/utils/git.ts (1)
  • isRepoDirty (3-17)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: macOS / cli
  • GitHub Check: macOS / postcss
  • GitHub Check: Windows / postcss
  • GitHub Check: Windows / vite
  • GitHub Check: Windows / cli
  • GitHub Check: Windows / upgrade
  • GitHub Check: Windows
🔇 Additional comments (3)
packages/@tailwindcss-upgrade/src/utils/git.ts (1)

3-5: LGTM! Clean enhancement for directory-aware repo checks.

The optional cwd parameter is a clean addition that maintains backward compatibility while enabling per-directory git status checks. This aligns well with the test changes in integrations/upgrade/index.test.ts where it's used with the root parameter.

integrations/upgrade/index.test.ts (1)

2821-2821: LGTM! Test correctly uses the root-aware dirty check.

The test callback now properly receives the root parameter and passes it to isRepoDirty(root), enabling accurate repository dirty checks scoped to the test's working directory. This aligns well with the API enhancement in packages/@tailwindcss-upgrade/src/utils/git.ts.

Also applies to: 2858-2858

package.json (1)

59-59: Verify whether turbo 2.5.8 was chosen intentionally or if 2.6.1 should be tested.

Version 2.5.8 is outdated; the latest available release is 2.6.1. While no security advisories were found, the newer version may address the USERPROFILE-related issues mentioned in the PR. Confirm whether pinning to 2.5.8 was deliberate (e.g., to avoid regressions in 2.6.1) or if 2.6.1 should be evaluated for compatibility.

@thecrypticace thecrypticace merged commit a7c968e into main Nov 18, 2025
38 of 39 checks passed
@thecrypticace thecrypticace deleted the bump-turbo branch November 18, 2025 20:14
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.

2 participants