helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix(ext/node): match WebCrypto tag too small error msg with Node

Enables `parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js`

Ref https://github.com/denoland/deno/issues/29637


Changed files:
filename: ext/crypto/00_crypto.js
patch: @@ -734,7 +734,7 @@ class SubtleCrypto {
             normalizedAlgorithm.tagLength / 8
         ) {
           throw new DOMException(
-            "Tag length overflows ciphertext",
+            "The provided data is too small",
             "OperationError",
           );
         }

filename: tests/node_compat/config.jsonc
patch: @@ -420,6 +420,7 @@
       "test-crypto-stream.js",
       "test-crypto-subtle-zero-length.js",
       "test-crypto-update-encoding.js",
+      "test-crypto-webcrypto-aes-decrypt-tag-too-small.js",
       "test-crypto-x509.js",
       "test-dgram-address.js",
       "test-dgram-bind-default-address.js",

filename: tests/node_compat/runner/TODO.md
patch: @@ -549,7 +549,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co
 - [parallel/test-crypto-secure-heap.js](https://github.com/nodejs/node/tree/v23.9.0/test/parallel/test-crypto-secure-heap.js)
 - [parallel/test-crypto-sign-verify.js](https://github.com/nodejs/node/tree/v23.9.0/test/parallel/test-crypto-sign-verify.js)
 - [parallel/test-crypto-verify-failure.js](https://github.com/nodejs/node/tree/v23.9.0/test/parallel/test-crypto-verify-failure.js)
-- [parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js](https://github.com/nodejs/node/tree/v23.9.0/test/parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js)
 - [parallel/test-crypto-worker-thread.js](https://github.com/nodejs/node/tree/v23.9.0/test/parallel/test-crypto-worker-thread.js)
 - [parallel/test-crypto.js](https://github.com/nodejs/node/tree/v23.9.0/test/parallel/test-crypto.js)
 - [parallel/test-cwd-enoent-preload.js](https://github.com/nodejs/node/tree/v23.9.0/test/parallel/test-cwd-enoent-preload.js)

filename: tests/node_compat/test/parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js
patch: @@ -0,0 +1,36 @@
+// deno-fmt-ignore-file
+// deno-lint-ignore-file
+
+// Copyright Joyent and Node contributors. All rights reserved. MIT license.
+// Taken from Node 23.9.0
+// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
+
+'use strict';
+
+const common = require('../common');
+
+if (!common.hasCrypto)
+  common.skip('missing crypto');
+
+const assert = require('assert');
+const { subtle } = globalThis.crypto;
+
+subtle.importKey(
+  'raw',
+  new Uint8Array(32),
+  {
+    name: 'AES-GCM'
+  },
+  false,
+  [ 'encrypt', 'decrypt' ])
+  .then((k) =>
+    assert.rejects(() => {
+      return subtle.decrypt({
+        name: 'AES-GCM',
+        iv: new Uint8Array(12),
+      }, k, new Uint8Array(0));
+    }, {
+      name: 'OperationError',
+      message: /The provided data is too small/,
+    })
+  ).then(common.mustCall());
Repository: ggml-org/llama.cpp
Pull request: build : fix build-ios-device

This commit was required for this PR https://github.com/ggml-org/llama.cpp/pull/16185

Changed files:
filename: build-xcframework.sh
patch: @@ -422,6 +422,7 @@ echo "Building for iOS devices..."
 cmake -B build-ios-device -G Xcode \
     "${COMMON_CMAKE_ARGS[@]}" \
     -DCMAKE_OSX_DEPLOYMENT_TARGET=${IOS_MIN_OS_VERSION} \
+    -DCMAKE_SYSTEM_NAME=iOS \
     -DCMAKE_OSX_SYSROOT=iphoneos \
     -DCMAKE_OSX_ARCHITECTURES="arm64" \
     -DCMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS=iphoneos \
Repository: huggingface/transformers
Pull request: fix chameleonvision UT failure

as discussed in https://github.com/huggingface/diffusers/pull/11690,  ut `pytest -rA tests/models/chameleon/test_modeling_chameleon.py::ChameleonVision2SeqModelTest::test_model_parallel_beam_search` w/ 2 cards, the error log is "RuntimeError: Expected all tensors to be on the same device, but found at least two devices,src/transformers/models/chameleon/modeling_chameleon.py", the reason is even residual is in the same device as hidden_states at the beginning, but after they went through some operators as both input and output, they finally placed to different device, but when they come to + which is not a nn.Module(so accelerate cannot pre-hook it), error happens. 

so, update `no_split_modules` in `ChameleonVQVAE` to avoid it. @SunMarc, pls help review, thx.


Changed files:
filename: src/transformers/models/chameleon/modeling_chameleon.py
patch: @@ -817,7 +817,11 @@ class ChameleonPreTrainedModel(PreTrainedModel):
 )
 class ChameleonVQVAE(ChameleonPreTrainedModel):
     config: ChameleonVQVAEConfig
-    _no_split_modules = ["ChameleonVQVAEVectorQuantizer"]
+    _no_split_modules = [
+        "ChameleonVQVAEVectorQuantizer",
+        "ChameleonVQVAEEncoderAttnBlock",
+        "ChameleonVQVAEEncoderResnetBlock",
+    ]
 
     def __init__(self, config: ChameleonVQVAEConfig):
         super().__init__(config)
Repository: vercel/next.js
Pull request: Turbopack: Move fs watcher anyhow::Context import inline to fix compilation warnings

I broke this in my previous PR

https://github.com/vercel/next.js/pull/81909/files#r2225998847

Closes PACK-5130

Changed files:
filename: turbopack/crates/turbo-tasks-fs/src/watcher.rs
patch: @@ -10,7 +10,7 @@ use std::{
     time::Duration,
 };
 
-use anyhow::{Context, Result};
+use anyhow::Result;
 use notify::{
     Config, EventKind, PollWatcher, RecommendedWatcher, RecursiveMode, Watcher,
     event::{MetadataKind, ModifyKind, RenameMode},
@@ -113,6 +113,8 @@ impl DiskWatcher {
         dir_path: &Path,
         root_path: &Path,
     ) -> Result<()> {
+        use anyhow::Context; // inner import due to conditional compilation
+
         if let Some(watcher) = watcher.as_mut() {
             let mut path = dir_path;
             let err_with_context = |err| {
Repository: denoland/deno
Pull request: fix: revert back to prefering highest previously resolved version for a req

This is a revert

* https://github.com/denoland/deno_graph/pull/589

Changed files:
filename: Cargo.lock
patch: @@ -1999,9 +1999,9 @@ dependencies = [
 
 [[package]]
 name = "deno_graph"
-version = "0.95.0"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af557eab0d8abf2c6e7c890d510eccaebe52388924ae4a3e15c8a818c1bbbb90"
+checksum = "365b662cfc14021c2994156d5a58b9c91d655879b817715e2d92d8adce5b3c31"
 dependencies = [
  "async-trait",
  "capacity_builder",
@@ -2803,11 +2803,11 @@ dependencies = [
 
 [[package]]
 name = "deno_unsync"
-version = "0.4.3"
+version = "0.4.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47c618b51088b3ac67f15c69b3ed7620ba3a7d495e5a090186df9424b5ab623e"
+checksum = "6742a724e8becb372a74c650a1aefb8924a5b8107f7d75b3848763ea24b27a87"
 dependencies = [
- "futures",
+ "futures-util",
  "parking_lot",
  "tokio",
 ]

filename: Cargo.toml
patch: @@ -61,7 +61,7 @@ deno_cache_dir = "=0.22.2"
 deno_config = { version = "=0.55.0", features = ["workspace"] }
 deno_doc = "=0.178.0"
 deno_error = "=0.6.1"
-deno_graph = { version = "=0.95.0", default-features = false }
+deno_graph = { version = "=0.95.1", default-features = false }
 deno_lint = "=0.76.0"
 deno_lockfile = "=0.29.0"
 deno_media_type = { version = "=0.2.8", features = ["module_specifier"] }
@@ -72,7 +72,7 @@ deno_path_util = "=0.4.0"
 deno_semver = "=0.8.0"
 deno_task_shell = "=0.24.0"
 deno_terminal = "=0.2.2"
-deno_unsync = "0.4.3"
+deno_unsync = "0.4.4"
 deno_whoami = "0.1.0"
 eszip = "=0.92.0"
Repository: vercel/next.js
Pull request: Add link to manually trigger preview builds

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the PR.
- Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to understand the PR)
- When linking to a Slack thread, you might want to share details of the conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Changed files:
filename: contributing/core/testing.md
patch: @@ -201,4 +201,4 @@ or, to use `next` from a specific Pull Request (PR number required):
 
 <sup>1</sup> Not all native packages are built automatically.
 `build-and-deploy` excludes slow, rarely used native variants of `next-swc`.
-To force a build of all packages, you can trigger `build-and-deploy` manually (i.e. `workflow_dispatch`).
+To force a build of all packages, you can [trigger `build-and-deploy` manually](https://github.com/vercel/next.js/actions/workflows/build_and_deploy.yml) (i.e. `workflow_dispatch`).
Repository: nodejs/node
Pull request: test: force slow `JSON.stringify` path for overflow

Refs https://chromium-review.googlesource.com/c/v8/v8/+/6011806

The V8 team just enabled the `JSON.stringify` fast path by default, which is iterative and won't throw. Pre-emptively preserve test functionality by forcing the slow path. See above linked PR for approach this is borrowed from.
<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: test/fixtures/console/stack_overflow.js
patch: @@ -26,11 +26,15 @@ Error.stackTraceLimit = 0;
 
 console.error('before');
 
+// Invalidate elements protector to force slow-path.
+// The fast-path of JSON.stringify is iterative and won't throw.
+Array.prototype[2] = 'foo';
+
 // Trigger stack overflow by stringifying a deeply nested array.
-let array = [];
-for (let i = 0; i < 100000; i++) {
-  array = [ array ];
-}
+// eslint-disable-next-line no-sparse-arrays
+let array = [,];
+for (let i = 0; i < 10000; i++)
+  array = [array];
 
 JSON.stringify(array);
Repository: vercel/next.js
Pull request: Update Rspack production test manifest

This auto-generated PR updates the production integration test manifest used when testing Rspack.

Changed files:
filename: test/rspack-build-tests-manifest.json
patch: @@ -1105,6 +1105,8 @@
       "app-dir static/dynamic handling should propagate unstable_cache tags correctly",
       "app-dir static/dynamic handling should properly error when dynamic = \"error\" page uses dynamic",
       "app-dir static/dynamic handling should render not found pages correctly and fallback to the default one",
+      "app-dir static/dynamic handling should respond correctly for dynamic route with dynamicParams false in layout",
+      "app-dir static/dynamic handling should respond correctly for partially dynamic route with dynamicParams false in layout",
       "app-dir static/dynamic handling should skip cache in draft mode",
       "app-dir static/dynamic handling should skip fetch cache when accessing request properties",
       "app-dir static/dynamic handling should skip fetch cache when an authorization header is present after dynamic usage",
@@ -1217,6 +1219,8 @@
       "app-dir static/dynamic handling should properly error when dynamic = \"error\" page uses dynamic",
       "app-dir static/dynamic handling should properly revalidate a route handler that triggers dynamic usage with force-static",
       "app-dir static/dynamic handling should render not found pages correctly and fallback to the default one",
+      "app-dir static/dynamic handling should respond correctly for dynamic route with dynamicParams false in layout",
+      "app-dir static/dynamic handling should respond correctly for partially dynamic route with dynamicParams false in layout",
       "app-dir static/dynamic handling should revalidate all fetches during on-demand revalidate",
       "app-dir static/dynamic handling should revalidate correctly with config and fetch revalidate",
       "app-dir static/dynamic handling should skip cache in draft mode",
@@ -4924,6 +4928,9 @@
       "rewrite-headers next.config.js rewrites static HTML (/hello/other) should have the expected headers",
       "rewrite-headers next.config.js rewrites static Prefetch RSC (/hello/other) should have the expected headers",
       "rewrite-headers next.config.js rewrites static RSC (/hello/other) should have the expected headers",
+      "rewrite-headers next.config.js rewrites with path-matched query HTML (/rewrites-to-query/andrew) should have the expected headers",
+      "rewrite-headers next.config.js rewrites with path-matched query Prefetch RSC (/rewrites-to-query/andrew) should have the expected headers",
+      "rewrite-headers next.config.js rewrites with path-matched query RSC (/rewrites-to-query/andrew) should have the expected headers",
       "rewrite-headers next.config.js rewrites with query HTML (/hello/fred) should have the expected headers",
       "rewrite-headers next.config.js rewrites with query Prefetch RSC (/hello/fred) should have the expected headers",
       "rewrite-headers next.config.js rewrites with query RSC (/hello/fred) should have the expected headers",
Repository: nodejs/node
Pull request: src: fix possible dereference of NULL pointer

There is a CHECK_NOT_NULL check before dereferencing node_env on line 710 in the if block, but there is no CHECK_NOT_NULL check before dereferencing node_env on line 721. Maybe it makes sense to put CHECK_NOT_NULL right after calling the Environment::GetCurrent function?

Changed files:
filename: src/node_api.cc
patch: @@ -704,9 +704,9 @@ void napi_module_register_by_symbol(v8::Local<v8::Object> exports,
                                     napi_addon_register_func init,
                                     int32_t module_api_version) {
   node::Environment* node_env = node::Environment::GetCurrent(context);
+  CHECK_NOT_NULL(node_env);
   std::string module_filename = "";
   if (init == nullptr) {
-    CHECK_NOT_NULL(node_env);
     node_env->ThrowError("Module has no declared entry point.");
     return;
   }
Repository: huggingface/transformers
Pull request: Fix an invalid condition

# What does this PR do?

This was detected by ruff.

Changed files:
filename: src/transformers/models/align/convert_align_tf_to_hf.py
patch: @@ -275,7 +275,7 @@ def replace_params(hf_params, tf_params, key_mapping):
             new_hf_value = torch.from_numpy(np.transpose(value))
         elif "temperature" in key:
             new_hf_value = value
-        elif "bn/gamma" or "bn/beta" in key:
+        elif "bn/gamma" in key or "bn/beta" in key:
             new_hf_value = torch.from_numpy(np.transpose(value)).squeeze()
         else:
             new_hf_value = torch.from_numpy(value)
Repository: electron/electron
Pull request: build: fail for out of date patches on forks

Backport of #46080

See that PR for details.


Notes: none


Changed files:
filename: .github/actions/checkout/action.yml
patch: @@ -99,7 +99,7 @@ runs:
       fi
 
       ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 e d gclient sync --with_branch_heads --with_tags -vv
-      if [[ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]]; then
+      if [[ "${{ inputs.is-release }}" != "true" ]]; then
         # Re-export all the patches to check if there were changes.
         python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
         cd src/electron

filename: script/push-patch.js
patch: @@ -2,23 +2,31 @@ const { appCredentialsFromString, getTokenForRepo } = require('@electron/github-
 
 const cp = require('node:child_process');
 
+const { PATCH_UP_APP_CREDS } = process.env;
+
 async function main () {
+  if (!PATCH_UP_APP_CREDS) {
+    throw new Error('PATCH_UP_APP_CREDS environment variable not set');
+  }
+
   const token = await getTokenForRepo(
     {
       name: 'electron',
       owner: 'electron'
     },
-    appCredentialsFromString(process.env.PATCH_UP_APP_CREDS)
+    appCredentialsFromString(PATCH_UP_APP_CREDS)
   );
+
   const remoteURL = `https://x-access-token:${token}@github.com/electron/electron.git`;
+
   // NEVER LOG THE OUTPUT OF THIS COMMAND
   // GIT LEAKS THE ACCESS CREDENTIALS IN CONSOLE LOGS
   const { status } = cp.spawnSync('git', ['push', '--set-upstream', remoteURL], {
     stdio: 'ignore'
   });
+
   if (status !== 0) {
-    console.error('Failed to push to target branch');
-    process.exit(1);
+    throw new Error('Failed to push to target branch');
   }
 }
Repository: facebook/react
Pull request: Convert ReactJSXElement to createRoot


Changed files:
filename: packages/react/src/__tests__/ReactJSXElement-test.js
patch: @@ -10,8 +10,9 @@
 'use strict';
 
 let React;
-let ReactDOM;
+let ReactDOMClient;
 let ReactTestUtils;
+let act;
 
 describe('ReactJSXElement', () => {
   let Component;
@@ -20,8 +21,10 @@ describe('ReactJSXElement', () => {
     jest.resetModules();
 
     React = require('react');
-    ReactDOM = require('react-dom');
+    ReactDOMClient = require('react-dom/client');
     ReactTestUtils = require('react-dom/test-utils');
+    act = require('internal-test-utils').act;
+
     Component = class extends React.Component {
       render() {
         return <div />;
@@ -172,14 +175,20 @@ describe('ReactJSXElement', () => {
     expect(element.constructor).toBe(object.constructor);
   });
 
-  it('should use default prop value when removing a prop', () => {
+  it('should use default prop value when removing a prop', async () => {
     Component.defaultProps = {fruit: 'persimmon'};
 
     const container = document.createElement('div');
-    const instance = ReactDOM.render(<Component fruit="mango" />, container);
+    const root = ReactDOMClient.createRoot(container);
+    let instance;
+    await act(() => {
+      root.render(<Component fruit="mango" ref={ref => (instance = ref)} />);
+    });
     expect(instance.props.fruit).toBe('mango');
 
-    ReactDOM.render(<Component />, container);
+    await act(() => {
+      root.render(<Component ref={ref => (instance = ref)} />);
+    });
     expect(instance.props.fruit).toBe('persimmon');
   });
Repository: denoland/deno
Pull request: fix(lsp): use canonicalized fallback filesystem root

Fixes https://github.com/denoland/vscode_deno/issues/1305.

Changed files:
filename: cli/lsp/config.rs
patch: @@ -2026,11 +2026,14 @@ impl ConfigTree {
     let pkg_json_cache = PackageJsonMemCache::default();
     let workspace_cache = WorkspaceMemCache::default();
     let mut scopes = BTreeMap::new();
-    for (folder_url, ws_settings) in
-      settings.by_workspace_folder.iter().chain([(
-        &Arc::new(Url::parse("file:///").unwrap()),
-        &Some(settings.unscoped.clone()),
-      )])
+    let fs_root_url = std::fs::canonicalize("/")
+      .ok()
+      .and_then(|p| Url::from_directory_path(p).ok())
+      .unwrap_or_else(|| Url::parse("file:///").unwrap());
+    for (folder_url, ws_settings) in settings
+      .by_workspace_folder
+      .iter()
+      .chain([(&Arc::new(fs_root_url), &Some(settings.unscoped.clone()))])
     {
       let mut ws_settings = ws_settings.as_ref();
       if Some(folder_url) == settings.first_folder.as_ref() {
Repository: ggml-org/llama.cpp
Pull request: README.md : Added link to llama-cpp-jna Java binding

Link to Java JNA bindings to llama.cpp native libraries

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: README.md
patch: @@ -178,6 +178,7 @@ Instructions for adding support for new models: [HOWTO-add-model.md](docs/develo
 - Clojure: [phronmophobic/llama.clj](https://github.com/phronmophobic/llama.clj)
 - React Native: [mybigday/llama.rn](https://github.com/mybigday/llama.rn)
 - Java: [kherud/java-llama.cpp](https://github.com/kherud/java-llama.cpp)
+- Java: [QuasarByte/llama-cpp-jna](https://github.com/QuasarByte/llama-cpp-jna)
 - Zig: [deins/llama.cpp.zig](https://github.com/Deins/llama.cpp.zig)
 - Flutter/Dart: [netdur/llama_cpp_dart](https://github.com/netdur/llama_cpp_dart)
 - Flutter: [xuegao-tzx/Fllama](https://github.com/xuegao-tzx/Fllama)