helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Update Turbopack development test manifest

This auto-generated PR updates the development integration test manifest used when testing Turbopack.

Changed files:
filename: test/turbopack-dev-tests-manifest.json
patch: @@ -1151,7 +1151,7 @@
     "flakey": [],
     "runtimeError": false
   },
-  "packages/next/src/server/lib/incremental-cache/shared-cache-controls.test.ts": {
+  "packages/next/src/server/lib/incremental-cache/shared-cache-controls.external.test.ts": {
     "passed": [
       "SharedCacheControls should clear the in-memory cache",
       "SharedCacheControls should get cache control from in-memory cache",
@@ -8583,6 +8583,16 @@
     "flakey": [],
     "runtimeError": false
   },
+  "test/e2e/app-dir/rsc-redirect/rsc-redirect.test.ts": {
+    "passed": [
+      "rsc-redirect should get 200 status code for rsc request",
+      "rsc-redirect should get 307 status code for document request"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
   "test/e2e/app-dir/rsc-webpack-loader/rsc-webpack-loader.test.ts": {
     "passed": [],
     "failed": [],
@@ -13431,6 +13441,7 @@
       "Config Experimental Warning should not show warning with default config from function",
       "Config Experimental Warning should not show warning with default value",
       "Config Experimental Warning should show the configured value for numerical features",
+      "Config Experimental Warning should show the configured value for string features",
       "Config Experimental Warning should show warning with a symbol indicating that a default `true` value is set to `false`",
       "Config Experimental Warning should show warning with config from function with experimental",
       "Config Experimental Warning should show warning with config from object with experimental",
Repository: ggml-org/llama.cpp
Pull request: llava : fix typo in error message [no ci]


- [x] I have read the [contributing guidelines](https://github.com/ggerganov/llama.cpp/blob/master/CONTRIBUTING.md)
- Self-reported review complexity:
  - [x] Low
  - [ ] Medium
  - [ ] High


Changed files:
filename: examples/llava/llava.cpp
patch: @@ -432,7 +432,7 @@ struct llava_image_embed * llava_image_embed_make_with_bytes(struct clip_ctx * c
     bool image_embed_result = llava_image_embed_make_with_clip_img(ctx_clip, n_threads, img, &image_embed, &n_image_pos);
     if (!image_embed_result) {
         clip_image_u8_free(img);
-        LOG_ERR("%s: coulnd't embed the image\n", __func__);
+        LOG_ERR("%s: couldn't embed the image\n", __func__);
         return NULL;
     }
Repository: electron/electron
Pull request: fix: build failure when PDF viewer is disabled

#### Description of Change

Fix a FTBFS when the PDF viewer is enabled.

This was introduced by #44843 but it's kind of a good thing? This function has always been unused when the PDF viewer is disabled; but thanks to 44843, the compiler now has enough information to warn us about it & error out.

#### Checklist

- [x] PR description included and stakeholders cc'd
- [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: Fixed build failure when the PDF viewer is disabled.

Changed files:
filename: shell/browser/extensions/electron_extension_system.cc
patch: @@ -87,6 +87,7 @@ void ElectronExtensionSystem::InitForRegularProfile(bool extensions_enabled) {
   management_policy_ = std::make_unique<ManagementPolicy>();
 }
 
+#if BUILDFLAG(ENABLE_PDF_VIEWER)
 namespace {
 
 std::unique_ptr<base::Value::Dict> ParseManifest(
@@ -103,10 +104,11 @@ std::unique_ptr<base::Value::Dict> ParseManifest(
 }
 
 }  // namespace
+#endif  // if BUILDFLAG(ENABLE_PDF_VIEWER)
 
 void ElectronExtensionSystem::LoadComponentExtensions() {
-  std::string utf8_error;
 #if BUILDFLAG(ENABLE_PDF_VIEWER)
+  std::string utf8_error;
   std::string pdf_manifest_string = pdf_extension_util::GetManifest();
   std::unique_ptr<base::Value::Dict> pdf_manifest =
       ParseManifest(pdf_manifest_string);
Repository: ggml-org/llama.cpp
Pull request: llava: update surgery script to not remove tensors

This commit updates the surgery script to not remove the tensors from the model file. For this to work the `--skip-unknown` flag is added as an argument to the convert.py script in README.md.

The motivation for this change is that the surgery script currently removes the projector tensors from the model file. If the model was checked out from a repository, the model file will have been updated and have to be checked out again to reset this effect. If this can be avoided I think it would be preferable.

I did not perform this change for BakLLaVA models as I am not sure how that part works.

Changed files:
filename: examples/llava/README.md
patch: @@ -53,7 +53,7 @@ python ./examples/llava/convert-image-encoder-to-gguf.py -m ../clip-vit-large-pa
 5. Use `convert.py` to convert the LLaMA part of LLaVA to GGUF:
 
 ```sh
-python ./convert.py ../llava-v1.5-7b
+python ./convert.py ../llava-v1.5-7b --skip-unknown
 ```
 
 Now both the LLaMA part and the image encoder is in the `llava-v1.5-7b` directory.

filename: examples/llava/llava-surgery.py
patch: @@ -19,10 +19,6 @@
 projector = {name: checkpoint[name].float() for name in mm_tensors}
 torch.save(projector, f"{args.model}/llava.projector")
 
-# remove these tensors from the checkpoint and save it again
-for name in mm_tensors:
-    del checkpoint[name]
-
 # BakLLaVA models contain CLIP tensors in it
 clip_tensors = [k for k, v in checkpoint.items() if k.startswith("model.vision_tower")]
 if len(clip_tensors) > 0:
@@ -39,7 +35,7 @@
             f.write("{}\n")
 
 
-torch.save(checkpoint, path)
+    torch.save(checkpoint, path)
 
 print("Done!")
 print(f"Now you can convert {args.model} to a regular LLaMA GGUF file.")
Repository: denoland/deno
Pull request: fix(publish): correct coloring in --help

It didn't apply coloring:
![Screenshot 2025-02-03 at 01 59 17](https://github.com/user-attachments/assets/b275cd56-930c-43e2-b29f-a706f4f79322)


Changed files:
filename: cli/args/flags.rs
patch: @@ -3358,8 +3358,8 @@ fn publish_subcommand() -> Command {
         .arg(
           Arg::new("set-version")
             .long("set-version")
-            .help("Set version for a package to be published.
-  <p(245)>This flag can be used while publishing individual packages and cannot be used in a workspace.</>")
+            .help(cstr!("Set version for a package to be published.
+  <p(245)>This flag can be used while publishing individual packages and cannot be used in a workspace.</>"))
             .value_name("VERSION")
             .help_heading(PUBLISH_HEADING)
         )
Repository: vercel/next.js
Pull request: [devtools] set up panel ui tab infra

This is the "router" component for tabs.

Changed files:
filename: packages/next/src/next-devtools/dev-overlay/components/devtools-panel/devtools-panel-tab/devtools-panel-tab.tsx
patch: @@ -0,0 +1,18 @@
+import type { DevToolsPanelTabType } from '../devtools-panel'
+
+export function DevToolsPanelTab({
+  activeTab,
+}: {
+  activeTab: DevToolsPanelTabType
+}) {
+  switch (activeTab) {
+    case 'settings':
+      return <div>Settings</div>
+    case 'route':
+      return <div>Route</div>
+    case 'issues':
+      return <div>Issues</div>
+    default:
+      return null
+  }
+}

filename: packages/next/src/next-devtools/dev-overlay/components/devtools-panel/devtools-panel.tsx
patch: @@ -3,6 +3,7 @@ import type { OverlayDispatch, OverlayState } from '../../shared'
 import { useState } from 'react'
 
 import { DevToolsPanelFooter } from './devtools-panel-footer'
+import { DevToolsPanelTab } from './devtools-panel-tab/devtools-panel-tab'
 import { Dialog, DialogContent, DialogHeader, DialogBody } from '../dialog'
 import { Overlay } from '../overlay/overlay'
 import {
@@ -17,6 +18,8 @@ import { INDICATOR_PADDING } from '../devtools-indicator/devtools-indicator'
 import { FullScreenIcon } from '../../icons/fullscreen'
 import { Cross } from '../../icons/cross'
 
+export type DevToolsPanelTabType = 'issues' | 'route' | 'settings'
+
 export function DevToolsPanel({
   state,
   dispatch,
@@ -115,7 +118,9 @@ export function DevToolsPanel({
                   </div>
                 </div>
               </DialogHeader>
-              <DialogBody></DialogBody>
+              <DialogBody>
+                <DevToolsPanelTab activeTab={activeTab} />
+              </DialogBody>
             </DialogContent>
             <DevToolsPanelFooter versionInfo={state.versionInfo} />
           </Dialog>
Repository: facebook/react
Pull request: Allow Node.js 20 to build

This is stable and appears to build w/o problem. I don't see why we should disallow it.

Changed files:
filename: package.json
patch: @@ -102,7 +102,7 @@
     "yargs": "^15.3.1"
   },
   "devEngines": {
-    "node": "16.x || 18.x || 19.x"
+    "node": "16.x || 18.x || 19.x || 20.x"
   },
   "jest": {
     "testRegex": "/scripts/jest/dont-run-jest-directly\\.js$"
Repository: ggml-org/llama.cpp
Pull request: llama : update llm_build_copy_mask_state comment [no ci]

This commit updates the comment, which seems to contain a typo or be an outdated comment, in the copy_mask_state function changing the variable n_rs to n_kv.

I believe this change is correct and what the comment wants to convey is to copy the states that are not going to be used in the upcoming processing, which are the tokens states from n_seqs up to the number of possible token states n_kv.



- [x] I have read the [contributing guidelines](https://github.com/ggerganov/llama.cpp/blob/master/CONTRIBUTING.md)
- Self-reported review complexity:
  - [x] Low
  - [ ] Medium
  - [ ] High


Changed files:
filename: src/llama.cpp
patch: @@ -9258,7 +9258,7 @@ static struct ggml_tensor * llm_build_copy_mask_state(
     // FIXME: zero-out NANs?
     states = ggml_mul(ctx, states, state_mask);
 
-    // copy states which won't be changed further (between n_seqs and n_rs)
+    // copy states which won't be changed further (between n_seqs and n_kv)
     ggml_build_forward_expand(graph,
         ggml_cpy(ctx,
             ggml_view_1d(ctx, states, n_state*(n_kv - n_seqs), n_seqs*n_state*ggml_element_size(states)),
Repository: denoland/deno
Pull request: fix(ext/node): enforce -RW perms on `node:sqlite`

require RW permission on the database path except when using in-memory mode.

Changed files:
filename: ext/node/ops/sqlite/database.rs
patch: @@ -6,6 +6,8 @@ use std::rc::Rc;
 
 use deno_core::op2;
 use deno_core::GarbageCollected;
+use deno_core::OpState;
+use deno_permissions::PermissionsContainer;
 use serde::Deserialize;
 
 use super::SqliteError;
@@ -41,6 +43,19 @@ pub struct DatabaseSync {
 
 impl GarbageCollected for DatabaseSync {}
 
+fn check_perms(state: &mut OpState, location: &str) -> Result<(), SqliteError> {
+  if location != ":memory:" {
+    state
+      .borrow::<PermissionsContainer>()
+      .check_read_with_api_name(location, Some("node:sqlite"))?;
+    state
+      .borrow::<PermissionsContainer>()
+      .check_write_with_api_name(location, Some("node:sqlite"))?;
+  }
+
+  Ok(())
+}
+
 // Represents a single connection to a SQLite database.
 #[op2]
 impl DatabaseSync {
@@ -53,12 +68,15 @@ impl DatabaseSync {
   #[constructor]
   #[cppgc]
   fn new(
+    state: &mut OpState,
     #[string] location: String,
     #[serde] options: Option<DatabaseSyncOptions>,
   ) -> Result<DatabaseSync, SqliteError> {
     let options = options.unwrap_or_default();
 
     let db = if options.open {
+      check_perms(state, &location)?;
+
       let db = rusqlite::Connection::open(&location)?;
       if options.enable_foreign_key_constraints {
         db.execute("PRAGMA foreign_keys = ON", [])?;
@@ -81,11 +99,12 @@ impl DatabaseSync {
   // via the constructor. An exception is thrown if the database is
   // already opened.
   #[fast]
-  fn open(&self) -> Result<(), SqliteError> {
+  fn open(&self, state: &mut OpState) -> Result<(), SqliteError> {
     if self.conn.borrow().is_some() {
       return Err(SqliteError::AlreadyOpen);
     }
 
+    check_perms(state, &self.location)?;
     let db = rusqlite::Connection::open(&self.location)?;
     if self.options.enable_foreign_key_constraints {
       db.execute("PRAGMA foreign_keys = ON", [])?;

filename: ext/node/ops/sqlite/mod.rs
patch: @@ -4,10 +4,14 @@ mod database;
 mod statement;
 
 pub use database::DatabaseSync;
+use deno_permissions::PermissionCheckError;
 pub use statement::StatementSync;
 
 #[derive(Debug, thiserror::Error, deno_error::JsError)]
 pub enum SqliteError {
+  #[class(inherit)]
+  #[error(transparent)]
+  Permission(#[from] PermissionCheckError),
   #[class(generic)]
   #[error(transparent)]
   SqliteError(#[from] rusqlite::Error),

filename: tests/unit_node/sqlite_test.ts
patch: @@ -91,3 +91,13 @@ Deno.test("[node/sqlite] StatementSync blob are Uint8Array", () => {
   const row = obj[0] as Record<string, Uint8Array>;
   assert(row["cast('test' as blob)"] instanceof Uint8Array);
 });
+
+Deno.test({
+  name: "[node/sqlite] sqlite permissions",
+  permissions: { read: false, write: false },
+  fn() {
+    assertThrows(() => {
+      new DatabaseSync("test.db");
+    }, Deno.errors.NotCapable);
+  },
+});
Repository: huggingface/transformers
Pull request: Fix DTensor import compatibility for PyTorch < 2.5

# What does this PR do?

This PR fixes a compatibility issue related to `DTensor` import introduced in PyTorch 2.5.

Previously, `DTensor` was imported only under the condition:

```python
if _torch_distributed_available and is_torch_greater_or_equal("2.5"):
    from torch.distributed.tensor import DTensor
 ```   
However, this led to a situation where DTensor is not defined at all in PyTorch versions below 2.5. As a result, any later use of:
`isinstance(some_tensor, DTensor)` would raise a NameError, even if the conditional import was skipped. This PR addresses that issue.

### Changes made:
-Added a fallback DTensor = None to ensure the name is always defined.

-Updated downstream code to check if DTensor is not None before using isinstance(..., DTensor).

-Ensures safe and version-compatible handling of DTensor logic across PyTorch versions.
---

Fixes: N/A (no open issue, but addresses latent compatibility bug)

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] 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?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.


Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -172,7 +172,8 @@
 _is_ds_init_called = False
 _torch_distributed_available = torch.distributed.is_available()
 
-if _torch_distributed_available and is_torch_greater_or_equal("2.5"):
+_is_dtensor_available = _torch_distributed_available and is_torch_greater_or_equal("2.5")
+if _is_dtensor_available:
     from torch.distributed.tensor import DTensor
 
 
@@ -3780,7 +3781,7 @@ def save_pretrained(
         for shard_file, tensors in filename_to_tensors:
             shard = {}
             for tensor in tensors:
-                if isinstance(state_dict[tensor], DTensor):
+                if _is_dtensor_available and isinstance(state_dict[tensor], DTensor):
                     full_tensor = state_dict[tensor].full_tensor()
                     # to get the correctly ordered tensor we need to repack if packed
                     if _get_parameter_tp_plan(tensor, self._tp_plan) in ("local_packed_rowwise",):
Repository: electron/electron
Pull request: fix: build failure when PDF viewer is disabled

Backport of #44960

See that PR for details.


Notes: Fixed build failure when the PDF viewer is disabled.

Changed files:
filename: shell/browser/extensions/electron_extension_system.cc
patch: @@ -87,6 +87,7 @@ void ElectronExtensionSystem::InitForRegularProfile(bool extensions_enabled) {
   management_policy_ = std::make_unique<ManagementPolicy>();
 }
 
+#if BUILDFLAG(ENABLE_PDF_VIEWER)
 namespace {
 
 std::unique_ptr<base::Value::Dict> ParseManifest(
@@ -103,10 +104,11 @@ std::unique_ptr<base::Value::Dict> ParseManifest(
 }
 
 }  // namespace
+#endif  // if BUILDFLAG(ENABLE_PDF_VIEWER)
 
 void ElectronExtensionSystem::LoadComponentExtensions() {
-  std::string utf8_error;
 #if BUILDFLAG(ENABLE_PDF_VIEWER)
+  std::string utf8_error;
   std::string pdf_manifest_string = pdf_extension_util::GetManifest();
   std::unique_ptr<base::Value::Dict> pdf_manifest =
       ParseManifest(pdf_manifest_string);
Repository: facebook/react
Pull request: Add error boundary to Flight fixture

Errors in form actions are now rethrown during render (#26689), so we can handle them using an error boundary.

Changed files:
filename: fixtures/flight/src/Button.js
patch: @@ -1,27 +1,30 @@
 'use client';
 
 import * as React from 'react';
+import {flushSync} from 'react-dom';
+import ErrorBoundary from './ErrorBoundary.js';
 
 export default function Button({action, children}) {
   const [isPending, setIsPending] = React.useState(false);
 
   return (
-    <form>
-      <button
-        disabled={isPending}
-        formAction={async () => {
-          setIsPending(true);
-          try {
-            const result = await action();
-            console.log(result);
-          } catch (error) {
-            console.error(error);
-          } finally {
-            setIsPending(false);
-          }
-        }}>
-        {children}
-      </button>
-    </form>
+    <ErrorBoundary>
+      <form>
+        <button
+          disabled={isPending}
+          formAction={async () => {
+            // TODO: Migrate to useFormPending once that exists
+            flushSync(() => setIsPending(true));
+            try {
+              const result = await action();
+              console.log(result);
+            } finally {
+              React.startTransition(() => setIsPending(false));
+            }
+          }}>
+          {children}
+        </button>
+      </form>
+    </ErrorBoundary>
   );
 }

filename: fixtures/flight/src/ErrorBoundary.js
patch: @@ -0,0 +1,16 @@
+'use client';
+
+import * as React from 'react';
+
+export default class ErrorBoundary extends React.Component {
+  state = {error: null};
+  static getDerivedStateFromError(error) {
+    return {error};
+  }
+  render() {
+    if (this.state.error) {
+      return <div>Caught an error: {this.state.error.message}</div>;
+    }
+    return this.props.children;
+  }
+}

filename: fixtures/flight/src/Form.js
patch: @@ -1,25 +1,28 @@
 'use client';
 
 import * as React from 'react';
+import {flushSync} from 'react-dom';
+import ErrorBoundary from './ErrorBoundary.js';
 
 export default function Form({action, children}) {
   const [isPending, setIsPending] = React.useState(false);
 
   return (
-    <form
-      action={async formData => {
-        setIsPending(true);
-        try {
-          const result = await action(formData);
-          alert(result);
-        } catch (error) {
-          console.error(error);
-        } finally {
-          setIsPending(false);
-        }
-      }}>
-      <input name="name" />
-      <button>Say Hi</button>
-    </form>
+    <ErrorBoundary>
+      <form
+        action={async formData => {
+          // TODO: Migrate to useFormPending once that exists
+          flushSync(() => setIsPending(true));
+          try {
+            const result = await action(formData);
+            alert(result);
+          } finally {
+            React.startTransition(() => setIsPending(false));
+          }
+        }}>
+        <input name="name" />
+        <button>Say Hi</button>
+      </form>
+    </ErrorBoundary>
   );
 }
Repository: denoland/deno
Pull request: fix(ext/node): set process.env as own property

Fixes `gcp-metadata@6.1.1`

```
% deno eval "import 'npm:gcp-metadata@6.1.1'" # main
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'GOOGLE_SDK_NODE_LOGGING')
    at Object.log (file:///Users/divy/Library/Caches/deno/npm/registry.npmjs.org/google-logging-utils/0.0.2/build/src/logging-utils.js:356:36)
    at Object.<anonymous> (file:///Users/divy/Library/Caches/deno/npm/registry.npmjs.org/gcp-metadata/6.1.1/build/src/index.js:52:20)
    at Object.<anonymous> (file:///Users/divy/Library/Caches/deno/npm/registry.npmjs.org/gcp-metadata/6.1.1/build/src/index.js:409:4)
    at Module._compile (node:module:745:34)
    at loadMaybeCjs (node:module:770:10)
    at Object.Module._extensions..js (node:module:755:12)
    at Module.load (node:module:662:32)
    at Function.Module._load (node:module:534:12)
    at Module.require (node:module:681:19)
    at require (node:module:812:16)

% target/debug/deno eval "import 'npm:gcp-metadata@6.1.1'" # this PR
```

Changed files:
filename: ext/node/polyfills/process.ts
patch: @@ -780,6 +780,7 @@ const process = new Process();
 
 /* Set owned property */
 process.versions = versions;
+process.env = env;
 
 Object.defineProperty(process, Symbol.toStringTag, {
   enumerable: false,

filename: tests/unit_node/process_test.ts
patch: @@ -390,6 +390,8 @@ Deno.test({
 Deno.test({
   name: "process.env",
   fn() {
+    assert(Object.prototype.hasOwnProperty.call(process, "env"));
+
     Deno.env.set("HELLO", "WORLD");
 
     assertObjectMatch(process.env, Deno.env.toObject());