helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Turbopack: exclude resolve-rewrites if possible

Implement this
https://github.com/vercel/next.js/blob/6c4ca1cb12a36d23ddd86fd13e0c87c72d628317/packages/next/src/build/create-compiler-aliases.ts#L174-L181
in Turbopack as well.

This would not be necessary if we consumed Next.js internal files in ESM and they were marked as `sideEffects: free`...

Closes PACK-4994

Changed files:
filename: packages/next/src/build/create-compiler-aliases.ts
patch: @@ -35,7 +35,6 @@ export function createWebpackAliases({
   appDir,
   dir,
   reactProductionProfiling,
-  hasRewrites,
 }: {
   distDir: string
   isClient: boolean
@@ -46,12 +45,8 @@ export function createWebpackAliases({
   appDir: string | undefined
   dir: string
   reactProductionProfiling: boolean
-  hasRewrites: boolean
 }): CompilerAliases {
   const pageExtensions = config.pageExtensions
-  const clientResolveRewrites = require.resolve(
-    '../shared/lib/router/utils/resolve-rewrites'
-  )
   const customAppAliases: CompilerAliases = {}
   const customDocumentAliases: CompilerAliases = {}
 
@@ -170,15 +165,6 @@ export function createWebpackAliases({
     [RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS]:
       'next/dist/build/webpack/loaders/next-flight-loader/track-dynamic-import',
 
-    ...(isClient || isEdgeServer
-      ? {
-          [clientResolveRewrites]: hasRewrites
-            ? clientResolveRewrites
-            : // With webpack 5 an alias can be pointed to false to noop
-              false,
-        }
-      : {}),
-
     '@swc/helpers/_': path.join(
       path.dirname(require.resolve('@swc/helpers/package.json')),
       '_'

filename: packages/next/src/build/webpack-config.ts
patch: @@ -777,7 +777,6 @@ export default async function getBaseWebpackConfig(
       appDir,
       dir,
       reactProductionProfiling,
-      hasRewrites,
     }),
     ...(isClient
       ? {

filename: packages/next/src/shared/lib/router/router.ts
patch: @@ -22,7 +22,6 @@ import mitt from '../mitt'
 import { getLocationOrigin, getURL, loadGetInitialProps, ST } from '../utils'
 import { isDynamicRoute } from './utils/is-dynamic'
 import { parseRelativeUrl } from './utils/parse-relative-url'
-import resolveRewrites from './utils/resolve-rewrites'
 import { getRouteMatcher } from './utils/route-matcher'
 import { getRouteRegex } from './utils/route-regex'
 import { formatWithValidation } from './utils/format-url'
@@ -46,6 +45,13 @@ import { handleSmoothScroll } from './utils/handle-smooth-scroll'
 import type { Params } from '../../../server/request/params'
 import { MATCHED_PATH_HEADER } from '../../../lib/constants'
 
+let resolveRewrites: typeof import('./utils/resolve-rewrites').default
+if (process.env.__NEXT_HAS_REWRITES) {
+  resolveRewrites = (
+    require('./utils/resolve-rewrites') as typeof import('./utils/resolve-rewrites')
+  ).default
+}
+
 declare global {
   interface Window {
     /* prod */
Repository: facebook/react
Pull request: [Fizz] Pass task.childIndex in retryReplayTask

This was missed that we track the child index on the task. The equivalent in retryRenderTask already has this.

The effect is that a lazy node that suspends gets its child index reset to -1 even though it should resume in the index it left off.


Changed files:
filename: packages/react-server/src/ReactFizzServer.js
patch: @@ -3476,7 +3476,13 @@ function retryReplayTask(request: Request, task: ReplayTask): void {
     const prevThenableState = task.thenableState;
     task.thenableState = null;
 
-    renderNodeDestructive(request, task, prevThenableState, task.node, -1);
+    renderNodeDestructive(
+      request,
+      task,
+      prevThenableState,
+      task.node,
+      task.childIndex,
+    );
 
     if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {
       throw new Error(
Repository: facebook/react
Pull request: Revert "Build: use content hash for facebook-react-native build"

Reverts facebook/react#27577.

We also sync React Native OSS bundles which means this didn't work as hoped unless we abandon the commit hash in OSS which seems useful.

Changed files:
filename: scripts/rollup/build-all-release-channels.js
patch: @@ -8,7 +8,6 @@ const fse = require('fs-extra');
 const {spawnSync} = require('child_process');
 const path = require('path');
 const tmp = require('tmp');
-const glob = require('glob');
 
 const {
   ReactVersion,
@@ -236,28 +235,19 @@ function processExperimental(buildDir, version) {
     );
   }
 
-  const facebookWwwDir = path.join(buildDir, 'facebook-www');
-  if (fs.existsSync(facebookWwwDir)) {
-    for (const fileName of fs.readdirSync(facebookWwwDir).sort()) {
-      const filePath = path.join(facebookWwwDir, fileName);
+  if (fs.existsSync(buildDir + '/facebook-www')) {
+    const hash = crypto.createHash('sha1');
+    for (const fileName of fs.readdirSync(buildDir + '/facebook-www').sort()) {
+      const filePath = buildDir + '/facebook-www/' + fileName;
       const stats = fs.statSync(filePath);
       if (!stats.isDirectory()) {
+        hash.update(fs.readFileSync(filePath));
         fs.renameSync(filePath, filePath.replace('.js', '.modern.js'));
       }
     }
-    const contentHash = hashJSFilesInDirectory(facebookWwwDir);
     updatePlaceholderReactVersionInCompiledArtifacts(
-      facebookWwwDir,
-      ReactVersion + '-www-modern-' + contentHash
-    );
-  }
-
-  const facebookReactNativeDir = path.join(buildDir, 'facebook-react-native');
-  if (fs.existsSync(facebookReactNativeDir)) {
-    const contentHash = hashJSFilesInDirectory(facebookReactNativeDir);
-    updatePlaceholderReactVersionInCompiledArtifacts(
-      facebookReactNativeDir,
-      ReactVersion + '-react-native-' + contentHash
+      buildDir + '/facebook-www',
+      ReactVersion + '-www-modern-' + hash.digest('hex').slice(0, 8)
     );
   }
 
@@ -356,14 +346,6 @@ function updatePackageVersions(
   }
 }
 
-function hashJSFilesInDirectory(directory) {
-  const hash = crypto.createHash('sha1');
-  for (const filePath of glob.sync(directory + '/**/*.js').sort()) {
-    hash.update(fs.readFileSync(filePath));
-  }
-  return hash.digest('hex').slice(0, 8);
-}
-
 function updatePlaceholderReactVersionInCompiledArtifacts(
   artifactsDirectory,
   newVersion
Repository: denoland/deno
Pull request: fix(lockfile): handling of peer deps when migrating to lockfile v5


Changed files:
filename: Cargo.lock
patch: @@ -2170,9 +2170,9 @@ dependencies = [
 
 [[package]]
 name = "deno_lockfile"
-version = "0.26.0"
+version = "0.26.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf38d2df0cfe7ca030a0328c2039afaba39d13c775be9d2cf5fd7705ad2b5c72"
+checksum = "d191fba7b3e2071f584c248b3aefeae185b57a8fa3c8985185e1d8b248835b92"
 dependencies = [
  "async-trait",
  "deno_semver",

filename: Cargo.toml
patch: @@ -59,7 +59,7 @@ deno_doc = "=0.169.1"
 deno_error = "=0.5.6"
 deno_graph = "=0.89.4"
 deno_lint = "=0.74.0"
-deno_lockfile = "=0.26.0"
+deno_lockfile = "=0.26.1"
 deno_media_type = { version = "=0.2.8", features = ["module_specifier"] }
 deno_native_certs = "0.3.0"
 deno_npm = "=0.31.0"
Repository: electron/electron
Pull request: build: make sure there is at least 35GB free for source cache

#### Description of Change
As seen in https://github.com/electron/electron/actions/runs/13157928831/job/36733003034#step:4, compressed src is now 32G, so we need to update the check for free disk space for source caches.
<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->none


Changed files:
filename: .github/actions/checkout/action.yml
patch: @@ -73,10 +73,10 @@ runs:
     if: steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache  == 'true'
     shell: bash
     run: |    
-      # if there is less than 20 GB free space then creating the cache might fail so exit early
+      # if there is less than 35 GB free space then creating the cache might fail so exit early
       freespace=`df -m /mnt/cross-instance-cache | grep -w /mnt/cross-instance-cache | awk '{print $4}'`
       freespace_human=`df -h /mnt/cross-instance-cache | grep -w /mnt/cross-instance-cache | awk '{print $4}'`
-      if [ $freespace -le 20000 ]; then
+      if [ $freespace -le 35000 ]; then
         echo "The cross mount cache has $freespace_human free space which is not enough - exiting"
         exit 1
       else
Repository: ggml-org/llama.cpp
Pull request: gguf-py : remove erroneous FFN_GATE entry

This was added by mistake in #14898

Changed files:
filename: gguf-py/gguf/tensor_mapping.py
patch: @@ -427,7 +427,6 @@ class TensorNameMap:
             "model.layers.{bid}.residual_mlp.w1",         # arctic
             "transformer.h.{bid}.mlp.c_fc_0",             # exaone
             "model.layers.{bid}.feed_forward.gate_proj",  # llama4 jamba granite-hybrid
-            "model.layers.{bid}.block_sparse_moe.gate",   # smallthinker
             "model.transformer.blocks.{bid}.ff_proj",     # llada
             "layers.{bid}.mlp.gate_proj",                 # qwen3-embedding
         ),
Repository: nodejs/node
Pull request: test: add fast api tests for getLibuvNow()

Adds a test for the v8 fast api we use for getLibuvNow() method.

Changed files:
filename: src/timers.cc
patch: @@ -1,5 +1,7 @@
 #include "timers.h"
+
 #include "env-inl.h"
+#include "node_debug.h"
 #include "node_external_reference.h"
 #include "util-inl.h"
 #include "v8.h"
@@ -33,8 +35,8 @@ void BindingData::SlowGetLibuvNow(const FunctionCallbackInfo<Value>& args) {
   args.GetReturnValue().Set(Number::New(args.GetIsolate(), now));
 }
 
-double BindingData::FastGetLibuvNow(Local<Object> unused,
-                                    Local<Object> receiver) {
+double BindingData::FastGetLibuvNow(Local<Value> receiver) {
+  TRACK_V8_FAST_API_CALL("timers.getLibuvNow");
   return GetLibuvNowImpl(FromJSObject<BindingData>(receiver));
 }
 

filename: src/timers.h
patch: @@ -26,8 +26,7 @@ class BindingData : public SnapshotableObject {
   static void SetupTimers(const v8::FunctionCallbackInfo<v8::Value>& args);
 
   static void SlowGetLibuvNow(const v8::FunctionCallbackInfo<v8::Value>& args);
-  static double FastGetLibuvNow(v8::Local<v8::Object> unused,
-                                v8::Local<v8::Object> receiver);
+  static double FastGetLibuvNow(v8::Local<v8::Value> receiver);
   static double GetLibuvNowImpl(BindingData* data);
 
   static void SlowScheduleTimer(

filename: test/parallel/test-timers-now.js
patch: @@ -1,11 +1,29 @@
+// Flags: --expose-internals --no-warnings --allow-natives-syntax
 'use strict';
-// Flags: --expose-internals
 
-require('../common');
-const assert = require('assert');
+const common = require('../common');
+const assert = require('node:assert');
 const { internalBinding } = require('internal/test/binding');
 const binding = internalBinding('timers');
 
 // Return value of getLibuvNow() should easily fit in a SMI after start-up.
 // We need to use the binding as the receiver for fast API calls.
 assert(binding.getLibuvNow() < 0x3ffffff);
+
+{
+  // Only javascript methods can be optimized through %OptimizeFunctionOnNextCall
+  // This is why we surround the C++ method we want to optimize with a JS function.
+  function getLibuvNow() {
+    return binding.getLibuvNow();
+  }
+
+  eval('%PrepareFunctionForOptimization(getLibuvNow)');
+  getLibuvNow();
+  eval('%OptimizeFunctionOnNextCall(getLibuvNow)');
+  assert(getLibuvNow() < 0x3ffffff);
+
+  if (common.isDebug) {
+    const { getV8FastApiCallCount } = internalBinding('debug');
+    assert.strictEqual(getV8FastApiCallCount('timers.getLibuvNow'), 1);
+  }
+}
Repository: ggml-org/llama.cpp
Pull request: metal : remove contiguous assertion for src0 in IM2COL

`src0` data is unused in `IM2COL`

Changed files:
filename: ggml/src/ggml-metal/ggml-metal.m
patch: @@ -1876,7 +1876,7 @@ static bool ggml_metal_supports_op(const struct ggml_backend_metal_device_contex
         case GGML_OP_ROPE:
             return true;
         case GGML_OP_IM2COL:
-            return op->src[1]->type == GGML_TYPE_F32 && (op->type == GGML_TYPE_F16 || op->type == GGML_TYPE_F32);
+            return ggml_is_contiguous(op->src[1]) && op->src[1]->type == GGML_TYPE_F32 && (op->type == GGML_TYPE_F16 || op->type == GGML_TYPE_F32);
         case GGML_OP_POOL_1D:
             return false;
         case GGML_OP_UPSCALE:
@@ -4731,7 +4731,6 @@ static int ggml_metal_encode_node(
             } break;
         case GGML_OP_IM2COL:
             {
-                GGML_ASSERT(ggml_is_contiguous(src0));
                 GGML_ASSERT(ggml_is_contiguous(src1));
                 GGML_ASSERT(src1->type == GGML_TYPE_F32);
                 GGML_ASSERT( dst->type == GGML_TYPE_F16 || dst->type == GGML_TYPE_F32);
Repository: denoland/deno
Pull request: fix(lockfile): omit tarball url from lockfile if it's the default

This is where deno_lockfile gets the info for the transform from 4->5. So while we were doing this optimization on new v5 lockfiles, we weren't doing it correctly for ones migrated from earlier versions.

Testing this is kinda hard because our tests don't use the default registry, hmm

Changed files:
filename: cli/npm/mod.rs
patch: @@ -19,6 +19,8 @@ use deno_npm::npm_rc::ResolvedNpmRc;
 use deno_npm::registry::NpmPackageInfo;
 use deno_npm::registry::NpmPackageVersionInfo;
 use deno_npm::registry::NpmRegistryApi;
+use deno_npm::resolution::DefaultTarballUrlProvider;
+use deno_npm::NpmPackageId;
 use deno_resolver::npm::ByonmNpmResolverCreateOptions;
 use deno_runtime::colors;
 use deno_semver::package::PackageName;
@@ -38,6 +40,7 @@ pub use self::managed::NpmResolutionInitializer;
 pub use self::managed::ResolveSnapshotError;
 use crate::file_fetcher::CliFileFetcher;
 use crate::http_util::HttpClientProvider;
+use crate::npm::managed::DefaultTarballUrl;
 use crate::sys::CliSys;
 use crate::util::progress_bar::ProgressBar;
 
@@ -73,7 +76,21 @@ impl deno_lockfile::NpmPackageInfoProvider for NpmPackageInfoApiAdapter {
         })?;
         Ok::<_, Box<dyn std::error::Error + Send + Sync>>(
           deno_lockfile::Lockfile5NpmInfo {
-            tarball_url: version_info.dist.as_ref().map(|d| d.tarball.clone()),
+            tarball_url: version_info.dist.as_ref().and_then(|d| {
+              if d.tarball
+                == DefaultTarballUrl.default_tarball_url(&NpmPackageId {
+                  nv: v.clone(),
+                  // TODO(nathanwhit): this function takes an `NpmPackageId`
+                  // but it should take a `PackageNv`. For now just
+                  // use default here.
+                  peer_dependencies: Default::default(),
+                })
+              {
+                None
+              } else {
+                Some(d.tarball.clone())
+              }
+            }),
             optional_dependencies: version_info
               .optional_dependencies
               .iter()
Repository: facebook/react
Pull request: Build: use content hash for facebook-react-native build

Similar to #26734, this switches the RN builds for Meta to a content hash instead of git commit number to make the builds reproducible and avoid creating sync commits if the bundled content didn't change.

Changed files:
filename: scripts/rollup/build-all-release-channels.js
patch: @@ -8,6 +8,7 @@ const fse = require('fs-extra');
 const {spawnSync} = require('child_process');
 const path = require('path');
 const tmp = require('tmp');
+const glob = require('glob');
 
 const {
   ReactVersion,
@@ -235,19 +236,28 @@ function processExperimental(buildDir, version) {
     );
   }
 
-  if (fs.existsSync(buildDir + '/facebook-www')) {
-    const hash = crypto.createHash('sha1');
-    for (const fileName of fs.readdirSync(buildDir + '/facebook-www').sort()) {
-      const filePath = buildDir + '/facebook-www/' + fileName;
+  const facebookWwwDir = path.join(buildDir, 'facebook-www');
+  if (fs.existsSync(facebookWwwDir)) {
+    for (const fileName of fs.readdirSync(facebookWwwDir).sort()) {
+      const filePath = path.join(facebookWwwDir, fileName);
       const stats = fs.statSync(filePath);
       if (!stats.isDirectory()) {
-        hash.update(fs.readFileSync(filePath));
         fs.renameSync(filePath, filePath.replace('.js', '.modern.js'));
       }
     }
+    const contentHash = hashJSFilesInDirectory(facebookWwwDir);
     updatePlaceholderReactVersionInCompiledArtifacts(
-      buildDir + '/facebook-www',
-      ReactVersion + '-www-modern-' + hash.digest('hex').slice(0, 8)
+      facebookWwwDir,
+      ReactVersion + '-www-modern-' + contentHash
+    );
+  }
+
+  const facebookReactNativeDir = path.join(buildDir, 'facebook-react-native');
+  if (fs.existsSync(facebookReactNativeDir)) {
+    const contentHash = hashJSFilesInDirectory(facebookReactNativeDir);
+    updatePlaceholderReactVersionInCompiledArtifacts(
+      facebookReactNativeDir,
+      ReactVersion + '-react-native-' + contentHash
     );
   }
 
@@ -346,6 +356,14 @@ function updatePackageVersions(
   }
 }
 
+function hashJSFilesInDirectory(directory) {
+  const hash = crypto.createHash('sha1');
+  for (const filePath of glob.sync(directory + '/**/*.js').sort()) {
+    hash.update(fs.readFileSync(filePath));
+  }
+  return hash.digest('hex').slice(0, 8);
+}
+
 function updatePlaceholderReactVersionInCompiledArtifacts(
   artifactsDirectory,
   newVersion
Repository: huggingface/transformers
Pull request: Clarify per_device_train_batch_size scaling in TrainingArguments (#38…

## What does this PR do?

This PR clarifies in the `TrainingArguments` docstring that `per_device_train_batch_size`
is multiplied by the number of devices when training on multiple GPUs or with distributed training.

Closes #38484

## Before submitting

- [x] This PR fixes a typo or improves the docs

## Who can review?

- @zach-huggingface  
- @SunMarc  
- @qgallouedec  


Changed files:
filename: src/transformers/training_args.py
patch: @@ -246,7 +246,8 @@ class TrainingArguments:
         prediction_loss_only (`bool`, *optional*, defaults to `False`):
             When performing evaluation and generating predictions, only returns the loss.
         per_device_train_batch_size (`int`, *optional*, defaults to 8):
-            The batch size per device accelerator core/CPU for training.
+            The batch size *per device*. The **global batch size** is computed as:
+            `per_device_train_batch_size * number_of_devices` in multi-GPU or distributed setups.
         per_device_eval_batch_size (`int`, *optional*, defaults to 8):
             The batch size per device accelerator core/CPU for evaluation.
         gradient_accumulation_steps (`int`, *optional*, defaults to 1):
Repository: ggml-org/llama.cpp
Pull request: opencl: fix support ops condition for `rms_norm`

Current `supports_op` simply returns `true` for `rms_norm` while the actual kernel requires ne00 to be multiple of 4 and contiguous. This PR adds these conditions to `supports_ops`. This also fixes the crash in `test-backend-ops` for `RMS_NORM_MUL_ADD`.


Changed files:
filename: ggml/src/ggml-opencl/ggml-opencl.cpp
patch: @@ -2647,8 +2647,9 @@ static bool ggml_opencl_supports_op(ggml_backend_dev_t dev, const struct ggml_te
             return op->src[0]->type == GGML_TYPE_F32;
         case GGML_OP_SOFT_MAX:
         case GGML_OP_NORM:
-        case GGML_OP_RMS_NORM:
             return true;
+        case GGML_OP_RMS_NORM:
+            return op->ne[0] % 4 == 0 && ggml_is_contiguous_rows(op->src[0]);
         case GGML_OP_REPEAT:
             return op->src[0]->type == GGML_TYPE_F32 && op->type == GGML_TYPE_F32; // Assuming F32 for now, can be expanded
         case GGML_OP_PAD:
Repository: vercel/next.js
Pull request: Disable Turbopack manifest

- Don't create update PRs anymore for the manifests
- Don't read the manifest when running tests

Closes PACK-4980

Changed files:
filename: .github/workflows/build_and_test.yml
patch: @@ -244,7 +244,6 @@ jobs:
     uses: ./.github/workflows/build_reusable.yml
     with:
       afterBuild: |
-        export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/turbopack-dev-tests-manifest.json"
         export IS_TURBOPACK_TEST=1
         export TURBOPACK_DEV=1
         export NEXT_TEST_MODE=dev
@@ -276,7 +275,6 @@ jobs:
     with:
       nodeVersion: 18.18.2
       afterBuild: |
-        export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/turbopack-dev-tests-manifest.json"
         export IS_TURBOPACK_TEST=1
         export TURBOPACK_DEV=1
         export NEXT_TEST_REACT_VERSION="${{ matrix.react }}"
@@ -310,7 +308,6 @@ jobs:
     with:
       nodeVersion: 18.18.2
       afterBuild: |
-        export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/turbopack-build-tests-manifest.json"
         export IS_TURBOPACK_TEST=1
         export TURBOPACK_BUILD=1
         export NEXT_TEST_MODE=start
@@ -335,7 +332,6 @@ jobs:
     with:
       nodeVersion: 18.18.2
       afterBuild: |
-        export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/turbopack-build-tests-manifest.json"
         export IS_TURBOPACK_TEST=1
         export TURBOPACK_BUILD=1
 

filename: .github/workflows/turbopack-update-tests-manifest.yml
patch: @@ -2,9 +2,9 @@
 name: Update Turbopack test manifest
 
 on:
-  schedule:
-    # Every day at 7AM UTC https://crontab.guru/#0_7_*_*_*
-    - cron: '0 7 * * *'
+  # schedule:
+  # Every day at 7AM UTC https://crontab.guru/#0_7_*_*_*
+  # - cron: '0 7 * * *'
   workflow_dispatch:
 
 jobs:

filename: scripts/test-new-tests.mjs
patch: @@ -155,10 +155,6 @@ async function main() {
           NEXT_TEST_VERSION: nextTestVersion,
           IS_TURBOPACK_TEST: '1',
           TURBOPACK_BUILD: testMode === 'start' ? '1' : undefined,
-          NEXT_EXTERNAL_TESTS_FILTERS:
-            testMode === 'dev'
-              ? 'test/turbopack-dev-tests-manifest.json'
-              : 'test/turbopack-build-tests-manifest.json',
         },
       })
     }