helloadhavan/github_issues huggingface dataset:
Repository: nodejs/node
Pull request: dns: fix dns query cache implementation

Refs: https://github.com/nodejs/node/pull/57640

It turns out #57640 was incomplete and I missed including this option mask flag. Thank you to @augjoh for [pointing this out](https://github.com/nodejs/node/issues/57641#issuecomment-2888235890). 

Changed files:
filename: src/cares_wrap.cc
patch: @@ -879,9 +879,9 @@ void ChannelWrap::Setup() {
   }
 
   /* We do the call to ares_init_option for caller. */
-  const int optmask =
-      ARES_OPT_FLAGS | ARES_OPT_TIMEOUTMS |
-      ARES_OPT_SOCK_STATE_CB | ARES_OPT_TRIES;
+  const int optmask = ARES_OPT_FLAGS | ARES_OPT_TIMEOUTMS |
+                      ARES_OPT_SOCK_STATE_CB | ARES_OPT_TRIES |
+                      ARES_OPT_QUERY_CACHE;
   r = ares_init_options(&channel_, &options, optmask);
 
   if (r != ARES_SUCCESS) {

filename: test/parallel/test-dns.js
patch: @@ -415,7 +415,7 @@ assert.throws(() => {
         (answer) => Object.assign({ domain }, answer)
       ),
     }), port, address);
-  }, cases.length * 2 - 1));
+  }, cases.length * 2));
 
   server.bind(0, common.mustCall(() => {
     const address = server.address();
Repository: facebook/react
Pull request: fix[rdt/fiber/renderer.js]: getCurrentFiber can be injected as null

In production artifacts for `18.x.x` `getCurrentFiber` can actually be injected as `null`. Updated `getComponentStack` and `onErrorOrWarning` implementations to support this.

![Screenshot 2024-09-16 at 10 52 00](https://github.com/user-attachments/assets/a0c773aa-ebbf-4fd5-95c4-cac3cc0c203f)


Changed files:
filename: packages/react-devtools-shared/src/backend/fiber/renderer.js
patch: @@ -1078,7 +1078,7 @@ export function attach(
   function getComponentStack(
     topFrame: Error,
   ): null | {enableOwnerStacks: boolean, componentStack: string} {
-    if (getCurrentFiber === undefined) {
+    if (getCurrentFiber == null) {
       // Expected this to be part of the renderer. Ignore.
       return null;
     }
@@ -1130,7 +1130,7 @@ export function attach(
     type: 'error' | 'warn',
     args: $ReadOnlyArray<any>,
   ): void {
-    if (getCurrentFiber === undefined) {
+    if (getCurrentFiber == null) {
       // Expected this to be part of the renderer. Ignore.
       return;
     }

filename: packages/react-devtools-shared/src/backend/types.js
patch: @@ -158,7 +158,7 @@ export type ReactRenderer = {
   currentDispatcherRef?: LegacyDispatcherRef | CurrentDispatcherRef,
   // Only injected by React v16.9+ in DEV mode.
   // Enables DevTools to append owners-only component stack to error messages.
-  getCurrentFiber?: () => Fiber | null,
+  getCurrentFiber?: (() => Fiber | null) | null,
   // Only injected by React Flight Clients in DEV mode.
   // Enables DevTools to append owners-only component stack to error messages from Server Components.
   getCurrentComponentInfo?: () => ReactComponentInfo | null,
Repository: vercel/next.js
Pull request: Turbopack: take task cache log before starting snapshot

### What?

We need to snapshot the task data before taking all task cache changes.

Otherwise there is a race condition where the task data contains a task id that is not in the task cache.

Closes PACK-5681

Changed files:
filename: turbopack/crates/turbo-tasks-backend/src/backend/mod.rs
patch: @@ -964,12 +964,12 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
             .map(|op| op.arc().clone())
             .collect::<Vec<_>>();
         drop(snapshot_request);
+        self.storage.start_snapshot();
         let mut persisted_task_cache_log = self
             .persisted_task_cache_log
             .as_ref()
             .map(|l| l.take(|i| i))
             .unwrap_or_default();
-        self.storage.start_snapshot();
         let mut snapshot_request = self.snapshot_request.lock();
         snapshot_request.snapshot_requested = false;
         self.in_progress_operations
Repository: huggingface/transformers
Pull request: [kernels] Add version to function mapping

# What does this PR do?

We simply add a version attribute to the function kernel mapping to avoid breaking changes for kernels in the future

Changed files:
filename: src/transformers/integrations/hub_kernels.py
patch: @@ -162,8 +162,8 @@ def register_kernel_mapping(*args, **kwargs):
         raise RuntimeError("register_kernel_mapping requires `kernels` to be installed. Run `pip install kernels`.")
 
 
-_HUB_KERNEL_MAPPING: dict[str, str] = {
-    "causal-conv1d": "kernels-community/causal-conv1d",
+_HUB_KERNEL_MAPPING: dict[str, dict[str, str]] = {
+    "causal-conv1d": {"repo_id": "kernels-community/causal-conv1d"},
 }
 
 _KERNEL_MODULE_MAPPING: dict[str, Optional[ModuleType]] = {}
@@ -242,7 +242,9 @@ def lazy_load_kernel(kernel_name: str, mapping: dict[str, Optional[ModuleType]]
         from kernels import get_kernel
 
         try:
-            kernel = get_kernel(_HUB_KERNEL_MAPPING[kernel_name])
+            repo_id = _HUB_KERNEL_MAPPING[kernel_name]["repo_id"]
+            version = _HUB_KERNEL_MAPPING[kernel_name].get("version", None)
+            kernel = get_kernel(repo_id, version=version)
             mapping[kernel_name] = kernel
         except FileNotFoundError:
             mapping[kernel_name] = None
Repository: nodejs/node
Pull request: meta: add .npmrc with ignore-scripts=true

If any depdencies actually need to run the scripts, the corresponding script can add --no-ignore-scripts.

<!--
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: .gitignore
patch: @@ -21,6 +21,7 @@
 !.nycrc
 !.yamllint.yaml
 !.configurations/
+!/.npmrc
 
 # === Rules for root dir ===
 /core

filename: .npmrc
patch: @@ -0,0 +1 @@
+ignore-scripts=true
Repository: ollama/ollama
Pull request: Revert "fix golangci workflow not enable gofmt and goimports"

Reverts ollama/ollama#4190

gofmt is still a problem on windows see https://github.com/ollama/ollama/actions/runs/8989369091/job/24692319408?pr=4153

Changed files:
filename: .github/workflows/test.yaml
patch: @@ -269,7 +269,7 @@ jobs:
           mkdir -p llm/build/darwin/$ARCH/stub/bin
           touch llm/build/darwin/$ARCH/stub/bin/ollama_llama_server
         if: ${{ startsWith(matrix.os, 'macos-') }}
-      - uses: golangci/golangci-lint-action@v5
+      - uses: golangci/golangci-lint-action@v4
         with:
           args: --timeout 8m0s -v
   test:

filename: .golangci.yaml
patch: @@ -9,8 +9,9 @@ linters:
     - contextcheck
     - exportloopref
     - gocheckcompilerdirectives
-    - gofmt
-    - goimports
+    # FIXME: for some reason this errors on windows
+    # - gofmt
+    # - goimports
     - misspell
     - nilerr
     - unused
Repository: ggml-org/llama.cpp
Pull request: server : add VSCode's Github Copilot Chat support

## Overview

VSCode recently added support to use local models with Github Copilot Chat:

https://code.visualstudio.com/updates/v1_99#_bring-your-own-key-byok-preview

This PR adds compatibility of `llama-server` with this feature.

## Usage

- Start a `llama-server` on port 11434 with an instruct model of your choice. For example, using `Qwen 2.5 Coder Instruct 3B`:

  ```bash
  # downloads ~3GB of data

  llama-server \
      -hf ggml-org/Qwen2.5-Coder-3B-Instruct-Q8_0-GGUF \
      --port 11434 -fa -ngl 99 -c 0
  ```

- In VSCode -> Chat -> Manage models -> select "Ollama" (not sure why it is called like this):

  ![image](https://github.com/user-attachments/assets/003f408c-333b-4f18-b4c5-6c0ecfe01597)

- Select the available model from the list and click "OK":

  ![image](https://github.com/user-attachments/assets/ddd13f2e-6016-4752-a5a8-84c9efe0a8d6)

- Enjoy local AI assistance using vanilla `llama.cpp`:

  ![image](https://github.com/user-attachments/assets/8c41b10c-4892-4fad-9b43-8643fb8839c0)

- Advanced context reuse for faster prompt reprocessing can be enabled by adding `--cache-reuse 256` to the `llama-server` command

- Speculative decoding is also supported. Simply start the `llama-server` like this for example:

  ```bash
  llama-server \
      -m  ./models/qwen2.5-32b-coder-instruct/ggml-model-q8_0.gguf \
      -md ./models/qwen2.5-1.5b-coder-instruct/ggml-model-q4_0.gguf \
      --port 11434 -fa -ngl 99 -ngld 99 -c 0 --cache-reuse 256
  ```

Changed files:
filename: examples/server/server.cpp
patch: @@ -3907,6 +3907,21 @@ int main(int argc, char ** argv) {
         res_ok(res, {{ "success", true }});
     };
 
+    const auto handle_api_show = [&ctx_server, &res_ok](const httplib::Request &, httplib::Response & res) {
+        json data = {
+            {
+                "template", common_chat_templates_source(ctx_server.chat_templates.get()),
+            },
+            {
+                "model_info", {
+                    { "llama.context_length", ctx_server.slots.back().n_ctx, },
+                }
+            },
+        };
+
+        res_ok(res, data);
+    };
+
     // handle completion-like requests (completion, chat, infill)
     // we can optionally provide a custom format for partial results and final results
     const auto handle_completions_impl = [&ctx_server, &res_error, &res_ok](
@@ -4471,6 +4486,7 @@ int main(int argc, char ** argv) {
     svr->Get ("/metrics",             handle_metrics);
     svr->Get ("/props",               handle_props);
     svr->Post("/props",               handle_props_change);
+    svr->Post("/api/show",            handle_api_show);
     svr->Get ("/models",              handle_models); // public endpoint (no API key check)
     svr->Get ("/v1/models",           handle_models); // public endpoint (no API key check)
     svr->Post("/completion",          handle_completions); // legacy
Repository: facebook/react
Pull request: convert circleci worklfow fuzz_tests to github actions

## Summary

This pull request converts the CircleCI workflows to GitHub actions workflows. [Github Actions Importer](https://github.com/github/gh-actions-importer) was used to convert the workflows initially, then I edited them manually to correct errors in translation.  

## How did you test this change?

I tested these changes in a forked repo. You can [view the logs of this workflow in my fork](https://github.com/robandpdx/react/actions).

https://fburl.com/workplace/f6mz6tmw


Changed files:
filename: .github/workflows/fuzz_tests.yml
patch: @@ -0,0 +1,32 @@
+name: facebook/react/fuzz_tests
+on:
+  schedule:
+  - cron: 0 * * * *
+  push:
+    branches:
+      - main
+  workflow_dispatch:
+    inputs:
+      prerelease_commit_sha:
+        required: false
+jobs:
+  test_fuzz:
+    if: inputs.prerelease_commit_sha == ''
+    runs-on: ubuntu-latest
+    env:
+      TZ: "/usr/share/zoneinfo/America/Los_Angeles"
+    steps:
+    - uses: actions/checkout@v4.1.0
+    - uses: actions/setup-node@v4
+      with:
+        node-version-file: '.nvmrc'
+        cache: 'yarn'
+    - name: Install dependencies
+      run: yarn install --frozen-lockfile
+      env:
+        ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
+      shell: bash
+    - name: Run fuzz tests
+      run: |-
+        FUZZ_TEST_SEED=$RANDOM yarn test fuzz --ci
+        FUZZ_TEST_SEED=$RANDOM yarn test --prod fuzz --ci
Repository: vercel/next.js
Pull request: Update font data

This auto-generated PR updates font data with latest available

Changed files:
filename: packages/font/src/google/font-data.json
patch: @@ -1418,6 +1418,21 @@
     "styles": ["normal", "italic"],
     "subsets": ["latin"]
   },
+  "BBH Sans Bartle": {
+    "weights": ["400"],
+    "styles": ["normal"],
+    "subsets": ["latin"]
+  },
+  "BBH Sans Bogle": {
+    "weights": ["400"],
+    "styles": ["normal"],
+    "subsets": ["latin"]
+  },
+  "BBH Sans Hegarty": {
+    "weights": ["400"],
+    "styles": ["normal"],
+    "subsets": ["latin"]
+  },
   "BIZ UDGothic": {
     "weights": ["400", "700"],
     "styles": ["normal"],

filename: packages/font/src/google/index.ts
patch: @@ -2253,6 +2253,42 @@ export declare function B612_Mono<
   adjustFontFallback?: boolean
   subsets?: Array<'latin'>
 }): T extends undefined ? NextFont : NextFontWithVariable
+export declare function BBH_Sans_Bartle<
+  T extends CssVariable | undefined = undefined,
+>(options: {
+  weight: '400' | Array<'400'>
+  style?: 'normal' | Array<'normal'>
+  display?: Display
+  variable?: T
+  preload?: boolean
+  fallback?: string[]
+  adjustFontFallback?: boolean
+  subsets?: Array<'latin'>
+}): T extends undefined ? NextFont : NextFontWithVariable
+export declare function BBH_Sans_Bogle<
+  T extends CssVariable | undefined = undefined,
+>(options: {
+  weight: '400' | Array<'400'>
+  style?: 'normal' | Array<'normal'>
+  display?: Display
+  variable?: T
+  preload?: boolean
+  fallback?: string[]
+  adjustFontFallback?: boolean
+  subsets?: Array<'latin'>
+}): T extends undefined ? NextFont : NextFontWithVariable
+export declare function BBH_Sans_Hegarty<
+  T extends CssVariable | undefined = undefined,
+>(options: {
+  weight: '400' | Array<'400'>
+  style?: 'normal' | Array<'normal'>
+  display?: Display
+  variable?: T
+  preload?: boolean
+  fallback?: string[]
+  adjustFontFallback?: boolean
+  subsets?: Array<'latin'>
+}): T extends undefined ? NextFont : NextFontWithVariable
 export declare function BIZ_UDGothic<
   T extends CssVariable | undefined = undefined,
 >(options: {
Repository: denoland/deno
Pull request: fix(repl): fix panic when pressing Tab at beginning of line

## Summary
- Fixes a panic (usize underflow) in the REPL when pressing Tab at the beginning of a line that contains text
- The `get_expr_from_line_at_pos` function was looking at text *after* the cursor to determine the completion expression, then subtracting its length from cursor position 0, causing an underflow to `usize::MAX`
- Fix: only consider text before the cursor when determining the expression to complete

## Reproduction steps
1. Run `deno` to enter REPL
2. Type `Date(`
3. Move cursor to beginning of the line (Home key or Ctrl+A)
4. Press Tab

## Test plan
- [x] Manually verified the panic no longer occurs with the above reproduction steps
- [x] Verified normal tab completion still works (e.g. typing `Dat` + Tab completes to `Date`)

Closes #28038

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Changed files:
filename: cli/tools/repl/editor.rs
patch: @@ -169,15 +169,8 @@ fn is_word_boundary(c: char) -> bool {
 
 fn get_expr_from_line_at_pos(line: &str, cursor_pos: usize) -> &str {
   let start = line[..cursor_pos].rfind(is_word_boundary).unwrap_or(0);
-  let end = line[cursor_pos..]
-    .rfind(is_word_boundary)
-    .map(|i| cursor_pos + i)
-    .unwrap_or(cursor_pos);
-
-  let word = &line[start..end];
-  let word = word.strip_prefix(is_word_boundary).unwrap_or(word);
-
-  (word.strip_suffix(is_word_boundary).unwrap_or(word)) as _
+  let word = &line[start..cursor_pos];
+  word.strip_prefix(is_word_boundary).unwrap_or(word)
 }
 
 impl Completer for EditorHelper {
Repository: ollama/ollama
Pull request: fly example


Changed files:
filename: examples/flyio/.gitignore
patch: @@ -0,0 +1 @@
+fly.toml

filename: examples/flyio/README.md
patch: @@ -0,0 +1,67 @@
+# Deploy Ollama to Fly.io
+
+> Note: this example exposes a public endpoint and does not configure authentication. Use with care.
+
+## Prerequisites
+
+- Ollama: https://ollama.com/download
+- Fly.io account. Sign up for a free account: https://fly.io/app/sign-up
+
+## Steps
+
+1. Login to Fly.io
+
+    ```bash
+    fly auth login
+    ```
+
+1. Create a new Fly app
+
+    ```bash
+    fly launch --name <name> --image ollama/ollama --internal-port 11434 --vm-size shared-cpu-8x --now
+    ```
+
+1. Pull and run `orca-mini:3b`
+
+    ```bash
+    OLLAMA_HOST=https://<name>.fly.dev ollama run orca-mini:3b
+    ```
+
+`shared-cpu-8x` is a free-tier eligible machine type. For better performance, switch to a `performance` or `dedicated` machine type or attach a GPU for hardware acceleration (see below).
+
+## (Optional) Persistent Volume
+
+By default Fly Machines use ephemeral storage which is problematic if you want to use the same model across restarts without pulling it again. Create and attach a persistent volume to store the downloaded models:
+
+1. Create the Fly Volume
+
+    ```bash
+    fly volume create ollama
+    ```
+
+1. Update `fly.toml` and add `[mounts]`
+
+    ```toml
+    [mounts]
+      source = "ollama"
+      destination = "/mnt/ollama/models"
+    ```
+
+1. Update `fly.toml` and add `[env]`
+
+    ```toml
+    [env]
+      OLLAMA_MODELS = "/mnt/ollama/models"
+    ```
+
+1. Deploy your app
+
+    ```bash
+    fly deploy
+    ```
+
+## (Optional) Hardware Acceleration
+
+Fly.io GPU is currently in waitlist. Sign up for the waitlist: https://fly.io/gpu
+
+Once you've been accepted, create the app with the additional flags `--vm-gpu-kind a100-pcie-40gb` or `--vm-gpu-kind a100-pcie-80gb`.
Repository: electron/electron
Pull request: test: re-enable native module tests

Backport of #46747

See that PR for details.


Notes: none

Changed files:
filename: .github/workflows/pipeline-segment-electron-test.yml
patch: @@ -194,7 +194,6 @@ jobs:
         MOCHA_REPORTER: mocha-multi-reporters
         MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
         ELECTRON_DISABLE_SECURITY_WARNINGS: 1
-        ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
         DISPLAY: ':99.0'
         NPM_CONFIG_MSVS_VERSION: '2022'
       run: |

filename: spec/api-browser-window-spec.ts
patch: @@ -1,4 +1,3 @@
-import { nativeImage } from 'electron';
 import { app, BrowserWindow, BrowserView, dialog, ipcMain, OnBeforeSendHeadersListenerDetails, net, protocol, screen, webContents, webFrameMain, session, WebContents, WebFrameMain } from 'electron/main';
 
 import { expect } from 'chai';
@@ -6713,52 +6712,6 @@ describe('BrowserWindow module', () => {
     });
   });
 
-  describe('offscreen rendering image', () => {
-    afterEach(closeAllWindows);
-
-    const imagePath = path.join(fixtures, 'assets', 'osr.png');
-    const targetImage = nativeImage.createFromPath(imagePath);
-    const nativeModulesEnabled = !process.env.ELECTRON_SKIP_NATIVE_MODULE_TESTS;
-    ifit(nativeModulesEnabled && ['win32'].includes(process.platform))('use shared texture, hardware acceleration enabled', (done) => {
-      const { ExtractPixels, InitializeGpu } = require('@electron-ci/osr-gpu');
-
-      try {
-        InitializeGpu();
-      } catch (e) {
-        console.log('Failed to initialize GPU, this spec needs a valid GPU device. Skipping...');
-        console.error(e);
-        done();
-        return;
-      }
-
-      const w = new BrowserWindow({
-        show: false,
-        webPreferences: {
-          offscreen: {
-            useSharedTexture: true
-          }
-        },
-        transparent: true,
-        frame: false,
-        width: 128,
-        height: 128
-      });
-
-      w.webContents.once('paint', async (e, dirtyRect) => {
-        try {
-          expect(e.texture).to.be.not.null();
-          const pixels = ExtractPixels(e.texture!.textureInfo);
-          const img = nativeImage.createFromBitmap(pixels, { width: dirtyRect.width, height: dirtyRect.height, scaleFactor: 1 });
-          expect(img.toBitmap().equals(targetImage.toBitmap())).to.equal(true);
-          done();
-        } catch (e) {
-          done(e);
-        }
-      });
-      w.loadFile(imagePath);
-    });
-  });
-
   describe('"transparent" option', () => {
     afterEach(closeAllWindows);
Repository: vercel/next.js
Pull request: Fix build compile mode if pages dir does not exist in Next.js 16

## Fixing a bug

### What?

Fixes `next build --experimental-build-mode=compile` for standalone output when there is no pages directory (app-dir only projects) in Next 16.

### Why?

When building a Next.js 16 application with:
- `output: 'standalone'` configuration
- App Router only (no Pages Router)
- Compile mode enabled

The build would fail because the standalone directory writing logic attempted to recursively copy a non-existent `pages` directory. This caused build failures for app-only projects using standalone output.

### How?

Added an existence check (`existsSync`) before attempting to copy the pages directory to the standalone output, similar to the existing check for the app directory. This allows the build to proceed successfully when there is no pages directory.

**Testing:**

**Before**

<img width="1078" height="383" alt="image" src="https://github.com/user-attachments/assets/bdf74165-af4d-462e-aa34-bf75a4532aa0" />

**After**

<img width="975" height="323" alt="image" src="https://github.com/user-attachments/assets/a4708f12-940d-4304-af3f-ed246c963f8c" />


Changed files:
filename: packages/next/src/build/index.ts
patch: @@ -765,17 +765,22 @@ async function writeStandaloneDirectory(
         )
       }
 
-      await recursiveCopy(
-        path.join(distDir, SERVER_DIRECTORY, 'pages'),
-        path.join(
-          distDir,
-          STANDALONE_DIRECTORY,
-          path.relative(outputFileTracingRoot, distDir),
-          SERVER_DIRECTORY,
-          'pages'
-        ),
-        { overwrite: true }
-      )
+      const originalPagesDir = path.join(distDir, SERVER_DIRECTORY, 'pages')
+
+      if (existsSync(originalPagesDir)) {
+        await recursiveCopy(
+          originalPagesDir,
+          path.join(
+            distDir,
+            STANDALONE_DIRECTORY,
+            path.relative(outputFileTracingRoot, distDir),
+            SERVER_DIRECTORY,
+            'pages'
+          ),
+          { overwrite: true }
+        )
+      }
+
       if (appDir) {
         const originalServerApp = path.join(distDir, SERVER_DIRECTORY, 'app')
         if (existsSync(originalServerApp)) {