helloadhavan/github_issues huggingface dataset:
Repository: rust-lang/rust
Pull request: Add comment to borrow-checker

As requested by @lcnr

r? @lcnr

Changed files:
filename: compiler/rustc_borrowck/src/type_check/mod.rs
patch: @@ -447,6 +447,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
         let tcx = self.infcx.tcx;
 
         for proj in &user_ty.projs {
+            // Necessary for non-trivial patterns whose user-type annotation is an opaque type,
+            // e.g. `let (_a,): Tait = whatever`, see #105897
             if !self.infcx.next_trait_solver()
                 && let ty::Alias(ty::Opaque, ..) = curr_projected_ty.ty.kind()
             {
Repository: electron/electron
Pull request: test: add tests for `navigationHistory.goToIndex()`

Backport of #50607

See that PR for details.


Notes: none.

Changed files:
filename: spec/api-web-contents-spec.ts
patch: @@ -802,6 +802,65 @@ describe('webContents module', () => {
       });
     });
 
+    describe('navigationHistory.goToIndex(index) API', () => {
+      beforeEach(async () => {
+        await w.loadURL(urlPage1);
+        await w.loadURL(urlPage2);
+        await w.loadURL(urlPage3);
+
+        expect(w.webContents.navigationHistory.getActiveIndex()).to.equal(2);
+      });
+
+      it('should be able to go to a valid earlier index', async () => {
+        w.webContents.navigationHistory.goToIndex(0);
+
+        await waitUntil(() => w.webContents.navigationHistory.getActiveIndex() === 0);
+        await waitUntil(() => w.webContents.getTitle() === 'Page 1');
+      });
+
+      it('should be able to go to a valid later index', async () => {
+        w.webContents.navigationHistory.goToIndex(0);
+        await waitUntil(() => w.webContents.navigationHistory.getActiveIndex() === 0);
+        await waitUntil(() => w.webContents.getTitle() === 'Page 1');
+
+        w.webContents.navigationHistory.goToIndex(2);
+
+        await waitUntil(() => w.webContents.navigationHistory.getActiveIndex() === 2);
+        await waitUntil(() => w.webContents.getTitle() === 'Page 3');
+      });
+
+      const expectNoEffect = async (fn: () => void) => {
+        const activeIndex = w.webContents.navigationHistory.getActiveIndex();
+        const title = w.webContents.getTitle();
+        let didStartNavigationCount = 0;
+        let didFinishLoadCount = 0;
+
+        w.webContents.on('did-start-navigation', () => didStartNavigationCount++);
+        w.webContents.on('did-finish-load', () => didFinishLoadCount++);
+
+        fn();
+
+        await setTimeout();
+
+        expect(w.webContents.navigationHistory.getActiveIndex()).to.equal(activeIndex);
+        expect(w.webContents.getTitle()).to.equal(title);
+        expect(didStartNavigationCount).to.equal(0);
+        expect(didFinishLoadCount).to.equal(0);
+      };
+
+      it('should do nothing when given the current active index', async () => {
+        const activeIndex = w.webContents.navigationHistory.getActiveIndex();
+        await expectNoEffect(() => w.webContents.navigationHistory.goToIndex(activeIndex));
+      });
+
+      it('should do nothing when given an invalid index', async () => {
+        await expectNoEffect(() => {
+          w.webContents.navigationHistory.goToIndex(-1);
+          w.webContents.navigationHistory.goToIndex(w.webContents.navigationHistory.length());
+        });
+      });
+    });
+
     describe('navigationHistory.clear API', () => {
       it('should be able clear history', async () => {
         await w.loadURL(urlPage1);
Repository: huggingface/transformers
Pull request: Remove unused TensorFlow env var

# What does this PR do?
Removes TensorFlow's `"TF_CPP_MIN_LOG_LEVEL"` env var. This is no longer needed since TF/Jax are gone.

This `utils/print_env.py` script is being used in CI running tests to print, req useful env vars.

## Code Agent Policy

The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. We are currently bottlenecked by our ability to review and respond to them. As a result, 
**we ask that new users do not submit pure code agent PRs** at this time. 
You may use code agents in drafting or to help you diagnose issues. We'd also ask autonomous "OpenClaw"-like agents
not to open any PRs or issues for the moment.

PRs that appear to be fully agent-written will probably be closed without review, and we may block users who do this
repeatedly or maliciously. 

This is a rapidly-evolving situation that's causing significant shockwaves in the open-source community. As a result, 
this policy is likely to be updated regularly in the near future. For more information, please read [`CONTRIBUTING.md`](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md).

- [x] I confirm that this is not a pure code agent PR.

## 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?
@Rocketknight1 @vasqu

Changed files:
filename: utils/print_env.py
patch: @@ -17,15 +17,12 @@
 
 # this script dumps information about the environment
 
-import os
 import sys
 
 import transformers
 from transformers import is_torch_hpu_available, is_torch_xpu_available
 
 
-os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
-
 print("Python version:", sys.version)
 print("transformers version:", transformers.__version__)
Repository: ollama/ollama
Pull request: mlx: only log load errors when MLX is needed

This suppresses irrelevant/noisy errors in the GGML runner.

Changed files:
filename: x/mlxrunner/mlx/dynamic.go
patch: @@ -16,9 +16,14 @@ import (
 )
 
 var initError error
+var initLoadError string
 
 // CheckInit returns any error that occurred during MLX dynamic library initialization.
+// When initialization failed, detailed load errors are logged to help diagnose the issue.
 func CheckInit() error {
+	if initError != nil && initLoadError != "" {
+		slog.Error(initLoadError)
+	}
 	return initError
 }
 
@@ -44,12 +49,12 @@ func tryLoadFromDir(dir string) bool {
 
 		var handle C.mlx_dynamic_handle
 		if C.mlx_dynamic_load(&handle, cPath) != 0 {
-			slog.Error("Failed to load MLX dynamic library", "path", path)
+			initLoadError = fmt.Sprintf("failed to load MLX dynamic library: path=%s", path)
 			continue
 		}
 
 		if C.mlx_dynamic_load_symbols(handle) != 0 {
-			slog.Error("Failed to load MLX dynamic library symbols", "path", path)
+			initLoadError = fmt.Sprintf("failed to load MLX dynamic library symbols: path=%s", path)
 			C.mlx_dynamic_unload(&handle)
 			continue
 		}
Repository: huggingface/transformers
Pull request: Fix when RoPE params are in kwargs

# What does this PR do?

Fixes https://github.com/huggingface/transformers/issues/45030

After the config validation, all validations are now run after config is initialized. So this config has been wrong from the beginning but we didn't complain

I added a small patch and warning, we will support it in case there are actually valid remote config that still use old-format RoPE. After some time we will start popping it from `kwargs` and assume it is not used by model

Changed files:
filename: src/transformers/configuration_utils.py
patch: @@ -263,6 +263,12 @@ def __post_init__(self, **kwargs):
         # BC for rotary embeddings. We will pop out legacy keys from kwargs and rename to new format
         if hasattr(self, "rope_parameters"):
             kwargs = self.convert_rope_params_to_dict(**kwargs)
+        elif kwargs.get("rope_scaling") and kwargs.get("rope_theta"):
+            logger.warning(
+                f"{self.__class__.__name__} got `key=rope_scaling` in kwargs but hasn't set it as attribute. "
+                "For RoPE standardization you need to set `self.rope_parameters` in model's config. "
+            )
+            kwargs = self.convert_rope_params_to_dict(**kwargs)
 
         # Parameters for sequence generation saved in the config are popped instead of loading them.
         for parameter_name in GenerationConfig._get_default_generation_params().keys():
Repository: huggingface/transformers
Pull request: [`FA`] Fix BC support for a few versions + add deprecation cycle

As per title, see https://github.com/huggingface/transformers/pull/42435#issuecomment-4143234736

Changed files:
filename: src/transformers/utils/__init__.py
patch: @@ -134,6 +134,7 @@
     is_flash_attn_3_available,
     is_flash_attn_4_available,
     is_flash_attn_greater_or_equal,
+    is_flash_attn_greater_or_equal_2_10,
     is_flute_available,
     is_fouroversix_available,
     is_fp_quant_available,

filename: src/transformers/utils/import_utils.py
patch: @@ -25,6 +25,7 @@
 import shutil
 import subprocess
 import sys
+import warnings
 from collections import OrderedDict
 from collections.abc import Callable
 from enum import Enum
@@ -973,6 +974,16 @@ def is_flash_attn_greater_or_equal(library_version: str) -> bool:
         return False
 
 
+@lru_cache
+def is_flash_attn_greater_or_equal_2_10() -> bool:
+    warnings.warn(
+        "`is_flash_attn_greater_or_equal_2_10` is deprecated and will be removed in v5.8. "
+        "Please use `is_flash_attn_greater_or_equal(library_version='2.1.0')` instead if needed.",
+        FutureWarning,
+    )
+    return is_flash_attn_greater_or_equal("2.1.0")
+
+
 @lru_cache
 def is_huggingface_hub_greater_or_equal(library_version: str, accept_dev: bool = False) -> bool:
     is_available, hub_version = _is_package_available("huggingface_hub", return_version=True)
Repository: nodejs/node
Pull request: stream: micro-optimize writable condition


Changed files:
filename: lib/internal/streams/writable.js
patch: @@ -1005,8 +1005,8 @@ ObjectDefineProperties(Writable.prototype, {
       // where the writable side was disabled upon construction.
       // Compat. The user might manually disable writable side through
       // deprecated setter.
-      return !!w && w.writable !== false && !w.errored &&
-        (w[kState] & (kEnding | kEnded | kDestroyed)) === 0;
+      return !!w && w.writable !== false &&
+        (w[kState] & (kEnding | kEnded | kDestroyed | kErrored)) === 0;
     },
     set(val) {
       // Backwards compatible.
Repository: vercel/next.js
Pull request: Turbopack: Use `debug = "line-tables-only"` for dev builds

This defaults to `true`: https://doc.rust-lang.org/cargo/reference/profiles.html#debug

Nobody on the team uses a debugger often enough for this to be worth the time tradeoff: https://kobzol.github.io/rust/rustc/2025/05/20/disable-debuginfo-to-improve-rust-compile-times.html

I'm gathering some rough numbers, and I'll add them to the PR.

After `cargo clean` and one `cargo build -p next-napi-bindings` with each profile (Linux arm64):

```
du -sh target/*
4.0K    target/CACHEDIR.TAG
7.9G    target/debug
14G     target/dev-with-debug
7.5M    target/generated
```

This is nearly half the size.

Due to cargo quirks, the `dev` profile defaults to the `target/debug` directory. Of course, any disk size wins you get are more than offset if you need to use a debugger and end up with an additional profile.

```
hyperfine -w 1 -r 5 -p 'cargo clean' 'cargo build --profile dev-with-debug -p next-napi-bindings' 'cargo build -p next-napi-bindings'
```

![Screenshot 2026-03-18 at 11.46.19 AM.png](https://app.graphite.com/user-attachments/assets/c7117107-7d8f-465f-b7aa-382c3ed222ac.png)

(this is on https://github.com/bgw/benchmark-scripts/, on my M2 Macbook inside of a Linux VM this takes closer to 2m20s)

That's a cold build, the blog post I linked indicated this may be even more significant for incremental builds.

Changed files:
filename: Cargo.toml
patch: @@ -32,6 +32,10 @@ unexpected_cfgs = { level = "warn", check-cfg = [
   'cfg(codspeed)',
 ] }
 
+[profile.dev]
+# https://kobzol.github.io/rust/rustc/2025/05/20/disable-debuginfo-to-improve-rust-compile-times.html
+debug = "line-tables-only"
+
 # This crate is particularly sensitive to compiler optimizations
 [profile.dev.package.turbo-persistence]
 opt-level = 1
@@ -44,6 +48,10 @@ opt-level = 1
 [profile.dev.build-override]
 opt-level = 3
 
+[profile.dev-with-debug]
+inherits = "dev"
+debug = true
+
 [profile.release]
 lto = "thin"
Repository: electron/electron
Pull request: fix: remove menu update debug log

#### Description of Change

Removes a diagnostic log:

```
representedObject is not a WeakPtrToElectronMenuModelAsNSObject
```

This log was introduced alongside a guard in macOS menu refresh. The guard is part of the system's expected behavior, preventing us from processing menu items we don't own. In other words, the guard itself is benign. Keep the guard, remove the log.

Fixes #50389

#### Checklist
- [x] PR description included
- [x] I have built and tested this PR
- [x] `npm test` passes
- [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: Removed "representedObject is not a WeakPtrToElectronMenuModelAsNSObject" logging when interacting with macOS menus.


Changed files:
filename: shell/browser/ui/cocoa/electron_menu_controller.mm
patch: @@ -478,7 +478,6 @@ - (void)applyStateToMenuItem:(NSMenuItem*)item {
 
   if (![represented
           isKindOfClass:[WeakPtrToElectronMenuModelAsNSObject class]]) {
-    NSLog(@"representedObject is not a WeakPtrToElectronMenuModelAsNSObject");
     return;
   }
Repository: ollama/ollama
Pull request: ci: Fix windows build

Instead of relying on sh for wildcard, do it in Go for better windows compatibility.

Changed files:
filename: x/mlxrunner/mlx/generator/main.go
patch: @@ -97,8 +97,18 @@ func main() {
 	qc := tree_sitter.NewQueryCursor()
 	defer qc.Close()
 
-	var funs []Function
+	var files []string
 	for _, arg := range flag.Args() {
+		matches, err := filepath.Glob(arg)
+		if err != nil {
+			fmt.Fprintf(os.Stderr, "Error expanding glob %s: %v\n", arg, err)
+			continue
+		}
+		files = append(files, matches...)
+	}
+
+	var funs []Function
+	for _, arg := range files {
 		bts, err := os.ReadFile(arg)
 		if err != nil {
 			fmt.Fprintf(os.Stderr, "Error reading file %s: %v\n", arg, err)

filename: x/mlxrunner/mlx/mlx.go
patch: @@ -1,6 +1,6 @@
 package mlx
 
-//go:generate sh -c "go run generator/main.go -output=. ./include/mlx/c/*.h"
+//go:generate go run generator/main.go -output=. ./include/mlx/c/*.h
 
 // #cgo CXXFLAGS: -std=c++17
 // #cgo CPPFLAGS: -I${SRCDIR}/include
Repository: rust-lang/rust
Pull request: Fix Vec::const_make_global for 0 capacity and ZST's

fixes https://github.com/rust-lang/rust/issues/153158


Changed files:
filename: library/alloc/src/vec/mod.rs
patch: @@ -898,9 +898,17 @@ impl<T> Vec<T> {
     where
         T: Freeze,
     {
-        unsafe { core::intrinsics::const_make_global(self.as_mut_ptr().cast()) };
-        let me = ManuallyDrop::new(self);
-        unsafe { slice::from_raw_parts(me.as_ptr(), me.len) }
+        // `const_make_global` requires the pointer to point to the beginning of a heap allocation,
+        // which is not the case when `self.capacity()` is 0, or if `T::IS_ZST`,
+        // which is why we instead return a new slice in this case.
+        if self.capacity() == 0 || T::IS_ZST {
+            let me = ManuallyDrop::new(self);
+            unsafe { slice::from_raw_parts(NonNull::<T>::dangling().as_ptr(), me.len) }
+        } else {
+            unsafe { core::intrinsics::const_make_global(self.as_mut_ptr().cast()) };
+            let me = ManuallyDrop::new(self);
+            unsafe { slice::from_raw_parts(me.as_ptr(), me.len) }
+        }
     }
 }
 

filename: library/alloctests/tests/vec.rs
patch: @@ -2764,3 +2764,25 @@ fn const_heap() {
 
     assert_eq!([1, 2, 4, 8, 16, 32], X);
 }
+
+// regression test for issue #153158. `const_make_global` previously assumed `Vec<T>`'s buf
+// always has a heap allocation, which lead to compilation errors.
+#[test]
+fn const_make_global_empty_or_zst_regression() {
+    const EMPTY_SLICE: &'static [i32] = {
+        let empty_vec: Vec<i32> = Vec::new();
+        empty_vec.const_make_global()
+    };
+
+    assert_eq!(EMPTY_SLICE, &[]);
+
+    const ZST_SLICE: &'static [()] = {
+        let mut zst_vec: Vec<()> = Vec::new();
+        zst_vec.push(());
+        zst_vec.push(());
+        zst_vec.push(());
+        zst_vec.const_make_global()
+    };
+
+    assert_eq!(ZST_SLICE, &[(), (), ()]);
+}
Repository: nodejs/node
Pull request: module: doc-deprecate `module.register()`

This PR doc-deprecates `module.register()` in favor of `module.registerHooks()`.

In discussion with @joyeecheung we were thinking of landing this now so it can go out in 25 and 26, and then a runtime deprecation can go out in 26. cc @nodejs/loaders @nodejs/releasers 

The `module.registerHooks` API is nearing stability; at the very least it’s already much more stable than `module.register`, and lacks the [unresolvable issues](https://github.com/nodejs/node/pull/55698) that plagued `module.register`.

Changed files:
filename: doc/api/deprecations.md
patch: @@ -4523,6 +4523,20 @@ Type: Runtime
 Passing a non-extractable [`CryptoKey`][] to [`KeyObject.from()`][] is
 deprecated and will throw an error in a future version.
 
+### DEP0205: `module.register()`
+
+<!-- YAML
+changes:
+  - version: REPLACEME
+    pr-url: https://github.com/nodejs/node/pull/62395
+    description: Documentation-only deprecation.
+-->
+
+Type: Documentation-only
+
+[`module.register()`][] is deprecated. Use [`module.registerHooks()`][]
+instead.
+
 [DEP0142]: #dep0142-repl_builtinlibs
 [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
 [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -4627,6 +4641,8 @@ deprecated and will throw an error in a future version.
 [`message.trailersDistinct`]: http.md#messagetrailersdistinct
 [`message.trailers`]: http.md#messagetrailers
 [`module.createRequire()`]: module.md#modulecreaterequirefilename
+[`module.register()`]: module.md#moduleregisterspecifier-parenturl-options
+[`module.registerHooks()`]: module.md#moduleregisterhooksoptions
 [`os.networkInterfaces()`]: os.md#osnetworkinterfaces
 [`os.tmpdir()`]: os.md#ostmpdir
 [`process.env`]: process.md#processenv

filename: doc/api/module.md
patch: @@ -178,7 +178,12 @@ isBuiltin('wss'); // false
 added:
   - v20.6.0
   - v18.19.0
+deprecated: REPLACEME
 changes:
+  - version: REPLACEME
+    pr-url: https://github.com/nodejs/node/pull/62395
+    description: Documentation-only deprecation (DEP0205). Use
+                 `module.registerHooks()` instead.
   - version:
     - v23.6.1
     - v22.13.1
@@ -193,7 +198,7 @@ changes:
     description: Add support for WHATWG URL instances.
 -->
 
-> Stability: 1.1 - Active development
+> Stability: 0 - Deprecated: Use [`module.registerHooks()`][] instead.
 
 * `specifier` {string|URL} Customization hooks to be registered; this should be
   the same string that would be passed to `import()`, except that if it is

filename: test/doctool/test-doc-api-json.mjs
patch: @@ -159,5 +159,5 @@ for await (const dirent of await fs.opendir(new URL('../../out/doc/api/', import
   assert.partialDeepStrictEqual(allExpectedKeys, findAllKeys(json));
 }
 
-assert.strictEqual(numberOfDeprecatedSections, 44); // Increase this number every time a new API is deprecated.
+assert.strictEqual(numberOfDeprecatedSections, 45); // Increase this number every time a new API is deprecated.
 assert.strictEqual(numberOfRemovedAPIs, 46); // Increase this number every time a section is marked as removed.
Repository: facebook/react
Pull request: [DevTools] Fix alignment of breadcrumbs separator


## Summary

The separator vertical alignment felt slightly off. Now we're aligning separators and items by their baseline which looks more pleasent.

## How did you test this change?

Before:
<img width="546" height="68" alt="CleanShot 2026-02-18 at 10 08 59@2x" src="https://github.com/user-attachments/assets/a85d228c-be8d-40bb-8a0a-dd3333cfec3c" />
After:

<img width="546" height="80" alt="CleanShot 2026-02-18 at 10 09 07@2x" src="https://github.com/user-attachments/assets/0e1a8799-8f4f-4144-aa87-9fdf63460628" />


Changed files:
filename: packages/react-devtools-shared/src/devtools/views/Components/OwnersStack.css
patch: @@ -34,6 +34,7 @@
 
 .OwnerStackFlatListContainer {
   display: inline-flex;
+  align-items: baseline;
 }
 
 .OwnerStackFlatListSeparator {

filename: packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseBreadcrumbs.css
patch: @@ -10,6 +10,7 @@
   display: inline-flex;
   flex-direction: row;
   flex-wrap: nowrap;
+  align-items: baseline;
 }
 
 .SuspenseBreadcrumbsListItem {
Repository: electron/electron
Pull request: fix: remove menu update debug log

Backport of #50608

See that PR for details.


Notes: Removed "representedObject is not a WeakPtrToElectronMenuModelAsNSObject" logging when interacting with macOS menus.


Changed files:
filename: shell/browser/ui/cocoa/electron_menu_controller.mm
patch: @@ -478,7 +478,6 @@ - (void)applyStateToMenuItem:(NSMenuItem*)item {
 
   if (![represented
           isKindOfClass:[WeakPtrToElectronMenuModelAsNSObject class]]) {
-    NSLog(@"representedObject is not a WeakPtrToElectronMenuModelAsNSObject");
     return;
   }
Repository: huggingface/transformers
Pull request: Allow advanced users to override `model_type` in `AutoConfig.from_pretrained`

Some checkpoints, such as https://huggingface.co/omni-research/Tarsier2-Recap-7b, have the wrong `model_type` in their `config.json`.

This PR allows advanced users (vLLM) to pass `model_type` into `AutoConfig.from_pretrained` via `kwargs` to override what's in the `config.json`.

Changed files:
filename: src/transformers/configuration_utils.py
patch: @@ -760,6 +760,15 @@ def _get_config_dict(
         if "model_type" not in config_dict and is_timm_config_dict(config_dict):
             config_dict["model_type"] = "timm_wrapper"
 
+        # Some checkpoints may contain the wrong model_type in the config file.
+        # Allow the user to override it but warn them that it might not work.
+        if "model_type" in kwargs and config_dict["model_type"] != kwargs["model_type"]:
+            logger.warning(
+                f"{configuration_file} has 'model_type={config_dict['model_type']}' but you overrode "
+                f"it with 'model_type={kwargs['model_type']}'. This may lead to unexpected behavior."
+            )
+            config_dict["model_type"] = kwargs["model_type"]
+
         return config_dict, kwargs
 
     @classmethod