helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Add maxYieldMs feature flag in Scheduler

Missed this in https://github.com/facebook/react/pull/22105

Changed files:
filename: packages/scheduler/src/SchedulerFeatureFlags.js
patch: @@ -12,3 +12,4 @@ export const enableProfiling = false;
 export const enableIsInputPendingContinuous = false;
 export const frameYieldMs = 5;
 export const continuousYieldMs = 50;
+export const maxYieldMs = 300;

filename: packages/scheduler/src/forks/Scheduler.js
patch: @@ -15,6 +15,7 @@ import {
   enableIsInputPendingContinuous,
   frameYieldMs,
   continuousYieldMs,
+  maxYieldMs,
 } from '../SchedulerFeatureFlags';
 
 import {push, pop, peek} from '../SchedulerMinHeap';
@@ -431,7 +432,7 @@ let taskTimeoutID = -1;
 // need to be frame aligned; for those that do, use requestAnimationFrame.
 let frameInterval = frameYieldMs;
 const continuousInputInterval = continuousYieldMs;
-const maxInterval = 300;
+const maxInterval = maxYieldMs;
 let startTime = -1;
 
 let needsPaint = false;

filename: packages/scheduler/src/forks/SchedulerFeatureFlags.www-dynamic.js
patch: @@ -18,3 +18,4 @@ export const enableProfiling = __VARIANT__;
 export const enableIsInputPendingContinuous = __VARIANT__;
 export const frameYieldMs = 5;
 export const continuousYieldMs = 50;
+export const maxYieldMs = 300;

filename: packages/scheduler/src/forks/SchedulerFeatureFlags.www.js
patch: @@ -16,6 +16,7 @@ export const {
   enableIsInputPendingContinuous,
   frameYieldMs,
   continuousYieldMs,
+  maxYieldMs,
 } = dynamicFeatureFlags;
 
 export const enableProfiling = __PROFILE__ && enableProfilingFeatureFlag;
Repository: denoland/deno
Pull request: fix(lsp): don't discover deno.json in vendor dir

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->


Changed files:
filename: cli/lsp/language_server.rs
patch: @@ -848,7 +848,7 @@ impl Inner {
           // We ignore these directories by default because there is a
           // high likelihood they aren't relevant. Someone can opt-into
           // them by specifying one of them as an enabled path.
-          if matches!(dir_name.as_str(), "node_modules" | ".git") {
+          if matches!(dir_name.as_str(), "vendor" | "node_modules" | ".git") {
             continue;
           }
           // ignore cargo target directories for anyone using Deno with Rust
@@ -3678,6 +3678,9 @@ mod tests {
   #[test]
   fn test_walk_workspace() {
     let temp_dir = TempDir::new();
+    temp_dir.create_dir_all("root1/vendor/");
+    temp_dir.write("root1/vendor/mod.ts", ""); // no, vendor
+
     temp_dir.create_dir_all("root1/node_modules/");
     temp_dir.write("root1/node_modules/mod.ts", ""); // no, node_modules
Repository: facebook/react
Pull request: Add feature flags for scheduler experiments

## Overview

Adds `enableIsInputPendingContinuous` and `schedulerYieldMs`.

Changed files:
filename: packages/scheduler/src/SchedulerFeatureFlags.js
patch: @@ -9,3 +9,6 @@
 export const enableSchedulerDebugging = false;
 export const enableIsInputPending = false;
 export const enableProfiling = false;
+export const enableIsInputPendingContinuous = false;
+export const frameYieldMs = 5;
+export const continuousYieldMs = 50;

filename: packages/scheduler/src/forks/Scheduler.js
patch: @@ -11,6 +11,10 @@
 import {
   enableSchedulerDebugging,
   enableProfiling,
+  enableIsInputPending,
+  enableIsInputPendingContinuous,
+  frameYieldMs,
+  continuousYieldMs,
 } from '../SchedulerFeatureFlags';
 
 import {push, pop, peek} from '../SchedulerMinHeap';
@@ -36,8 +40,6 @@ import {
   startLoggingProfilingEvents,
 } from '../SchedulerProfiling';
 
-import {enableIsInputPending} from '../SchedulerFeatureFlags';
-
 let getCurrentTime;
 const hasPerformanceNow =
   typeof performance === 'object' && typeof performance.now === 'function';
@@ -98,7 +100,7 @@ const isInputPending =
     ? navigator.scheduling.isInputPending.bind(navigator.scheduling)
     : null;
 
-const continuousOptions = {includeContinuous: true};
+const continuousOptions = {includeContinuous: enableIsInputPendingContinuous};
 
 function advanceTimers(currentTime) {
   // Check for tasks that are no longer delayed and add them to the queue.
@@ -427,9 +429,8 @@ let taskTimeoutID = -1;
 // thread, like user events. By default, it yields multiple times per frame.
 // It does not attempt to align with frame boundaries, since most tasks don't
 // need to be frame aligned; for those that do, use requestAnimationFrame.
-// TODO: Make these configurable
-let frameInterval = 5;
-const continuousInputInterval = 50;
+let frameInterval = frameYieldMs;
+const continuousInputInterval = continuousYieldMs;
 const maxInterval = 300;
 let startTime = -1;
 
@@ -506,7 +507,7 @@ function forceFrameRate(fps) {
     frameInterval = Math.floor(1000 / fps);
   } else {
     // reset the framerate
-    frameInterval = 5;
+    frameInterval = frameYieldMs;
   }
 }
 

filename: packages/scheduler/src/forks/SchedulerFeatureFlags.www-dynamic.js
patch: @@ -15,3 +15,6 @@
 export const enableIsInputPending = __VARIANT__;
 export const enableSchedulerDebugging = __VARIANT__;
 export const enableProfiling = __VARIANT__;
+export const enableIsInputPendingContinuous = __VARIANT__;
+export const frameYieldMs = 5;
+export const continuousYieldMs = 50;

filename: packages/scheduler/src/forks/SchedulerFeatureFlags.www.js
patch: @@ -13,6 +13,9 @@ export const {
   enableIsInputPending,
   enableSchedulerDebugging,
   enableProfiling: enableProfilingFeatureFlag,
+  enableIsInputPendingContinuous,
+  frameYieldMs,
+  continuousYieldMs,
 } = dynamicFeatureFlags;
 
 export const enableProfiling = __PROFILE__ && enableProfilingFeatureFlag;
Repository: electron/electron
Pull request: fix: handle failing to enter fullscreen on macOS

Backport of #43112

See that PR for details.


Notes: Fix behavior when entering/exiting fullscreen fails on macOS.

Changed files:
filename: shell/browser/native_window_mac.h
patch: @@ -166,6 +166,7 @@ class NativeWindowMac : public NativeWindow,
   void DetachChildren() override;
 
   void NotifyWindowWillEnterFullScreen();
+  void NotifyWindowDidFailToEnterFullScreen();
   void NotifyWindowWillLeaveFullScreen();
 
   // Cleanup observers when window is getting closed. Note that the destructor

filename: shell/browser/native_window_mac.mm
patch: @@ -1664,6 +1664,13 @@ void ReorderChildWindowAbove(NSWindow* child_window, NSWindow* other_window) {
   UpdateVibrancyRadii(true);
 }
 
+void NativeWindowMac::NotifyWindowDidFailToEnterFullScreen() {
+  UpdateVibrancyRadii(false);
+
+  if (buttons_proxy_)
+    [buttons_proxy_ redraw];
+}
+
 void NativeWindowMac::NotifyWindowWillLeaveFullScreen() {
   if (buttons_proxy_) {
     // Hide window title when leaving fullscreen.

filename: shell/browser/ui/cocoa/electron_ns_window_delegate.mm
patch: @@ -311,6 +311,18 @@ - (void)windowDidEnterFullScreen:(NSNotification*)notification {
   shell_->HandlePendingFullscreenTransitions();
 }
 
+- (void)windowDidFailToEnterFullScreen:(NSWindow*)window {
+  shell_->set_fullscreen_transition_state(FullScreenTransitionState::kNone);
+
+  shell_->SetResizable(is_resizable_);
+  shell_->NotifyWindowDidFailToEnterFullScreen();
+
+  if (shell_->HandleDeferredClose())
+    return;
+
+  shell_->HandlePendingFullscreenTransitions();
+}
+
 - (void)windowWillExitFullScreen:(NSNotification*)notification {
   shell_->set_fullscreen_transition_state(FullScreenTransitionState::kExiting);
Repository: electron/electron
Pull request: fix: handle failing to enter fullscreen on macOS

Backport of #43112

See that PR for details.


Notes: Fix behavior when entering/exiting fullscreen fails on macOS.

Changed files:
filename: shell/browser/native_window_mac.h
patch: @@ -166,6 +166,7 @@ class NativeWindowMac : public NativeWindow,
   void DetachChildren() override;
 
   void NotifyWindowWillEnterFullScreen();
+  void NotifyWindowDidFailToEnterFullScreen();
   void NotifyWindowWillLeaveFullScreen();
 
   // Cleanup observers when window is getting closed. Note that the destructor

filename: shell/browser/native_window_mac.mm
patch: @@ -1665,6 +1665,13 @@ void ReorderChildWindowAbove(NSWindow* child_window, NSWindow* other_window) {
   UpdateVibrancyRadii(true);
 }
 
+void NativeWindowMac::NotifyWindowDidFailToEnterFullScreen() {
+  UpdateVibrancyRadii(false);
+
+  if (buttons_proxy_)
+    [buttons_proxy_ redraw];
+}
+
 void NativeWindowMac::NotifyWindowWillLeaveFullScreen() {
   if (buttons_proxy_) {
     // Hide window title when leaving fullscreen.

filename: shell/browser/ui/cocoa/electron_ns_window_delegate.mm
patch: @@ -311,6 +311,18 @@ - (void)windowDidEnterFullScreen:(NSNotification*)notification {
   shell_->HandlePendingFullscreenTransitions();
 }
 
+- (void)windowDidFailToEnterFullScreen:(NSWindow*)window {
+  shell_->set_fullscreen_transition_state(FullScreenTransitionState::kNone);
+
+  shell_->SetResizable(is_resizable_);
+  shell_->NotifyWindowDidFailToEnterFullScreen();
+
+  if (shell_->HandleDeferredClose())
+    return;
+
+  shell_->HandlePendingFullscreenTransitions();
+}
+
 - (void)windowWillExitFullScreen:(NSNotification*)notification {
   shell_->set_fullscreen_transition_state(FullScreenTransitionState::kExiting);
Repository: denoland/deno
Pull request: fix(ext/node): don't encode buffer data as utf8 in node:http2

We previously encoded any data as utf8 which is incorrect. This patch fixes that and allows writing image data to `node:http2` request's body. It will enable @google-cloud/vision package to work on Deno.


Towards https://github.com/denoland/deno/issues/23714

Changed files:
filename: ext/node/polyfills/http2.ts
patch: @@ -933,25 +933,23 @@ export class ClientHttp2Stream extends Duplex {
 
   // TODO(bartlomieju): clean up
   _write(chunk, encoding, callback?: () => void) {
-    debugHttp2(">>> _write", callback);
+    debugHttp2(">>> _write", encoding, callback);
     if (typeof encoding === "function") {
       callback = encoding;
-      encoding = "utf8";
+      encoding = this.#encoding;
     }
     let data;
-    if (typeof encoding === "string") {
+    if (encoding === "utf8") {
       data = ENCODER.encode(chunk);
-    } else {
+    } else if (encoding === "buffer") {
+      this.#encoding = encoding;
       data = chunk.buffer;
     }
 
     this.#requestPromise
       .then(() => {
         debugHttp2(">>> _write", this.#rid, data, encoding, callback);
-        return op_http2_client_send_data(
-          this.#rid,
-          data,
-        );
+        return op_http2_client_send_data(this.#rid, new Uint8Array(data));
       })
       .then(() => {
         callback?.();

filename: tests/unit_node/http2_test.ts
patch: @@ -1,6 +1,9 @@
 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
 
 import * as http2 from "node:http2";
+import { Buffer } from "node:buffer";
+import { readFile } from "node:fs/promises";
+import { join } from "node:path";
 import * as net from "node:net";
 import { assert, assertEquals } from "@std/assert/mod.ts";
 import { curlRequest } from "../unit/test_util.ts";
@@ -164,3 +167,39 @@ Deno.test("[node/http2.createServer()]", {
   // Issue: https://github.com/denoland/deno/issues/22764
   await new Promise<void>((resolve) => server.on("close", resolve));
 });
+
+Deno.test("[node/http2 client] write image buffer on request stream works", async () => {
+  const url = "https://localhost:5545";
+  const client = http2.connect(url);
+  client.on("error", (err) => console.error(err));
+
+  const imagePath = join(import.meta.dirname!, "testdata", "green.jpg");
+  const buffer = await readFile(imagePath);
+  const req = client.request({ ":method": "POST", ":path": "/echo_server" });
+  req.write(buffer, (err) => {
+    if (err) throw err;
+  });
+
+  let receivedData: Buffer;
+  req.on("data", (chunk) => {
+    if (!receivedData) {
+      receivedData = chunk;
+    } else {
+      receivedData = Buffer.concat([receivedData, chunk]);
+    }
+  });
+  req.end();
+
+  const endPromise = Promise.withResolvers<void>();
+  setTimeout(() => {
+    try {
+      client.close();
+    } catch (_) {
+      // pass
+    }
+    endPromise.resolve();
+  }, 2000);
+
+  await endPromise.promise;
+  assertEquals(receivedData!, buffer);
+});
Repository: facebook/react
Pull request: Yarn replace-fork should not silently error

If the Yarn `replace-fork` script fails while running the lint sub-command, catch and report the error. (Previously this error was being swallowed and causing CI to incorrectly report a different problem.)

Relates to #21998, #22151

Changed files:
filename: scripts/merge-fork/replace-fork.js
patch: @@ -22,7 +22,15 @@ async function main() {
   await Promise.all(oldFilenames.map(unforkFile));
 
   // Use ESLint to autofix imports
-  spawnSync('yarn', ['linc', '--fix']);
+  const spawn = spawnSync('yarn', ['linc', '--fix'], {
+    stdio: ['inherit', 'inherit', 'pipe'],
+  });
+  if (spawn.stderr.toString() !== '') {
+    spawnSync('git', ['checkout', '.']);
+
+    console.log(Error(spawn.stderr));
+    process.exitCode = 1;
+  }
 }
 
 async function unforkFile(oldFilename) {
Repository: facebook/react
Pull request: Fix typo in preprocessData.js

Fix typo:

SUSPEND_DURING_UPATE  ->  SUSPEND_DURING_UPDATE


Changed files:
filename: packages/react-devtools-scheduling-profiler/src/import-worker/preprocessData.js
patch: @@ -67,7 +67,7 @@ const WARNING_STRINGS = {
     'A big nested update was scheduled during layout. ' +
     'Nested updates require React to re-render synchronously before the browser can paint. ' +
     'Consider delaying this update by moving it to a passive effect (useEffect).',
-  SUSPEND_DURING_UPATE:
+  SUSPEND_DURING_UPDATE:
     'A component suspended during an update which caused a fallback to be shown. ' +
     "Consider using the Transition API to avoid hiding components after they've been mounted.",
 };
@@ -951,7 +951,7 @@ export default async function preprocessData(
           lane => profilerData.laneToLabelMap.get(lane) === 'Transition',
         )
       ) {
-        suspenseEvent.warning = WARNING_STRINGS.SUSPEND_DURING_UPATE;
+        suspenseEvent.warning = WARNING_STRINGS.SUSPEND_DURING_UPDATE;
       }
     },
   );
Repository: vercel/next.js
Pull request: [dev-overlay] Read `issueCount` from non-async `errors` array

This PR improves how we read the `issueCount` property for the Next.js Dev Indicator. Data for `runtimeErrors` is loaded in batches so the error count also jumps with it, but really we should be able to determine how many errors are going to be displayed _before_ the data loads for all of them.

Before the changes the issue count was very volatile, leading to UI jank as the errors data loads in:


https://github.com/user-attachments/assets/86b99053-303c-46d7-b097-f687fa3b2756


After the changes we still load the errors in batches, but the issue count is stable:


https://github.com/user-attachments/assets/fd9d14ae-6a01-446f-bc3c-66b2f64c9720



Changed files:
filename: packages/next/src/client/components/react-dev-overlay/ui/container/runtime-error/render-error.tsx
patch: @@ -108,7 +108,12 @@ const RenderRuntimeError = ({ children, state, isAppDir }: Props) => {
     }
   }, [nextError, isAppDir])
 
-  const totalErrorCount = runtimeErrors.length
+  const totalErrorCount = errors.filter((err, idx) => {
+    const prev = errors[idx - 1]
+    // Check for duplicates
+    if (idx > 0) return getErrorSignature(prev) !== getErrorSignature(err)
+    return true
+  }).length
 
   return children({ runtimeErrors, totalErrorCount })
 }
Repository: huggingface/transformers
Pull request: Skip FP8 linear tests

# What does this PR do?
Skips FP8 linear tests because FP8 is only supported on gpus with compute cabalitie >=9.0 (they pass locally)



Changed files:
filename: tests/quantization/finegrained_fp8/test_fp8.py
patch: @@ -250,6 +250,10 @@ def test_save_pretrained_offload(self):
 class FP8LinearTest(unittest.TestCase):
     device = "cuda"
 
+    @unittest.skipIf(
+        torch.cuda.is_available() and torch.cuda.get_device_capability()[0] < 9,
+        "Skipping FP8LinearTest because it is not supported on GPU with capability < 9.0",
+    )
     def test_linear_preserves_shape(self):
         """
         Test that FP8Linear preserves shape when in_features == out_features.
@@ -262,6 +266,10 @@ def test_linear_preserves_shape(self):
         x_ = linear(x)
         self.assertEqual(x_.shape, x.shape)
 
+    @unittest.skipIf(
+        torch.cuda.is_available() and torch.cuda.get_device_capability()[0] < 9,
+        "Skipping FP8LinearTest because it is not supported on GPU with capability < 9.0",
+    )
     def test_linear_with_diff_feature_size_preserves_shape(self):
         """
         Test that FP8Linear generates the correct shape when in_features != out_features.
Repository: ggml-org/llama.cpp
Pull request: cmake: fix ccache conflict

If users already set CMAKE_C_COMPILER_LAUNCHER globally, setting it in cmake again will lead to conflict and compile fail.



Changed files:
filename: ggml/src/CMakeLists.txt
patch: @@ -65,7 +65,7 @@ if (GGML_LTO)
     endif()
 endif()
 
-if (GGML_CCACHE)
+if (GGML_CCACHE AND NOT CMAKE_C_COMPILER_LAUNCHER AND NOT CMAKE_CXX_COMPILER_LAUNCHER)
     find_program(GGML_CCACHE_FOUND ccache)
     find_program(GGML_SCCACHE_FOUND sccache)
Repository: huggingface/transformers
Pull request: remove redundant code in trainer

# What does this PR do?

The inti func of wsd scheduler is the same as the other schedulers, we do not need explicitly init it.

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

@muellerzr and @SunMarc 


Changed files:
filename: src/transformers/optimization.py
patch: @@ -582,6 +582,7 @@ def scheduler_hook(param):
     if name == SchedulerType.INVERSE_SQRT:
         return schedule_func(optimizer, num_warmup_steps=num_warmup_steps)
 
+    # wsd scheduler requires either num_training_steps or num_stable_steps
     if name == SchedulerType.WARMUP_STABLE_DECAY:
         return schedule_func(
             optimizer,
Repository: facebook/react
Pull request: DevTools: update error indices when elements are added/removed

## Summary

Closes https://github.com/facebook/react/issues/22143

First commit has the current behavior. Second commit the fix (making it easier to spot the change in behavior).

## Test Plan

- [x] tested behavior in shell
- [x] CI green (failure is unrelated and probably just needs a restart)


Changed files:
filename: packages/react-devtools-shared/src/__tests__/treeContext-test.js
patch: @@ -2119,6 +2119,64 @@ describe('TreeListContext', () => {
       `);
     });
 
+    it('should update correctly when elements are added/removed', () => {
+      const container = document.createElement('div');
+      let errored = false;
+      function ErrorOnce() {
+        if (!errored) {
+          errored = true;
+          console.error('test-only:one-time-error');
+        }
+        return null;
+      }
+      withErrorsOrWarningsIgnored(['test-only:'], () =>
+        utils.act(() =>
+          legacyRender(
+            <React.Fragment>
+              <ErrorOnce key="error" />
+            </React.Fragment>,
+            container,
+          ),
+        ),
+      );
+
+      let renderer;
+      utils.act(() => (renderer = TestRenderer.create(<Contexts />)));
+      expect(state).toMatchInlineSnapshot(`
+        ✕ 1, ⚠ 0
+        [root]
+             <ErrorOnce key="error"> ✕
+      `);
+
+      withErrorsOrWarningsIgnored(['test-only:'], () =>
+        utils.act(() =>
+          legacyRender(
+            <React.Fragment>
+              <Child />
+              <ErrorOnce key="error" />
+            </React.Fragment>,
+            container,
+          ),
+        ),
+      );
+
+      utils.act(() => renderer.update(<Contexts />));
+      expect(state).toMatchInlineSnapshot(`
+        ✕ 1, ⚠ 0
+        [root]
+             <Child>
+             <ErrorOnce key="error"> ✕
+      `);
+
+      selectNextErrorOrWarning();
+      expect(state).toMatchInlineSnapshot(`
+        ✕ 1, ⚠ 0
+        [root]
+             <Child>
+        →    <ErrorOnce key="error"> ✕
+      `);
+    });
+
     it('should update select and auto-expand parts components within hidden parts of the tree', () => {
       const Wrapper = ({children}) => children;
 

filename: packages/react-devtools-shared/src/devtools/store.js
patch: @@ -1187,6 +1187,18 @@ export default class Store extends EventEmitter<{|
       console.groupEnd();
     }
 
+    const indicesOfCachedErrorsOrWarningsAreStale =
+      !haveErrorsOrWarningsChanged &&
+      (addedElementIDs.length > 0 || removedElementIDs.size > 0);
+    if (indicesOfCachedErrorsOrWarningsAreStale) {
+      this._cachedErrorAndWarningTuples.forEach(entry => {
+        const index = this.getIndexOfElementID(entry.id);
+        if (index !== null) {
+          entry.index = index;
+        }
+      });
+    }
+
     this.emit('mutated', [addedElementIDs, removedElementIDs]);
   };