helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Remove findInstanceBlockingEvent unused parameters

## Summary
First three parameters of `findInstanceBlockingEvent` are unused since I think if we remove the unused parameters it makes it easier to know that which parameters is need by `findInstanceBlockingEvent`.

## How did you test this change?
Existing tests.


Changed files:
filename: packages/react-dom-bindings/src/events/ReactDOMEventListener.js
patch: @@ -155,12 +155,7 @@ export function dispatchEvent(
     return;
   }
 
-  let blockedOn = findInstanceBlockingEvent(
-    domEventName,
-    eventSystemFlags,
-    targetContainer,
-    nativeEvent,
-  );
+  let blockedOn = findInstanceBlockingEvent(nativeEvent);
   if (blockedOn === null) {
     dispatchEventForPluginEventSystem(
       domEventName,
@@ -198,12 +193,7 @@ export function dispatchEvent(
       if (fiber !== null) {
         attemptSynchronousHydration(fiber);
       }
-      const nextBlockedOn = findInstanceBlockingEvent(
-        domEventName,
-        eventSystemFlags,
-        targetContainer,
-        nativeEvent,
-      );
+      const nextBlockedOn = findInstanceBlockingEvent(nativeEvent);
       if (nextBlockedOn === null) {
         dispatchEventForPluginEventSystem(
           domEventName,
@@ -240,9 +230,6 @@ export let return_targetInst: null | Fiber = null;
 // Returns a SuspenseInstance or Container if it's blocked.
 // The return_targetInst field above is conceptually part of the return value.
 export function findInstanceBlockingEvent(
-  domEventName: DOMEventName,
-  eventSystemFlags: EventSystemFlags,
-  targetContainer: EventTarget,
   nativeEvent: AnyNativeEvent,
 ): null | Container | SuspenseInstance {
   // TODO: Warn if _enabled is false.

filename: packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js
patch: @@ -376,13 +376,7 @@ function attemptReplayContinuousQueuedEvent(
   }
   const targetContainers = queuedEvent.targetContainers;
   while (targetContainers.length > 0) {
-    const targetContainer = targetContainers[0];
-    const nextBlockedOn = findInstanceBlockingEvent(
-      queuedEvent.domEventName,
-      queuedEvent.eventSystemFlags,
-      targetContainer,
-      queuedEvent.nativeEvent,
-    );
+    const nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
     if (nextBlockedOn === null) {
       const nativeEvent = queuedEvent.nativeEvent;
       const nativeEventClone = new nativeEvent.constructor(
Repository: electron/electron
Pull request: fix: clang-tidy `performance-inefficient-vector-operation` warnings (32-x-y backport)

Manually backport #44743 to 32-x-y. See that PR for details.

No significant changes compared to 44743; trop just got confused by some `#include` shear in `electron_api_crash_reporter.cc`

Notes: none.

Changed files:
filename: shell/browser/api/electron_api_crash_reporter.cc
patch: @@ -10,8 +10,7 @@
 #include <utility>
 #include <vector>
 
-#include "base/command_line.h"
-#include "base/functional/bind.h"
+#include "base/containers/to_vector.h"
 #include "base/no_destructor.h"
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
@@ -223,18 +222,17 @@ v8::Local<v8::Value> GetUploadedReports(v8::Isolate* isolate) {
     list->LoadSync();
   }
 
+  auto to_obj = [isolate](const UploadList::UploadInfo* upload) {
+    return gin::DataObjectBuilder{isolate}
+        .Set("date", upload->upload_time)
+        .Set("id", upload->upload_id)
+        .Build();
+  };
+
   constexpr size_t kMaxUploadReportsToList = std::numeric_limits<size_t>::max();
-  const std::vector<const UploadList::UploadInfo*> uploads =
-      list->GetUploads(kMaxUploadReportsToList);
-  std::vector<v8::Local<v8::Object>> result;
-  for (auto* const upload : uploads) {
-    result.push_back(gin::DataObjectBuilder(isolate)
-                         .Set("date", upload->upload_time)
-                         .Set("id", upload->upload_id)
-                         .Build());
-  }
-  v8::Local<v8::Value> v8_result = gin::ConvertToV8(isolate, result);
-  return v8_result;
+  return gin::ConvertToV8(
+      isolate,
+      base::ToVector(list->GetUploads(kMaxUploadReportsToList), to_obj));
 }
 #endif
 

filename: shell/common/api/electron_api_clipboard.cc
patch: @@ -7,6 +7,7 @@
 #include <map>
 
 #include "base/containers/contains.h"
+#include "base/containers/to_vector.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "shell/browser/browser.h"
@@ -281,11 +282,8 @@ void Clipboard::Clear(gin_helper::Arguments* args) {
 
 // This exists for testing purposes ONLY.
 void Clipboard::WriteFilesForTesting(const std::vector<base::FilePath>& files) {
-  std::vector<ui::FileInfo> file_infos;
-  for (const auto& file : files) {
-    file_infos.emplace_back(ui::FileInfo(ui::FileInfo(file, file.BaseName())));
-  }
-
+  auto to_info = [](const auto& p) { return ui::FileInfo{p, p.BaseName()}; };
+  auto file_infos = base::ToVector(files, to_info);
   ui::ScopedClipboardWriter writer(ui::ClipboardBuffer::kCopyPaste);
   writer.WriteFilenames(ui::FileInfosToURIList(file_infos));
 }
Repository: denoland/deno
Pull request: fix(ext/node): scrypt panic when `log_n` > 64

Throws an error instead of panic. Ref https://github.com/denoland/deno/issues/27716


Changed files:
filename: ext/node/ops/crypto/mod.rs
patch: @@ -571,7 +571,7 @@ fn scrypt(
     parallelization,
     keylen as usize,
   )
-  .unwrap();
+  .map_err(|_| JsErrorBox::generic("scrypt params construction failed"))?;
 
   // Call into scrypt
   let res = scrypt::scrypt(&password, &salt, &params, output_buffer);

filename: ext/node/polyfills/internal/crypto/scrypt.ts
patch: @@ -107,23 +107,19 @@ export function scrypt(
     throw new Error("exceeds max memory");
   }
 
-  try {
-    op_node_scrypt_async(
-      password,
-      salt,
-      keylen,
-      Math.log2(N),
-      r,
-      p,
-      maxmem,
-    ).then(
-      (buf: Uint8Array) => {
-        cb(null, Buffer.from(buf.buffer));
-      },
-    );
-  } catch (err: unknown) {
-    return cb(err);
-  }
+  op_node_scrypt_async(
+    password,
+    salt,
+    keylen,
+    Math.log2(N),
+    r,
+    p,
+    maxmem,
+  ).then(
+    (buf: Uint8Array) => {
+      cb(null, Buffer.from(buf.buffer));
+    },
+  ).catch((err: unknown) => cb(err));
 }
 
 export default {

filename: tests/unit_node/crypto/crypto_scrypt_test.ts
patch: @@ -188,3 +188,13 @@ Deno.test("scryptSync with options works correctly", () => {
     ]),
   );
 });
+
+Deno.test("log_n > 64 doesn't panic", async () => {
+  const { promise, resolve } = Promise.withResolvers<void>();
+
+  scrypt("password", "salt", 128, () => {
+    resolve();
+  });
+
+  await promise;
+});
Repository: nodejs/node
Pull request: doc: remove deprecated pattern in `child_process.md`

Refs: https://github.com/nodejs/node/pull/57389
<!--
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: doc/api/child_process.md
patch: @@ -138,7 +138,7 @@ exec('my.bat', (err, stdout, stderr) => {
 });
 
 // Script with spaces in the filename:
-const bat = spawn('"my script.cmd"', ['a', 'b'], { shell: true });
+const bat = spawn('"my script.cmd" a b', { shell: true });
 // or:
 exec('"my script.cmd" a b', (err, stdout, stderr) => {
   // ...
@@ -158,7 +158,7 @@ exec('my.bat', (err, stdout, stderr) => {
 });
 
 // Script with spaces in the filename:
-const bat = spawn('"my script.cmd"', ['a', 'b'], { shell: true });
+const bat = spawn('"my script.cmd" a b', { shell: true });
 // or:
 exec('"my script.cmd" a b', (err, stdout, stderr) => {
   // ...
Repository: huggingface/transformers
Pull request: Use `raise from e` in `hub.py` utility

Always better to `"raise from"` when raising from another exception (dunno why we missed this one, other `raise` are ok)

Changed files:
filename: src/transformers/utils/hub.py
patch: @@ -550,7 +550,7 @@ def cached_files(
         elif isinstance(e, HTTPError) and not isinstance(e, EntryNotFoundError):
             if not _raise_exceptions_for_connection_errors:
                 return None
-            raise OSError(f"There was a specific connection error when trying to load {path_or_repo_id}:\n{e}")
+            raise OSError(f"There was a specific connection error when trying to load {path_or_repo_id}:\n{e}") from e
         # Any other Exception type should now be re-raised, in order to provide helpful error messages and break the execution flow
         # (EntryNotFoundError will be treated outside this block and correctly re-raised if needed)
         elif not isinstance(e, EntryNotFoundError):
Repository: vercel/next.js
Pull request: Update Rspack production test manifest

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

Changed files:
filename: test/rspack-build-tests-manifest.json
patch: @@ -6516,6 +6516,33 @@
     "flakey": [],
     "runtimeError": false
   },
+  "test/e2e/chrome-devtools-workspace/chrome-devtools-workspace-base-path.test.ts": {
+    "passed": [
+      "chrome-devtools-workspace basePath should be able to connect to Chrome DevTools in dev with a configured basePath"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
+  "test/e2e/chrome-devtools-workspace/chrome-devtools-workspace-custom-disable.test.ts": {
+    "passed": [
+      "chrome-devtools-workspace custom disable can be disabled by providing your own endpoint"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
+  "test/e2e/chrome-devtools-workspace/chrome-devtools-workspace.test.ts": {
+    "passed": [
+      "chrome-devtools-workspace default should be able to connect to Chrome DevTools in dev"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
   "test/e2e/config-promise-export/async-function.test.ts": {
     "passed": ["async export should work"],
     "failed": [],
@@ -19883,5 +19910,14 @@
     "pending": [],
     "flakey": [],
     "runtimeError": false
+  },
+  "test/production/typescript-checked-side-effect-imports/index.test.ts": {
+    "passed": [
+      "Imports of server/client-only with noUncheckedSideEffectImports Should build without typescript errors"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
   }
 }
Repository: nodejs/node
Pull request: meta: remove collaborator self-nomination

Anyone with sufficient involvement in Node.js (such that becoming a collaborator would benefit Node.js) is going to have plenty of people to ask. The self-nomination process has been entirely superfluous the entire time I've been involved in Node.js. Simplify things and get rid of it.

This is based on my comment at https://github.com/nodejs/node/pull/57503/files#r1997694900. If there isn't consensus on this, then that's OK and we can just close it. I don't feel so strongly that I want to have a long back-and-forth about it. But if there is consensus, let's take this opportunity to simplify our governance.

Since this is a change to the Governance doc, I think it's appropriate to @-mention the TSC. @nodejs/tsc 

<!--
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: GOVERNANCE.md
patch: @@ -194,10 +194,6 @@ nominee publicly accepts it. In the case
 of an objection, the TSC is responsible for working with the individuals
 involved and finding a resolution.
 
-Collaborators might overlook someone with valuable contributions. In that case,
-the contributor may open an issue or contact a collaborator to request a
-nomination.
-
 #### How to review a collaborator nomination
 
 A collaborator nomination can be reviewed in the same way one would review a PR
Repository: ggml-org/llama.cpp
Pull request: Update Paddler link and description in README.md


Changed files:
filename: README.md
patch: @@ -240,7 +240,7 @@ Instructions for adding support for new models: [HOWTO-add-model.md](docs/develo
 <details>
 <summary>Infrastructure</summary>
 
-- [Paddler](https://github.com/distantmagic/paddler) - Stateful load balancer custom-tailored for llama.cpp
+- [Paddler](https://github.com/intentee/paddler) - Open-source LLMOps platform for hosting and scaling AI in your own infrastructure
 - [GPUStack](https://github.com/gpustack/gpustack) - Manage GPU clusters for running LLMs
 - [llama_cpp_canister](https://github.com/onicai/llama_cpp_canister) - llama.cpp as a smart contract on the Internet Computer, using WebAssembly
 - [llama-swap](https://github.com/mostlygeek/llama-swap) - transparent proxy that adds automatic model switching with llama-server
Repository: ggml-org/llama.cpp
Pull request: kv-cache : fix seq_rm with seq_id == -1

fix #15215 #15104

When `seq_id == -1` we remove the tokens from all KV cache buffers.

Changed files:
filename: src/llama-kv-cache-unified.cpp
patch: @@ -223,12 +223,7 @@ void llama_kv_cache_unified::clear(bool data) {
 }
 
 bool llama_kv_cache_unified::seq_rm(llama_seq_id seq_id, llama_pos p0, llama_pos p1) {
-    GGML_ASSERT(seq_id >= 0 && (size_t) seq_id < seq_to_stream.size());
-
-    auto & cells = v_cells[seq_to_stream[seq_id]];
-    auto & head  = v_heads[seq_to_stream[seq_id]];
-
-    uint32_t new_head = cells.size();
+    GGML_ASSERT(seq_id == -1 || (seq_id >= 0 && (size_t) seq_id < seq_to_stream.size()));
 
     if (p0 < 0) {
         p0 = 0;
@@ -239,6 +234,11 @@ bool llama_kv_cache_unified::seq_rm(llama_seq_id seq_id, llama_pos p0, llama_pos
     }
 
     if (seq_id >= 0) {
+        auto & cells = v_cells[seq_to_stream[seq_id]];
+        auto & head  = v_heads[seq_to_stream[seq_id]];
+
+        uint32_t new_head = cells.size();
+
         for (uint32_t i = 0; i < cells.size(); ++i) {
             if (!cells.pos_in(i, p0, p1)) {
                 continue;
@@ -250,24 +250,36 @@ bool llama_kv_cache_unified::seq_rm(llama_seq_id seq_id, llama_pos p0, llama_pos
                 }
             }
         }
+
+        // If we freed up a slot, set head to it so searching can start there.
+        if (new_head != cells.size() && new_head < head) {
+            head = new_head;
+        }
     } else {
         // match any sequence
-        for (uint32_t i = 0; i < cells.size(); ++i) {
-            if (!cells.pos_in(i, p0, p1)) {
-                continue;
-            }
+        for (uint32_t s = 0; s < n_stream; ++s) {
+            auto & cells = v_cells[s];
+            auto & head  = v_heads[s];
 
-            cells.rm(i);
+            uint32_t new_head = cells.size();
 
-            if (new_head == cells.size()) {
-                new_head = i;
+            for (uint32_t i = 0; i < cells.size(); ++i) {
+                if (!cells.pos_in(i, p0, p1)) {
+                    continue;
+                }
+
+                cells.rm(i);
+
+                if (new_head == cells.size()) {
+                    new_head = i;
+                }
             }
-        }
-    }
 
-    // If we freed up a slot, set head to it so searching can start there.
-    if (new_head != cells.size() && new_head < head) {
-        head = new_head;
+            // If we freed up a slot, set head to it so searching can start there.
+            if (new_head != cells.size() && new_head < head) {
+                head = new_head;
+            }
+        }
     }
 
     return true;
Repository: ggml-org/llama.cpp
Pull request: convert : fix merge conflicts

Quick fixup.

Changed files:
filename: convert_hf_to_gguf.py
patch: @@ -572,7 +572,7 @@ def set_gguf_parameters(self):
         if (rope_theta := self.hparams.get("rope_theta")) is not None:
             self.gguf_writer.add_rope_freq_base(rope_theta)
             logger.info(f"gguf: rope theta = {rope_theta}")
-        if (f_rms_eps := self.find_hparam(["rms_norm_eps", "norm_eps"])) is not None:
+        if (f_rms_eps := self.find_hparam(["rms_norm_eps", "norm_eps"], optional=True)) is not None:
             self.gguf_writer.add_layer_norm_rms_eps(f_rms_eps)
             logger.info(f"gguf: rms norm epsilon = {f_rms_eps}")
         if (f_norm_eps := self.find_hparam(["layer_norm_eps", "layer_norm_epsilon", "norm_epsilon"], optional=True)) is not None:
@@ -3598,7 +3598,7 @@ class Qwen3MoeModel(Qwen2MoeModel):
 
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
-        hparams = ModelBase.load_hparams(self.dir_model)
+        hparams = ModelBase.load_hparams(self.dir_model, False)
         self.origin_hf_arch = hparams.get('architectures', [None])[0]
 
     def set_vocab(self):
Repository: denoland/deno
Pull request: perf(lsp): cache completion item resolution during request

This commit adds a simple HashMap cache to completion requests.

On a test project the time to compute completions went from 1200ms
to 75ms and the cache contained ~300 entries when 8000 completion
items were produced by the TSC.

This is a short-lived cache and is discarded once the completion
request is finished. In a follow up commits we could make it persist
between requests.

Changed files:
filename: cli/lsp/tsc.rs
patch: @@ -3683,6 +3683,10 @@ impl CompletionInfo {
     position: u32,
     language_server: &language_server::Inner,
   ) -> lsp::CompletionResponse {
+    // A cache for costly resolution computations.
+    // On a test project, it was found to speed up completion requests
+    // by 10-20x and contained ~300 entries for 8000 completion items.
+    let mut cache = HashMap::with_capacity(512);
     let items = self
       .entries
       .iter()
@@ -3694,6 +3698,7 @@ impl CompletionInfo {
           specifier,
           position,
           language_server,
+          &mut cache,
         )
       })
       .collect();
@@ -3898,6 +3903,7 @@ impl CompletionEntry {
     self.insert_text.clone()
   }
 
+  #[allow(clippy::too_many_arguments)]
   pub fn as_completion_item(
     &self,
     line_index: Arc<LineIndex>,
@@ -3906,6 +3912,7 @@ impl CompletionEntry {
     specifier: &ModuleSpecifier,
     position: u32,
     language_server: &language_server::Inner,
+    resolution_cache: &mut HashMap<(ModuleSpecifier, ModuleSpecifier), String>,
   ) -> Option<lsp::CompletionItem> {
     let mut label = self.name.clone();
     let mut label_details: Option<lsp::CompletionItemLabelDetails> = None;
@@ -3964,21 +3971,29 @@ impl CompletionEntry {
         }
       }
     }
-
     if let Some(source) = &self.source {
       let mut display_source = source.clone();
       if let Some(import_data) = &self.auto_import_data {
         let import_mapper =
           language_server.get_ts_response_import_mapper(specifier);
-        if let Some(mut new_specifier) = import_mapper
-          .check_specifier(&import_data.normalized, specifier)
+        let maybe_cached = resolution_cache
+          .get(&(import_data.normalized.clone(), specifier.clone()))
+          .cloned();
+        if let Some(mut new_specifier) = maybe_cached
+          .or_else(|| {
+            import_mapper.check_specifier(&import_data.normalized, specifier)
+          })
           .or_else(|| relative_specifier(specifier, &import_data.normalized))
           .or_else(|| {
             ModuleSpecifier::parse(&import_data.raw.module_specifier)
               .is_ok()
               .then(|| import_data.normalized.to_string())
           })
         {
+          resolution_cache.insert(
+            (import_data.normalized.clone(), specifier.clone()),
+            new_specifier.clone(),
+          );
           if new_specifier.contains("/node_modules/") {
             return None;
           }