helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: remove unneeded handlescope from JS callbacks

Backport of #48318

See that PR for details.

Notes: fix crash when accessing `webContents.session`

Changed files:
filename: shell/browser/api/electron_api_session.cc
patch: @@ -1697,14 +1697,11 @@ Session* Session::CreateFrom(v8::Isolate* isolate,
     return nullptr;
   }
 
-  {
-    v8::HandleScope handle_scope(isolate);
-    v8::Local<v8::Object> wrapper;
-    if (!session->GetWrapper(isolate).ToLocal(&wrapper)) {
-      return nullptr;
-    }
-    App::Get()->EmitWithoutEvent("session-created", wrapper);
+  v8::Local<v8::Object> wrapper;
+  if (!session->GetWrapper(isolate).ToLocal(&wrapper)) {
+    return nullptr;
   }
+  App::Get()->EmitWithoutEvent("session-created", wrapper);
 
   return session;
 }
@@ -1883,7 +1880,6 @@ v8::Local<v8::Value> FromPartition(const std::string& partition,
       Session::FromPartition(args->isolate(), partition, std::move(options));
 
   if (session) {
-    v8::HandleScope handle_scope(args->isolate());
     v8::Local<v8::Object> wrapper;
     if (!session->GetWrapper(args->isolate()).ToLocal(&wrapper)) {
       return v8::Null(args->isolate());
@@ -1905,7 +1901,6 @@ v8::Local<v8::Value> FromPath(const base::FilePath& path,
   Session* session = Session::FromPath(args, path, std::move(options));
 
   if (session) {
-    v8::HandleScope handle_scope(args->isolate());
     v8::Local<v8::Object> wrapper;
     if (!session->GetWrapper(args->isolate()).ToLocal(&wrapper)) {
       return v8::Null(args->isolate());

filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -3758,7 +3758,6 @@ v8::Local<v8::Value> WebContents::GetOwnerBrowserWindow(
 }
 
 v8::Local<v8::Value> WebContents::Session(v8::Isolate* isolate) {
-  v8::HandleScope handle_scope(isolate);
   v8::Local<v8::Object> wrapper;
   if (!session_->GetWrapper(isolate).ToLocal(&wrapper)) {
     return v8::Null(isolate);
Repository: vercel/next.js
Pull request: [test] Deflake custom cache handler test

[flakiness metric](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22%20%40test.name%3A%22use-cache-custom-handler%20should%20use%20a%20modern%20custom%20cache%20handler%20if%20provided%22%20%40test.type%3A%22nextjs%22%20%40test.status%3A%22fail%22%20%40git.branch%3Acanary&agg_m=count&agg_m_source=base&agg_t=count&fromUser=true&index=citest&start=1759310750664&end=1761902750664&paused=false)

The test page used a low revalidate time of 3 seconds. In CI, sometimes that much time passes between the first and second request, causing the test to fail when comparing the data values (locally reproducible with `{ cpuThrottleRate: 20 }`). Increasing the revalidate time to 6 seconds should make the test more robust.

Changed files:
filename: test/e2e/app-dir/use-cache-custom-handler/app/page.tsx
patch: @@ -7,7 +7,7 @@ import React from 'react'
 async function getData() {
   'use cache'
 
-  cacheLife({ revalidate: 3 })
+  cacheLife({ revalidate: 6 })
   cacheTag('modern')
 
   return new Date().toISOString()

filename: test/e2e/app-dir/use-cache-custom-handler/use-cache-custom-handler.test.ts
patch: @@ -58,12 +58,16 @@ describe('use-cache-custom-handler', () => {
     // Because we use a low `revalidate` value for the "use cache" function, new
     // data should be returned eventually.
 
-    await retry(async () => {
-      await browser.refresh()
-      data = await browser.elementById('data').text()
-      expect(data).toMatch(isoDateRegExp)
-      expect(data).not.toEqual(initialData)
-    }, 5000)
+    await retry(
+      async () => {
+        await browser.refresh()
+        data = await browser.elementById('data').text()
+        expect(data).toMatch(isoDateRegExp)
+        expect(data).not.toEqual(initialData)
+      },
+      10_000,
+      2_000
+    )
   })
 
   it('calls neither refreshTags nor getExpiration if "use cache" is not used', async () => {
Repository: nodejs/node
Pull request: doc: improve code snippet alternative of url.parse() using WHATWG URL

This is a follow up to a comment https://github.com/nodejs/node/pull/59736#discussion_r2383025362 that pointed out the existing code snippet is not safe since the `req.url` can start with a double slash which would cause the hostname to be replaced.

Changed files:
filename: doc/api/url.md
patch: @@ -1853,7 +1853,7 @@ input. CVEs are not issued for `url.parse()` vulnerabilities. Use the
 function getURL(req) {
   const proto = req.headers['x-forwarded-proto'] || 'https';
   const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com';
-  return new URL(req.url || '/', `${proto}://${host}`);
+  return new URL(`${proto}://${host}${req.url || '/'}`);
 }
 ```
 
@@ -1863,7 +1863,7 @@ use the example below:
 
 ```js
 function getURL(req) {
-  return new URL(req.url || '/', 'https://example.com');
+  return new URL(`https://example.com${req.url || '/'}`);
 }
 ```
Repository: vuejs/vue
Pull request: Allow extended Vue constructors as the mixins option

Fix #2956 


Changed files:
filename: src/util/options.js
patch: @@ -339,7 +339,11 @@ export function mergeOptions (parent, child, vm) {
   }
   if (child.mixins) {
     for (var i = 0, l = child.mixins.length; i < l; i++) {
-      parent = mergeOptions(parent, child.mixins[i], vm)
+      var mixin = child.mixins[i]
+      var mixinOptions = mixin.prototype instanceof Vue
+        ? mixin.options
+        : mixin
+      parent = mergeOptions(parent, mixinOptions, vm)
     }
   }
   for (key in parent) {

filename: test/unit/specs/util/options_spec.js
patch: @@ -303,12 +303,14 @@ describe('Util - Option merging', function () {
     var f4 = function () {}
     var mixinA = { a: 1, directives: { a: a }, created: f2 }
     var mixinB = { b: 1, directives: { b: b }, created: f3 }
+    var mixinC = Vue.extend({ c: 1 })
     var res = merge(
       { a: 2, directives: { c: c }, created: [f1] },
-      { directives: { d: d }, mixins: [mixinA, mixinB], created: f4 }
+      { directives: { d: d }, mixins: [mixinA, mixinB, mixinC], created: f4 }
     )
     expect(res.a).toBe(1)
     expect(res.b).toBe(1)
+    expect(res.c).toBe(1)
     expect(res.directives.a).toBe(a)
     expect(res.directives.b).toBe(b)
     expect(res.directives.c).toBe(c)
Repository: electron/electron
Pull request: ci: Use Local Execution, Remote Caching (LERC) for fork PRS

Backport of #48319

See that PR for details.


Notes: <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->none


Changed files:
filename: .github/actions/build-electron/action.yml
patch: @@ -44,6 +44,14 @@ runs:
     - name: Add Clang problem matcher
       shell: bash
       run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
+    - name: Setup Siso for fork pull requests
+      if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
+      shell: bash
+      run: |
+        # Use Local Execution, Remote Caching (LERC). Checks the remote cache for action
+        # matches and uses existing results if a match is found. If not, execution of the
+        # action is performed locally.
+        echo "RBE_exec_strategy=local" >> $GITHUB_ENV
     - name: Build Electron ${{ inputs.step-suffix }}
       shell: bash
       run: |
Repository: vercel/next.js
Pull request: [test] Consider `test/integration/` in flake detection tests

No mention why integration tests were excluded when the flake detection was introduced in https://github.com/vercel/next.js/pull/63943 so I assume this was an oversight.

The other explainer is that no new tests are added to `test/integration` so there won't be an y "new" tests in there. But since we also use flake detection for changes, integration tests should be considered.

Test is upstack where I change an integration test that correctly gets run in flake detection shards.

Changed files:
filename: scripts/get-changed-tests.mjs
patch: @@ -112,7 +112,10 @@ export default async function getChangedTests() {
       .catch(() => false)
 
     if (fileExists && file.match(/^test\/.*?\.test\.(js|ts|tsx)$/)) {
-      if (file.startsWith('test/e2e/')) {
+      if (
+        file.startsWith('test/e2e/') ||
+        file.startsWith('test/integration/')
+      ) {
         devTests.push(file)
         prodTests.push(file)
       } else if (file.startsWith('test/prod')) {
Repository: nodejs/node
Pull request: lib: fix constructor in _errnoException stack tree

Fixes the constructor name in the stack tree for _errnoException.

Changed files:
filename: lib/util.js
patch: @@ -339,7 +339,7 @@ function _errnoException(...args) {
     Error.stackTraceLimit = 0;
     const e = new ErrnoException(...args);
     Error.stackTraceLimit = limit;
-    ErrorCaptureStackTrace(e, _exceptionWithHostPort);
+    ErrorCaptureStackTrace(e, _errnoException);
     return e;
   }
   return new ErrnoException(...args);
Repository: ggml-org/llama.cpp
Pull request: mtmd : fix ASR for LFM2.5-Audio-1.5B

The callback was renaming the input tensor and leading to error
```
/data/git/llama.cpp/tools/mtmd/clip.cpp:3358: Failed to get tensor inp_raw
```

The first commit causing the issue is https://github.com/ggml-org/llama.cpp/pull/17914.

Changed files:
filename: tools/mtmd/models/conformer.cpp
patch: @@ -12,7 +12,6 @@ ggml_cgraph * clip_graph_conformer::build() {
     ggml_build_forward_expand(gf, pos_emb);
 
     ggml_tensor * inp = build_inp_raw(1);
-    cb(inp, "input", -1);
 
     auto * cur = ggml_cont(ctx0, ggml_transpose(ctx0, inp));
Repository: electron/electron
Pull request: ci: Use Local Execution, Remote Caching (LERC) for fork PRS

#### Description of Change
- Since #47534, fork PRs have been failing trying to use siso with the error: ```PermissionDenied desc = Failed to authorize to Execute() against instance name "projects/electron-rbe/instances/default_instance": Permission denied``` (eg see https://github.com/electron/electron/actions/runs/17621870487/job/50277249344#step:24:33167).

Since fork PRs only have read access to the RBE cache that siso uses, this PR fixes that error by setting the RBE exec strategy to `local` which has the following operation:
> Use Local Execution, Remote Caching (LERC). Checks the remote cache for action matches and uses existing results if a match is found. If not, execution of the action is performed locally.

Successful builds with this strategy can be seen here: https://github.com/electron/electron/actions/runs/17739060216?pr=48320.

<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->none


Changed files:
filename: .github/actions/build-electron/action.yml
patch: @@ -44,6 +44,14 @@ runs:
     - name: Add Clang problem matcher
       shell: bash
       run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
+    - name: Setup Siso for fork pull requests
+      if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
+      shell: bash
+      run: |
+        # Use Local Execution, Remote Caching (LERC). Checks the remote cache for action
+        # matches and uses existing results if a match is found. If not, execution of the
+        # action is performed locally.
+        echo "RBE_exec_strategy=local" >> $GITHUB_ENV
     - name: Build Electron ${{ inputs.step-suffix }}
       shell: bash
       run: |
Repository: huggingface/transformers
Pull request: Update `test_dynamic_cache_exportability_multiple_run` (failing on torch 2.10 nightly)

# What does this PR do?

See 

https://github.com/pytorch/pytorch/issues/167293#issuecomment-3529014252

The suggestion seems to reasonable since the test name is 

> test_dynamic_cache_exportability_multiple_run

Changed files:
filename: tests/utils/test_cache_utils.py
patch: @@ -628,7 +628,7 @@ def test_dynamic_cache_exportability_multiple_run(self):
         past_key_values = res.past_key_values
 
         shapes = torch.export.ShapesCollection()
-        dyn = torch.export.Dim("seq", max=512)
+        dyn = torch.export.Dim.DYNAMIC(max=512)
 
         for ix in range(len(past_key_values)):
             shapes[past_key_values.layers[ix].keys] = (None, None, dyn, None)
Repository: vuejs/vue
Pull request: add options render tests

ref: #2872


Changed files:
filename: test/unit/features/options/render.spec.js
patch: @@ -0,0 +1,30 @@
+import Vue from 'entries/web-runtime'
+
+describe('Options render', () => {
+  it('basic usage', () => {
+    const vm = new Vue({
+      render () {
+        const h = this.$createElement
+        const children = []
+        for (let i = 0; i < this.items.length; i++) {
+          children.push(h('li', { staticClass: 'task' }, [this.items[i].name]))
+        }
+        return h('ul', { staticClass: 'tasks' }, children)
+      },
+      data: {
+        items: [{ id: 1, name: 'task1' }, { id: 2, name: 'task2' }]
+      }
+    }).$mount()
+    expect(vm.$el.tagName).toBe('UL')
+    for (let i = 0; i < vm.$el.children.length; i++) {
+      const li = vm.$el.children[i]
+      expect(li.tagName).toBe('LI')
+      expect(li.textContent).toBe(vm.items[i].name)
+    }
+  })
+
+  it('should warn non `render` option and non `template` option', () => {
+    new Vue().$mount()
+    expect('Failed to mount component: template or render function not defined.').toHaveBeenWarned()
+  })
+})
Repository: ollama/ollama
Pull request: chatglm graph


Changed files:
filename: llm/ggml.go
patch: @@ -424,6 +424,32 @@ func (llm GGML) GraphSize(context, batch uint64) (partialOffload, fullOffload ui
 			4*batch*(3*embedding+vocab)+embedding*vocab*105/128,
 			4*batch*(2*embedding+1+2*embeddingHeadsK*headsKV+context+context*headsKV)+4*embeddingHeadsK*context*headsKV+embedding*embeddingHeadsK*headsKV*9/16,
 		)
+	case "chatglm":
+		fullOffload = 4 * batch * (embedding + vocab)
+		partialOffload = 4*batch*(embedding+vocab) + embedding*vocab*105/128
+		if qkvBias, ok := layers["blk.0"]["attn_qkv.bias"]; ok {
+			fullOffload = max(
+				fullOffload,
+				4*batch*(2+
+					2*embedding+
+					context+
+					context*heads+
+					embeddingHeadsK*heads+
+					qkvBias.Shape[0]),
+			)
+
+			partialOffload = max(
+				partialOffload,
+				4*batch*(1+
+					2*embedding+
+					embeddingHeadsK*heads+
+					context+
+					context*heads)+
+					4*embeddingHeadsK*context+
+					4*context*embeddingHeadsK+
+					4*qkvBias.Shape[0],
+			)
+		}
 	}
 
 	return
Repository: vercel/next.js
Pull request: [test] Allow CLI integration test to be retryable

Fixes https://github.com/vercel/next.js/actions/runs/18937795131/job/54068900147#step:34:1879

`--experimental-https` test creates a cert relying on no cert existing in the default path. When it passes, it doesn't cleanup. Retrying that test file due to an unrelated failure would therefore always fail. Now we ensure no cert exists.

Changed files:
filename: test/integration/cli/test/index.test.js
patch: @@ -15,6 +15,7 @@ import path, { join } from 'path'
 import pkg from 'next/package'
 import http from 'http'
 import stripAnsi from 'strip-ansi'
+import { rmSync } from 'fs'
 
 const dirBasic = join(__dirname, '../basic')
 const dirDuplicateSass = join(__dirname, '../duplicate-sass')
@@ -848,6 +849,13 @@ describe('CLI Usage', () => {
     })
 
     itCI('--experimental-https', async () => {
+      // set by runNextCommandDev
+      const nextDir = path.dirname(require.resolve('next/package'))
+      // hardcoded by Next.js relative to cwd of Next.js
+      const certDir = path.resolve(nextDir, 'certificates')
+      try {
+        rmSync(certDir, { recursive: true, force: true })
+      } catch {}
       // only runs on CI as it requires administrator privileges
       const port = await findPort()
       let output = ''
Repository: ggml-org/llama.cpp
Pull request: ggml-blas: hide warnings from included BLAS headers

This is a followup from https://github.com/ggml-org/llama.cpp/pull/18205#issuecomment-3734078140 to hide some warnings. These warnings are appearing now that the correct headers are being included in some builds.

Changed files:
filename: ggml/src/ggml-blas/CMakeLists.txt
patch: @@ -93,7 +93,7 @@ if (BLAS_FOUND)
     endif()
 
     target_link_libraries     (ggml-blas PRIVATE ${BLAS_LIBRARIES})
-    target_include_directories(ggml-blas PRIVATE ${BLAS_INCLUDE_DIRS})
+    target_include_directories(ggml-blas SYSTEM PRIVATE ${BLAS_INCLUDE_DIRS})
 else()
     message(FATAL_ERROR "BLAS not found, please refer to "
                         "https://cmake.org/cmake/help/latest/module/FindBLAS.html#blas-lapack-vendors"
Repository: ollama/ollama
Pull request: Remove `GGML_CUDA_FORCE_MMQ=on` from build

Removing this build flag seems to cause mmq to be decided at runtime vs always forcing it on. This stops some cuda calls from failing on V100 and other CC 7.0 cards. This may also help with [RDNA3 cards](https://github.com/ggerganov/llama.cpp/blob/a59f8fdc85e1119d470d8766e29617962549d993/docs/build.md?plain=1#L175)

Fixes https://github.com/ollama/ollama/issues/5571

Changes to mmq functionality related to this bug: https://github.com/ggerganov/llama.cpp/compare/7c26775...a8db2a9c#diff-b2fe862fcd5119199ae59ea13d1b6a46e0d23e41e727e39d90913f828a5ff66bR78

Changed files:
filename: llm/generate/gen_linux.sh
patch: @@ -178,7 +178,7 @@ if [ -z "${OLLAMA_SKIP_CUDA_GENERATE}" -a -d "${CUDA_LIB_DIR}" ]; then
         CMAKE_CUDA_DEFS="-DGGML_CUDA=on -DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES} ${OLLAMA_CUSTOM_CUDA_DEFS}"
         echo "Building custom CUDA GPU"
     else
-        CMAKE_CUDA_DEFS="-DGGML_CUDA=on -DCMAKE_CUDA_FLAGS=-t8 -DGGML_CUDA_FORCE_MMQ=on -DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES} -DCMAKE_LIBRARY_PATH=/usr/local/cuda/compat"
+        CMAKE_CUDA_DEFS="-DGGML_CUDA=on -DCMAKE_CUDA_FLAGS=-t8 -DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES} -DCMAKE_LIBRARY_PATH=/usr/local/cuda/compat"
     fi
     CMAKE_DEFS="${COMMON_CMAKE_DEFS} ${CMAKE_DEFS} ${ARM64_DEFS} ${CMAKE_CUDA_DEFS}"
     BUILD_DIR="../build/linux/${ARCH}/cuda${CUDA_VARIANT}"
Repository: huggingface/transformers
Pull request: Stop inheriting tests!

When we import a `pytest` test class like `BambaModelTest` into another file to inherit from, this creates a reference to the parent class in the new file. When we run `pytest new_file.py`, both the new child test class **and** the parent class are run. This was causing the `bamba` tests to be run in the `granitemoehybrid` test file and the `cohere` tests to be run in the `cohere2` test file

This PR copies the test code into the new file, replacing the overridden attributes and methods as required, so that there's no reference to the parent class anywhere.

cc @ydshieh

Changed files:
filename: tests/models/cohere2/test_modeling_cohere2.py
patch: @@ -269,3 +269,6 @@ def test_generation_beyond_sliding_window(self, attn_implementation: str):
         output_text = tokenizer.batch_decode(out)
 
         self.assertEqual(output_text, EXPECTED_COMPLETIONS)
+
+
+del CohereModelTest, CohereModelTester  # So the parent tests don't run in this file too

filename: tests/models/granitemoehybrid/test_modeling_granitemoehybrid.py
patch: @@ -178,3 +178,6 @@ def test_model_generation(self):
         text = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
 
         self.assertEqual(EXPECTED_TEXT_COMPLETION, text)
+
+
+del BambaModelTest, BambaModelTester  # So the parent tests don't run in this file too
Repository: vuejs/vue
Pull request: add options el tests

ref: #2872


Changed files:
filename: test/unit/features/options/el.spec.js
patch: @@ -0,0 +1,65 @@
+import Vue from 'vue'
+
+describe('Options el', () => {
+  it('basic usage', () => {
+    const el = document.createElement('div')
+    el.innerHTML = '<span>{{message}}</span>'
+    const vm = new Vue({
+      el,
+      data: { message: 'hello world' }
+    })
+    expect(vm.$el.tagName).toBe('DIV')
+    expect(vm.$el.textContent).toBe(vm.message)
+  })
+
+  it('should be replaced when use togther with `template` option', () => {
+    const el = document.createElement('div')
+    el.innerHTML = '<span>{{message}}</span>'
+    const vm = new Vue({
+      el,
+      template: '<p id="app"><span>{{message}}</span></p>',
+      data: { message: 'hello world' }
+    })
+    expect(vm.$el.tagName).toBe('P')
+    expect(vm.$el.textContent).toBe(vm.message)
+  })
+
+  it('should be replaced when use togther with `render` option', () => {
+    const el = document.createElement('div')
+    el.innerHTML = '<span>{{message}}</span>'
+    const vm = new Vue({
+      el,
+      render () {
+        const h = this.$createElement
+        return h('p', { staticAttrs: { id: 'app' }}, [
+          h('span', {}, [this.message])
+        ])
+      },
+      data: { message: 'hello world' }
+    })
+    expect(vm.$el.tagName).toBe('P')
+    expect(vm.$el.textContent).toBe(vm.message)
+  })
+
+  it('svg element', () => {
+    const ns = 'http://www.w3.org/2000/svg'
+    const el = document.createElementNS(ns, 'svg')
+    const text = document.createElementNS(ns, 'text')
+    text.setAttribute(':x', 'x')
+    text.setAttribute(':y', 'y')
+    text.setAttribute(':fill', 'color')
+    text.textContent = '{{text}}'
+    el.appendChild(text)
+    const vm = new Vue({
+      el,
+      data: {
+        x: 64, y: 128, color: 'red', text: 'svg text'
+      }
+    })
+    expect(vm.$el.tagName).toBe('svg')
+    expect(vm.$el.childNodes[0].getAttribute('x')).toBe(vm.x.toString())
+    expect(vm.$el.childNodes[0].getAttribute('y')).toBe(vm.y.toString())
+    expect(vm.$el.childNodes[0].getAttribute('fill')).toBe(vm.color)
+    expect(vm.$el.childNodes[0].textContent).toBe(vm.text)
+  })
+})