helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [compiler] Add typing for useContext hook

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30548
* #30547
* __->__ #30546
* #30545
* #30544

In the future, we can use this to identify useContext calls.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts
patch: @@ -10,6 +10,7 @@ import {
   BUILTIN_SHAPES,
   BuiltInArrayId,
   BuiltInUseActionStateId,
+  BuiltInUseContextHookId,
   BuiltInUseEffectHookId,
   BuiltInUseInsertionEffectHookId,
   BuiltInUseLayoutEffectHookId,
@@ -245,15 +246,19 @@ const TYPED_GLOBALS: Array<[string, BuiltInType]> = [
 const REACT_APIS: Array<[string, BuiltInType]> = [
   [
     'useContext',
-    addHook(DEFAULT_SHAPES, {
-      positionalParams: [],
-      restParam: Effect.Read,
-      returnType: {kind: 'Poly'},
-      calleeEffect: Effect.Read,
-      hookKind: 'useContext',
-      returnValueKind: ValueKind.Frozen,
-      returnValueReason: ValueReason.Context,
-    }),
+    addHook(
+      DEFAULT_SHAPES,
+      {
+        positionalParams: [],
+        restParam: Effect.Read,
+        returnType: {kind: 'Poly'},
+        calleeEffect: Effect.Read,
+        hookKind: 'useContext',
+        returnValueKind: ValueKind.Frozen,
+        returnValueReason: ValueReason.Context,
+      },
+      BuiltInUseContextHookId,
+    ),
   ],
   [
     'useState',

filename: compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts
patch: @@ -1599,6 +1599,12 @@ export function isUseInsertionEffectHookType(id: Identifier): boolean {
   );
 }
 
+export function isUseContextHookType(id: Identifier): boolean {
+  return (
+    id.type.kind === 'Function' && id.type.shapeId === 'BuiltInUseContextHook'
+  );
+}
+
 export function getHookKind(env: Environment, id: Identifier): HookKind | null {
   return getHookKindForType(env, id.type);
 }

filename: compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts
patch: @@ -208,6 +208,7 @@ export const BuiltInUseInsertionEffectHookId = 'BuiltInUseInsertionEffectHook';
 export const BuiltInUseOperatorId = 'BuiltInUseOperator';
 export const BuiltInUseReducerId = 'BuiltInUseReducer';
 export const BuiltInDispatchId = 'BuiltInDispatch';
+export const BuiltInUseContextHookId = 'BuiltInUseContextHook';
 
 // ShapeRegistry with default definitions for built-ins.
 export const BUILTIN_SHAPES: ShapeRegistry = new Map();
Repository: ggml-org/llama.cpp
Pull request: model-conversion : add trust_remote_code for orig model run [no ci]

This commit add the trust_remote_code=True argument when loading models using AutoConfig, AutoTokenizer, and AutoModelForCausalLM for the run original model script.

The motivation for this is that some models require custom code to be loaded properly, and setting trust_remote_code=True avoids a prompt asking for user confirmation:
```console
(venv) $ make causal-run-original-model
The repository /path/to/model contains custom code which must be
executed to correctly load the model. You can inspect the repository
content at /path/to/model.

Do you wish to run the custom code? [y/N] N
```

Having this as the default seems like a safe choice as we have to clone or download the models we convert and would be expecting to run any custom code they have.


Changed files:
filename: examples/model-conversion/scripts/causal/run-org-model.py
patch: @@ -138,7 +138,7 @@ def fn(_m, input, output):
         "Model path must be specified either via --model-path argument or MODEL_PATH environment variable"
     )
 
-config = AutoConfig.from_pretrained(model_path)
+config = AutoConfig.from_pretrained(model_path, trust_remote_code=True)
 
 print("Model type:       ", config.model_type)
 print("Vocab size:       ", config.vocab_size)
@@ -148,8 +148,8 @@ def fn(_m, input, output):
 print("EOS token id:     ", config.eos_token_id)
 
 print("Loading model and tokenizer using AutoTokenizer:", model_path)
-tokenizer = AutoTokenizer.from_pretrained(model_path)
-config = AutoConfig.from_pretrained(model_path)
+tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
+config = AutoConfig.from_pretrained(model_path, trust_remote_code=True)
 
 if unreleased_model_name:
     model_name_lower = unreleased_model_name.lower()
@@ -171,7 +171,7 @@ def fn(_m, input, output):
         exit(1)
 else:
     model = AutoModelForCausalLM.from_pretrained(
-        model_path, device_map="auto", offload_folder="offload"
+        model_path, device_map="auto", offload_folder="offload", trust_remote_code=True
     )
 
 for name, module in model.named_modules():
Repository: ollama/ollama
Pull request: types/model: remove (*Digest).Scan and Digest.Value


Changed files:
filename: types/model/digest.go
patch: @@ -1,10 +1,6 @@
 package model
 
 import (
-	"database/sql"
-	"database/sql/driver"
-	"errors"
-	"fmt"
 	"log/slog"
 	"strings"
 	"unicode"
@@ -44,32 +40,9 @@ func (d Digest) LogValue() slog.Value {
 }
 
 var (
-	_ driver.Valuer  = Digest{}
-	_ sql.Scanner    = (*Digest)(nil)
 	_ slog.LogValuer = Digest{}
 )
 
-// Scan implements the sql.Scanner interface.
-func (d *Digest) Scan(src any) error {
-	if d.IsValid() {
-		return errors.New("model.Digest: illegal Scan on valid Digest")
-	}
-	switch v := src.(type) {
-	case string:
-		*d = ParseDigest(v)
-		return nil
-	case []byte:
-		*d = ParseDigest(string(v))
-		return nil
-	}
-	return fmt.Errorf("model.Digest: invalid Scan source %T", src)
-}
-
-// Value implements the driver.Valuer interface.
-func (d Digest) Value() (driver.Value, error) {
-	return d.String(), nil
-}
-
 // ParseDigest parses a string in the form of "<digest-type>-<digest>" into a
 // Digest.
 func ParseDigest(s string) Digest {
Repository: facebook/react
Pull request: [compiler] Simplify FunctionExpression node

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30548
* #30547
* #30546
* #30545
* __->__ #30544

Rather than storing the entire babel node, store only the required
information which is the node type.

This will be useful for when we synthesize new functions that don't have
a corresponding babel node.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts
patch: @@ -3270,7 +3270,7 @@ function lowerFunctionToValue(
   return {
     kind: 'FunctionExpression',
     name,
-    expr: expr.node,
+    type: expr.node.type,
     loc: exprLoc,
     loweredFunc,
   };

filename: compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts
patch: @@ -1076,10 +1076,10 @@ export type FunctionExpression = {
   kind: 'FunctionExpression';
   name: string | null;
   loweredFunc: LoweredFunction;
-  expr:
-    | t.ArrowFunctionExpression
-    | t.FunctionExpression
-    | t.FunctionDeclaration;
+  type:
+    | 'ArrowFunctionExpression'
+    | 'FunctionExpression'
+    | 'FunctionDeclaration';
   loc: SourceLocation;
 };
 

filename: compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts
patch: @@ -1997,7 +1997,7 @@ function codegenInstructionValue(
         ),
         reactiveFunction,
       ).unwrap();
-      if (instrValue.expr.type === 'ArrowFunctionExpression') {
+      if (instrValue.type === 'ArrowFunctionExpression') {
         let body: t.BlockStatement | t.Expression = fn.body;
         if (body.body.length === 1 && loweredFunc.directives.length == 0) {
           const stmt = body.body[0]!;
Repository: electron/electron
Pull request: feat: add support for --no-experimental-global-navigator

#### Description of Change

With Node.js v21 starting to support global navigator object, applications that load 3-rd party plugins need to provide a migration timeline for these plugins that relied on the presence of navigator object to detect web environments which would not be the case anymore.

https://github.com/nodejs/node/commit/309c71ae38e0f29fd3d563bfc2766f4aa94eb0ad

#### Release Notes

Notes: add support for `--no-experimental-global-navigator` flag

Changed files:
filename: docs/api/command-line-switches.md
patch: @@ -327,6 +327,10 @@ Set the directory to which all Node.js diagnostic output files are written. Defa
 
 Affects the default output directory of [v8.setHeapSnapshotNearHeapLimit](https://nodejs.org/docs/latest/api/v8.html#v8setheapsnapshotnearheaplimitlimit).
 
+### `--no-experimental-global-navigator`
+
+Disable exposition of [Navigator API][] on the global scope from Node.js.
+
 [app]: app.md
 [append-switch]: command-line.md#commandlineappendswitchswitch-value
 [debugging-main-process]: ../tutorial/debugging-main-process.md
@@ -335,3 +339,4 @@ Affects the default output directory of [v8.setHeapSnapshotNearHeapLimit](https:
 [play-silent-audio]: https://github.com/atom/atom/pull/9485/files
 [ready]: app.md#event-ready
 [severities]: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h?q=logging::LogSeverity&ss=chromium
+[Navigator API]: https://github.com/nodejs/node/blob/main/doc/api/globals.md#navigator

filename: shell/common/node_bindings.cc
patch: @@ -374,6 +374,7 @@ bool IsAllowedOption(const std::string_view option) {
       "--throw-deprecation",
       "--trace-deprecation",
       "--trace-warnings",
+      "--no-experimental-global-navigator",
   });
 
   if (debug_options.contains(option))

filename: spec/api-utility-process-spec.ts
patch: @@ -780,5 +780,33 @@ describe('utilityProcess module', () => {
       expect(stat.size).to.be.greaterThan(0);
       await fs.rm(tmpDir, { recursive: true });
     });
+
+    it('supports --no-experimental-global-navigator flag', async () => {
+      {
+        const child = utilityProcess.fork(path.join(fixturesPath, 'navigator.js'), [], {
+          stdio: 'ignore'
+        });
+        await once(child, 'spawn');
+        const [data] = await once(child, 'message');
+        expect(data).to.be.true();
+        const exit = once(child, 'exit');
+        expect(child.kill()).to.be.true();
+        await exit;
+      }
+      {
+        const child = utilityProcess.fork(path.join(fixturesPath, 'navigator.js'), [], {
+          stdio: 'ignore',
+          execArgv: [
+            '--no-experimental-global-navigator'
+          ]
+        });
+        await once(child, 'spawn');
+        const [data] = await once(child, 'message');
+        expect(data).to.be.false();
+        const exit = once(child, 'exit');
+        expect(child.kill()).to.be.true();
+        await exit;
+      }
+    });
   });
 });

filename: spec/fixtures/api/utility-process/navigator.js
patch: @@ -0,0 +1 @@
+process.parentPort.postMessage(typeof navigator === 'object');
Repository: huggingface/transformers
Pull request: Fix doc

# What does this PR do?



Changed files:
filename: docs/source/ko/internal/generation_utils.md
patch: @@ -252,8 +252,6 @@ generation_output[:2]
 [[autodoc]] SlidingWindowCache
 
 [[autodoc]] EncoderDecoderCache
-    - to_legacy_cache
-    - from_legacy_cache
 
 ## 워터마크 유틸리티 (Watermark Utils) [[transformers.WatermarkDetector]]
Repository: ollama/ollama
Pull request: Fix rocm deps with new subprocess paths

This fixes a regression on main and in 0.1.32-rc1 where the rocm dependency file was missing the libraries.

Changed files:
filename: Dockerfile
patch: @@ -42,7 +42,7 @@ ARG CGO_CFLAGS
 ARG AMDGPU_TARGETS
 RUN OLLAMA_SKIP_CPU_GENERATE=1 sh gen_linux.sh
 RUN mkdir /tmp/scratch && \
-    for dep in $(cat /go/src/github.com/ollama/ollama/llm/llama.cpp/build/linux/x86_64/rocm*/lib/deps.txt) ; do \
+    for dep in $(zcat /go/src/github.com/ollama/ollama/llm/build/linux/x86_64/rocm*/bin/deps.txt.gz) ; do \
         cp ${dep} /tmp/scratch/ || exit 1 ; \
     done && \
     (cd /opt/rocm/lib && tar cf - rocblas/library) | (cd /tmp/scratch/ && tar xf - ) && \
Repository: nodejs/node
Pull request: doc: clarify experimental platform vulnerability policy

## Summary

* Adds a new section to the Node.js threat model specifying that security vulnerabilities affecting only experimental platforms will not be accepted as valid security issues
* Clarifies that problems on experimental platforms will be treated as normal bugs
* Specifies that no CVEs or bug bounty rewards will be issued for experimental platform-specific issues

This change aligns the security policy with the existing tier-based platform support system and provides clear guidance for security researchers and maintainers.

Changed files:
filename: SECURITY.md
patch: @@ -102,6 +102,22 @@ vulnerability in the context of the Node.js threat model. In other
 words, it cannot assume that a trusted element (such as the operating
 system) has been compromised.
 
+### Experimental platforms
+
+Node.js maintains a tier-based support system for operating systems and
+hardware combinations (Tier 1, Tier 2, and Experimental). For platforms
+classified as "Experimental" in the [supported platforms](BUILDING.md#supported-platforms)
+documentation:
+
+* Security vulnerabilities that only affect experimental platforms will **not** be accepted as valid security issues.
+* Any issues on experimental platforms will be treated as normal bugs.
+* No CVEs will be issued for issues that only affect experimental platforms
+* Bug bounty rewards are not available for experimental platform-specific issues
+
+This policy recognizes that experimental platforms may not compile, may not
+pass the test suite, and do not have the same level of testing and support
+infrastructure as Tier 1 and Tier 2 platforms.
+
 Being able to cause the following through control of the elements that Node.js
 does not trust is considered a vulnerability:
Repository: vercel/next.js
Pull request: Turbopack: Use strongly consistent reads in `random_change` unit test

I can't reproduce it locally, but I've noticed this test flake a few times in CI. Use strongly consistent reads to hopefully fix that.

Closes PACK-5622

Changed files:
filename: turbopack/crates/turbo-tasks-backend/tests/random_change.rs
patch: @@ -3,24 +3,30 @@
 #![allow(clippy::needless_return)] // tokio macro-generated code doesn't respect this
 
 use anyhow::{Result, bail};
-use rand::Rng;
-use turbo_tasks::{State, Vc};
+use rand::{Rng, SeedableRng, rngs::StdRng};
+use turbo_tasks::{ResolvedVc, State, Vc};
 use turbo_tasks_testing::{Registration, register, run_once};
 
 static REGISTRATION: Registration = register!();
 
 #[tokio::test(flavor = "multi_thread", worker_threads = 2)]
 async fn random_change() {
     run_once(&REGISTRATION, || async {
-        let state = make_state();
-        let value = rand::rng().random_range(0..100);
-        state.await?.state.set(value);
+        let state = make_state_operation().resolve_strongly_consistent().await?;
 
-        let result = func(state, 0).await?;
-        assert_eq!(result.value, value);
+        let mut rng = StdRng::from_seed(Default::default());
+        let func_op = func_operation(state);
+        let func2_op = func2_operation(state);
+        for _i in 0..10 {
+            let value = rng.random_range(0..100);
+            state.await?.state.set(value);
 
-        let result = func2(state).await?;
-        assert_eq!(result.value, value);
+            let result = func_op.read_strongly_consistent().await?;
+            assert_eq!(result.value, value);
+
+            let result = func2_op.read_strongly_consistent().await?;
+            assert_eq!(result.value, value);
+        }
 
         anyhow::Ok(())
     })
@@ -40,20 +46,25 @@ struct ValueContainer {
     state: State<i32>,
 }
 
-#[turbo_tasks::function]
-fn make_state() -> Vc<ValueContainer> {
+#[turbo_tasks::function(operation)]
+fn make_state_operation() -> Vc<ValueContainer> {
     ValueContainer {
         state: State::new(0),
     }
     .cell()
 }
 
-#[turbo_tasks::function]
-async fn func2(input: Vc<ValueContainer>) -> Result<Vc<Value>> {
+#[turbo_tasks::function(operation)]
+async fn func2_operation(input: ResolvedVc<ValueContainer>) -> Result<Vc<Value>> {
     let state = input.await?;
     let value = state.state.get();
     println!("func2 {}", *value);
-    Ok(func(input, -*value))
+    Ok(func(*input, -*value))
+}
+
+#[turbo_tasks::function(operation)]
+async fn func_operation(input: ResolvedVc<ValueContainer>) -> Vc<Value> {
+    func(*input, 0)
 }
 
 #[turbo_tasks::function]
Repository: denoland/deno
Pull request: test: add regression test for catching error in require(esm)

Another test case for https://github.com/denoland/deno/issues/32279

Changed files:
filename: tests/specs/run/npm_pkg_requires_esm_js/__test__.jsonc
patch: @@ -1,5 +1,14 @@
 {
-  "args": "run -A main.js",
-  "output": "output.out",
-  "exitCode": 1
+  "tests": {
+    "esm_file_loaded_via_require": {
+      "args": "run -A main.js",
+      "output": "output.out",
+      "exitCode": 1
+    },
+    "require_throwing_esm_caught": {
+      "args": "run -A catch_throwing_esm.cjs",
+      "output": "catch_throwing_esm.out",
+      "exitCode": 0
+    }
+  }
 }

filename: tests/specs/run/npm_pkg_requires_esm_js/catch_throwing_esm.cjs
patch: @@ -0,0 +1,22 @@
+"use strict";
+const assert = require("node:assert");
+
+// Test 1: require of ESM that throws a simple error can be caught
+let caught = false;
+try {
+  require("./throw.mjs");
+} catch (e) {
+  caught = true;
+  assert.ok(e.message.includes("STOP"), "error message should contain STOP");
+} finally {
+  assert.ok(caught, "require of throwing ESM should have been caught");
+}
+
+// Test 2: require of ESM that throws a global error can be caught
+globalThis.err = new Error("top-level error");
+assert.throws(
+  () => require("./throw_global.mjs"),
+  (e) => e.message.includes("top-level error"),
+);
+
+console.log("caught require of throwing esm");

filename: tests/specs/run/npm_pkg_requires_esm_js/catch_throwing_esm.out
patch: @@ -0,0 +1 @@
+caught require of throwing esm

filename: tests/specs/run/npm_pkg_requires_esm_js/throw.mjs
patch: @@ -0,0 +1 @@
+throw new Error("STOP");

filename: tests/specs/run/npm_pkg_requires_esm_js/throw_global.mjs
patch: @@ -0,0 +1 @@
+throw globalThis.err;
Repository: facebook/react
Pull request: [compiler] Validate against setState in useMemo

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #30552

Developers sometimes use `useMemo()` as a way to conditionally execute code, including conditionally calling setState. However, the compiler may remove existing useMemo calls if they are not necessary, which _should_ always be a safe optimization. If the useMemo has side effects (eg sets state), then this isn't safe.

This PR improves ValidateNoSetStateInRender to disallow any setState in useMemo (even if it's conditional), expanding on the previous check for unconditional setState in render. Note that the approach uses the StartMemoize/FinishMemoize instructions added in DropManualMemo to know whether a particular setState call is within a useMemo or not. This means enabling the validation in DropManualMemo when the setState validation is enabled, but that's fine since that validation is on everywhere by default (_except_ for in fixtures, which we have a todo for)

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-setState-in-useMemo-indirect-useCallback.expect.md
patch: @@ -0,0 +1,38 @@
+
+## Input
+
+```javascript
+import {useCallback} from 'react';
+
+function useKeyedState({key, init}) {
+  const [prevKey, setPrevKey] = useState(key);
+  const [state, setState] = useState(init);
+
+  const fn = useCallback(() => {
+    setPrevKey(key);
+    setState(init);
+  });
+
+  useMemo(() => {
+    fn();
+  }, [key, init]);
+
+  return state;
+}
+
+```
+
+
+## Error
+
+```
+  11 |
+  12 |   useMemo(() => {
+> 13 |     fn();
+     |     ^^ InvalidReact: Calling setState from useMemo may trigger an infinite loop. (https://react.dev/reference/react/useState) (13:13)
+  14 |   }, [key, init]);
+  15 |
+  16 |   return state;
+```
+          
+      
\ No newline at end of file

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-setState-in-useMemo-indirect-useCallback.js
patch: @@ -0,0 +1,17 @@
+import {useCallback} from 'react';
+
+function useKeyedState({key, init}) {
+  const [prevKey, setPrevKey] = useState(key);
+  const [state, setState] = useState(init);
+
+  const fn = useCallback(() => {
+    setPrevKey(key);
+    setState(init);
+  });
+
+  useMemo(() => {
+    fn();
+  }, [key, init]);
+
+  return state;
+}
Repository: ollama/ollama
Pull request: mixtral mem


Changed files:
filename: llm/ggml.go
patch: @@ -330,6 +330,8 @@ func (llm GGML) GraphSize(context, batch uint64) (partialOffload, fullOffload ui
 	headsKV := llm.KV().HeadCountKV()
 	vocab := uint64(len(llm.KV()["tokenizer.ggml.tokens"].([]any)))
 
+	layers := llm.Tensors().Layers()
+
 	switch llm.KV().Architecture() {
 	case "llama":
 		fullOffload = 4 * batch * (1 + 4*embedding + context*(1+heads))
@@ -339,6 +341,15 @@ func (llm GGML) GraphSize(context, batch uint64) (partialOffload, fullOffload ui
 			4*batch*(1+embedding+max(context, embedding))+embedding*embedding*9/16+4*context*(batch*heads+embedding/heads*headsKV),
 			4*batch*(embedding+vocab)+embedding*vocab*105/128,
 		)
+
+		if ffnGateWeight, ok := layers["0"]["ffn_gate.0.weight"]; ok {
+			ffnGateWeight1 := ffnGateWeight.Shape[1]
+			fullOffload = 4 * batch * (2 + 3*embedding + context*(1+heads) + 2*headsKV + ffnGateWeight1)
+			partialOffload = max(
+				4*batch*(3+embedding/heads*headsKV+embedding+context*(1+heads)+ffnGateWeight1)+(embedding*embedding+3*embedding*headsKV*ffnGateWeight1)*9/16,
+				4*batch*(1+2*embedding+context*(1+heads))+embedding*(6*context*headsKV/heads+embedding*9/16),
+			)
+		}
 	case "gemma":
 		fullOffload = 4 * batch * (embedding + vocab)
 		partialOffload = 4*batch*(2*embedding+vocab+1) + embedding*vocab*105/128
@@ -350,7 +361,7 @@ func (llm GGML) GraphSize(context, batch uint64) (partialOffload, fullOffload ui
 
 		partialOffload = max(
 			4*batch*(embedding+vocab)+embedding*vocab*105/128,
-			4*batch*(1+2*embedding+context*(1+heads))+ 4*embedding*context+embedding*embedding*9/16,
+			4*batch*(1+2*embedding+context*(1+heads))+4*embedding*context+embedding*embedding*9/16,
 		)
 	case "qwen2":
 		fullOffload = max(
Repository: ggml-org/llama.cpp
Pull request: model-conversion : add token ids to prompt token output [no ci]

This commit adds the token ids to the printed prompt outputs.

The motivation for this is that is can be useful to see the actual token ids alongside the token strings for debugging.


Changed files:
filename: examples/model-conversion/logits.cpp
patch: @@ -144,7 +144,7 @@ int main(int argc, char ** argv) {
             return 1;
         }
         std::string s(buf, n);
-        printf("%s", s.c_str());
+        printf("%s (%d)", s.c_str(), id);
     }
     printf("\n");
Repository: ollama/ollama
Pull request: types/model: remove (*Digest).Scan and Digest.Value


Changed files:
filename: types/model/digest.go
patch: @@ -44,32 +44,9 @@ func (d Digest) LogValue() slog.Value {
 }
 
 var (
-	_ driver.Valuer  = Digest{}
-	_ sql.Scanner    = (*Digest)(nil)
 	_ slog.LogValuer = Digest{}
 )
 
-// Scan implements the sql.Scanner interface.
-func (d *Digest) Scan(src any) error {
-	if d.IsValid() {
-		return errors.New("model.Digest: illegal Scan on valid Digest")
-	}
-	switch v := src.(type) {
-	case string:
-		*d = ParseDigest(v)
-		return nil
-	case []byte:
-		*d = ParseDigest(string(v))
-		return nil
-	}
-	return fmt.Errorf("model.Digest: invalid Scan source %T", src)
-}
-
-// Value implements the driver.Valuer interface.
-func (d Digest) Value() (driver.Value, error) {
-	return d.String(), nil
-}
-
 // ParseDigest parses a string in the form of "<digest-type>-<digest>" into a
 // Digest.
 func ParseDigest(s string) Digest {
Repository: ollama/ollama
Pull request: types/model: remove DisplayLong


Changed files:
filename: types/model/name.go
patch: @@ -259,15 +259,6 @@ func (r Name) DisplayShortest(mask string) string {
 	return r.slice(PartHost, PartTag).String()
 }
 
-// DisplayLong returns the fullest possible display string in form:
-//
-//	<namespace>/<model>:<tag>
-//
-// If any part is missing, it is omitted from the display string.
-func (r Name) DisplayLong() string {
-	return r.slice(PartNamespace, PartTag).String()
-}
-
 var seps = [...]string{
 	PartHost:      "/",
 	PartNamespace: "/",