helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: run `visibleOnAllWorkspaces` tests on the right platforms

Backport of #46815

See that PR for details.


Notes: none.

Changed files:
filename: spec/api-browser-window-spec.ts
patch: @@ -5407,6 +5407,27 @@ describe('BrowserWindow module', () => {
         expect(w.webContents.isLoadingMainFrame()).to.be.true('isLoadingMainFrame');
       });
     });
+
+    // FIXME: enable this test on Linux as well.
+    ifdescribe(process.platform === 'darwin')('visibleOnAllWorkspaces state', () => {
+      describe('with properties', () => {
+        it('can be changed', () => {
+          const w = new BrowserWindow({ show: false });
+          expect(w.visibleOnAllWorkspaces).to.be.false();
+          w.visibleOnAllWorkspaces = true;
+          expect(w.visibleOnAllWorkspaces).to.be.true();
+        });
+      });
+
+      describe('with functions', () => {
+        it('can be changed', () => {
+          const w = new BrowserWindow({ show: false });
+          expect(w.isVisibleOnAllWorkspaces()).to.be.false();
+          w.setVisibleOnAllWorkspaces(true);
+          expect(w.isVisibleOnAllWorkspaces()).to.be.true();
+        });
+      });
+    });
   });
 
   ifdescribe(process.platform !== 'linux')('window states (excluding Linux)', () => {
@@ -5447,26 +5468,6 @@ describe('BrowserWindow module', () => {
       });
     });
 
-    describe('visibleOnAllWorkspaces state', () => {
-      it('with properties', () => {
-        it('can be changed', () => {
-          const w = new BrowserWindow({ show: false });
-          expect(w.visibleOnAllWorkspaces).to.be.false();
-          w.visibleOnAllWorkspaces = true;
-          expect(w.visibleOnAllWorkspaces).to.be.true();
-        });
-      });
-
-      it('with functions', () => {
-        it('can be changed', () => {
-          const w = new BrowserWindow({ show: false });
-          expect(w.isVisibleOnAllWorkspaces()).to.be.false();
-          w.setVisibleOnAllWorkspaces(true);
-          expect(w.isVisibleOnAllWorkspaces()).to.be.true();
-        });
-      });
-    });
-
     ifdescribe(process.platform === 'darwin')('documentEdited state', () => {
       it('with properties', () => {
         it('can be changed', () => {
Repository: nodejs/node
Pull request: test: deflake test-buffer-large-size-buffer-alloc

Use the error message as another condition to skip the test when the buffer allocation fails.

Refs: https://github.com/nodejs/node/commit/795dd8eb7988ae38553e
Refs: https://github.com/nodejs/node/commit/e9c6004a2d580008082b

<!--
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/pummel/test-buffer-large-size-buffer-alloc.js
patch: @@ -7,12 +7,22 @@ common.skipIf32Bits();
 const assert = require('node:assert');
 const size = 2 ** 31;
 
+let largeBuffer;
+
 // Test Buffer.alloc with size larger than integer range
 try {
-  assert.throws(() => Buffer.alloc(size).toString('utf8'), { code: 'ERR_STRING_TOO_LONG' });
+  largeBuffer = Buffer.alloc(size);
 } catch (e) {
-  if (e.code !== 'ERR_MEMORY_ALLOCATION_FAILED') {
-    throw e;
+  if (
+    e.code === 'ERR_MEMORY_ALLOCATION_FAILED' ||
+    /Array buffer allocation failed/.test(e.message)
+  ) {
+    common.skip('insufficient space for Buffer.alloc');
   }
-  common.skip('insufficient space for Buffer.alloc');
+
+  throw e;
 }
+
+assert.throws(() => largeBuffer.toString('utf8'), {
+  code: 'ERR_STRING_TOO_LONG',
+});
Repository: ollama/ollama
Pull request: Add ollama user to render group for Radeon support

For the ROCm libraries to access the driver, we need to add the ollama user to the render group.

Note: the script will need more work to fully support radeon cards, but this will at least make the installation functional.  Without this change, the server sits in a crash-loop due to lack of permissions to access the driver.

Changed files:
filename: scripts/install.sh
patch: @@ -76,6 +76,10 @@ configure_systemd() {
         status "Creating ollama user..."
         $SUDO useradd -r -s /bin/false -m -d /usr/share/ollama ollama
     fi
+    if getent group render >/dev/null 2>&1; then
+        status "Adding ollama user to render group..."
+        $SUDO usermod -a -G render ollama
+    fi
 
     status "Adding current user to ollama group..."
     $SUDO usermod -a -G ollama $(whoami)
Repository: facebook/react
Pull request: [Flight] Allow temporary references in `decodeReplyFromBusboy`

## Summary

Ports https://github.com/facebook/react/pull/29010 to `decodeReplyFromBusboy`

## How did you test this change?

- `pnpm next dev test/e2e/app-dir/actions/` on https://github.com/vercel/next.js/pull/66054

Changed files:
filename: packages/react-server-dom-esm/src/ReactFlightDOMServerNode.js
patch: @@ -126,8 +126,13 @@ function renderToPipeableStream(
 function decodeReplyFromBusboy<T>(
   busboyStream: Busboy,
   moduleBasePath: ServerManifest,
+  options?: {temporaryReferences?: TemporaryReferenceSet},
 ): Thenable<T> {
-  const response = createResponse(moduleBasePath, '');
+  const response = createResponse(
+    moduleBasePath,
+    '',
+    options ? options.temporaryReferences : undefined,
+  );
   let pendingFiles = 0;
   const queuedFields: Array<string> = [];
   busboyStream.on('field', (name, value) => {

filename: packages/react-server-dom-turbopack/src/ReactFlightDOMServerNode.js
patch: @@ -127,8 +127,13 @@ function renderToPipeableStream(
 function decodeReplyFromBusboy<T>(
   busboyStream: Busboy,
   turbopackMap: ServerManifest,
+  options?: {temporaryReferences?: TemporaryReferenceSet},
 ): Thenable<T> {
-  const response = createResponse(turbopackMap, '');
+  const response = createResponse(
+    turbopackMap,
+    '',
+    options ? options.temporaryReferences : undefined,
+  );
   let pendingFiles = 0;
   const queuedFields: Array<string> = [];
   busboyStream.on('field', (name, value) => {

filename: packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js
patch: @@ -127,8 +127,13 @@ function renderToPipeableStream(
 function decodeReplyFromBusboy<T>(
   busboyStream: Busboy,
   webpackMap: ServerManifest,
+  options?: {temporaryReferences?: TemporaryReferenceSet},
 ): Thenable<T> {
-  const response = createResponse(webpackMap, '');
+  const response = createResponse(
+    webpackMap,
+    '',
+    options ? options.temporaryReferences : undefined,
+  );
   let pendingFiles = 0;
   const queuedFields: Array<string> = [];
   busboyStream.on('field', (name, value) => {
Repository: ollama/ollama
Pull request: set `num_gpu` to 1 only by default on darwin arm64


Changed files:
filename: gpu/gpu_darwin.go
patch: @@ -33,11 +33,15 @@ func getCPUMem() (memInfo, error) {
 }
 
 func NumGPU(numLayer, fileSizeBytes int64, opts api.Options) int {
+	if opts.NumGPU != -1 {
+		return opts.NumGPU
+	}
+
+	// metal only supported on arm64
 	if runtime.GOARCH == "arm64" {
 		return 1
 	}
 
-	// metal only supported on arm64
 	return 0
 }
Repository: electron/electron
Pull request: fix: enable `autoHideMenuBar` tests on Linux and Windows

Backport of #46818

See that PR for details.


Notes: Fixed documentation to mark `Window.autoHideMenuBar` as supported on Linux and Windows.

Changed files:
filename: docs/api/base-window.md
patch: @@ -382,7 +382,7 @@ A `View` property for the content view of the window.
 
 A `string` (optional) property that is equal to the `tabbingIdentifier` passed to the `BrowserWindow` constructor or `undefined` if none was set.
 
-#### `win.autoHideMenuBar`
+#### `win.autoHideMenuBar` _Linux_ _Windows_
 
 A `boolean` property that determines whether the window menu bar should hide itself automatically. Once set, the menu bar will only show when users press the single `Alt` key.
 

filename: docs/api/browser-window.md
patch: @@ -483,7 +483,7 @@ A `Integer` property representing the unique ID of the window. Each ID is unique
 
 A `string` (optional) property that is equal to the `tabbingIdentifier` passed to the `BrowserWindow` constructor or `undefined` if none was set.
 
-#### `win.autoHideMenuBar`
+#### `win.autoHideMenuBar` _Linux_ _Windows_
 
 A `boolean` property that determines whether the window menu bar should hide itself automatically. Once set, the menu bar will only show when users press the single `Alt` key.
 

filename: docs/api/structures/base-window-options.md
patch: @@ -58,8 +58,8 @@
   `false` on macOS. This option is not configurable on other platforms.
 * `disableAutoHideCursor` boolean (optional) - Whether to hide cursor when typing.
   Default is `false`.
-* `autoHideMenuBar` boolean (optional) - Auto hide the menu bar unless the `Alt`
-  key is pressed. Default is `false`.
+* `autoHideMenuBar` boolean (optional) _Linux_ _Windows_ - Auto hide the menu bar
+  unless the `Alt` key is pressed. Default is `false`.
 * `enableLargerThanScreen` boolean (optional) _macOS_ - Enable the window to
   be resized larger than screen. Only relevant for macOS, as other OSes
   allow larger-than-screen windows by default. Default is `false`.

filename: spec/api-browser-window-spec.ts
patch: @@ -2360,10 +2360,10 @@ describe('BrowserWindow module', () => {
     });
   });
 
-  describe('autoHideMenuBar state', () => {
+  ifdescribe(process.platform !== 'darwin')('autoHideMenuBar state', () => {
     afterEach(closeAllWindows);
 
-    it('for properties', () => {
+    describe('for properties', () => {
       it('can be set with autoHideMenuBar constructor option', () => {
         const w = new BrowserWindow({ show: false, autoHideMenuBar: true });
         expect(w.autoHideMenuBar).to.be.true('autoHideMenuBar');
@@ -2379,7 +2379,7 @@ describe('BrowserWindow module', () => {
       });
     });
 
-    it('for functions', () => {
+    describe('for functions', () => {
       it('can be set with autoHideMenuBar constructor option', () => {
         const w = new BrowserWindow({ show: false, autoHideMenuBar: true });
         expect(w.isMenuBarAutoHide()).to.be.true('autoHideMenuBar');
Repository: vercel/next.js
Pull request: metadata: align turbopack loader with js loader

Follow up of #83443, clean up the unnecessary code to align the turbopack loader to js loader.

Changed files:
filename: crates/next-core/src/next_app/metadata/route.rs
patch: @@ -290,11 +290,6 @@ async fn dynamic_sitemap_route_with_generate_source(
             export async function GET(_, ctx) {{
                 const {{ __metadata_id__: id, ...params }} = await ctx.params || {{}}
                 const hasXmlExtension = id ? id.endsWith('.xml') : false
-                if (id && !hasXmlExtension) {{
-                    return new NextResponse('Not Found', {{
-                        status: 404,
-                    }})
-                }}
 
                 if (process.env.NODE_ENV !== 'production') {{
                     const sitemaps = await generateSitemaps()
@@ -303,7 +298,7 @@ async fn dynamic_sitemap_route_with_generate_source(
                         if (item?.id == null) {{
                             throw new Error('id property is required for every item returned from generateSitemaps')
                         }}
-                        const baseId = id && hasXmlExtension ? id.slice(0, -4) : id
+                        const baseId = id && hasXmlExtension ? id.slice(0, -4) : undefined
                         if (item.id.toString() === baseId) {{
                             foundId = item.id
                         }}
Repository: denoland/deno
Pull request: fix(node/timers): ensure active timers entry is deleted on `Timeout.prototype.refresh`

Closes https://github.com/denoland/deno/issues/31435

Changed files:
filename: ext/node/polyfills/internal/timers.mjs
patch: @@ -5,6 +5,7 @@ import { primordials } from "ext:core/mod.js";
 const {
   FunctionPrototypeBind,
   MapPrototypeDelete,
+  MapPrototypeGet,
   MapPrototypeSet,
   NumberIsFinite,
   SafeArrayIterator,
@@ -33,6 +34,7 @@ export { kTimerId } from "ext:deno_web/02_timers.js";
 // Timeout values > TIMEOUT_MAX are set to 1.
 export const TIMEOUT_MAX = 2 ** 31 - 1;
 
+export const kDestroy = Symbol("destroy");
 export const kTimeout = Symbol("timeout");
 const kRefed = Symbol("refed");
 const createTimer = Symbol("createTimer");
@@ -43,7 +45,15 @@ const createTimer = Symbol("createTimer");
  *
  * @type {Map<number, Timeout>}
  */
-export const activeTimers = new SafeMap();
+const activeTimers = new SafeMap();
+
+/**
+ * @param {number} id
+ * @returns {Timeout | undefined}
+ */
+export function getActiveTimer(id) {
+  return MapPrototypeGet(activeTimers, id);
+}
 
 // Timer constructor function.
 export function Timeout(callback, after, args, isRepeat, isRefed) {
@@ -87,6 +97,11 @@ Timeout.prototype[createTimer] = function () {
   return id;
 };
 
+Timeout.prototype[kDestroy] = function () {
+  this._destroyed = true;
+  MapPrototypeDelete(activeTimers, this[kTimerId]);
+};
+
 // Make sure the linked list only shows the minimal necessary information.
 Timeout.prototype[inspect.custom] = function (_, options) {
   return inspect(this, {
@@ -101,6 +116,7 @@ Timeout.prototype[inspect.custom] = function (_, options) {
 Timeout.prototype.refresh = function () {
   if (!this._destroyed) {
     clearTimeout_(this[kTimerId]);
+    MapPrototypeDelete(activeTimers, this[kTimerId]);
     this[kTimerId] = this[createTimer]();
   }
   return this;

filename: ext/node/polyfills/timers.ts
patch: @@ -3,8 +3,6 @@
 import { primordials } from "ext:core/mod.js";
 const {
   FunctionPrototypeBind,
-  MapPrototypeGet,
-  MapPrototypeDelete,
   ObjectDefineProperty,
   Promise,
   PromiseReject,
@@ -14,8 +12,9 @@ const {
 } = primordials;
 
 import {
-  activeTimers,
+  getActiveTimer,
   Immediate,
+  kDestroy,
   setUnrefTimeout,
   Timeout,
 } from "ext:deno_node/internal/timers.mjs";
@@ -128,11 +127,7 @@ export function clearTimeout(timeout?: Timeout | number) {
     return;
   }
   const id = +timeout;
-  const timer = MapPrototypeGet(activeTimers, id);
-  if (timer) {
-    timer._destroyed = true;
-    MapPrototypeDelete(activeTimers, id);
-  }
+  getActiveTimer(id)?.[kDestroy]();
   clearTimeout_(id);
 }
 export function setInterval(
@@ -148,11 +143,7 @@ export function clearInterval(timeout?: Timeout | number | string) {
     return;
   }
   const id = +timeout;
-  const timer = MapPrototypeGet(activeTimers, id);
-  if (timer) {
-    timer._destroyed = true;
-    MapPrototypeDelete(activeTimers, id);
-  }
+  getActiveTimer(id)?.[kDestroy]();
   clearInterval_(id);
 }
 export function setImmediate(
Repository: vercel/next.js
Pull request: fix: transpile-config should await import before return

The fallback didn't work because it didn't await the import when returning.

x-ref: https://github.com/vercel/next.js/actions/runs/17548458762/job/49837846122

Changed files:
filename: packages/next/src/build/next-config-ts/transpile-config.ts
patch: @@ -123,7 +123,8 @@ export async function transpileConfig({
         // Value is 'strip' or 'transform' based on how the feature is enabled.
         // https://nodejs.org/api/process.html#processfeaturestypescript
         if ((process.features as any).typescript) {
-          return import(pathToFileURL(nextConfigPath).href)
+          // Run import() here to catch errors and fallback to legacy resolution.
+          return (await import(pathToFileURL(nextConfigPath).href)).default
         }
 
         if (
Repository: nodejs/node
Pull request: test: cleanup status files

- removes empty expectations from status files
- aligns empty status file to be single-line json

Changed files:
filename: test/wpt/status/html/webappapis/atob.json
patch: @@ -1,2 +1 @@
-{
-}
+{}

filename: test/wpt/status/url.json
patch: @@ -10,7 +10,6 @@
       ]
     }
   },
-  "toascii.window.js": {},
   "url-setters-a-area.window.js": {
     "skip": "already tested in url-setters.any.js"
   },

filename: test/wpt/status/urlpattern.json
patch: @@ -7,7 +7,5 @@
   },
   "urlpattern-compare.tentative.https.any.js": {
     "skip": "compareComponent function is not yet included in the URLPattern spec"
-  },
-  "urlpattern.any.js": {},
-  "urlpattern.https.any.js": {}
+  }
 }
Repository: ggml-org/llama.cpp
Pull request: ggml : add missing AVX512 feature checks

    _mm512_cvtepu8_epi16        requires  __AVX512BW__
    _mm512_srli_epi16           requires  __AVX512BW__
    __builtin_ia32_inserti32x8  requires  __AVX512DQ__


Changed files:
filename: ggml/src/ggml-cpu/arch/x86/repack.cpp
patch: @@ -646,7 +646,7 @@ static void gemm_q4_b32_8x8_q8_0_lut_avx(int n, float * GGML_RESTRICT s, size_t
     __m256i requiredOrder = _mm256_set_epi32(3, 2, 1, 0, 7, 6, 5, 4);
     int64_t xstart = 0;
     int anr = nr - nr%16; // Used to align nr with boundary of 16
-#ifdef __AVX512F__
+#if defined(__AVX512BW__) && defined(__AVX512DQ__)
     int anc = nc - nc%16; // Used to align nc with boundary of 16
                           // Mask to mask out nibbles from packed bytes expanded to 512 bit length
     const __m512i m4bexpanded = _mm512_set1_epi8(0x0F);
@@ -1041,7 +1041,7 @@ static void gemm_q4_b32_8x8_q8_0_lut_avx(int n, float * GGML_RESTRICT s, size_t
         xstart = anc/8;
         y = 0;
     }
-#endif // __AVX512F__
+#endif // __AVX512BW__ && __AVX512DQ__
 
     // Take group of four block_q8_0x4 structures at each pass of the loop and perform dot product operation
 
@@ -1989,7 +1989,7 @@ void ggml_gemm_q4_K_8x8_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const vo
     __m256i requiredOrder = _mm256_set_epi32(3, 2, 1, 0, 7, 6, 5, 4);
     int64_t xstart = 0;
     int anr = nr - nr % 16;; // Used to align nr with boundary of 16
-#ifdef __AVX512F__
+#if defined(__AVX512BW__) && defined(__AVX512DQ__)
     int anc = nc - nc % 16; // Used to align nc with boundary of 16
     // Mask to mask out nibbles from packed bytes expanded to 512 bit length
     const __m512i m4bexpanded = _mm512_set1_epi8(0x0F);
@@ -2727,7 +2727,7 @@ void ggml_gemm_q4_K_8x8_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const vo
         xstart = anc/8;
         y = 0;
     }
-#endif //AVX512F
+#endif // __AVX512BW__ && __AVX512DQ__
 
     // Take group of four block_q8_Kx4 structures at each pass of the loop and perform dot product operation
     for (; y < anr / 4; y += 4) {
@@ -3467,7 +3467,7 @@ void ggml_gemm_q2_K_8x8_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const vo
     __m256i scalesmask2 = _mm256_castsi128_si256(scalesmask2_sse);
     scalesmask2 = _mm256_permute2f128_si256(scalesmask2, scalesmask2, 0);
 
-#ifdef __AVX512F__
+#if defined(__AVX512BW__) && defined(__AVX512DQ__)
 
     int anc = nc - nc % 16; // Used to align nc with boundary of 16
 
@@ -4947,7 +4947,7 @@ void ggml_gemm_q2_K_8x8_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const vo
         y = 0;
     }
 
-#endif //AVX512F
+#endif // __AVX512BW__ && __AVX512DQ__
 
     // Take group of four block_q8_Kx4 structures at each pass of the loop and perform dot product operation
     for (; y < anr / 4; y += 4) {
Repository: facebook/react
Pull request: [Flight Reply] retain listeners when resolving models with existing listeners

In #29201 a fix was made to ensure we don't "forget" about some listeners when handling cyclic chunks.
In #29204 another fix was made for a special case when the chunk already has listeners before it first resolves.

This implements the followup fix for Flight Reply which was originally missed in #29204

Changed files:
filename: packages/react-server/src/ReactFlightReplyServer.js
patch: @@ -205,8 +205,23 @@ function wakeChunkIfInitialized<T>(
     case PENDING:
     case BLOCKED:
     case CYCLIC:
-      chunk.value = resolveListeners;
-      chunk.reason = rejectListeners;
+      if (chunk.value) {
+        for (let i = 0; i < resolveListeners.length; i++) {
+          chunk.value.push(resolveListeners[i]);
+        }
+      } else {
+        chunk.value = resolveListeners;
+      }
+
+      if (chunk.reason) {
+        if (rejectListeners) {
+          for (let i = 0; i < rejectListeners.length; i++) {
+            chunk.reason.push(rejectListeners[i]);
+          }
+        }
+      } else {
+        chunk.reason = rejectListeners;
+      }
       break;
     case ERRORED:
       if (rejectListeners) {
Repository: ggml-org/llama.cpp
Pull request: metal : support I32 -> I32 copy

rel #17004

Changed files:
filename: ggml/src/ggml-metal/ggml-metal-device.m
patch: @@ -989,7 +989,7 @@ bool ggml_metal_device_supports_op(ggml_metal_device_t dev, const struct ggml_te
                                 return false;
                         }
                     case GGML_TYPE_I32:
-                        return op->type == GGML_TYPE_F32;
+                        return op->type == GGML_TYPE_F32 || op->type == GGML_TYPE_I32;
                     default:
                         return false;
                 };

filename: ggml/src/ggml-metal/ggml-metal.metal
patch: @@ -6560,6 +6560,7 @@ template [[host_name("kernel_cpy_f32_f32")]]   kernel kernel_cpy_t kernel_cpy_t_
 template [[host_name("kernel_cpy_f32_f16")]]   kernel kernel_cpy_t kernel_cpy_t_t<float,   half>;
 template [[host_name("kernel_cpy_f32_i32")]]   kernel kernel_cpy_t kernel_cpy_t_t<float,   int32_t>;
 template [[host_name("kernel_cpy_i32_f32")]]   kernel kernel_cpy_t kernel_cpy_t_t<int32_t, float>;
+template [[host_name("kernel_cpy_i32_i32")]]   kernel kernel_cpy_t kernel_cpy_t_t<int32_t, int32_t>;
 #if defined(GGML_METAL_HAS_BF16)
 template [[host_name("kernel_cpy_f32_bf16")]]  kernel kernel_cpy_t kernel_cpy_t_t<float,   bfloat>;
 #endif