helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix: add permission name when accessing a special file errors

fix https://github.com/denoland/deno/issues/25055

Changed files:
filename: ext/fs/lib.rs
patch: @@ -89,9 +89,9 @@ impl FsPermissions for deno_permissions::PermissionsContainer {
     api_name: &str,
   ) -> Result<Cow<'a, Path>, FsError> {
     if resolved {
-      self.check_special_file(path, api_name).map_err(|_| {
-        std::io::Error::from(std::io::ErrorKind::PermissionDenied)
-      })?;
+      self
+        .check_special_file(path, api_name)
+        .map_err(FsError::PermissionDenied)?;
       return Ok(Cow::Borrowed(path));
     }
 

filename: tests/unit/os_test.ts
patch: @@ -3,6 +3,7 @@ import {
   assert,
   assertEquals,
   assertNotEquals,
+  assertStringIncludes,
   assertThrows,
 } from "./test_util.ts";
 
@@ -196,6 +197,37 @@ Deno.test({ permissions: { read: false } }, function execPathPerm() {
   );
 });
 
+Deno.test(async function execPathPerm() {
+  if (Deno.build.os !== "linux") return;
+  // This is hack to bypass a bug in deno test runner,
+  // Currently if you specify {read: true} permission, it will stil pass --allow-all (tests are run with deno test --allow-all) implicitly, so this test won't work
+  // The workaround is to spawn a deno executable with the needed permissions
+  // TODO(#25085): remove this hack when the bug is fixed
+  const cmd = new Deno.Command(Deno.execPath(), {
+    args: ["run", "--allow-read", "-"],
+    stdin: "piped",
+    stderr: "piped",
+  }).spawn();
+  const stdinWriter = cmd.stdin.getWriter();
+  await stdinWriter
+    .write(
+      new TextEncoder().encode('Deno.readTextFileSync("/proc/net/dev")'),
+    );
+  await stdinWriter.close();
+  await cmd.status;
+
+  const stderrReder = cmd.stderr.getReader();
+  const error = await stderrReder
+    .read()
+    .then((r) => new TextDecoder().decode(r.value));
+  await stderrReder.cancel();
+
+  assertStringIncludes(
+    error,
+    `PermissionDenied: Requires all access to "/proc/net/dev", run again with the --allow-all flag`,
+  );
+});
+
 Deno.test(
   { permissions: { sys: ["loadavg"] } },
   function loadavgSuccess() {
Repository: denoland/deno
Pull request: fix(fmt/markdown): regression with pipe in code blocks in tables


Changed files:
filename: .dprint.json
patch: @@ -67,7 +67,7 @@
   "plugins": [
     "https://plugins.dprint.dev/typescript-0.91.6.wasm",
     "https://plugins.dprint.dev/json-0.19.3.wasm",
-    "https://plugins.dprint.dev/markdown-0.17.4.wasm",
+    "https://plugins.dprint.dev/markdown-0.17.5.wasm",
     "https://plugins.dprint.dev/toml-0.6.2.wasm",
     "https://plugins.dprint.dev/exec-0.5.0.json@8d9972eee71fa1590e04873540421f3eda7674d0f1aae3d7c788615e7b7413d0",
     "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.4.0.wasm"

filename: Cargo.lock
patch: @@ -2481,9 +2481,9 @@ dependencies = [
 
 [[package]]
 name = "dprint-plugin-markdown"
-version = "0.17.4"
+version = "0.17.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b2748618896a9206d21762a64a1d57be380f13e3e6774163d42395ca5bdf2f1"
+checksum = "2f1d74e1b3481450e956c35a68e0a5e795796adb13e100d19b6971b9cb531824"
 dependencies = [
  "anyhow",
  "dprint-core",

filename: cli/Cargo.toml
patch: @@ -101,7 +101,7 @@ dissimilar = "=1.0.4"
 dotenvy = "0.15.7"
 dprint-plugin-json = "=0.19.3"
 dprint-plugin-jupyter = "=0.1.3"
-dprint-plugin-markdown = "=0.17.4"
+dprint-plugin-markdown = "=0.17.5"
 dprint-plugin-typescript = "=0.91.6"
 env_logger = "=0.10.0"
 fancy-regex = "=0.10.0"
Repository: vercel/next.js
Pull request: Turbopack: avoid compation on initial write

### What?

As initial build performance is a performance bottleneck for persistent caching we want to delay compaction and don't want to execute it on the first build.

Closes PACK-4472

Changed files:
filename: turbopack/crates/turbo-tasks-backend/src/database/turbo.rs
patch: @@ -89,6 +89,7 @@ impl KeyValueDatabase for TurboKeyValueDatabase {
             batch: self.db.write_batch()?,
             db: &self.db,
             compact_join_handle: &self.compact_join_handle,
+            initial_write: self.db.is_empty(),
         }))
     }
 
@@ -106,6 +107,7 @@ pub struct TurboWriteBatch<'a> {
     batch: turbo_persistence::WriteBatch<WriteBuffer<'static>, 5>,
     db: &'a Arc<TurboPersistence>,
     compact_join_handle: &'a Mutex<Option<JoinHandle<Result<()>>>>,
+    initial_write: bool,
 }
 
 impl<'a> BaseWriteBatch<'a> for TurboWriteBatch<'a> {
@@ -126,10 +128,13 @@ impl<'a> BaseWriteBatch<'a> for TurboWriteBatch<'a> {
         // Commit the write batch
         self.db.commit_write_batch(self.batch)?;
 
-        // Start a new compaction in the background
-        let db = self.db.clone();
-        let handle = spawn(move || db.compact(COMPACT_MAX_COVERAGE, COMPACT_MAX_MERGE_SEQUENCE));
-        self.compact_join_handle.lock().replace(handle);
+        if !self.initial_write {
+            // Start a new compaction in the background
+            let db = self.db.clone();
+            let handle =
+                spawn(move || db.compact(COMPACT_MAX_COVERAGE, COMPACT_MAX_MERGE_SEQUENCE));
+            self.compact_join_handle.lock().replace(handle);
+        }
 
         Ok(())
     }
Repository: ggml-org/llama.cpp
Pull request: sync : ggml


Changed files:
filename: scripts/sync-ggml.last
patch: @@ -1 +1 @@
-b59bddafe278877dfa22a80e53a637513862babb
+9b048bb72b811f50b0c30d9e5c84d6ff9f4bf005
Repository: nodejs/node
Pull request: doc: fix color contrast issue in light mode

Attributes are being highlighted as #f00 on a background of #f2f2f2 in light mode. That's a color contrast of 3.98:1, failing to meet the 4.5:1 requirement of WCAG 2.1 AA. This changes the attribute color to #d00, which has a color contrast of 5.09:1 meeting the 4.5:1 requirement.

By the way, I'm not sure if we document it anywhere, but it would probably be useful to document that we strive for WCAG 2.1 AA compliance (and not AAA compliance which might not even be possible, or some other WCAG version compliance). 

Before:

![image](https://github.com/user-attachments/assets/38923bd7-aa2e-418f-a186-b5263a0eeeca)


After:

![image](https://github.com/user-attachments/assets/ebc7e508-36ec-4ec5-b3ee-e95334f03313)

<!--
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: doc/api_assets/hljs.css
patch: @@ -49,7 +49,7 @@
     color: #808080;
   }
   .hljs-attr {
-    color: #f00;
+    color: #d00;
   }
   .hljs-symbol,
   .hljs-bullet,
Repository: denoland/deno
Pull request: fix(node/tty): fix `tty.WriteStream.hasColor` with different args

The check in `tty.WriteStream.prototype.hasColors()` was incorrect leading to the [`yoctocolors`](https://github.com/sindresorhus/yoctocolors) package not printing any colors.

Fixes https://github.com/denoland/deno/issues/24407

Changed files:
filename: ext/node/polyfills/tty.js
patch: @@ -113,7 +113,10 @@ export class WriteStream extends Socket {
    * @returns {boolean}
    */
   hasColors(count, env) {
-    if (env === undefined && typeof count === "object") {
+    if (
+      env === undefined &&
+      (count === undefined || typeof count === "object" && count !== null)
+    ) {
       env = count;
       count = 16;
     }

filename: tests/unit_node/tty_test.ts
patch: @@ -38,6 +38,10 @@ Deno.test("[node/tty WriteStream.isTTY] returns true when fd is a tty", () => {
 
 Deno.test("[node/tty WriteStream.hasColors] returns true when colors are supported", () => {
   assert(tty.WriteStream.prototype.hasColors() === !Deno.noColor);
+  assert(tty.WriteStream.prototype.hasColors({}) === !Deno.noColor);
+
+  assert(tty.WriteStream.prototype.hasColors(1));
+  assert(tty.WriteStream.prototype.hasColors(1, {}));
 });
 
 Deno.test("[node/tty WriteStream.getColorDepth] returns current terminal color depth", () => {
Repository: facebook/react
Pull request: Remove hacky stream.locked check, declare as byte stream instead

We used to check for stream.locked in pull to see if we've been passed to something that reads yet.

This was a bad hack because it won't actually call pull again if that changes.

The source of this is because the default for "highWaterMark" is 1 on some streams. So it always wants to add one "chunk" (of size 1).

If we leave our high water mark as 0, we won't fill up any buffers unless we're asked for more.

This web API is somewhat odd because it would be way more efficient if it just told us how much the recipient wants instead of calling us once per chunk.

Anyway, I turns out that if we define ourselves as a "bytes" type of stream, the default also happens to be a high water mark of 0 so we can just use that instead.

Changed files:
filename: packages/react-dom/src/server/ReactDOMFizzServerBrowser.js
patch: @@ -43,14 +43,9 @@ function renderToReadableStream(
   return new Promise((resolve, reject) => {
     function onCompleteShell() {
       const stream = new ReadableStream({
+        type: 'bytes',
         pull(controller) {
-          // Pull is called immediately even if the stream is not passed to anything.
-          // That's buffering too early. We want to start buffering once the stream
-          // is actually used by something so we can give it the best result possible
-          // at that point.
-          if (stream.locked) {
-            startFlowing(request, controller);
-          }
+          startFlowing(request, controller);
         },
         cancel(reason) {},
       });

filename: packages/react-server-dom-webpack/src/ReactFlightDOMServerBrowser.js
patch: @@ -31,17 +31,12 @@ function renderToReadableStream(
     options ? options.onError : undefined,
   );
   const stream = new ReadableStream({
+    type: 'bytes',
     start(controller) {
       startWork(request);
     },
     pull(controller) {
-      // Pull is called immediately even if the stream is not passed to anything.
-      // That's buffering too early. We want to start buffering once the stream
-      // is actually used by something so we can give it the best result possible
-      // at that point.
-      if (stream.locked) {
-        startFlowing(request, controller);
-      }
+      startFlowing(request, controller);
     },
     cancel(reason) {},
   });
Repository: nodejs/node
Pull request: build: fix missing fp16 dependency in d8 builds

<!--
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: tools/v8_gypfiles/d8.gyp
patch: @@ -21,6 +21,7 @@
         'v8.gyp:v8_libplatform',
         'v8.gyp:generate_bytecode_builtins_list',
         'v8.gyp:v8_abseil',
+        'v8.gyp:fp16',
       ],
       # Generated source files need this explicitly:
       'include_dirs+': [
Repository: ggml-org/llama.cpp
Pull request: opencl: remove unnecessary assert for `add`

`add` does not require both inputs to be contiguous.


Changed files:
filename: ggml/src/ggml-opencl/ggml-opencl.cpp
patch: @@ -4855,8 +4855,6 @@ bool ggml_cl_compute_forward(ggml_backend_t backend, struct ggml_tensor * tensor
             if (!any_on_device) {
                 return false;
             }
-            GGML_ASSERT(ggml_is_contiguous(src0));
-            GGML_ASSERT(ggml_is_contiguous(src1));
             func = ggml_cl_add;
             break;
         case GGML_OP_MUL:
Repository: denoland/deno
Pull request: fix: correct JSON config schema to show vendor option as stable

This has been considered stable for some time now.

https://docs.deno.com/runtime/manual/basics/vendoring/

Changed files:
filename: cli/schemas/config-file.v1.json
patch: @@ -434,7 +434,7 @@
       "type": "boolean"
     },
     "vendor": {
-      "description": "UNSTABLE: Enables or disables the use of a local vendor folder as a local cache for remote modules and node_modules folder for npm packages. Alternatively, use the `--vendor` flag or override the config via `--vendor=false`. Requires Deno 1.36.1 or later.",
+      "description": "Enables or disables the use of a local vendor folder as a local cache for remote modules and node_modules folder for npm packages. Alternatively, use the `--vendor` flag or override the config via `--vendor=false`. Requires Deno 1.36.1 or later.",
       "type": "boolean"
     },
     "tasks": {
Repository: denoland/deno
Pull request: fix(upgrade): correctly compute latest version based on current release channel

This commit fixes computation of the latest available version
by taking into account which release channel the current
binary is on.

Before this commit, if user was on "RC" channel, calling
`deno upgrade` would not switch back to the "stable"
channel.

Changed files:
filename: cli/tools/upgrade.rs
patch: @@ -543,6 +543,7 @@ pub async fn upgrade(
   Ok(())
 }
 
+#[derive(Debug)]
 enum RequestedVersion {
   Latest(ReleaseChannel),
   SpecificVersion(ReleaseChannel, String),
@@ -662,24 +663,45 @@ async fn find_latest_version_to_upgrade(
       .await?;
 
   let (maybe_newer_latest_version, current_version) = match release_channel {
-    ReleaseChannel::Stable | ReleaseChannel::Rc => {
+    ReleaseChannel::Stable => {
       let current_version = version::DENO_VERSION_INFO.deno;
-      let current_is_most_recent = if version::DENO_VERSION_INFO.release_channel
-        != ReleaseChannel::Canary
-      {
+
+      // If the current binary is not a stable channel, we can skip
+      // computation if we're on a newer release - we're not.
+      if version::DENO_VERSION_INFO.release_channel != ReleaseChannel::Stable {
+        (Some(latest_version_found), current_version)
+      } else {
         let current = Version::parse_standard(current_version).unwrap();
         let latest =
           Version::parse_standard(&latest_version_found.version_or_hash)
             .unwrap();
-        current >= latest
-      } else {
-        false
-      };
+        let current_is_most_recent = current >= latest;
 
-      if !force && current_is_most_recent {
-        (None, current_version)
-      } else {
+        if !force && current_is_most_recent {
+          (None, current_version)
+        } else {
+          (Some(latest_version_found), current_version)
+        }
+      }
+    }
+    ReleaseChannel::Rc => {
+      let current_version = version::DENO_VERSION_INFO.deno;
+
+      // If the current binary is not an rc channel, we can skip
+      // computation if we're on a newer release - we're not.
+      if version::DENO_VERSION_INFO.release_channel != ReleaseChannel::Rc {
         (Some(latest_version_found), current_version)
+      } else {
+        let current = Version::parse_standard(current_version).unwrap();
+        let latest =
+          Version::parse_standard(&latest_version_found.version_or_hash)
+            .unwrap();
+        let current_is_most_recent = current >= latest;
+        if !force && current_is_most_recent {
+          (None, current_version)
+        } else {
+          (Some(latest_version_found), current_version)
+        }
       }
     }
     ReleaseChannel::Canary => {
Repository: ggml-org/llama.cpp
Pull request: clip : cap max image size 1024 for qwen vl model

Fix #13445 #13467

An image of size 2592x1944 equivalents to over 20k tokens, which is an unreasonable amount of computation (equivalent to 41GB of VRAM)

And turns out, the problem is not isolated to llama.cpp, someone already discuss about this using HF implementation: https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct/discussions/10

The solution is to cap image size to maximum 1024x1024, which brings down the max memory usage to 1830M

We maybe able to use less memory with flash attn, but given recent discussion about why it's not enabled by default on text model, I'm not sure what's the risk of adding flash attn to vision support. WDYT @ggerganov ?


Changed files:
filename: tools/mtmd/clip.cpp
patch: @@ -1909,16 +1909,20 @@ struct clip_model_loader {
                     } break;
                 case PROJECTOR_TYPE_QWEN2VL:
                     {
-                        // max image size = sqrt(max_pixels)
-                        // https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct/blob/main/preprocessor_config.json
-                        hparams.image_size = 3584;
+                        // max image size = sqrt(max_pixels) = 3584
+                        // ref: https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct/blob/main/preprocessor_config.json
+                        // however, the model use unreasonable memory past 1024 size, we force it to 1024 otherwise it's unusable
+                        // ref: https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct/discussions/10
+                        hparams.image_size = 1024;
                         hparams.warmup_image_size = hparams.patch_size * 8;
                     } break;
                 case PROJECTOR_TYPE_QWEN25VL:
                     {
                         // max image size = sqrt(max_pixels)
                         // https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct/blob/main/preprocessor_config.json
-                        hparams.image_size = 3584;
+                        // however, the model use unreasonable memory past 1024 size, we force it to 1024 otherwise it's unusable
+                        // ref: https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct/discussions/10
+                        hparams.image_size = 1024;
                         hparams.warmup_image_size = hparams.patch_size * 8;
                         get_u32(KEY_WIN_ATTN_PATTERN, hparams.n_wa_pattern);
                     } break;
Repository: denoland/deno
Pull request: fix: log current version when using deno upgrade

This PR addresses a suggestion in issue #21417

**Changes**
Logged out current version when using deno upgrade.

Changed files:
filename: cli/tools/upgrade.rs
patch: @@ -450,6 +450,8 @@ pub async fn upgrade(
   let requested_version =
     RequestedVersion::from_upgrade_flags(upgrade_flags.clone())?;
 
+  log::info!("Current Deno version: v{}", version::DENO_VERSION_INFO.deno);
+
   let maybe_selected_version_to_upgrade = match &requested_version {
     RequestedVersion::Latest(channel) => {
       find_latest_version_to_upgrade(