Skip to content

Drop x86_64-darwin#207

Merged
grahamc merged 5 commits intomainfrom
push-pokunnsooyqs
Nov 10, 2025
Merged

Drop x86_64-darwin#207
grahamc merged 5 commits intomainfrom
push-pokunnsooyqs

Conversation

@grahamc
Copy link
Copy Markdown
Member

@grahamc grahamc commented Nov 8, 2025

Implements DeterminateSystems/nix-src#224

Description
Checklist
  • Tested changes against a test repository
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • (If this PR is for a release) Updated README to point to the new tag (leave unchecked if not applicable)

Summary by CodeRabbit

  • Chores

    • Removed Intel macOS from supported platforms, reducing targets that receive development shells and per-system settings.
    • CI: Devshell rendering step now skips the two large macOS runners.
  • Bug Fixes / Behavior

    • Installer creation on Intel macOS now fails with an error instead of proceeding.
    • If no installer tag is provided, the process falls back to tag v3.12.2.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 8, 2025

Walkthrough

Removed x86_64-darwin from flake.nix supportedSystems, added constructor-side platform handling in src/index.ts that errors on Intel macOS and sets INPUT_SOURCE-TAG=v3.12.2 if source-tag is absent, and restricted a CI step to skip two large macOS runners.

Changes

Cohort / File(s) Summary
System Support Configuration
flake.nix
Removed the x86_64-darwin entry from supportedSystems, reducing supported platforms from four to three.
Installer action platform handling
src/index.ts
In NixInstallerAction constructor, detect x86_64 macOS (Intel): emit a hard error via actionsCore.error indicating unsupported platform; read input source-tag and if undefined emit a notice and set environment variable INPUT_SOURCE-TAG = "v3.12.2".
CI workflow condition
.github/workflows/ci.yml
Updated the "Render the devshell" step condition to skip when matrix.runner is macos-13-large or macos-14-large, narrowing when the step runs.

Sequence Diagram(s)

sequenceDiagram
  participant Runner
  participant Action as NixInstallerAction
  participant Env as Environment

  Runner->>Action: instantiate action (runtime info)
  Note right of Action `#ddeeff`: detect platform (os + arch)
  alt x86_64 macOS (Intel)
    Action->>Runner: emit hard error (Intel macOS unsupported)
    Note right of Runner `#ffeecc`: constructor may abort
    Action->>Action: attempt read input "source-tag"
    alt input undefined
      Action->>Runner: emit notice about pinning to v3.12.2
      Action->>Env: set INPUT_SOURCE-TAG = "v3.12.2"
    else input provided
      Action->>Runner: continue with provided tag
    end
  else other platform
    Action->>Runner: proceed normally
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Check src/index.ts for correct use of actionsCore.error vs. failing behavior and scope of the env assignment.
  • Verify no remaining references or tests expecting x86_64-darwin in flake.nix.
  • Confirm CI condition logic in .github/workflows/ci.yml matches intended runner semantics.

Poem

🐰 I nibbled flakes and pruned a line,
Intel macs now stop at the sign.
A fallback tag I gently sowed,
v3.12.2 — so builds still go.
Hoppity cheers for tidy code.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Drop x86_64-darwin' directly and accurately summarizes the main change: removing x86_64-darwin from supported systems across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch push-pokunnsooyqs

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d88c2e8 and 540d4ad.

⛔ Files ignored due to path filters (1)
  • dist/index.js is excluded by !**/dist/**
📒 Files selected for processing (1)
  • src/index.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/index.ts
⏰ 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). (9)
  • GitHub Check: Test: macos-14-xlarge with determinate
  • GitHub Check: Test: macos-14-xlarge
  • GitHub Check: Test: macos-14-large
  • GitHub Check: Test: macos-14-large with determinate
  • GitHub Check: Test: macos-13-large with determinate
  • GitHub Check: Test: macos-13-large
  • GitHub Check: Test: namespace-profile-default-arm64
  • GitHub Check: Test: ubuntu-latest
  • GitHub Check: Test: nscloud-ubuntu-22.04-amd64-4x16

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

@colemickens

This comment was marked as outdated.

Copy link
Copy Markdown

@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 (1)
src/index.ts (1)

93-105: Consider refactoring this platform-specific guard for maintainability and code quality.

While this approach is functional for handling end-of-support for Intel Macs, there are several improvements to consider:

  1. Unprofessional comment (line 94): The comment "Holy guacamole this is ugly" should be removed or rewritten professionally. Comments like this undermine code quality and don't explain why this approach was necessary.

  2. Hardcoded version string (line 103): The version "v3.12.2" is hardcoded, making it harder to maintain. Consider extracting it as a constant at the file level:

    const LAST_INTEL_MAC_SUPPORTED_VERSION = "v3.12.2";
  3. Direct environment manipulation: Setting process.env["INPUT_source-tag"] directly bypasses normal input mechanisms. While this works for GitHub Actions (which reads inputs from INPUT_* environment variables), it's unconventional and could be confusing. Consider documenting why this approach is necessary, or explore if detsys-ts provides a cleaner way to set default inputs.

  4. Constructor placement: While technically correct (no this access before super()), having complex conditional logic in the constructor is less than ideal. Consider extracting to a private static method:

    private static applyIntelMacWorkaround(): void {
      if (platform.getArchOs() === "X64-macOS") {
        actionsCore.warning("...");
        const sourceTag = inputs.getStringOrUndefined("source-tag");
        if (sourceTag === undefined) {
          actionsCore.notice("...");
          process.env["INPUT_source-tag"] = LAST_INTEL_MAC_SUPPORTED_VERSION;
        }
      }
    }

Given the PR comment "CI needs attention," please verify that the pinned version works correctly on Intel Macs and that appropriate tests exist for this code path.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9fc343c and c8bf775.

⛔ Files ignored due to path filters (1)
  • dist/index.js is excluded by !**/dist/**
📒 Files selected for processing (1)
  • src/index.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/index.ts (1)
dist/index.js (4)
  • platform (99922-99922)
  • sourceTag (101443-101443)
  • inputs (3395-3397)
  • process (24980-24980)
⏰ 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). (10)
  • GitHub Check: Test: macos-14-large
  • GitHub Check: Test: macos-14-xlarge
  • GitHub Check: Test: macos-14-xlarge with determinate
  • GitHub Check: Test: macos-14-large with determinate
  • GitHub Check: Test: namespace-profile-default-arm64 with determinate
  • GitHub Check: Test: macos-13-large with determinate
  • GitHub Check: Test: macos-13-large
  • GitHub Check: Test: namespace-profile-default-arm64
  • GitHub Check: Test: nscloud-ubuntu-22.04-amd64-4x16
  • GitHub Check: Test: ubuntu-latest

Copy link
Copy Markdown

@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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3b0637f and d88c2e8.

⛔ Files ignored due to path filters (1)
  • dist/index.js is excluded by !**/dist/**
📒 Files selected for processing (1)
  • src/index.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/index.ts (1)
dist/index.js (4)
  • platform (99922-99922)
  • sourceTag (101443-101443)
  • inputs (3395-3397)
  • process (24980-24980)
⏰ 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). (9)
  • GitHub Check: Test: macos-14-xlarge with determinate
  • GitHub Check: Test: macos-13-large
  • GitHub Check: Test: macos-14-xlarge
  • GitHub Check: Test: macos-14-large
  • GitHub Check: Test: ubuntu-latest
  • GitHub Check: Test: macos-14-large with determinate
  • GitHub Check: Test: macos-13-large with determinate
  • GitHub Check: Test: nscloud-ubuntu-22.04-amd64-4x16
  • GitHub Check: Test: namespace-profile-default-arm64


- name: Render the devshell
if: success() || failure()
if: (success() || failure()) && matrix.runner != 'macos-13-large' && matrix.runner != 'macos-14-large'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why? Does the devshell not build for macOS? That's surprising?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

macos-13-large and macos-14-large are Intel macs, which no longer has a dev shell

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why are they not just removed from the matrix, if we're dropping them after all?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't want to cause all CI runs to immediately fail as soon as we merge and cause a stop-the-world emergency for people all at once. That'll include us, since we haven't deleted x86_64-darwin from all our CI workflows. I'm thinking we have this pin-back warning, and then in a couple weeks or so move to failing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

(...which implies making sure it works :P)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, the reason we're keeping this around is so that we actually test our "fall back to version that supports x86" code, so we don't immediately break all users who were using x86 macs

And since there's no devshell for x86 macs in this repo anymore we have to skip this step

But we still want to test that x86 isn't hard-broken just yet.

@grahamc grahamc requested a review from colemickens November 9, 2025 20:22
actionsCore.error(
"Determinate Nix Installer no longer supports macOS on Intel. Please migrate to Apple Silicon, and use Nix's built-in Rosetta support to build for Intel. See: https://github.com/DeterminateSystems/nix-src/issues/224",
);
const sourceTag = inputs.getStringOrUndefined("source-tag");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What if they're setting source-rev, or source-pr, or any of our other source-..... args? We probably shouldn't override those too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

as far as I can tell, absolutely nobody does that for x86_64-darwin:

CleanShot 2025-11-09 at 22 53 24@2x

@grahamc grahamc merged commit 89b1f59 into main Nov 10, 2025
17 checks passed
@grahamc grahamc deleted the push-pokunnsooyqs branch November 10, 2025 03:55
@coderabbitai coderabbitai bot mentioned this pull request Nov 10, 2025
3 tasks
@coderabbitai coderabbitai bot mentioned this pull request Jan 28, 2026
3 tasks
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.

3 participants