helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Turbopack: Use workaround for rustc miscompilation bug on macos intel

Uses https://github.com/hyperium/hyper/pull/3908 cherry-picked on top of hyper v1.6.0 to work around https://github.com/hyperium/hyper/issues/3902 and https://github.com/rust-lang/rust/issues/140686

- Git Branch: https://github.com/bgw/hyper-rs/commits/v1.6.0-with-macos-intel-miscompilation-workaround/
- Cherry-picked commit: https://github.com/bgw/hyper-rs/commit/ab3544930722e6c270c16d3239dbb1d58f713393

Fixes #81697

The proper fix is to update the rustc toolchain, but since we use nightly toolchains, this is too risky for a minor patch release. So this applies the workaround instead.

## Test Plan

Force using x86-64 under Rosetta by downloading a "standalone" version of nodejs and adding it to the front of the `PATH` with:

```
export PATH=/Users/bgw/Downloads/node-v22.17.1-darwin-x64/bin/:"$PATH"
```

Use `create-next-app` to create a new app. This fetching Geist by default.

Run `pnpm dev`, see the 404 errors.

Modify the `package.json` to use this preview version:

```
    "next": "https://vercel-packages.vercel.app/next/commits/16196a3d2d7df65222727619e8db993336cf7aff/next"
```

Run `pnpm i && pnpm dev`, see that the 404s are solved!

Closes PACK-5117

Changed files:
filename: Cargo.lock
patch: @@ -2809,8 +2809,7 @@ dependencies = [
 [[package]]
 name = "hyper"
 version = "1.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80"
+source = "git+https://github.com/bgw/hyper-rs.git?branch=v1.6.0-with-macos-intel-miscompilation-workaround#ab3544930722e6c270c16d3239dbb1d58f713393"
 dependencies = [
  "bytes",
  "futures-channel",

filename: Cargo.toml
patch: @@ -438,6 +438,7 @@ vergen-gitcl = { version = "1.0.8", features = [
 webbrowser = "0.8.7"
 
 [patch.crates-io]
-mdxjs = { git = "https://github.com/kdy1/mdxjs-rs.git", branch = "swc-core-30" }
+hyper = { git = "https://github.com/bgw/hyper-rs.git", branch = "v1.6.0-with-macos-intel-miscompilation-workaround" }
 lightningcss = { git = "https://github.com/parcel-bundler/lightningcss.git", branch = "mischnic/bump-browserslist" }
+mdxjs = { git = "https://github.com/kdy1/mdxjs-rs.git", branch = "swc-core-30" }
 parcel_selectors = { git = "https://github.com/parcel-bundler/lightningcss.git", branch = "mischnic/bump-browserslist" }
Repository: huggingface/transformers
Pull request: Fix version issue in modeling_utils.py

# What does this PR do?

As per the title. `nn.RMSNorm` was added in torch 2.4, which created friction when calling the function. This fixes it by simply removing it from the `isinstance` check, as the name test is enough anyway and already covers it

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -2881,9 +2881,7 @@ def _init_weights(self, module):
         # We cannot use `isinstance` on the RMSNorms or LayerNorms, as they usually are custom modules which change names
         # between modelings (because they are prefixed with the model name)
         elif (
-            isinstance(
-                module, (nn.LayerNorm, nn.RMSNorm, nn.GroupNorm, nn.BatchNorm1d, nn.BatchNorm2d, nn.BatchNorm3d)
-            )
+            isinstance(module, (nn.GroupNorm, nn.BatchNorm1d, nn.BatchNorm2d, nn.BatchNorm3d))
             or "LayerNorm" in module.__class__.__name__
             or "RMSNorm" in module.__class__.__name__
         ):
Repository: denoland/deno
Pull request: ci: only check git changes on pull requests

See https://github.com/denoland/deno/actions/runs/15333789783/job/43146617279.

Changed files:
filename: .github/workflows/ci.generate.ts
patch: @@ -1002,7 +1002,7 @@ const ci = {
         },
         {
           name: "Ensure no git changes",
-          if: "matrix.job == 'test'",
+          if: "matrix.job == 'test' && github.event_name == 'pull_request'",
           run: [
             'if [[ -n "$(git status --porcelain)" ]]; then',
             'echo "❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files."',

filename: .github/workflows/ci.yml
patch: @@ -617,7 +617,7 @@ jobs:
           !startsWith(github.ref, 'refs/tags/'))))
         run: cargo test --release --locked --features=panic-trace
       - name: Ensure no git changes
-        if: '!(matrix.skip) && (matrix.job == ''test'')'
+        if: '!(matrix.skip) && (matrix.job == ''test'' && github.event_name == ''pull_request'')'
         run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
       - name: Configure hosts file for WPT
         if: '!(matrix.skip) && (matrix.wpt)'
Repository: ggml-org/llama.cpp
Pull request: ci : add caching for ROCm installation in release workflow

This commit applies the same caching to the release workflow which currently exists for the main CI workflow that was introduced in Commit ff02caf9eed261423289d1531a56536fbf57bfc2 ("ci : cache ROCm installation in windows-latest-cmake-hip (#15887)").

----
Example release workflow:
https://github.com/danbev/llama.cpp/actions/runs/17614411525/job/50043790575


Changed files:
filename: .github/workflows/release.yml
patch: @@ -544,27 +544,52 @@ jobs:
         run: |
           git clone https://github.com/rocm/rocwmma --branch rocm-6.2.4 --depth 1
 
+      - name: Cache ROCm Installation
+        id: cache-rocm
+        uses: actions/cache@v4
+        with:
+          path: C:\Program Files\AMD\ROCm
+          key: rocm-6.1-${{ runner.os }}-v1
+          restore-keys: |
+            rocm-6.1-${{ runner.os }}-
+
       - name: ccache
         uses: ggml-org/ccache-action@v1.2.16
         with:
           key: windows-latest-cmake-hip-${{ matrix.name }}-x64
           evict-old-files: 1d
 
-      - name: Install
+      - name: Install ROCm
+        if: steps.cache-rocm.outputs.cache-hit != 'true'
         id: depends
         run: |
           $ErrorActionPreference = "Stop"
           write-host "Downloading AMD HIP SDK Installer"
           Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-24.Q3-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
           write-host "Installing AMD HIP SDK"
           $proc = Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -PassThru
-          $proc.WaitForExit(600000)
+          $completed = $proc.WaitForExit(600000)
+          if (-not $completed) {
+              Write-Error "ROCm installation timed out after 10 minutes. Killing the process"
+              $proc.Kill()
+              exit 1
+          }
+          if ($proc.ExitCode -ne 0) {
+              Write-Error "ROCm installation failed with exit code $($proc.ExitCode)"
+              exit 1
+          }
           write-host "Completed AMD HIP SDK installation"
 
       - name: Verify ROCm
         id: verify
         run: |
-          & 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' --version
+          # Find and test ROCm installation
+          $clangPath = Get-ChildItem 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | Select-Object -First 1
+          if (-not $clangPath) {
+            Write-Error "ROCm installation not found"
+            exit 1
+          }
+          & $clangPath.FullName --version
 
       - name: Build
         id: cmake_build
Repository: vercel/next.js
Pull request: Remove some random commas


Changed files:
filename: docs/01-app/03-api-reference/03-file-conventions/route-segment-config.mdx
patch: @@ -71,11 +71,11 @@ export const dynamic = 'auto'
 Control what happens when a dynamic segment is visited that was not generated with [generateStaticParams](/docs/app/api-reference/functions/generate-static-params).
 
 ```tsx filename="layout.tsx | page.tsx" switcher
-export const dynamicParams = true // true | false,
+export const dynamicParams = true // true | false
 ```
 
 ```js filename="layout.js | page.js | route.js" switcher
-export const dynamicParams = true // true | false,
+export const dynamicParams = true // true | false
 ```
 
 - **`true`** (default): Dynamic segments not included in `generateStaticParams` are generated on demand.
Repository: ggml-org/llama.cpp
Pull request: ggml-cpu : fix padding in ggml_timestep_embedding

This commit fixes the zero padding for odd dimensions in ggml_compute_forward_timestep_embedding_f32.
The motivation for this is that currently if an odd dimension is used, the padding check incorrectly uses the dimension value for indexing. For example, with dim=15:

Elements 0-6 are set to cosine values
Elements 7-13 are set to sine values
Element 14 is left uninitialized (contains garbage) 
Element 15 is correctly set to zero

This fix changes embed_data[dim] to embed_data[2 * half] so that element 14 (the first unused element) is properly set to zero as well as the last element.

Resolves: https://github.com/ggml-org/ggml/issues/1324


Changed files:
filename: ggml/src/ggml-cpu/ops.cpp
patch: @@ -8598,6 +8598,7 @@ static void ggml_compute_forward_timestep_embedding_f32(
             embed_data[j + half] = sinf(arg);
         }
         if (dim % 2 != 0 && ith == 0) {
+            embed_data[2 * half] = 0.f;
             embed_data[dim] = 0.f;
         }
     }
Repository: huggingface/transformers
Pull request: Avoid OOM when other tests are failing

# What does this PR do?

Avoid OOM when other tests are failing

Changed files:
filename: tests/models/musicgen_melody/test_modeling_musicgen_melody.py
patch: @@ -31,6 +31,7 @@
 )
 from transformers.testing_utils import (
     Expectations,
+    cleanup,
     get_device_properties,
     is_torch_available,
     is_torchaudio_available,
@@ -1256,6 +1257,12 @@ class MusicgenMelodyIntegrationTests(unittest.TestCase):
     def model(self):
         return MusicgenMelodyForConditionalGeneration.from_pretrained("ylacombe/musicgen-melody").to(torch_device)
 
+    def setUp(self):
+        cleanup(torch_device, gc_collect=True)
+
+    def tearDown(self):
+        cleanup(torch_device, gc_collect=True)
+
     @cached_property
     def processor(self):
         return MusicgenMelodyProcessor.from_pretrained("ylacombe/musicgen-melody")
Repository: ggml-org/llama.cpp
Pull request: ci : use macos-latest for arm64 webgpu build

This commit updates the runs-on field for the macOS arm64 webgpu build job to use macos-latest instead of just latest.

The motivation for this is that this job can wait for a runner to pick up the job for a very long time, sometimes over 7 hours. This is an attempt to see if this change can help reduce the wait time.

Refs: https://github.com/ggml-org/llama.cpp/actions/runs/17754163447/job/50454257570?pr=16004

----

With this change a runner picked up the job fairly quickly:
https://github.com/danbev/llama.cpp/actions/runs/17764796649/job/50485497894#logs



Changed files:
filename: .github/workflows/build.yml
patch: @@ -138,7 +138,7 @@ jobs:
           ctest -L main --verbose --timeout 900
 
   macOS-latest-cmake-arm64-webgpu:
-    runs-on: latest
+    runs-on: macos-latest
 
     steps:
       - name: Clone
Repository: denoland/deno
Pull request: fix(zlib): don't return a smi from crc32

Fixes https://github.com/denoland/deno/issues/29545.


Changed files:
filename: ext/node/ops/zlib/mod.rs
patch: @@ -421,7 +421,6 @@ pub fn op_zlib_close_if_pending(
 }
 
 #[op2(fast)]
-#[smi]
 pub fn op_zlib_crc32(#[buffer] data: &[u8], #[smi] value: u32) -> u32 {
   // SAFETY: `data` is a valid buffer.
   unsafe {

filename: tests/unit_node/zlib_test.ts
patch: @@ -240,6 +240,13 @@ Deno.test("crc32()", () => {
   assertThrows(() => crc32({}), TypeError);
 });
 
+Deno.test("crc32 doesn't overflow", () => {
+  let checksum = 0;
+  checksum = crc32(Buffer.from("H4sIAAAAAAAACg==", "base64"), checksum);
+  checksum = crc32("aaa", checksum);
+  assertEquals(checksum, 1466848669);
+});
+
 Deno.test("BrotliCompress", async () => {
   const deffered = Promise.withResolvers<void>();
   // @ts-ignore: BrotliCompress is not typed
Repository: huggingface/transformers
Pull request: AMD disable torchcodec

Temporarily disable `torchcodec` in AMD docker image which was introduced in #39669 because of strange segfault error.

Changed files:
filename: docker/transformers-pytorch-amd-gpu/Dockerfile
patch: @@ -21,7 +21,7 @@ ADD https://api.github.com/repos/huggingface/transformers/git/refs/heads/main ve
 RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF
 
 # On ROCm, torchcodec is required to decode audio files
-RUN python3 -m pip install --no-cache-dir torchcodec
+# RUN python3 -m pip install --no-cache-dir torchcodec
 # Install transformers
 RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing,video,audio]
Repository: ggml-org/llama.cpp
Pull request: ci : revert back to macos-13 for macOS-latest-cmake-x64

This commit reverts the change of the runs-on parameter for the macOS-latest-cmake-x64 job back to macos-13 that was make in Commit 51abc96bdc52ba8cd6ad78dcf12ed9a041d7b442 ("ci : update macos-latest* jobs to use macos-latest (#15938)").

The motivation for this is that using macos-latest will cause an ARM based runner to be used, and not an x64 based runner.

Refs: https://github.com/ggml-org/llama.cpp/pull/15938#issuecomment-3300805127


Changed files:
filename: .github/workflows/build.yml
patch: @@ -97,7 +97,7 @@ jobs:
           ctest -L 'main|curl' --verbose --timeout 900
 
   macOS-latest-cmake-x64:
-    runs-on: macos-latest
+    runs-on: macos-13
 
     steps:
       - name: Clone
Repository: vercel/next.js
Pull request: Add `run-turbopack-compiler` trace span

Add a span to `.next/trace` for Turbopack just as there is for Webpack

This span is consistently ~400ms longer than the `Compiled successfully in X ms` message though, due to the worker startup. With the worker disabled, it's accurate within 10ms.

<img width="2560" height="349" alt="Bildschirmfoto 2025-07-22 um 11 27 52" src="https://github.com/user-attachments/assets/4c12198c-02dd-4075-97a9-13342976ac41" />

Closes PACK-5106

Changed files:
filename: packages/next/src/build/turbopack-build/index.ts
patch: @@ -51,10 +51,16 @@ async function turbopackBuildWithWorker() {
 export function turbopackBuild(
   withWorker: boolean
 ): ReturnType<typeof import('./impl').turbopackBuild> {
-  if (withWorker) {
-    return turbopackBuildWithWorker()
-  } else {
-    const build = (require('./impl') as typeof import('./impl')).turbopackBuild
-    return build()
-  }
+  const nextBuildSpan = NextBuildContext.nextBuildSpan!
+  return nextBuildSpan
+    .traceChild('run-turbopack-compiler')
+    .traceAsyncFn(async () => {
+      if (withWorker) {
+        return await turbopackBuildWithWorker()
+      } else {
+        const build = (require('./impl') as typeof import('./impl'))
+          .turbopackBuild
+        return await build()
+      }
+    })
 }

filename: packages/next/src/trace/trace-uploader.ts
patch: @@ -28,6 +28,7 @@ const DEV_ALLOWED_EVENTS = new Set([
 const BUILD_ALLOWED_EVENTS = new Set([
   ...COMMON_ALLOWED_EVENTS,
   'next-build',
+  'run-turbopack-compiler',
   'webpack-compilation',
   'run-webpack-compiler',
   'create-entrypoints',
Repository: facebook/react
Pull request: Convert ReactErrorBoundariesHooks to createRoot


Changed files:
filename: packages/react-dom/src/__tests__/ReactErrorBoundariesHooks-test.internal.js
patch: @@ -10,16 +10,18 @@
 'use strict';
 
 let React;
-let ReactDOM;
+let ReactDOMClient;
+let act;
 
 describe('ReactErrorBoundariesHooks', () => {
   beforeEach(() => {
     jest.resetModules();
-    ReactDOM = require('react-dom');
     React = require('react');
+    ReactDOMClient = require('react-dom/client');
+    act = require('internal-test-utils').act;
   });
 
-  it('should preserve hook order if errors are caught', () => {
+  it('should preserve hook order if errors are caught', async () => {
     function ErrorThrower() {
       React.useMemo(() => undefined, []);
       throw new Error('expected');
@@ -57,10 +59,15 @@ describe('ReactErrorBoundariesHooks', () => {
     }
 
     const container = document.createElement('div');
-    ReactDOM.render(<App />, container);
+    const root = ReactDOMClient.createRoot(container);
+    await act(() => {
+      root.render(<App />);
+    });
 
-    expect(() => {
-      ReactDOM.render(<App />, container);
-    }).not.toThrow();
+    await expect(
+      act(() => {
+        root.render(<App />);
+      }),
+    ).resolves.not.toThrow();
   });
 });
Repository: denoland/deno
Pull request: fix(ext/http): handle vsock streams in `extract_network_stream`

Fixes https://github.com/denoland/deno/issues/29517

Changed files:
filename: Cargo.lock
patch: @@ -2072,6 +2072,7 @@ dependencies = [
  "thiserror 2.0.12",
  "tokio",
  "tokio-util",
+ "tokio-vsock",
 ]
 
 [[package]]

filename: ext/http/Cargo.toml
patch: @@ -57,6 +57,9 @@ thiserror.workspace = true
 tokio.workspace = true
 tokio-util = { workspace = true, features = ["io"] }
 
+[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
+tokio-vsock.workspace = true
+
 [dev-dependencies]
 bencher.workspace = true
 http-body-util.workspace = true

filename: ext/http/lib.rs
patch: @@ -1684,6 +1684,13 @@ fn extract_network_stream<U: CanDowncastUpgrade>(
       Ok(res) => return res,
       Err(x) => x,
     };
+  #[cfg(any(target_os = "linux", target_os = "macos"))]
+  let upgraded =
+    match maybe_extract_network_stream::<tokio_vsock::VsockStream, _>(upgraded)
+    {
+      Ok(res) => return res,
+      Err(x) => x,
+    };
   let upgraded =
     match maybe_extract_network_stream::<NetworkStream, _>(upgraded) {
       Ok(res) => return res,

filename: tests/unit/serve_test.ts
patch: @@ -4428,3 +4428,66 @@ Deno.test({
     "Cannot read request body as underlying resource unavailable",
   );
 });
+
+Deno.test(
+  {
+    ignore: Deno.build.os !== "linux",
+    permissions: { run: true, net: true },
+  },
+  async function httpServerVsockWebSocketUpgrade() {
+    const ac = new AbortController();
+    const { promise, resolve } = Promise.withResolvers<Deno.VsockAddr>();
+
+    await using server = Deno.serve(
+      {
+        signal: ac.signal,
+        cid: -1,
+        port: 8001,
+        onListen(info) {
+          resolve(info);
+        },
+        onError: createOnErrorCb(ac),
+      },
+      (request) => {
+        const { socket, response } = Deno.upgradeWebSocket(request);
+
+        socket.onmessage = (event) => {
+          // Echo the message back to the client
+          if (socket.readyState === WebSocket.OPEN) {
+            socket.send(event.data);
+          }
+        };
+
+        return response;
+      },
+    );
+
+    assertEquals((await promise).cid, 4294967295);
+    assertEquals((await promise).port, 8001);
+
+    const conn = await Deno.connect({
+      transport: "vsock",
+      cid: 1,
+      port: 8001,
+    });
+
+    // Send HTTP upgrade request
+    await conn.write(
+      new TextEncoder().encode(
+        "GET / HTTP/1.1\r\nHost: example.com\r\nConnection: Upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Key: test\r\n\r\n",
+      ),
+    );
+
+    // Read upgrade response
+    const responseData = new Uint8Array(512);
+    const responseRead = await conn.read(responseData);
+    const responseText = new TextDecoder().decode(
+      responseData.subarray(0, responseRead!),
+    );
+    assert(responseText.includes("101 Switching Protocols"));
+
+    await conn.close();
+    ac.abort();
+    await server.finished;
+  },
+);
Repository: vercel/next.js
Pull request: fix: support calling onClose multiple times in edge-ssr-app

#81389 changed the implementation of `edge-ssr-app`. it added a `RenderOpts.onClose` implemented like this:
```ts
let onCloseCallback: (() => void) | undefined
const renderOpts = {
  // ...
  onClose: (cb) => {
    onCloseCallback = cb
  },
}
```
this does not match the behavior of the node implementations of `onClose`, which use `res.on('close', cb)` -- calling this `onClose` multiple times won't work right, because we'll only store the last callback.

in practice we currently only call `onClose` once per request, in `AfterContext`, so this *technically works*. but that might change in the future, and it'd break things in surprising ways. to avoid this, i'm changing it to use `CloseController`, which we're already using in other places that need to implement this behavior.

Changed files:
filename: packages/next/src/build/templates/edge-ssr-app.ts
patch: @@ -24,6 +24,7 @@ import { getBotType } from '../../shared/lib/router/utils/is-bot'
 import { interopDefault } from '../../lib/interop-default'
 import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'
 import { checkIsOnDemandRevalidate } from '../../server/api-utils'
+import { CloseController } from '../../server/web/web-on-close'
 
 declare const incrementalCacheHandler: any
 // OPTIONAL_IMPORT:incrementalCacheHandler
@@ -99,6 +100,8 @@ async function requestHandler(
     prerenderManifest.preview
   )
 
+  const closeController = new CloseController()
+
   const renderContext: AppPageRouteHandlerContext = {
     page: normalizedSrcPage,
     query,
@@ -175,7 +178,7 @@ async function requestHandler(
 
       waitUntil: event.waitUntil.bind(event),
       onClose: (cb) => {
-        onCloseCallback = cb
+        closeController.onClose(cb)
       },
       onAfterTaskError: () => {},
 
@@ -190,7 +193,6 @@ async function requestHandler(
     },
   }
   let finalStatus = 200
-  let onCloseCallback: (() => void) | undefined
 
   const renderResultToResponse = (
     result: RenderResult<AppPageRenderResultMetadata>
@@ -202,7 +204,7 @@ async function requestHandler(
     // Handle null responses
     if (result.isNull) {
       finalStatus = 500
-      onCloseCallback?.()
+      closeController.dispatchClose()
       return new Response(null, { status: 500 })
     }
 
@@ -246,7 +248,7 @@ async function requestHandler(
         'Content-Length',
         String(new TextEncoder().encode(body).length)
       )
-      onCloseCallback?.()
+      closeController.dispatchClose()
       return new Response(body, {
         status: finalStatus,
         headers,
@@ -264,7 +266,7 @@ async function requestHandler(
       .catch((err: unknown) => {
         console.error('Error piping RenderResult to response:', err)
       })
-      .finally(() => onCloseCallback?.())
+      .finally(() => closeController.dispatchClose())
 
     return new Response(readable, {
       status: finalStatus,