helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: `NativeWindow.window_id()` returns same value for all windows

Backport of #46562

See that PR for details.


Notes: Fixed ElectronAccessibilityUI bug.

Changed files:
filename: shell/browser/native_window.cc
patch: @@ -96,8 +96,6 @@ const char kElectronNativeWindowKey[] = "__ELECTRON_NATIVE_WINDOW__";
 NativeWindow::NativeWindow(const gin_helper::Dictionary& options,
                            NativeWindow* parent)
     : widget_(std::make_unique<views::Widget>()), parent_(parent) {
-  ++next_id_;
-
   options.Get(options::kFrame, &has_frame_);
   options.Get(options::kTransparent, &transparent_);
   options.Get(options::kEnableLargerThanScreen, &enable_larger_than_screen_);
@@ -809,9 +807,6 @@ void NativeWindow::HandlePendingFullscreenTransitions() {
   SetFullScreen(next_transition);
 }
 
-// static
-int32_t NativeWindow::next_id_ = 0;
-
 bool NativeWindow::IsTranslucent() const {
   // Transparent windows are translucent
   if (transparent()) {

filename: shell/browser/native_window.h
patch: @@ -400,7 +400,7 @@ class NativeWindow : public base::SupportsUserData,
   NativeWindow* parent() const { return parent_; }
   bool is_modal() const { return is_modal_; }
 
-  int32_t window_id() const { return next_id_; }
+  int32_t window_id() const { return window_id_; }
 
   void add_child_window(NativeWindow* child) {
     child_windows_.push_back(child);
@@ -463,7 +463,8 @@ class NativeWindow : public base::SupportsUserData,
  private:
   std::unique_ptr<views::Widget> widget_;
 
-  static int32_t next_id_;
+  static inline int32_t next_id_ = 0;
+  const int32_t window_id_ = ++next_id_;
 
   // The content view, weak ref.
   raw_ptr<views::View> content_view_ = nullptr;
Repository: vercel/next.js
Pull request: Ensure tags are fetched for release branch

Follow-up to https://github.com/vercel/next.js/pull/83006 this ensures we actually pull the tag refs otherwise we can't reset to them. 

Verified here: https://github.com/vercel/next.js/actions/runs/17217751382

Changed files:
filename: scripts/create-release-branch.js
patch: @@ -39,7 +39,7 @@ async function main() {
     stdio: 'inherit',
     shell: true,
   })
-  await execa(`git fetch origin ${tagName}`, {
+  await execa(`git fetch origin ${tagName} --tags`, {
     stdio: 'inherit',
     shell: true,
   })
Repository: nodejs/node
Pull request: meta: add @nodejs/inspector as codeowner

<!--
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: .github/CODEOWNERS
patch: @@ -216,3 +216,10 @@
 /src/node_options.* @nodejs/config
 /test/parallel/test-config-* @nodejs/config
 /test/parallel/test-dotenv-* @nodejs/config
+
+# Inspector
+/src/inspector/* @nodejs/inspector
+/src/inspector_* @nodejs/inspector
+/lib/internal/inspector/* @nodejs/inspector
+/lib/internal/inspector_* @nodejs/inspector
+/lib/inspector.js @nodejs/inspector
Repository: denoland/deno
Pull request: fix(ext/node): avoid stack overflow in `node:zlib`'s `gunzip`

Fixes #30829

## Problem

The zlib polyfill had recursive calls between `processCallback` and `handle.write()` that caused stack overflow when decompressing large data.

## Solution

Defer `handle.write()` calls with `process.nextTick()` to break the synchronous call chain.

## Changes
- `ext/node/polyfills/zlib.js`: Wrapped `handle.write()` in `process.nextTick()`
- `tests/unit_node/zlib_test.ts`: Added test for 64MiB data decompression


Changed files:
filename: ext/node/polyfills/zlib.js
patch: @@ -608,19 +608,7 @@ function processCallback() {
     handle.availInBefore = availInAfter;
 
     if (!streamBufferIsFull) {
-      this.write(
-        handle.flushFlag,
-        this.buffer, // in
-        handle.inOff, // in_off
-        handle.availInBefore, // in_len
-        self._outBuffer, // out
-        self._outOffset, // out_off
-        self._chunkSize,
-      ); // out_len
-    } else {
-      const oldRead = self._read;
-      self._read = (n) => {
-        self._read = oldRead;
+      process.nextTick(() => {
         this.write(
           handle.flushFlag,
           this.buffer, // in
@@ -630,6 +618,22 @@ function processCallback() {
           self._outOffset, // out_off
           self._chunkSize,
         ); // out_len
+      });
+    } else {
+      const oldRead = self._read;
+      self._read = (n) => {
+        self._read = oldRead;
+        process.nextTick(() => {
+          this.write(
+            handle.flushFlag,
+            this.buffer, // in
+            handle.inOff, // in_off
+            handle.availInBefore, // in_len
+            self._outBuffer, // out
+            self._outOffset, // out_off
+            self._chunkSize,
+          ); // out_len
+        });
         self._read(n);
       };
     }

filename: tests/unit_node/zlib_test.ts
patch: @@ -16,6 +16,7 @@ import {
   createBrotliDecompress,
   createDeflate,
   deflateSync,
+  gunzip,
   gzip,
   gzipSync,
   unzipSync,
@@ -286,3 +287,31 @@ Deno.test("ERR_BUFFER_TOO_LARGE works correctly", () => {
     "Cannot create a Buffer larger than 1 bytes",
   );
 });
+
+// https://github.com/denoland/deno/issues/30829
+Deno.test("gunzip doesn't cause stack overflow with 64MiB data", async () => {
+  const data = Buffer.alloc(64 * 1024 * 1024);
+  const compressed = gzipSync(data);
+
+  const { promise, resolve, reject } = Promise.withResolvers<void>();
+
+  gunzip(compressed, (err, result) => {
+    if (err) {
+      reject(err);
+      return;
+    }
+    if (!result) {
+      reject(new Error("expected gunzip to return a Buffer"));
+      return;
+    }
+    if (result.length !== data.length) {
+      reject(
+        new Error(`expected ${data.length} bytes, got ${result.length}`),
+      );
+      return;
+    }
+    resolve();
+  });
+
+  await promise;
+});
Repository: huggingface/transformers
Pull request: Fix nightly torch CI

# What does this PR do?

Since we use FA2 in the CI docker image last Sunday, the nightly torch CI hangs at the docker image build job.

Let's not use FA2 and run FA2 tests on torch nightly CI workflow.

Also need to not install `detectron2` for the same/similar reason.

Changed files:
filename: .github/workflows/self-nightly-caller.yml
patch: @@ -12,12 +12,34 @@ on:
     branches:
       - run_ci_with_nightly_torch*
 
+# Used for `push` to easily modify the target workflow runs to compare against
+env:
+    prev_workflow_run_id: ""
+    other_workflow_run_id: ""
+
+
 jobs:
   build_nightly_torch_ci_images:
     name: Build CI Docker Images with nightly torch
     uses: ./.github/workflows/build-nightly-ci-docker-images.yml
     secrets: inherit
 
+  setup:
+    name: Setup
+    runs-on: ubuntu-22.04
+    steps:
+      - name: Setup
+        run: |
+          mkdir "setup_values"
+          echo "${{ inputs.prev_workflow_run_id || env.prev_workflow_run_id }}" > "setup_values/prev_workflow_run_id.txt"
+          echo "${{ inputs.other_workflow_run_id || env.other_workflow_run_id }}" > "setup_values/other_workflow_run_id.txt"
+
+      - name: Upload artifacts
+        uses: actions/upload-artifact@v4
+        with:
+          name: setup_values
+          path: setup_values
+
   model-ci:
     name: Model CI
     needs: build_nightly_torch_ci_images

filename: docker/transformers-all-latest-gpu/Dockerfile
patch: @@ -32,7 +32,10 @@ RUN python3 -m pip uninstall -y flax jax
 
 RUN python3 -m pip install --no-cache-dir -U timm
 
-RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract
+RUN [ "$PYTORCH" != "pre" ] && python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git || echo "Don't install detectron2 with nightly torch"
+
+RUN python3 -m pip install --no-cache-dir pytesseract
+
 RUN python3 -m pip install -U "itsdangerous<2.1.0"
 
 RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate
@@ -52,7 +55,7 @@ RUN python3 -m pip install --no-cache-dir bitsandbytes
 RUN python3 -m pip install --no-cache-dir quanto
 
 # After using A10 as CI runner, let's run FA2 tests
-RUN python3 -m pip uninstall -y ninja && python3 -m pip install --no-cache-dir ninja && python3 -m pip install flash-attn --no-cache-dir --no-build-isolation
+RUN [ "$PYTORCH" != "pre" ] && python3 -m pip uninstall -y ninja && python3 -m pip install --no-cache-dir ninja && python3 -m pip install flash-attn --no-cache-dir --no-build-isolation || echo "Don't install FA2 with nightly torch"
 
 # TODO (ydshieh): check this again
 # `quanto` will install `ninja` which leads to many `CUDA error: an illegal memory access ...` in some model tests
Repository: electron/electron
Pull request: fix: `NativeWindow.window_id()` returns same value for all windows

Backport of #46562

See that PR for details.


Notes: Fixed ElectronAccessibilityUI bug.

Changed files:
filename: shell/browser/native_window.cc
patch: @@ -96,8 +96,6 @@ const char kElectronNativeWindowKey[] = "__ELECTRON_NATIVE_WINDOW__";
 NativeWindow::NativeWindow(const gin_helper::Dictionary& options,
                            NativeWindow* parent)
     : widget_(std::make_unique<views::Widget>()), parent_(parent) {
-  ++next_id_;
-
   options.Get(options::kFrame, &has_frame_);
   options.Get(options::kTransparent, &transparent_);
   options.Get(options::kEnableLargerThanScreen, &enable_larger_than_screen_);
@@ -809,9 +807,6 @@ void NativeWindow::HandlePendingFullscreenTransitions() {
   SetFullScreen(next_transition);
 }
 
-// static
-int32_t NativeWindow::next_id_ = 0;
-
 bool NativeWindow::IsTranslucent() const {
   // Transparent windows are translucent
   if (transparent()) {

filename: shell/browser/native_window.h
patch: @@ -402,7 +402,7 @@ class NativeWindow : public base::SupportsUserData,
   NativeWindow* parent() const { return parent_; }
   bool is_modal() const { return is_modal_; }
 
-  int32_t window_id() const { return next_id_; }
+  int32_t window_id() const { return window_id_; }
 
   void add_child_window(NativeWindow* child) {
     child_windows_.push_back(child);
@@ -465,7 +465,8 @@ class NativeWindow : public base::SupportsUserData,
  private:
   std::unique_ptr<views::Widget> widget_;
 
-  static int32_t next_id_;
+  static inline int32_t next_id_ = 0;
+  const int32_t window_id_ = ++next_id_;
 
   // The content view, weak ref.
   raw_ptr<views::View> content_view_ = nullptr;
Repository: ollama/ollama
Pull request: Linux uninstall instructions

Document how to clean up the standard Linux installation.

Changed files:
filename: docs/linux.md
patch: @@ -80,3 +80,23 @@ To view logs of Ollama running as a startup service, run:
 ```bash
 journalctl -u ollama
 ```
+
+## Uninstall
+
+Remove the ollama service:
+```bash
+systemctl stop ollama
+systemctl disable ollama
+rm /etc/systemd/system/ollama.service
+```
+
+Remove the ollama binary from your bin directory (either `/usr/local/bin`, `/usr/bin`, or `/bin`):
+```bash
+rm /usr/local/bin/ollama
+```
+
+Remove the downloaded models and Ollama service user:
+```bash
+rm /usr/share/ollama
+userdel ollama
+```
Repository: facebook/react
Pull request: [Devtools] Look for a ReactMemoCacheSentinel on state

The useMemoCache polyfill doesn't have access to the fiber, and it simply uses state, which makes it not work with the devtools.

With this PR, devtools will look on the very first hook's state for this sentinel and display the Forget badge if present.

The polyfill will add this sentinel to it's state (the cache array).

Changed files:
filename: packages/react-devtools-shared/src/backend/ReactSymbols.js
patch: @@ -67,3 +67,7 @@ export const SUSPENSE_LIST_SYMBOL_STRING = 'Symbol(react.suspense_list)';
 
 export const SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED_SYMBOL_STRING =
   'Symbol(react.server_context.defaultValue)';
+
+export const REACT_MEMO_CACHE_SENTINEL: symbol = Symbol.for(
+  'react.memo_cache_sentinel',
+);

filename: packages/react-devtools-shared/src/backend/renderer.js
patch: @@ -86,6 +86,7 @@ import {
   STRICT_MODE_SYMBOL_STRING,
   PROFILER_NUMBER,
   PROFILER_SYMBOL_STRING,
+  REACT_MEMO_CACHE_SENTINEL,
   SCOPE_NUMBER,
   SCOPE_SYMBOL_STRING,
   FORWARD_REF_NUMBER,
@@ -474,8 +475,12 @@ export function getInternalReactConstants(version: string): {
     }
 
     let resolvedContext: any = null;
-    // $FlowFixMe[incompatible-type] fiber.updateQueue is mixed
-    if (!shouldSkipForgetCheck && fiber.updateQueue?.memoCache != null) {
+    if (
+      !shouldSkipForgetCheck &&
+      // $FlowFixMe[incompatible-type] fiber.updateQueue is mixed
+      (fiber.updateQueue?.memoCache != null ||
+        fiber.memoizedState?.memoizedState?.[REACT_MEMO_CACHE_SENTINEL])
+    ) {
       const displayNameWithoutForgetWrapper = getDisplayNameForFiber(
         fiber,
         true,
Repository: huggingface/transformers
Pull request: Not to shock AMD team by the cancelled workflow run notification ❤️ 💖

# What does this PR do?

If cancelled, not to send the notification.

Changed files:
filename: .github/workflows/slack-report.yml
patch: @@ -36,7 +36,7 @@ jobs:
   send_results:
     name: Send results to webhook
     runs-on: ubuntu-22.04
-    if: always()
+    if: always() && !cancelled()
     steps:
       - name: Preliminary job status
         shell: bash
Repository: ollama/ollama
Pull request: linux: add user to the `ollama` group on install

- Run the ollama system service as the current user
 
resolves #613 

Changed files:
filename: scripts/install.sh
patch: @@ -74,6 +74,9 @@ configure_systemd() {
         $SUDO useradd -r -s /bin/false -m -d /usr/share/ollama ollama
     fi
 
+    status "Adding current user to ollama group..."
+    $SUDO usermod -a -G ollama $(whoami)
+
     status "Creating ollama systemd service..."
     cat <<EOF | $SUDO tee /etc/systemd/system/ollama.service >/dev/null
 [Unit]
Repository: electron/electron
Pull request: fix: crash on parent window close and focur/blur

Backport of #46559

See that PR for details.


Notes: Fixed a possible BrowserWindow crash caused by closing a parent window with focus or blur events.

Changed files:
filename: shell/browser/api/electron_api_browser_window.cc
patch: @@ -219,14 +219,14 @@ void BrowserWindow::CloseImmediately() {
 }
 
 void BrowserWindow::Focus() {
-  if (api_web_contents_->IsOffScreen())
+  if (api_web_contents_ && api_web_contents_->IsOffScreen())
     FocusOnWebView();
   else
     BaseWindow::Focus();
 }
 
 void BrowserWindow::Blur() {
-  if (api_web_contents_->IsOffScreen())
+  if (api_web_contents_ && api_web_contents_->IsOffScreen())
     BlurWebView();
   else
     BaseWindow::Blur();

filename: spec/api-browser-window-spec.ts
patch: @@ -4930,6 +4930,18 @@ describe('BrowserWindow module', () => {
         expect(w.getChildWindows().length).to.equal(0);
       });
 
+      it('can handle parent window close with focus or blur events', (done) => {
+        const w = new BrowserWindow({ show: false });
+        const c = new BrowserWindow({ show: false, parent: w });
+
+        c.on('closed', () => {
+          w.focus();
+          done();
+        });
+
+        w.close();
+      });
+
       ifit(process.platform === 'darwin')('only shows the intended window when a child with siblings is shown', async () => {
         const w = new BrowserWindow({ show: false });
         const childOne = new BrowserWindow({ show: false, parent: w });
Repository: facebook/react
Pull request: Use use() in the Cache if available

This is a follow up to https://github.com/facebook/react/pull/28789#discussion_r1557232202

Revert to use the old readContext detection if not to support older React.

I haven't actually tested this. Just opening as a suggestion.


Changed files:
filename: packages/react-devtools-shared/src/devtools/cache.js
patch: @@ -59,19 +59,30 @@ const Pending = 0;
 const Resolved = 1;
 const Rejected = 2;
 
-const ReactSharedInternals = (React: any)
-  .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
-
-function readContext(Context: ReactContext<null>) {
-  const dispatcher = ReactSharedInternals.H;
-  if (dispatcher === null) {
-    throw new Error(
-      'react-cache: read and preload may only be called from within a ' +
-        "component's render. They are not supported in event handlers or " +
-        'lifecycle methods.',
-    );
-  }
-  return dispatcher.readContext(Context);
+let readContext;
+if (typeof React.use === 'function') {
+  readContext = function (Context: ReactContext<null>) {
+    return React.use(Context);
+  };
+} else if (
+  typeof (React: any).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ===
+  'object'
+) {
+  const ReactCurrentDispatcher = (React: any)
+    .__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;
+  readContext = function (Context: ReactContext<null>) {
+    const dispatcher = ReactCurrentDispatcher.current;
+    if (dispatcher === null) {
+      throw new Error(
+        'react-cache: read and preload may only be called from within a ' +
+          "component's render. They are not supported in event handlers or " +
+          'lifecycle methods.',
+      );
+    }
+    return dispatcher.readContext(Context);
+  };
+} else {
+  throw new Error('react-cache: Unsupported React version');
 }
 
 const CacheContext = createContext(null);
Repository: denoland/deno
Pull request: fix(clean): do not panic on failure to get local cache path in clean --except


Changed files:
filename: cli/tools/clean.rs
patch: @@ -313,7 +313,10 @@ async fn clean_except(
 
   let jsr_url = crate::args::jsr_url();
   add_jsr_meta_paths(graph, &mut keep_paths_trie, jsr_url, &|url| {
-    http_cache.local_path_for_url(url).map_err(Into::into)
+    http_cache
+      .local_path_for_url(url)
+      .map_err(Into::into)
+      .map(Some)
   })?;
   walk_removing(
     &mut state,
@@ -327,9 +330,6 @@ async fn clean_except(
   let mut node_modules_cleaned = FsCleaner::default();
 
   if let Some(dir) = node_modules_path {
-    // let npm_installer = factory.npm_installer_if_managed().await?.unwrap();
-    // npm_installer.
-    // let npm_installer = npm_installer.as_local().unwrap();
     clean_node_modules(
       &mut node_modules_cleaned,
       &node_modules_keep,
@@ -347,19 +347,29 @@ async fn clean_except(
       trie.add_rewrite(deno_dir.root.clone(), deno_dir_root_canonical);
     }
     let cache = cache.clone();
-    add_jsr_meta_paths(graph, &mut trie, jsr_url, &|_url| {
-      if let Ok(Some(path)) = cache.local_path_for_url(_url) {
-        Ok(path)
-      } else {
-        panic!("should not happen")
+    add_jsr_meta_paths(graph, &mut trie, jsr_url, &|url| match cache
+      .local_path_for_url(url)
+    {
+      Ok(path) => Ok(path),
+      Err(err) => {
+        log::warn!(
+          "failed to get local path for jsr meta url {}: {}",
+          url,
+          err
+        );
+        Ok(None)
       }
     })?;
     for url in keep {
       if url.scheme() == "http" || url.scheme() == "https" {
-        if let Ok(Some(path)) = cache.local_path_for_url(url) {
-          trie.insert(path);
-        } else {
-          panic!("should not happen")
+        match cache.local_path_for_url(url) {
+          Ok(Some(path)) => {
+            trie.insert(path);
+          }
+          Ok(None) => {}
+          Err(err) => {
+            log::warn!("failed to get local path for url {}: {}", url, err);
+          }
         }
       }
     }
@@ -410,20 +420,24 @@ fn add_jsr_meta_paths(
   graph: &ModuleGraph,
   path_trie: &mut PathTrie,
   jsr_url: &Url,
-  url_to_path: &dyn Fn(&Url) -> Result<PathBuf, AnyError>,
+  url_to_path: &dyn Fn(&Url) -> Result<Option<PathBuf>, AnyError>,
 ) -> Result<(), AnyError> {
   for package in graph.packages.mappings().values() {
     let Ok(base_url) = jsr_url.join(&format!("{}/", &package.name)) else {
       continue;
     };
     let keep = url_to_path(&base_url.join("meta.json").unwrap())?;
-    path_trie.insert(keep);
+    if let Some(keep) = keep {
+      path_trie.insert(keep);
+    }
     let keep = url_to_path(
       &base_url
         .join(&format!("{}_meta.json", package.version))
         .unwrap(),
     )?;
-    path_trie.insert(keep);
+    if let Some(keep) = keep {
+      path_trie.insert(keep);
+    }
   }
   Ok(())
 }