Skip to content

Conversation

@JSerFeng
Copy link
Contributor

Summary

Current only binary size of linux is checked, but most users use mac and windows, should watch size changes of them as well

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 14, 2025 07:26
@netlify
Copy link

netlify bot commented Nov 14, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit b53d351
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6916e2541aa7d7000850c345

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 14, 2025
@JSerFeng JSerFeng marked this pull request as draft November 14, 2025 07:29
@JSerFeng JSerFeng force-pushed the feat/linux-mac-size-limits branch from 10315fd to 2d90dbc Compare November 14, 2025 07:30
Copilot finished reviewing on behalf of JSerFeng November 14, 2025 07:33
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Nov 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends binary size monitoring from Linux-only to include macOS and Windows platforms, enabling size tracking for the binaries that most users actually use.

Key Changes:

  • Added matrix strategy to run binary size checks on Linux (x86_64-unknown-linux-gnu), macOS (aarch64-apple-darwin), and Windows (x86_64-pc-windows-msvc) platforms
  • Refactored binary-limit action to support multiple platforms with platform-specific binary path mappings
  • Implemented a two-stage workflow: individual platform checks that upload results, followed by a gather-results job that combines and posts a unified report

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/size-limit.yml Converted from single-platform to matrix-based execution; added artifact collection and result aggregation
.github/actions/binary-limit/binary-limit-script.js Added platform parameter support, binary path mappings for all platforms, and multi-platform report formatting
.github/actions/binary-limit/action.yml Added platform input parameter and result output for multi-platform support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

with:
script: |
const limit = parseInt("${{ inputs.size-threshold }}") || 51200;
const platform = inputs.platform;
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

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

The platform input should be accessed using GitHub Actions expression syntax. Line 30 attempts to access inputs.platform directly in JavaScript, but inputs is not available in the script context. It should be "${{ inputs.platform }}" to match the pattern used on line 29 for size-threshold.

Suggested change
const platform = inputs.platform;
const platform = "${{ inputs.platform }}";

Copilot uses AI. Check for mistakes.
run: |
rustup target add x86_64-unknown-linux-gnu
RUST_TARGET=x86_64-unknown-linux-gnu pnpm build:binding:release
rustup target add ${{ matrix.target }}
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

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

Redundant rustup target add command. This target was already added in the "Setup Rust Target" step at line 47. The duplicate command on line 59 should be removed.

Suggested change
rustup target add ${{ matrix.target }}

Copilot uses AI. Check for mistakes.
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

- name: Download size reports
uses: actions/[email protected]
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

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

Inconsistent action version format. The action version should be @v4.1.7 (with v prefix) to match the convention used elsewhere in the repository (e.g., line 21 in .github/actions/artifact/download/action.yml).

Suggested change
uses: actions/download-artifact@4.1.7
uses: actions/download-artifact@v4.1.7

Copilot uses AI. Check for mistakes.
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 14, 2025

CodSpeed Performance Report

Merging #12200 will not alter performance

Comparing feat/linux-mac-size-limits (b53d351) with main (7d4a1a3)

Summary

✅ 17 untouched

@JSerFeng JSerFeng force-pushed the feat/linux-mac-size-limits branch from 2d90dbc to b53d351 Compare November 14, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants