helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: perf(ext/http): cache abort signal error

Fixes a perf regression introduced in https://github.com/denoland/deno/commit/eed2598e6cf1db643b4edd07b5eff94c59eb9408 ([flamegraph](https://profiler.firefox.com/public/83whz7mrfkshk5q6hd6hjmrmw8tgmw67s96m4p0/flame-graph/?globalTrackOrder=0&hiddenLocalTracksByPid=12691-0we&symbolServer=http%3A%2F%2F127.0.0.1%3A3000%2F316cvciry38ippl9i74fmcxrd5q9asfrr28xp02&thread=0&v=10))

this patch:
```
Summary:
  Success rate: 100.00%
  Total:        10.0007 secs
  Slowest:      0.0145 secs
  Fastest:      0.0001 secs
  Average:      0.0006 secs
  Requests/sec: 80341.4816

  Total data:   9.19 MiB
  Size/request: 12
  Size/sec:     941.44 KiB
```

main:
```
Summary:
  Success rate: 100.00%
  Total:        10.0007 secs
  Slowest:      0.0068 secs
  Fastest:      0.0002 secs
  Average:      0.0009 secs
  Requests/sec: 56560.0551

  Total data:   6.47 MiB
  Size/request: 12
  Size/sec:     662.75 KiB
```

Changed files:
filename: ext/http/00_serve.ts
patch: @@ -126,6 +126,8 @@ function addTrailers(resp, headerList) {
   op_http_set_response_trailers(inner.external, headerList);
 }
 
+let signalAbortError;
+
 class InnerRequest {
   #external;
   #context;
@@ -156,9 +158,15 @@ class InnerRequest {
         );
       }
     }
+    if (!signalAbortError) {
+      signalAbortError = new DOMException(
+        "The request has been cancelled.",
+        "AbortError",
+      );
+    }
     // Unconditionally abort the request signal. Note that we don't use
     // an error here.
-    this.#abortController.abort();
+    this.#abortController.abort(signalAbortError);
     this.#external = null;
   }
Repository: huggingface/transformers
Pull request: Fix post_init() code duplication

# What does this PR do?

As per the title. The loop got duplicated in https://github.com/huggingface/transformers/pull/36677 but it should not be

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -1917,9 +1917,6 @@ def post_init(self):
             for name, module in self.named_children():
                 if plan := getattr(module, "_tp_plan", None):
                     self._tp_plan.update({f"{name}.{k}": v for k, v in plan.items()})
-        for name, module in self.named_children():
-            if plan := getattr(module, "_tp_plan", None):
-                self._tp_plan.update({f"{name}.{k}": v for k, v in plan.items()})
 
         if self._tp_plan is not None and is_torch_greater_or_equal("2.3"):
             for _, v in self._tp_plan.items():
Repository: huggingface/transformers
Pull request: Handling an exception related to HQQ quantization in modeling

# What does this PR do?

Adds exception handling to allow HQQ quantization to proceed when parameter names don't match between the model and state dict. It's due to the fact that in HQQ we only replace the linears on the fly by the hqqlinears, and this is because of some internal hqq considerations (to quantize each layer with a different precision...)

## Who can review ?
@SunMarc 

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -709,9 +709,19 @@ def _find_identical(tensors: List[Set[str]], state_dict: Dict[str, torch.Tensor]
 
 
 def _infer_parameter_dtype(
-    model: "PreTrainedModel", param_name: str, empty_param, keep_in_fp32_modules=None
+    model: "PreTrainedModel",
+    param_name: str,
+    empty_param: torch.Tensor,
+    keep_in_fp32_modules: Optional[List[str]] = None,
+    hf_quantizer: Optional[HfQuantizer] = None,
 ) -> Union[bool, Optional[torch.dtype]]:
-    old_param = model.get_parameter_or_buffer(param_name)
+    try:
+        old_param = model.get_parameter_or_buffer(param_name)
+    except Exception as e:
+        if hf_quantizer is not None and hf_quantizer.quantization_config.quant_method == QuantizationMethod.HQQ:
+            return True, None
+        else:
+            raise e
     is_torch_e4m3fn_available = hasattr(torch, "float8_e4m3fn")
     # We convert floating dtypes to the `dtype` passed except for float8_e4m3fn type. We also want to keep the buffers/params
     # in int/uint/bool and not cast them.
@@ -781,6 +791,7 @@ def _load_state_dict_into_meta_model(
             param_name,
             empty_param,
             keep_in_fp32_modules,
+            hf_quantizer,
         )
 
         if device_mesh is not None:  # In this case, the param is already on the correct device!
Repository: denoland/deno
Pull request: fix: unref stdin read

Closes https://github.com/denoland/deno_core/issues/648

Changed files:
filename: runtime/tokio_util.rs
patch: @@ -99,7 +99,13 @@ where
   #[cfg(not(tokio_unstable))]
   let join_handle = rt.spawn(future);
 
-  rt.block_on(join_handle).unwrap().into_inner()
+  let r = rt.block_on(join_handle).unwrap().into_inner();
+  // Forcefully shutdown the runtime - we're done executing JS code at this
+  // point, but there might be outstanding blocking tasks that were created and
+  // latered "unrefed". They won't terminate on their own, so we're forcing
+  // termination of Tokio runtime at this point.
+  rt.shutdown_background();
+  r
 }
 
 #[inline(always)]

filename: tests/specs/run/unref_stdin/__test__.jsonc
patch: @@ -0,0 +1,5 @@
+// Regression test for https://github.com/denoland/deno/issues/22453
+{
+  "args": "run main.js",
+  "output": "main.out"
+}

filename: tests/specs/run/unref_stdin/main.js
patch: @@ -0,0 +1,11 @@
+const { core } = Deno[Deno.internal];
+const opPromise = core.read(Deno.stdin.rid, new Uint8Array(10));
+core.unrefOpPromise(opPromise);
+
+async function main() {
+  console.log(1);
+  await opPromise;
+  console.log(2);
+}
+
+main();

filename: tests/specs/run/unref_stdin/main.out
patch: @@ -0,0 +1 @@
+1
Repository: facebook/react
Pull request: [Fizz] Always call flush() if it exists

I was trying to make things better with https://github.com/facebook/react/pull/17289 but I shot myself in the foot.

The problem is that Express `res` objects have no `flush` method but do have `flushHeaders`. Which is fine. Unless you add `compression` middleware. Which monkepatches `flush` onto the object. But we don't call it. So it never flushes.

Let's always call `flush` if it exists. If it fires a deprecation with `http.createServer`, that's fine.

Changed files:
filename: packages/react-server/src/ReactServerStreamConfigNode.js
patch: @@ -11,8 +11,6 @@ import type {Writable} from 'stream';
 
 type MightBeFlushable = {
   flush?: () => void,
-  // Legacy
-  flushHeaders?: () => void,
   ...
 };
 
@@ -31,12 +29,9 @@ export function flushBuffered(destination: Destination) {
   // If we don't have any more data to send right now.
   // Flush whatever is in the buffer to the wire.
   if (typeof destination.flush === 'function') {
-    // http.createServer response have flush(), but it has a different meaning and
-    // is deprecated in favor of flushHeaders(). Detect to avoid a warning.
-    if (typeof destination.flushHeaders !== 'function') {
-      // By convention the Zlib streams provide a flush function for this purpose.
-      destination.flush();
-    }
+    // By convention the Zlib streams provide a flush function for this purpose.
+    // For Express, compression middleware adds this method.
+    destination.flush();
   }
 }
Repository: denoland/deno
Pull request: feat(ext/webgpu): support create UnsafeWindowSurface on Wayland

This PR works fine with a [simply modified `deno_sdl2`](https://github.com/chirsz-ever/deno_sdl2/tree/chirsz/support-wayland).

@littledivy How do you think about this?

Changed files:
filename: cli/tsc/dts/lib.deno.unstable.d.ts
patch: @@ -776,12 +776,13 @@ declare namespace Deno {
    *  | "cocoa" (macOS)   | `NSView*`     | -               |
    *  | "win32" (Windows) | `HWND`        | `HINSTANCE`     |
    *  | "x11" (Linux)     | Xlib `Window` | Xlib `Display*` |
+   *  | "wayland" (Linux) | `wl_surface*` | `wl_display*`   |
    *
    * @category WebGPU
    */
   export class UnsafeWindowSurface {
     constructor(
-      system: "cocoa" | "win32" | "x11",
+      system: "cocoa" | "win32" | "x11" | "wayland",
       windowHandle: Deno.PointerValue<unknown>,
       displayHandle: Deno.PointerValue<unknown>,
     );

filename: ext/webgpu/byow.rs
patch: @@ -105,23 +105,38 @@ fn raw_window(
   window: *const c_void,
   display: *const c_void,
 ) -> Result<RawHandles, AnyError> {
-  if system != "x11" {
+  let (win_handle, display_handle);
+  if system == "x11" {
+    win_handle = {
+      let mut handle = raw_window_handle::XlibWindowHandle::empty();
+      handle.window = window as *mut c_void as _;
+
+      raw_window_handle::RawWindowHandle::Xlib(handle)
+    };
+
+    display_handle = {
+      let mut handle = raw_window_handle::XlibDisplayHandle::empty();
+      handle.display = display as *mut c_void;
+
+      raw_window_handle::RawDisplayHandle::Xlib(handle)
+    };
+  } else if system == "wayland" {
+    win_handle = {
+      let mut handle = raw_window_handle::WaylandWindowHandle::empty();
+      handle.surface = window as _;
+
+      raw_window_handle::RawWindowHandle::Wayland(handle)
+    };
+
+    display_handle = {
+      let mut handle = raw_window_handle::WaylandDisplayHandle::empty();
+      handle.display = display as _;
+
+      raw_window_handle::RawDisplayHandle::Wayland(handle)
+    };
+  } else {
     return Err(type_error("Invalid system on Linux"));
   }
 
-  let win_handle = {
-    let mut handle = raw_window_handle::XlibWindowHandle::empty();
-    handle.window = window as *mut c_void as _;
-
-    raw_window_handle::RawWindowHandle::Xlib(handle)
-  };
-
-  let display_handle = {
-    let mut handle = raw_window_handle::XlibDisplayHandle::empty();
-    handle.display = display as *mut c_void;
-
-    raw_window_handle::RawDisplayHandle::Xlib(handle)
-  };
-
   Ok((win_handle, display_handle))
 }
Repository: facebook/react
Pull request: Fix typo in bridge.js



<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

  Before submitting a pull request, please make sure the following is done:

  1. Fork [the repository](https://github.com/facebook/react) and create your branch from `master`.
  2. Run `yarn` in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
  5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
  6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
  7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
  8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

  Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

Fixed typo.

```
suppot -> support
```

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->

## Test Plan

<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. -->


Changed files:
filename: packages/react-devtools-shared/src/bridge.js
patch: @@ -238,7 +238,7 @@ type FrontendEvents = {|
   // but the new frontend still dispatches them (in case older backends are listening to them instead).
   //
   // Note that this approach does no support the combination of a newer backend with an older frontend.
-  // It would be more work to suppot both approaches (and not run handlers twice)
+  // It would be more work to support both approaches (and not run handlers twice)
   // so I chose to support the more likely/common scenario (and the one more difficult for an end user to "fix").
   overrideContext: [OverrideValue],
   overrideHookState: [OverrideHookState],
Repository: electron/electron
Pull request: ci: fix Nan test failure on Linux

Backport of #42863

See that PR for details.


Notes: none

Changed files:
filename: script/nan-spec-runner.js
patch: @@ -17,6 +17,14 @@ const args = require('minimist')(process.argv.slice(2), {
   string: ['only']
 });
 
+const getNodeGypVersion = () => {
+  const nanPackageJSONPath = path.join(NAN_DIR, 'package.json');
+  const nanPackageJSON = JSON.parse(fs.readFileSync(nanPackageJSONPath, 'utf8'));
+  const { devDependencies } = nanPackageJSON;
+  const nodeGypVersion = devDependencies['node-gyp'];
+  return nodeGypVersion || 'latest';
+};
+
 async function main () {
   const outDir = utils.getOutDir({ shouldLog: true });
   const nodeDir = path.resolve(BASE, 'out', outDir, 'gen', 'node_headers');
@@ -90,16 +98,17 @@ async function main () {
     env.LDFLAGS = ldflags;
   }
 
-  const { status: buildStatus } = cp.spawnSync(NPX_CMD, ['node-gyp', 'rebuild', '--verbose', '--directory', 'test', '-j', 'max'], {
+  const nodeGypVersion = getNodeGypVersion();
+  const { status: buildStatus, signal } = cp.spawnSync(NPX_CMD, [`node-gyp@${nodeGypVersion}`, 'rebuild', '--verbose', '--directory', 'test', '-j', 'max'], {
     env,
     cwd: NAN_DIR,
     stdio: 'inherit',
     shell: process.platform === 'win32'
   });
 
-  if (buildStatus !== 0) {
+  if (buildStatus !== 0 || signal != null) {
     console.error('Failed to build nan test modules');
-    return process.exit(buildStatus);
+    return process.exit(buildStatus !== 0 ? buildStatus : signal);
   }
 
   const { status: installStatus } = cp.spawnSync(NPX_CMD, [`yarn@${YARN_VERSION}`, 'install'], {
@@ -108,9 +117,10 @@ async function main () {
     stdio: 'inherit',
     shell: process.platform === 'win32'
   });
-  if (installStatus !== 0) {
+
+  if (installStatus !== 0 || signal != null) {
     console.error('Failed to install nan node_modules');
-    return process.exit(installStatus);
+    return process.exit(installStatus !== 0 ? installStatus : signal);
   }
 
   const onlyTests = args.only && args.only.split(',');
Repository: ggml-org/llama.cpp
Pull request: readme: added Sidekick to available UIs

This PR adds [Sidekick](https://github.com/johnbean393/Sidekick) to available UI projects for llama.cpp.

cc @ggerganov

Changed files:
filename: README.md
patch: @@ -172,6 +172,7 @@ Instructions for adding support for new models: [HOWTO-add-model.md](docs/develo
 - [eva](https://github.com/ylsdamxssjxxdd/eva) (MIT)
 - [iohub/collama](https://github.com/iohub/coLLaMA) (Apache-2.0)
 - [janhq/jan](https://github.com/janhq/jan) (AGPL)
+- [johnbean393/Sidekick](https://github.com/johnbean393/Sidekick) (MIT)
 - [KanTV](https://github.com/zhouwg/kantv?tab=readme-ov-file) (Apache-2.0)
 - [KodiBot](https://github.com/firatkiral/kodibot) (GPL)
 - [llama.vim](https://github.com/ggml-org/llama.vim) (MIT)
Repository: vercel/next.js
Pull request: [dev-overlay] Remove unused fields from hydration error state

Can't see what's supposed to write to this field.

Changed files:
filename: packages/next/src/client/components/errors/hydration-error-info.ts
patch: @@ -6,7 +6,6 @@ import {
 export type HydrationErrorState = {
   // Hydration warning template format: <message> <serverContent> <clientContent>
   warning?: [string, string, string]
-  componentStack?: string
   serverContent?: string
   clientContent?: string
   // React 19 hydration diff format: <notes> <link> <component diff?>

filename: packages/next/src/client/components/react-dev-overlay/app/hot-reloader-client.tsx
patch: @@ -515,8 +515,7 @@ export default function HotReload({
         | HydrationErrorState
         | undefined
       // Component stack is added to the error in use-error-handler in case there was a hydration error
-      const componentStackTrace =
-        (error as any)._componentStack || errorDetails?.componentStack
+      const componentStackTrace = (error as any)._componentStack
       const warning = errorDetails?.warning
 
       dispatch({

filename: packages/next/src/client/components/react-dev-overlay/pages/client.ts
patch: @@ -1,10 +1,7 @@
 import * as Bus from './bus'
 import { parseStack } from '../utils/parse-stack'
 import { parseComponentStack } from '../utils/parse-component-stack'
-import {
-  hydrationErrorState,
-  storeHydrationErrorStateFromConsoleArgs,
-} from '../../errors/hydration-error-info'
+import { storeHydrationErrorStateFromConsoleArgs } from '../../errors/hydration-error-info'
 import {
   ACTION_BEFORE_REFRESH,
   ACTION_BUILD_ERROR,
@@ -30,8 +27,7 @@ function handleError(error: unknown) {
 
   attachHydrationErrorState(error)
 
-  const componentStackTrace =
-    (error as any)._componentStack || hydrationErrorState.componentStack
+  const componentStackTrace = (error as any)._componentStack
   const componentStackFrames =
     typeof componentStackTrace === 'string'
       ? parseComponentStack(componentStackTrace)
Repository: electron/electron
Pull request: ci: fix Nan test failure on Linux

#### Description of Change

Fixes an issue seen after the release of node-gyp@10.2.0 owing to https://github.com/nodejs/node-gyp/commit/ea99fea83485dc5be04db01df9b2fdbe05319b8e. To fix this, use the same version of node-gyp when building nan tests as the one they directly depend on.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [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: none

Changed files:
filename: .github/workflows/pipeline-segment-node-nan-test.yml
patch: @@ -152,7 +152,7 @@ jobs:
         unzip -:o dist.zip
     - name: Setup Linux for Headless Testing
       run: sh -e /etc/init.d/xvfb start
-    - name: Run Node.js Tests
+    - name: Run Nan Tests
       run: |
         cd src
         node electron/script/nan-spec-runner.js

filename: script/nan-spec-runner.js
patch: @@ -17,6 +17,14 @@ const args = require('minimist')(process.argv.slice(2), {
   string: ['only']
 });
 
+const getNodeGypVersion = () => {
+  const nanPackageJSONPath = path.join(NAN_DIR, 'package.json');
+  const nanPackageJSON = JSON.parse(fs.readFileSync(nanPackageJSONPath, 'utf8'));
+  const { devDependencies } = nanPackageJSON;
+  const nodeGypVersion = devDependencies['node-gyp'];
+  return nodeGypVersion || 'latest';
+};
+
 async function main () {
   const outDir = utils.getOutDir({ shouldLog: true });
   const nodeDir = path.resolve(BASE, 'out', outDir, 'gen', 'node_headers');
@@ -90,7 +98,8 @@ async function main () {
     env.LDFLAGS = ldflags;
   }
 
-  const { status: buildStatus, signal } = cp.spawnSync(NPX_CMD, ['node-gyp', 'rebuild', '--verbose', '--directory', 'test', '-j', 'max'], {
+  const nodeGypVersion = getNodeGypVersion();
+  const { status: buildStatus, signal } = cp.spawnSync(NPX_CMD, [`node-gyp@${nodeGypVersion}`, 'rebuild', '--verbose', '--directory', 'test', '-j', 'max'], {
     env,
     cwd: NAN_DIR,
     stdio: 'inherit',
Repository: denoland/deno
Pull request: fix(config): move json schema unstable examples to item


Changed files:
filename: cli/schemas/config-file.v1.json
patch: @@ -549,24 +549,24 @@
       "type": "array",
       "description": "List of unstable features to enable.",
       "items": {
-        "type": "string"
-      },
-      "examples": [
-        "broadcast-channel",
-        "bare-node-builtins",
-        "byonm",
-        "cron",
-        "ffi",
-        "fs",
-        "http",
-        "kv",
-        "net",
-        "sloppy-imports",
-        "temporal",
-        "unsafe-proto",
-        "webgpu",
-        "worker-options"
-      ]
+        "type": "string",
+        "examples": [
+          "broadcast-channel",
+          "bare-node-builtins",
+          "byonm",
+          "cron",
+          "ffi",
+          "fs",
+          "http",
+          "kv",
+          "net",
+          "sloppy-imports",
+          "temporal",
+          "unsafe-proto",
+          "webgpu",
+          "worker-options"
+        ]
+      }
     },
     "name": {
       "type": "string",
Repository: nodejs/node
Pull request: build: fix GN build for sqlite and nghttp2

As in title - fixes build failures resultant of recent updates to `sqlite` and `nghttp2`.

<!--
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: deps/nghttp2/unofficial.gni
patch: @@ -34,6 +34,9 @@ template("nghttp2_gn_build") {
     if (is_clang || !is_win) {
       cflags_c = [
         "-Wno-implicit-fallthrough",
+        # Ref https://github.com/nghttp2/nghttp2/pull/2258
+        # This can be removed when the above PR is ingested.
+        "-Wno-extra-semi",
       ]
     }
   }

filename: deps/sqlite/unofficial.gni
patch: @@ -18,8 +18,14 @@ template("sqlite_gn_build") {
     forward_variables_from(invoker, "*")
     public_configs = [ ":sqlite_config" ]
     sources = gypi_values.sqlite_sources
+    cflags_c = [
+      "-Wno-implicit-fallthrough",
+      "-Wno-unreachable-code-return",
+      "-Wno-unreachable-code-break",
+      "-Wno-unreachable-code",
+    ]
     if (is_win) {
-      cflags_c = [
+      cflags_c += [
         "-Wno-sign-compare",
         "-Wno-unused-but-set-variable",
         "-Wno-unused-function",