helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [react-dom] Support `maskType` SVG prop

## Summary

React currently does not recognize the `maskType` prop on SVG elements, causing:
1. The attribute to be rendered as-is (`maskType="luminance"`) rather than the correct `mask-type="luminance"`
2. A React warning: *"React does not recognize the `maskType` prop on a DOM element"*

The SVG `mask-type` attribute is [valid per MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/mask-type) and specifies whether a mask is used as a luminance or alpha mask.

## Changes

- **`getAttributeAlias.js`**: Add `['maskType', 'mask-type']` to the SVG attribute alias map (alphabetically between `markerStart` and `overlinePosition`)
- **`possibleStandardNames.js`**: Add `masktype: 'maskType'` entry so the dev-mode warning correctly suggests the camelCase spelling

## Test

```jsx
// Before: renders as <mask maskType="luminance"> + React warning
// After: renders as <mask mask-type="luminance"> correctly
<svg>
  <mask id="m" maskType="luminance">...</mask>
</svg>
```

Fixes #35920

Changed files:
filename: packages/react-dom-bindings/src/shared/getAttributeAlias.js
patch: @@ -50,6 +50,7 @@ const aliases = new Map([
   ['markerEnd', 'marker-end'],
   ['markerMid', 'marker-mid'],
   ['markerStart', 'marker-start'],
+  ['maskType', 'mask-type'],
   ['overlinePosition', 'overline-position'],
   ['overlineThickness', 'overline-thickness'],
   ['paintOrder', 'paint-order'],

filename: packages/react-dom-bindings/src/shared/possibleStandardNames.js
patch: @@ -314,6 +314,7 @@ const possibleStandardNames = {
   markerwidth: 'markerWidth',
   mask: 'mask',
   maskcontentunits: 'maskContentUnits',
+  masktype: 'maskType',
   maskunits: 'maskUnits',
   mathematical: 'mathematical',
   mode: 'mode',
Repository: vercel/next.js
Pull request: Skip loadBindings() Lightning CSS check during next start

## Summary
Avoid calling `loadBindings()` to check whether the loaded binary supports Lightning CSS during `next start`, as this is unnecessary for production server operation. The check should only occur during the build phase.

- Skips the native binary load during `next start` (production server phase)
- No impact on build, development, or export phases
- Reduces production server startup overhead

## Test plan
- [x] Build and start tests passing
- [x] CI green (except pre-existing flaky cache components test in rerun)

Changed files:
filename: packages/next/src/server/config.ts
patch: @@ -9,7 +9,7 @@ import {
   PHASE_DEVELOPMENT_SERVER,
   PHASE_EXPORT,
   PHASE_PRODUCTION_BUILD,
-  type PHASE_PRODUCTION_SERVER,
+  PHASE_PRODUCTION_SERVER,
   type PHASE_TYPE,
 } from '../shared/lib/constants'
 import { defaultConfig, normalizeConfig } from './config-shared'
@@ -1796,7 +1796,10 @@ export default async function loadConfig(
       )
     }
 
-    if (userConfig.experimental?.useLightningcss) {
+    if (
+      phase !== PHASE_PRODUCTION_SERVER &&
+      userConfig.experimental?.useLightningcss
+    ) {
       const { loadBindings } =
         require('../build/swc') as typeof import('../build/swc')
       const isLightningSupported = (
Repository: nodejs/node
Pull request: tools: allow triagers to queue a PR for CI until it's reviewed

Triagers and PR authors currently have to wait until a PR has gotten an approving review before applying the https://github.com/nodejs/node/labels/request-ci label; this change allows to add the label immediately, and the CI will start once the PR is approved.

Fixes: https://github.com/nodejs/node/issues/62496

<!--
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/workflows/auto-start-ci.yml
patch: @@ -28,13 +28,13 @@ jobs:
       - name: Get Pull Requests
         id: get_prs_for_ci
         run: >
-          numbers=$(gh pr list \
-                  --repo ${{ github.repository }} \
+          echo "numbers=$(gh pr list \
+                  --repo "$GITHUB_REPOSITORY" \
                   --label 'request-ci' \
                   --json 'number' \
+                  --search 'review:approved' \
                   -t '{{ range . }}{{ .number }} {{ end }}' \
-                  --limit 5)
-          echo "numbers=$numbers" >> $GITHUB_OUTPUT
+                  --limit 5)" >> "$GITHUB_OUTPUT"
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
   start-ci:
Repository: facebook/react
Pull request: fix: remove unused variable to fix linter


Changed files:
filename: packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js
patch: @@ -1189,7 +1189,6 @@ describe('ReactFabric', () => {
 
     const ref1 = React.createRef();
     const ref2 = React.createRef();
-    const ref3 = React.createRef();
 
     const explicitTimeStampCamelCase = 'explicit-timestamp-camelcase';
     const explicitTimeStampLowerCase = 'explicit-timestamp-lowercase';
Repository: facebook/react
Pull request: [RN] Expose event as a global variable during dispatch

## Summary

This PR updates the event dispatching logic in React Native to expose the dispatched event in the global scope as done on Web (https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke) and in the new implementation of `EventTarget` in React Native (https://github.com/facebook/react-native/blob/d1b2ddc9cb4f7b4cb795fed197347173ed5c4bfb/packages/react-native/src/private/webapis/dom/events/EventTarget.js#L372).

## How did you test this change?

Added unit tests

Changed files:
filename: packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js
patch: @@ -1099,6 +1099,8 @@ describe('ReactFabric', () => {
               // Check for referential equality
               expect(ref1.current).toBe(event.target);
               expect(ref1.current).toBe(event.currentTarget);
+
+              expect(global.event).toBe(event);
             }}
             onStartShouldSetResponder={() => true}
           />
@@ -1110,6 +1112,8 @@ describe('ReactFabric', () => {
               // Check for referential equality
               expect(ref2.current).toBe(event.target);
               expect(ref2.current).toBe(event.currentTarget);
+
+              expect(global.event).toBe(event);
             }}
             onStartShouldSetResponder={() => true}
           />
@@ -1123,6 +1127,9 @@ describe('ReactFabric', () => {
     const [dispatchEvent] =
       nativeFabricUIManager.registerEventHandler.mock.calls[0];
 
+    const preexistingEvent = {};
+    global.event = preexistingEvent;
+
     dispatchEvent(getViewById('one').instanceHandle, 'topTouchStart', {
       target: getViewById('one').reactTag,
       identifier: 17,
@@ -1150,7 +1157,9 @@ describe('ReactFabric', () => {
       changedTouches: [],
     });
 
-    expect.assertions(6);
+    expect(global.event).toBe(preexistingEvent);
+
+    expect.assertions(9);
   });
 
   it('propagates timeStamps from native events and sets defaults', async () => {

filename: packages/react-native-renderer/src/legacy-events/EventPluginUtils.js
patch: @@ -67,6 +67,9 @@ function validateEventDispatches(event) {
  */
 export function executeDispatch(event, listener, inst) {
   event.currentTarget = getNodeFromInstance(inst);
+  const currentEvent = global.event;
+  global.event = event;
+
   try {
     listener(event);
   } catch (error) {
@@ -77,6 +80,8 @@ export function executeDispatch(event, listener, inst) {
       // TODO: Make sure this error gets logged somehow.
     }
   }
+
+  global.event = currentEvent;
   event.currentTarget = null;
 }
Repository: ollama/ollama
Pull request: cmd/launch: add guards for headless mode

Should have had a couple more guards to make sure that any tui element is guarded on detecting terminal

Changed files:
filename: cmd/cmd.go
patch: @@ -62,6 +62,9 @@ import (
 func init() {
 	// Override default selectors to use Bubbletea TUI instead of raw terminal I/O.
 	launch.DefaultSingleSelector = func(title string, items []launch.ModelItem, current string) (string, error) {
+		if !term.IsTerminal(int(os.Stdin.Fd())) || !term.IsTerminal(int(os.Stdout.Fd())) {
+			return "", fmt.Errorf("model selection requires an interactive terminal; use --model to run in headless mode")
+		}
 		tuiItems := tui.ReorderItems(tui.ConvertItems(items))
 		result, err := tui.SelectSingle(title, tuiItems, current)
 		if errors.Is(err, tui.ErrCancelled) {
@@ -71,6 +74,9 @@ func init() {
 	}
 
 	launch.DefaultMultiSelector = func(title string, items []launch.ModelItem, preChecked []string) ([]string, error) {
+		if !term.IsTerminal(int(os.Stdin.Fd())) || !term.IsTerminal(int(os.Stdout.Fd())) {
+			return nil, fmt.Errorf("model selection requires an interactive terminal; use --model to run in headless mode")
+		}
 		tuiItems := tui.ReorderItems(tui.ConvertItems(items))
 		result, err := tui.SelectMultiple(title, tuiItems, preChecked)
 		if errors.Is(err, tui.ErrCancelled) {

filename: cmd/launch/models.go
patch: @@ -199,7 +199,7 @@ func showOrPullWithPolicy(ctx context.Context, client *api.Client, model string,
 	case missingModelAutoPull:
 		return pullMissingModel(ctx, client, model)
 	case missingModelFail:
-		return fmt.Errorf("model %q not found; run 'ollama pull %s' first", model, model)
+		return fmt.Errorf("model %q not found; run 'ollama pull %s' first, or use --yes to auto-pull", model, model)
 	default:
 		return confirmAndPull(ctx, client, model)
 	}
Repository: rust-lang/rust
Pull request: Panic/return false on overflow in no_threads read/try_read impl

As per discussion with Mark in rust-lang/rust#153555, it's possible for `no_threads` impl of `RwLock` to trigger a silent overflow on `RwLock::read`/`RwLock::try_read` if we try to acquire more than `isize::MAX` read locks. This PR adds an explicit panic/return false when our read lock counter is at `isize::MAX` for `RwLock::read`/`RwLock::try_read`; the message is similar to that of sys/sync/rwlock/futex.rs [here](https://github.com/rust-lang/rust/blob/fb27476aaf1012f1f6ace6306f9b990e0d989c31/library/std/src/sys/sync/rwlock/futex.rs#L143).

<!-- homu-ignore:start -->
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r? <reviewer name>
-->
<!-- homu-ignore:end -->


Changed files:
filename: library/std/src/sys/sync/rwlock/no_threads.rs
patch: @@ -18,7 +18,7 @@ impl RwLock {
     pub fn read(&self) {
         let m = self.mode.get();
         if m >= 0 {
-            self.mode.set(m + 1);
+            self.mode.set(m.checked_add(1).expect("rwlock overflowed read locks"));
         } else {
             rtabort!("rwlock locked for writing");
         }
@@ -28,6 +28,9 @@ impl RwLock {
     pub fn try_read(&self) -> bool {
         let m = self.mode.get();
         if m >= 0 {
+            if m == isize::MAX {
+                return false;
+            }
             self.mode.set(m + 1);
             true
         } else {
@@ -56,16 +59,19 @@ impl RwLock {
 
     #[inline]
     pub unsafe fn read_unlock(&self) {
-        self.mode.set(self.mode.get() - 1);
+        assert!(
+            self.mode.replace(self.mode.get() - 1) > 0,
+            "rwlock has not been locked for reading"
+        );
     }
 
     #[inline]
     pub unsafe fn write_unlock(&self) {
-        assert_eq!(self.mode.replace(0), -1);
+        assert_eq!(self.mode.replace(0), -1, "rwlock has not been locked for writing");
     }
 
     #[inline]
     pub unsafe fn downgrade(&self) {
-        assert_eq!(self.mode.replace(1), -1);
+        assert_eq!(self.mode.replace(1), -1, "rwlock has not been locked for writing");
     }
 }
Repository: huggingface/transformers
Pull request: Fix stupid test fetcher

# What does this PR do?

Really stupid ...

Currently, change a docstring will count as "modified files", then the impacted files and test files to run are computed.

Say, we add a comment to bert, many files impacted (via dependency) then many test files to run.

This PR avoid this waste.

Changed files:
filename: tests/repo_utils/test_tests_fetcher.py
patch: @@ -39,6 +39,7 @@
     diff_is_docstring_only,
     extract_imports,
     get_all_tests,
+    get_diff,
     get_module_dependencies,
     get_repo_utils_tests,
     get_tree_starting_at,
@@ -313,6 +314,23 @@ def test_diff_is_docstring_only(self):
             commit_changes(bert_file, BERT_MODEL_FILE_NEW_CODE, repo)
             assert not diff_is_docstring_only(repo, branching_point, bert_file)
 
+    def test_get_diff_ignores_docstring_only_changes(self):
+        """Files whose diff is only in docstrings/comments should be excluded from get_diff results."""
+        with tempfile.TemporaryDirectory() as tmp_folder:
+            tmp_folder = Path(tmp_folder)
+            repo = create_tmp_repo(tmp_folder)
+            branching_commit = repo.head.commit
+
+            # Docstring-only change: should NOT appear in diff
+            commit_changes(BERT_MODELING_FILE, BERT_MODEL_FILE_NEW_DOCSTRING, repo)
+            diff = get_diff(repo, repo.head.commit, [branching_commit])
+            assert BERT_MODELING_FILE not in diff
+
+            # Real code change: should appear in diff
+            commit_changes(BERT_MODELING_FILE, BERT_MODEL_FILE_NEW_CODE, repo)
+            diff = get_diff(repo, repo.head.commit, [branching_commit])
+            assert BERT_MODELING_FILE in diff
+
     def test_extract_imports_relative(self):
         with tempfile.TemporaryDirectory() as tmp_folder:
             tmp_folder = Path(tmp_folder)

filename: utils/tests_fetcher.py
patch: @@ -354,7 +354,7 @@ def get_diff(repo: Repo, base_commit: str, commits: list[str]) -> list[str]:
                 # In case of renames, we'll look at the tests using both the old and new name.
                 if diff_obj.a_path != diff_obj.b_path:
                     code_diff.extend([diff_obj.a_path, diff_obj.b_path])
-                else:
+                elif not diff_is_docstring_only(repo, commit, diff_obj.a_path):
                     code_diff.append(diff_obj.a_path)
 
     return code_diff
Repository: electron/electron
Pull request: fix: don't force kFitToPrintableArea scaling when custom margins are set

Backport of #50615

See that PR for details.


Notes: Fixed an issue where margins did not look as expected when printing in silent mode.

Changed files:
filename: patches/chromium/printing.patch
patch: @@ -675,7 +675,7 @@ index ac2f719be566020d9f41364560c12e6d6d0fe3d8..16d758a6936f66148a196761cfb875f6
    PrintingFailed(int32 cookie, PrintFailureReason reason);
  
 diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
-index 60b5e83a8bc1ed07970be4cdfdc19962698bd754..1320f3b10b07b2cee90f39f406604176c7575796 100644
+index 60b5e83a8bc1ed07970be4cdfdc19962698bd754..dd83b6cfb6e3f916e60f50402014cd931a4d8850 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
 @@ -54,6 +54,7 @@
@@ -799,7 +799,7 @@ index 60b5e83a8bc1ed07970be4cdfdc19962698bd754..1320f3b10b07b2cee90f39f406604176
      // Check if `this` is still valid.
      if (!self)
        return;
-@@ -2394,29 +2415,43 @@ void PrintRenderFrameHelper::IPCProcessed() {
+@@ -2394,29 +2415,47 @@ void PrintRenderFrameHelper::IPCProcessed() {
  }
  
  bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame,
@@ -835,8 +835,12 @@ index 60b5e83a8bc1ed07970be4cdfdc19962698bd754..1320f3b10b07b2cee90f39f406604176
 -                      : mojom::PrintScalingOption::kSourceSize;
 -  RecordDebugEvent(settings.params->printed_doc_type ==
 +  bool silent = new_settings.FindBool("silent").value_or(false);
-+  if (silent) {
-+    settings->params->print_scaling_option = mojom::PrintScalingOption::kFitToPrintableArea;
++  int margins_type = new_settings.FindInt(kSettingMarginsType)
++      .value_or(static_cast<int>(mojom::MarginType::kDefaultMargins));
++  if (silent &&
++      margins_type == static_cast<int>(mojom::MarginType::kDefaultMargins)) {
++    settings->params->print_scaling_option =
++        mojom::PrintScalingOption::kFitToPrintableArea;
 +  } else {
 +    settings->params->print_scaling_option =
 +        center_on_paper ? mojom::PrintScalingOption::kCenterShrinkToFitPaper
Repository: vercel/next.js
Pull request: [turbopack] Use bail! instead of panic! for duplicate module ident error

### What?

In `turbopack/crates/turbopack-core/src/module_graph/mod.rs`, the `#[cfg(debug_assertions)]` duplicate module ident detection block inside `SingleModuleGraph::new_inner` called `panic!` when duplicates were found.

### Why?

`panic!` terminates the process hard, bypassing the normal error-handling chain. The enclosing function `new_inner` already returns `anyhow::Result<Vc<Self>>`, and `bail!` is already imported and used elsewhere in the same file. Using `bail!` converts this into a propagatable error, consistent with the rest of the error-handling idioms in the module.

### How?

Single-line change: replace `panic!(...)` with `bail!(...)` at the duplicate module detection site. No new imports needed — `bail!` was already in scope via `use anyhow::{Context, Result, bail};`.

Changed files:
filename: turbopack/crates/turbopack-core/src/module_graph/mod.rs
patch: @@ -406,7 +406,7 @@ impl SingleModuleGraph {
                     for (key, debug, parents) in duplicate_modules {
                         map.entry(key).or_default().push((debug, parents));
                     }
-                    panic!("Duplicate module idents in graph: {map:#?}",);
+                    bail!("Duplicate module idents in graph: {map:#?}",);
                 }
             }
         }
Repository: nodejs/node
Pull request: tools: do not run `commit-lint` on release proposals

The first commit is almost never related (except for LTS transitions), and we have the `lint-release-proposal` that runs checks on the actual commit to review
<!--
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/workflows/commit-lint.yml
patch: @@ -1,6 +1,10 @@
 name: First commit message adheres to guidelines
 
-on: [pull_request]
+on:
+  pull_request:
+    branches:
+      - main
+      - v[0-9]+.x-staging
 
 env:
   NODE_VERSION: lts/*
Repository: rust-lang/rust
Pull request: ./x run miri: default to edition 2021

Fixes https://github.com/rust-lang/rust/issues/154630

Changed files:
filename: src/bootstrap/src/core/build_steps/run.rs
patch: @@ -180,6 +180,10 @@ impl Step for Miri {
         // Forward arguments. This may contain further arguments to the program
         // after another --, so this must be at the end.
         miri.args(builder.config.args());
+        // Add default edition for Miri tests (2021); defaulting to 2015 is often confusing.
+        if !builder.config.args().iter().any(|arg| arg.starts_with("--edition")) {
+            miri.arg("--edition=2021");
+        }
 
         miri.into_cmd().run(builder);
     }