helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [Flight] Revert Emit Infinite Promise as a Halted Row (#30746)

This reverts commit 52c9c43735d0d5ebb9cd5e2a47c174cb5a5a1713.

Just kidding. We realized we probably don't want to do the halted row thing after all.

Changed files:
filename: packages/react-client/src/ReactFlightClient.js
patch: @@ -46,6 +46,7 @@ import {
   enableRefAsProp,
   enableFlightReadableStream,
   enableOwnerStacks,
+  enableHalt,
 } from 'shared/ReactFeatureFlags';
 
 import {
@@ -1193,6 +1194,10 @@ function parseModelString(
       }
       case '@': {
         // Promise
+        if (value.length === 2) {
+          // Infinite promise that never resolves.
+          return new Promise(() => {});
+        }
         const id = parseInt(value.slice(2), 16);
         const chunk = getChunk(response, id);
         return chunk;
@@ -2633,8 +2638,10 @@ function processFullStringRow(
     }
     // Fallthrough
     case 35 /* "#" */: {
-      resolveBlocked(response, id);
-      return;
+      if (enableHalt) {
+        resolveBlocked(response, id);
+        return;
+      }
     }
     // Fallthrough
     default: /* """ "{" "[" "t" "f" "n" "0" - "9" */ {

filename: packages/react-client/src/__tests__/ReactFlight-test.js
patch: @@ -3026,7 +3026,6 @@ describe('ReactFlight', () => {
 
     const promise = mockConsoleLog.mock.calls[0][1].promise;
     expect(promise).toBeInstanceOf(Promise);
-    expect(promise.status).toBe('blocked');
 
     expect(ownerStacks).toEqual(['\n    in App (at **)']);
   });

filename: packages/react-server/src/ReactFlightServer.js
patch: @@ -1817,6 +1817,10 @@ function serializeLazyID(id: number): string {
   return '$L' + id.toString(16);
 }
 
+function serializeInfinitePromise(): string {
+  return '$@';
+}
+
 function serializePromiseID(id: number): string {
   return '$@' + id.toString(16);
 }
@@ -3269,10 +3273,7 @@ function renderConsoleValue(
       }
       // If it hasn't already resolved (and been instrumented) we just encode an infinite
       // promise that will never resolve.
-      request.pendingChunks++;
-      const blockedId = request.nextChunkId++;
-      emitBlockedChunk(request, blockedId);
-      return serializePromiseID(blockedId);
+      return serializeInfinitePromise();
     }
 
     if (existingReference !== undefined) {
Repository: denoland/deno
Pull request: fix(ext/node): emit DEP0198 warning for SHAKE digests without outputLength

## Summary

- Emit `DeprecationWarning` (DEP0198) when creating SHAKE128/256 digests without an explicit `options.outputLength`, matching Node.js behavior with `--pending-deprecation`
- Enables `test-crypto-default-shake-lengths.js` and `test-crypto-default-shake-lengths-oneshot.js` in node_compat

## Test plan

- `cargo test --test node_compat test-crypto-default-shake-lengths` — 2 tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Changed files:
filename: ext/node/polyfills/internal/crypto/hash.ts
patch: @@ -43,6 +43,7 @@ import {
   NodeError,
 } from "ext:deno_node/internal/errors.ts";
 import LazyTransform from "ext:deno_node/internal/streams/lazy_transform.js";
+import process from "node:process";
 import {
   getDefaultEncoding,
   getHashBlockSize,
@@ -80,10 +81,24 @@ export function Hash(
     validateUint32(xofLen, "options.outputLength");
   }
 
+  const algoLower = isCopy ? undefined : algorithm.toLowerCase();
+
+  if (
+    !isCopy && xofLen === undefined &&
+    (algoLower === "shake128" ||
+      algoLower === "shake256")
+  ) {
+    process.emitWarning(
+      "Creating SHAKE128/256 digests without an explicit options.outputLength is deprecated.",
+      "DeprecationWarning",
+      "DEP0198",
+    );
+  }
+
   try {
     this[kHandle] = isCopy
       ? op_node_hash_clone(algorithm, xofLen)
-      : op_node_create_hash(algorithm.toLowerCase(), xofLen);
+      : op_node_create_hash(algoLower, xofLen);
   } catch (err) {
     // TODO(lucacasonato): don't do this
     if (err.message === "Output length mismatch for non-extendable algorithm") {

filename: tests/node_compat/config.jsonc
patch: @@ -256,6 +256,8 @@
       "exitCode": 1,
       "output": "[WILDCARD]Unknown cipher id-aes128-wrap[WILDCARD]"
     },
+    "parallel/test-crypto-default-shake-lengths.js": {},
+    "parallel/test-crypto-default-shake-lengths-oneshot.js": {},
     "parallel/test-crypto-dh-constructor.js": {},
     "parallel/test-crypto-dh-leak.js": {},
     "parallel/test-crypto-dh-odd-key.js": {},
Repository: facebook/react
Pull request: [Flight] Emit Infinite Promise as a Halted Row

Stacked on #30731.

When logging a Promise we emit it as an infinite promise instead of blocking the replay on it.

This models that as a halted row instead. No need for this special case.

I unflag the receiving side since now it's used to replace a feature that's already unflagged so it's used.


Changed files:
filename: packages/react-client/src/ReactFlightClient.js
patch: @@ -46,7 +46,6 @@ import {
   enableRefAsProp,
   enableFlightReadableStream,
   enableOwnerStacks,
-  enableHalt,
 } from 'shared/ReactFeatureFlags';
 
 import {
@@ -1194,10 +1193,6 @@ function parseModelString(
       }
       case '@': {
         // Promise
-        if (value.length === 2) {
-          // Infinite promise that never resolves.
-          return new Promise(() => {});
-        }
         const id = parseInt(value.slice(2), 16);
         const chunk = getChunk(response, id);
         return chunk;
@@ -2638,10 +2633,8 @@ function processFullStringRow(
     }
     // Fallthrough
     case 35 /* "#" */: {
-      if (enableHalt) {
-        resolveBlocked(response, id);
-        return;
-      }
+      resolveBlocked(response, id);
+      return;
     }
     // Fallthrough
     default: /* """ "{" "[" "t" "f" "n" "0" - "9" */ {

filename: packages/react-client/src/__tests__/ReactFlight-test.js
patch: @@ -2952,8 +2952,14 @@ describe('ReactFlight', () => {
     function foo() {
       return 'hello';
     }
+
     function ServerComponent() {
-      console.log('hi', {prop: 123, fn: foo, map: new Map([['foo', foo]])});
+      console.log('hi', {
+        prop: 123,
+        fn: foo,
+        map: new Map([['foo', foo]]),
+        promise: new Promise(() => {}),
+      });
       throw new Error('err');
     }
 
@@ -3018,6 +3024,10 @@ describe('ReactFlight', () => {
     expect(loggedFn2).not.toBe(foo);
     expect(loggedFn2.toString()).toBe(foo.toString());
 
+    const promise = mockConsoleLog.mock.calls[0][1].promise;
+    expect(promise).toBeInstanceOf(Promise);
+    expect(promise.status).toBe('blocked');
+
     expect(ownerStacks).toEqual(['\n    in App (at **)']);
   });
 

filename: packages/react-server/src/ReactFlightServer.js
patch: @@ -1817,10 +1817,6 @@ function serializeLazyID(id: number): string {
   return '$L' + id.toString(16);
 }
 
-function serializeInfinitePromise(): string {
-  return '$@';
-}
-
 function serializePromiseID(id: number): string {
   return '$@' + id.toString(16);
 }
@@ -3273,7 +3269,10 @@ function renderConsoleValue(
       }
       // If it hasn't already resolved (and been instrumented) we just encode an infinite
       // promise that will never resolve.
-      return serializeInfinitePromise();
+      request.pendingChunks++;
+      const blockedId = request.nextChunkId++;
+      emitBlockedChunk(request, blockedId);
+      return serializePromiseID(blockedId);
     }
 
     if (existingReference !== undefined) {
Repository: electron/electron
Pull request: fix: accent color should reflect system settings without restart

Backport of #47629

See that PR for details.


Notes: Fixed an issue where the window required restart in order to recognize system accent color setting change.


Changed files:
filename: shell/browser/native_window_views.h
patch: @@ -319,7 +319,7 @@ class NativeWindowViews : public NativeWindow,
   // Whether the window is currently being moved.
   bool is_moving_ = false;
 
-  std::variant<bool, SkColor> accent_color_ = true;
+  std::variant<std::monostate, bool, SkColor> accent_color_;
 
   std::optional<gfx::Rect> pending_bounds_change_;
 

filename: shell/browser/native_window_views_win.cc
patch: @@ -574,28 +574,42 @@ void NativeWindowViews::UpdateWindowAccentColor() {
   if (base::win::GetVersion() < base::win::Version::WIN11)
     return;
 
-  if (!IsAccentColorOnTitleBarsEnabled())
-    return;
-
   COLORREF border_color;
-  if (std::holds_alternative<bool>(accent_color_)) {
-    // Don't set accent color if the user has disabled it.
-    if (!std::get<bool>(accent_color_))
-      return;
+  bool should_apply_accent = false;
 
-    std::optional<DWORD> accent_color = GetAccentColor();
-    if (!accent_color.has_value())
-      return;
-
-    border_color =
-        RGB(GetRValue(accent_color.value()), GetGValue(accent_color.value()),
-            GetBValue(accent_color.value()));
-  } else {
+  if (std::holds_alternative<bool>(accent_color_)) {
+    bool force_accent = std::get<bool>(accent_color_);
+    if (!force_accent) {
+      should_apply_accent = false;
+    } else {
+      std::optional<DWORD> accent_color = GetAccentColor();
+      if (accent_color.has_value()) {
+        border_color = RGB(GetRValue(accent_color.value()),
+                           GetGValue(accent_color.value()),
+                           GetBValue(accent_color.value()));
+        should_apply_accent = true;
+      }
+    }
+  } else if (std::holds_alternative<SkColor>(accent_color_)) {
     SkColor color = std::get<SkColor>(accent_color_);
     border_color =
         RGB(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color));
+    should_apply_accent = true;
+  } else if (std::holds_alternative<std::monostate>(accent_color_)) {
+    if (IsAccentColorOnTitleBarsEnabled()) {
+      std::optional<DWORD> accent_color = GetAccentColor();
+      if (accent_color.has_value()) {
+        border_color = RGB(GetRValue(accent_color.value()),
+                           GetGValue(accent_color.value()),
+                           GetBValue(accent_color.value()));
+        should_apply_accent = true;
+      }
+    }
   }
 
+  // Reset to default system colors when accent color should not be applied.
+  if (!should_apply_accent)
+    border_color = DWMWA_COLOR_DEFAULT;
   SetWindowBorderAndCaptionColor(GetAcceleratedWidget(), border_color);
 }
Repository: ollama/ollama
Pull request: fix gemma, command-r layer weights

some models (gemma, command-r) do not have output tensors. instead the token_embd tensor are offloaded in its place

Changed files:
filename: llm/memory.go
patch: @@ -102,10 +102,14 @@ func EstimateGPULayers(gpus []gpu.GpuInfo, ggml *GGML, projectors []string, opts
 	layers := ggml.Tensors().Layers()
 
 	var memoryLayerOutput uint64
-	for k, v := range layers {
-		if k == "output" || k == "output_norm" {
-			memoryLayerOutput += v.size()
-		}
+	if layer, ok := layers["output_norm"]; ok {
+		memoryLayerOutput += layer.size()
+	}
+
+	if layer, ok := layers["output"]; ok {
+		memoryLayerOutput += layer.size()
+	} else if layer, ok := layers["token_embd"]; ok {
+		memoryLayerOutput += layer.size()
 	}
 
 	if gpus[0].Library == "metal" && opts.UseMMap {
Repository: electron/electron
Pull request: fix: accent color should reflect system settings without restart

Backport of #47629

See that PR for details.


Notes: Fixed an issue where the window required restart in order to recognize system accent color setting change.


Changed files:
filename: shell/browser/native_window_views.h
patch: @@ -306,7 +306,7 @@ class NativeWindowViews : public NativeWindow,
   // Whether the window is currently being moved.
   bool is_moving_ = false;
 
-  std::variant<bool, SkColor> accent_color_ = true;
+  std::variant<std::monostate, bool, SkColor> accent_color_;
 
   std::optional<gfx::Rect> pending_bounds_change_;
 

filename: shell/browser/native_window_views_win.cc
patch: @@ -574,28 +574,42 @@ void NativeWindowViews::UpdateWindowAccentColor() {
   if (base::win::GetVersion() < base::win::Version::WIN11)
     return;
 
-  if (!IsAccentColorOnTitleBarsEnabled())
-    return;
-
   COLORREF border_color;
-  if (std::holds_alternative<bool>(accent_color_)) {
-    // Don't set accent color if the user has disabled it.
-    if (!std::get<bool>(accent_color_))
-      return;
+  bool should_apply_accent = false;
 
-    std::optional<DWORD> accent_color = GetAccentColor();
-    if (!accent_color.has_value())
-      return;
-
-    border_color =
-        RGB(GetRValue(accent_color.value()), GetGValue(accent_color.value()),
-            GetBValue(accent_color.value()));
-  } else {
+  if (std::holds_alternative<bool>(accent_color_)) {
+    bool force_accent = std::get<bool>(accent_color_);
+    if (!force_accent) {
+      should_apply_accent = false;
+    } else {
+      std::optional<DWORD> accent_color = GetAccentColor();
+      if (accent_color.has_value()) {
+        border_color = RGB(GetRValue(accent_color.value()),
+                           GetGValue(accent_color.value()),
+                           GetBValue(accent_color.value()));
+        should_apply_accent = true;
+      }
+    }
+  } else if (std::holds_alternative<SkColor>(accent_color_)) {
     SkColor color = std::get<SkColor>(accent_color_);
     border_color =
         RGB(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color));
+    should_apply_accent = true;
+  } else if (std::holds_alternative<std::monostate>(accent_color_)) {
+    if (IsAccentColorOnTitleBarsEnabled()) {
+      std::optional<DWORD> accent_color = GetAccentColor();
+      if (accent_color.has_value()) {
+        border_color = RGB(GetRValue(accent_color.value()),
+                           GetGValue(accent_color.value()),
+                           GetBValue(accent_color.value()));
+        should_apply_accent = true;
+      }
+    }
   }
 
+  // Reset to default system colors when accent color should not be applied.
+  if (!should_apply_accent)
+    border_color = DWMWA_COLOR_DEFAULT;
   SetWindowBorderAndCaptionColor(GetAcceleratedWidget(), border_color);
 }
Repository: ollama/ollama
Pull request: types/model: export ParseNameBare and Merge

These are useful outside this package.

Changed files:
filename: types/model/name.go
patch: @@ -132,11 +132,12 @@ type Name struct {
 // field values are left in an undefined state. Use [Name.IsValid] to check
 // if the name is valid.
 func ParseName(s string) Name {
-	return merge(parseName(s), DefaultName())
+	return Merge(ParseNameBare(s), DefaultName())
 }
 
-// parseName is the same as [ParseName] without a merge.
-func parseName(s string) Name {
+// ParseNameBare parses s as a name string and returns a Name. No merge with
+// [DefaultName] is performed.
+func ParseNameBare(s string) Name {
 	var n Name
 	var promised bool
 
@@ -161,9 +162,9 @@ func parseName(s string) Name {
 	return n
 }
 
-// merge merges the host, namespace, and tag parts of the two names,
+// Merge merges the host, namespace, and tag parts of the two names,
 // preferring the non-empty parts of a.
-func merge(a, b Name) Name {
+func Merge(a, b Name) Name {
 	a.Host = cmp.Or(a.Host, b.Host)
 	a.Namespace = cmp.Or(a.Namespace, b.Namespace)
 	a.Tag = cmp.Or(a.Tag, b.Tag)

filename: types/model/name_test.go
patch: @@ -93,7 +93,7 @@ func TestParseNameParts(t *testing.T) {
 
 	for _, tt := range cases {
 		t.Run(tt.in, func(t *testing.T) {
-			got := parseName(tt.in)
+			got := ParseNameBare(tt.in)
 			if !reflect.DeepEqual(got, tt.want) {
 				t.Errorf("parseName(%q) = %v; want %v", tt.in, got, tt.want)
 			}
@@ -166,7 +166,7 @@ func TestNameparseNameDefault(t *testing.T) {
 func TestNameIsValid(t *testing.T) {
 	var numStringTests int
 	for s, want := range testCases {
-		n := parseName(s)
+		n := ParseNameBare(s)
 		t.Logf("n: %#v", n)
 		got := n.IsValid()
 		if got != want {
@@ -175,7 +175,7 @@ func TestNameIsValid(t *testing.T) {
 
 		// Test roundtrip with String
 		if got {
-			got := parseName(s).String()
+			got := ParseNameBare(s).String()
 			if got != s {
 				t.Errorf("parseName(%q).String() = %q; want %q", s, got, s)
 			}
@@ -221,7 +221,7 @@ func FuzzName(f *testing.F) {
 		f.Add(s)
 	}
 	f.Fuzz(func(t *testing.T, s string) {
-		n := parseName(s)
+		n := ParseNameBare(s)
 		if n.IsValid() {
 			parts := [...]string{n.Host, n.Namespace, n.Model, n.Tag, n.RawDigest}
 			for _, part := range parts {
Repository: ggml-org/llama.cpp
Pull request: Github: ask for -v logs for params_fit [no ci]

Updates the misc. issue template to clarify that `--verbose` logs are needed to debug `llama_params_fit`.

Changed files:
filename: .github/ISSUE_TEMPLATE/019-bug-misc.yml
patch: @@ -86,6 +86,7 @@ body:
       description: >
           If applicable, please copy and paste any relevant log output, including any generated text.
           This will be automatically formatted into code, so no need for backticks.
+          If you are encountering problems specifically with the `llama_params_fit` module, always upload `--verbose` logs as well.
       render: shell
     validations:
       required: false
Repository: ggml-org/llama.cpp
Pull request: model: fix LFM2_MOE missing tensors

Fix the issue reported in https://github.com/ggml-org/llama.cpp/pull/18105#issuecomment-3663775982

Changed files:
filename: src/llama-arch.cpp
patch: @@ -2055,7 +2055,7 @@ static std::set<llm_tensor> llm_get_tensor_names(llm_arch arch) {
                 LLM_TENSOR_SHORTCONV_INPROJ,
                 LLM_TENSOR_SHORTCONV_OUTPROJ,
                 LLM_TENSOR_TOKEN_EMBD,
-                LLM_TENSOR_OUTPUT_NORM,
+                LLM_TENSOR_OUTPUT_NORM_LFM2,
                 LLM_TENSOR_FFN_GATE_INP,
                 LLM_TENSOR_FFN_GATE_EXPS,
                 LLM_TENSOR_FFN_DOWN_EXPS,
Repository: ggml-org/llama.cpp
Pull request: model: fix LFM2 missing tensors

Overlooked a change from https://github.com/ggml-org/llama.cpp/pull/18051

cc @tdakhran for visibility: LFM2 reports missing tensor without this fix


Changed files:
filename: src/llama-model.cpp
patch: @@ -6236,8 +6236,8 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
                 {
                     tok_embd = create_tensor(tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}, 0);
 
-                    output_norm = create_tensor(tn(LLM_TENSOR_OUTPUT_NORM, "weight"), {n_embd}, 0);
-                    output      = create_tensor(tn(LLM_TENSOR_OUTPUT,      "weight"), {n_embd, n_vocab}, TENSOR_NOT_REQUIRED);
+                    output_norm = create_tensor(tn(LLM_TENSOR_OUTPUT_NORM_LFM2, "weight"), {n_embd}, 0);
+                    output      = create_tensor(tn(LLM_TENSOR_OUTPUT,           "weight"), {n_embd, n_vocab}, TENSOR_NOT_REQUIRED);
 
                     if (output == NULL) {
                         output = create_tensor(tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}, TENSOR_DUPLICATED);
Repository: vercel/next.js
Pull request: Update labeler


Changed files:
filename: .github/labeler.json
patch: @@ -58,9 +58,8 @@
       { "type": "user", "pattern": "ijjk" },
       { "type": "user", "pattern": "lazarv" },
       { "type": "user", "pattern": "lubieowoce" },
-      { "type": "user", "pattern": "bgub" },
       { "type": "user", "pattern": "RobPruzan" },
-      { "type": "user", "pattern": "samcx" },
+      { "type": "user", "pattern": "samselikoff" },
       { "type": "user", "pattern": "sebmarkbage" },
       { "type": "user", "pattern": "shuding" },
       { "type": "user", "pattern": "styfle" },
@@ -71,7 +70,6 @@
     "created-by: Next.js DevEx team": [
       { "type": "user", "pattern": "delbaoliveira" },
       { "type": "user", "pattern": "ismaelrumzan" },
-      { "type": "user", "pattern": "leerob" },
       { "type": "user", "pattern": "manovotny" },
       { "type": "user", "pattern": "molebox" },
       { "type": "user", "pattern": "timeyoutakeit" },
Repository: facebook/react
Pull request: [Fax] Make `react-markup` publishable via scripts


## Summary

Publishable packages are hardcoded which was missed in https://github.com/facebook/react/pull/30690.

First published as [0.0.0-experimental-1eaccd82-20240816](https://www.npmjs.com/package/react-markup/v/0.0.0-experimental-1eaccd82-20240816)

## How did you test this change?

```bash
$ scripts/release/prepare-release-from-ci.js --skipTests -r experimental --commit=fa6eab58541330349480690ef4e211520cc08d94
$ scripts/release/publish.js --tags experimental
✓ You are about the publish the following packages under the tag experimental:
[...]
react-markup 0.0.0-experimental-fa6eab58-20240815
```

Changed files:
filename: ReactVersions.js
patch: @@ -52,7 +52,7 @@ const stablePackages = {
 // These packages do not exist in the @canary or @latest channel, only
 // @experimental. We don't use semver, just the commit sha, so this is just a
 // list of package names instead of a map.
-const experimentalPackages = [];
+const experimentalPackages = ['react-markup'];
 
 module.exports = {
   ReactVersion,
Repository: ollama/ollama
Pull request: return code `499` when user cancels request while a model is loading


Changed files:
filename: llm/server.go
patch: @@ -442,7 +442,7 @@ func (s *llmServer) WaitUntilRunning(ctx context.Context) error {
 		select {
 		case <-ctx.Done():
 			slog.Info("context expired before server started")
-			return fmt.Errorf("timed out waiting for llama runner to start")
+			return fmt.Errorf("timed out waiting for llama runner to start: %w", ctx.Err())
 		case err := <-s.done:
 			msg := ""
 			if s.status != nil && s.status.LastErrMsg != "" {

filename: server/routes.go
patch: @@ -146,6 +146,11 @@ func (s *Server) GenerateHandler(c *gin.Context) {
 	select {
 	case runner = <-rCh:
 	case err = <-eCh:
+		if errors.Is(err, context.Canceled) {
+			c.JSON(499, gin.H{"error": "request canceled"})
+			return
+		}
+
 		c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
 		return
 	}
@@ -389,6 +394,11 @@ func (s *Server) EmbeddingsHandler(c *gin.Context) {
 	select {
 	case runner = <-rCh:
 	case err = <-eCh:
+		if errors.Is(err, context.Canceled) {
+			c.JSON(499, gin.H{"error": "request canceled"})
+			return
+		}
+
 		c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
 		return
 	}
@@ -1216,6 +1226,11 @@ func (s *Server) ChatHandler(c *gin.Context) {
 	select {
 	case runner = <-rCh:
 	case err = <-eCh:
+		if errors.Is(err, context.Canceled) {
+			c.JSON(499, gin.H{"error": "request canceled"})
+			return
+		}
+
 		c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
 		return
 	}
Repository: facebook/react
Pull request: [compiler] Allow functions containing refs to be returned

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30716
* __->__ #30724
* #30723
* #30715
* #30714
* #30713

Summary:
We previously were excessively strict about preventing functions that access refs from being returned--doing so is potentially valid for hooks, because the return value may only be used in an event or effect.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/return-ref-callback.expect.md
patch: @@ -4,6 +4,8 @@
 ```javascript
 // @flow @validateRefAccessDuringRender @validatePreserveExistingMemoizationGuarantees
 
+import {useRef} from 'react';
+
 component Foo() {
   const ref = useRef();
 
@@ -26,6 +28,8 @@ export const FIXTURE_ENTRYPOINT = {
 ```javascript
 import { c as _c } from "react/compiler-runtime";
 
+import { useRef } from "react";
+
 function Foo() {
   const $ = _c(1);
   const ref = useRef();
@@ -48,4 +52,4 @@ export const FIXTURE_ENTRYPOINT = {
 ```
       
 ### Eval output
-(kind: exception) useRef is not defined
\ No newline at end of file
+(kind: ok) "[[ function params=0 ]]"
\ No newline at end of file

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/return-ref-callback.js
patch: @@ -1,5 +1,7 @@
 // @flow @validateRefAccessDuringRender @validatePreserveExistingMemoizationGuarantees
 
+import {useRef} from 'react';
+
 component Foo() {
   const ref = useRef();