helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: fix: Rspack throw error when using ForceCompleteRuntimePlugin

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the PR.
- Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to understand the PR)
- When linking to a Slack thread, you might want to share details of the conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

TODO: Rspack currently does not support the hooks and chunk methods required by `ForceCompleteRuntimePlugin`.

Temporarily disable `ForceCompleteRuntimePlugin` when using Rspack as the bundler.

This plugin ensures complete webpack runtime is available during soft navigation to prevent runtime function errors, but Rspack currently does not support the required compilation hooks and chunk graph APIs.

Changed files:
filename: packages/next/src/build/webpack-config.ts
patch: @@ -1965,7 +1965,9 @@ export default async function getBaseWebpackConfig(
     plugins: [
       // In prod Webpack will already have a runtime for all reachable chunks.
       // During dev, it will update the runtime as chunks come in which may be too late for Flight.
-      dev && new ForceCompleteRuntimePlugin(),
+      //
+      // TODO: Rspack currently does not support the hooks and chunk methods required by ForceCompleteRuntimePlugin.
+      dev && !isRspack && new ForceCompleteRuntimePlugin(),
       isNodeServer &&
         new bundler.NormalModuleReplacementPlugin(
           /\.\/(.+)\.shared-runtime$/,
Repository: electron/electron
Pull request: fix: avoid deprecated login item methods

Backport of #48090

See that PR for details.


Notes: Fixed potential deadlock inside `app.getLoginItemSettings` on macOS

Changed files:
filename: shell/browser/browser_mac.mm
patch: @@ -411,19 +411,18 @@ LoginItemSettings GetLoginItemSettingsDeprecated() {
 #else
   // If the app was previously set as a LoginItem with the deprecated API,
   // we should report its LoginItemSettings via the old API.
-  LoginItemSettings settings_deprecated = GetLoginItemSettingsDeprecated();
   if (@available(macOS 13, *)) {
     const std::string status =
         platform_util::GetLoginItemEnabled(options.type, options.service_name);
     if (status == "enabled-deprecated") {
-      settings = settings_deprecated;
+      settings = GetLoginItemSettingsDeprecated();
     } else {
       settings.open_at_login = status == "enabled";
       settings.opened_at_login = was_launched_at_login_;
       settings.status = status;
     }
   } else {
-    settings = settings_deprecated;
+    settings = GetLoginItemSettingsDeprecated();
   }
 #endif
   return gin::ConvertToV8(isolate, settings);

filename: shell/common/platform_util_mac.mm
patch: @@ -220,7 +220,6 @@ void Beep() {
 
 std::string GetLoginItemEnabled(const std::string& type,
                                 const std::string& service_name) {
-  bool enabled = GetLoginItemEnabledDeprecated();
   if (@available(macOS 13, *)) {
     SMAppService* service = GetServiceForType(type, service_name);
     SMAppServiceStatus status = [service status];
@@ -232,10 +231,11 @@ void Beep() {
       return "requires-approval";
     else if (status == SMAppServiceStatusNotFound) {
       // If the login item was enabled with the old API, return that.
-      return enabled ? "enabled-deprecated" : "not-found";
+      return GetLoginItemEnabledDeprecated() ? "enabled-deprecated"
+                                             : "not-found";
     }
   }
-  return enabled ? "enabled" : "not-registered";
+  return GetLoginItemEnabledDeprecated() ? "enabled" : "not-registered";
 }
 
 bool SetLoginItemEnabled(const std::string& type,
Repository: ggml-org/llama.cpp
Pull request: doc: ban AI-generated PR descriptions [no ci]

We could maybe explicitly ban the use of language models to generate PR descriptions. In principle I think that this is maybe one of the more legitimate use cases for language models (if you wrote the code yourself and fully understand it). But basically all of the time-wasting slop PRs that we want to reject use language models to generate PR descriptions; the people pushing the submit button simply have no other way of creating the appearance of understanding the code they submit. So potentially this change would save maintainers a bit of time.

I personally never use language models for summarizing pull requests, and I would consider the potential time savings vs. actually writing the code negligible anyways (because I already know what it does). But I don't know the workflows of other maintainers/contributors. But we can also just write down strict rules to be followed "officially" and then make exceptions on a case-by-case basis for people who have proven themselves.

Changed files:
filename: CONTRIBUTING.md
patch: @@ -20,7 +20,7 @@ If AI is used to generate any portion of the code, contributors must adhere to t
 1. Explicitly disclose the manner in which AI was employed.
 2. Perform a comprehensive manual review prior to submitting the pull request.
 3. Be prepared to explain every line of code they submitted when asked about it by a maintainer.
-4. Using AI to respond to human reviewers is strictly prohibited.
+4. Using AI to write pull request descriptions or to respond to human reviewers is strictly prohibited.
 
 For more info, please refer to the [AGENTS.md](AGENTS.md) file.
Repository: facebook/react
Pull request: [www] set disableStringRefs to true


Changed files:
filename: packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
patch: @@ -82,7 +82,7 @@ export const disableClientCache = true;
 export const enableServerComponentLogs = true;
 export const enableInfiniteRenderLoopDetection = false;
 
-export const disableStringRefs = false;
+export const disableStringRefs = true;
 
 export const enableReactTestRendererWarning = false;
 export const disableLegacyMode = true;

filename: packages/shared/forks/ReactFeatureFlags.www-dynamic.js
patch: @@ -18,7 +18,6 @@ export const disableDefaultPropsExceptForClasses = __VARIANT__;
 export const disableLegacyContextForFunctionComponents = __VARIANT__;
 export const disableLegacyMode = __VARIANT__;
 export const disableSchedulerTimeoutInWorkLoop = __VARIANT__;
-export const disableStringRefs = __VARIANT__;
 export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
 export const enableDO_NOT_USE_disableStrictPassiveEffect = __VARIANT__;
 export const enableHiddenSubtreeInsertionEffectCleanup = __VARIANT__;

filename: packages/shared/forks/ReactFeatureFlags.www.js
patch: @@ -19,7 +19,6 @@ export const {
   disableDefaultPropsExceptForClasses,
   disableLegacyContextForFunctionComponents,
   disableSchedulerTimeoutInWorkLoop,
-  disableStringRefs,
   enableDebugTracing,
   enableDeferRootSchedulingToMicrotask,
   enableDO_NOT_USE_disableStrictPassiveEffect,
@@ -53,6 +52,7 @@ export const enableSuspenseAvoidThisFallback = true;
 export const enableSuspenseAvoidThisFallbackFizz = false;
 
 export const disableIEWorkarounds = true;
+export const disableStringRefs = true;
 export const enableCPUSuspense = true;
 export const enableUseMemoCacheHook = true;
 export const enableUseEffectEventHook = true;
Repository: ollama/ollama
Pull request: fix: quantization with template


Changed files:
filename: server/images.go
patch: @@ -414,17 +414,22 @@ func CreateModel(ctx context.Context, name model.Name, modelFileDir, quantizatio
 							return err
 						}
 
-						layers, err := parseFromFile(ctx, temp, "", fn)
+						layer, err := NewLayer(temp, baseLayer.MediaType)
 						if err != nil {
 							return err
 						}
 
-						if len(layers) != 1 {
-							return errors.New("quantization failed")
+						if _, err := temp.Seek(0, io.SeekStart); err != nil {
+							return err
+						}
+
+						ggml, _, err := llm.DecodeGGML(temp)
+						if err != nil {
+							return err
 						}
 
-						baseLayer.Layer = layers[0].Layer
-						baseLayer.GGML = layers[0].GGML
+						baseLayer.Layer = layer
+						baseLayer.GGML = ggml
 					}
 				}
Repository: vuejs/vue
Pull request: Test non-prefixed attributes before prefixed

Proposed fix for https://github.com/vuejs/vue/issues/2654


Changed files:
filename: src/directives/internal/style.js
patch: @@ -112,6 +112,12 @@ function prefix (prop) {
   }
   var i = prefixes.length
   var prefixed
+  if (camel !== 'filter' && (camel in testEl.style)) {
+    return {
+      kebab: prop,
+      camel: camel
+    }
+  }
   while (i--) {
     prefixed = camelPrefixes[i] + upper
     if (prefixed in testEl.style) {
@@ -121,10 +127,4 @@ function prefix (prop) {
       }
     }
   }
-  if (camel in testEl.style) {
-    return {
-      kebab: prop,
-      camel: camel
-    }
-  }
 }

filename: test/unit/specs/directives/internal/style_spec.js
patch: @@ -121,4 +121,10 @@ describe(':style', function () {
       done()
     })
   })
+
+  // #2654
+  it('background size with only one value', function () {
+    dir.update({ backgroundSize: '100%' })
+    expect(el.style.cssText.replace(/\s/g, '')).toBe('background-size:100%;')
+  })
 })
Repository: nodejs/node
Pull request: src: remove duplicate code


- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes
- [x] tests and/or benchmarks are included
- [x] documentation is changed or added
- [x] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)


Changed files:
filename: src/api/embed_helpers.cc
patch: @@ -116,7 +116,6 @@ CommonEnvironmentSetup::CommonEnvironmentSetup(
   Isolate::CreateParams params;
   params.array_buffer_allocator = impl_->allocator.get();
   params.external_references = external_references.data();
-  params.external_references = external_references.data();
   params.cpp_heap =
       v8::CppHeap::Create(platform, v8::CppHeapCreateParams{{}}).release();
Repository: electron/electron
Pull request: build: correct CHECK syntax

#### Description of Change

A previous PR landed with the incorrect `CHECK` syntax, and is breaking the release build. This PR corrects the syntax.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] PR description included and stakeholders cc'd
- [ ] `npm test` passes
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
- [ ] relevant API documentation, tutorials, and examples are updated and follow the [documentation style guide](https://github.com/electron/electron/blob/main/docs/development/style-guide.md)
- [ ] [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: none


Changed files:
filename: shell/app/electron_main_delegate.cc
patch: @@ -213,7 +213,7 @@ void RegisterPathProvider() {
 void ValidateV8Snapshot(v8::StartupData* data) {
   if (data->data &&
       electron::fuses::IsEmbeddedAsarIntegrityValidationEnabled()) {
-    CHECK(data->raw_size, 0);
+    CHECK_GT(data->raw_size, 0);
     UNSAFE_BUFFERS({
       base::span<const char> span_data(
           data->data, static_cast<unsigned long>(data->raw_size));
Repository: vuejs/vue
Pull request: Fix handling v-if along with v-for on a template tag

Proposed fix for https://github.com/vuejs/vue/issues/2657


Changed files:
filename: src/fragment/factory.js
patch: @@ -18,7 +18,7 @@ export default function FragmentFactory (vm, el) {
   this.vm = vm
   var template
   var isString = typeof el === 'string'
-  if (isString || isTemplate(el)) {
+  if (isString || isTemplate(el) && !el.hasAttribute('v-if')) {
     template = parseTemplate(el, true)
   } else {
     template = document.createDocumentFragment()

filename: test/unit/specs/misc_spec.js
patch: @@ -537,4 +537,13 @@ describe('Misc', function () {
     })
     expect(vm.$el.querySelector('image-field').namespaceURI).not.toMatch(/svg/)
   })
+
+  // #2657
+  it('template v-for with v-if', function () {
+    var vm = new Vue({
+      el: document.createElement('div'),
+      template: '<div><template v-for="n in 6" v-if="n % 2">{{ n }}</template></div>'
+    })
+    expect(vm.$el.textContent).toBe('135')
+  })
 })
Repository: ollama/ollama
Pull request: Refine mmap default logic on linux

If we try to use mmap when the model is larger than the system free space, loading is slower than the no-mmap approach.

This should resolve multiple issues where model loads stalled for longer than 5 minutes on some systems and caused our timeout to trigger.  When those users forced use_mmap=false, things sped up significantly, so this should handle it automatically.

Changed files:
filename: llm/server.go
patch: @@ -81,7 +81,17 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
 	var err error
 	var cpuRunner string
 	var estimate MemoryEstimate
-	var systemMemory uint64
+	var systemTotalMemory uint64
+	var systemFreeMemory uint64
+
+	systemMemInfo, err := gpu.GetCPUMem()
+	if err != nil {
+		slog.Error("failed to lookup system memory", "error", err)
+	} else {
+		systemTotalMemory = systemMemInfo.TotalMemory
+		systemFreeMemory = systemMemInfo.FreeMemory
+		slog.Debug("system memory", "total", format.HumanBytes2(systemTotalMemory), "free", systemFreeMemory)
+	}
 
 	// If the user wants zero GPU layers, reset the gpu list to be CPU/system ram info
 	if opts.NumGPU == 0 {
@@ -91,19 +101,10 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
 		cpuRunner = serverForCpu()
 		estimate = EstimateGPULayers(gpus, ggml, projectors, opts)
 	} else {
-		if gpus[0].Library == "metal" {
-			memInfo, err := gpu.GetCPUMem()
-			if err != nil {
-				slog.Error("failed to lookup system memory", "error", err)
-			} else {
-				systemMemory = memInfo.TotalMemory
-				slog.Debug("system memory", "total", format.HumanBytes2(systemMemory))
-			}
-		}
 		estimate = EstimateGPULayers(gpus, ggml, projectors, opts)
 
 		switch {
-		case gpus[0].Library == "metal" && estimate.VRAMSize > systemMemory:
+		case gpus[0].Library == "metal" && estimate.VRAMSize > systemTotalMemory:
 			// disable partial offloading when model is greater than total system memory as this
 			// can lead to locking up the system
 			opts.NumGPU = 0
@@ -211,7 +212,10 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
 	}
 
 	// Windows CUDA should not use mmap for best performance
-	if (runtime.GOOS == "windows" && gpus[0].Library == "cuda") || opts.UseMMap == api.TriStateFalse {
+	// Linux  with a model larger than free space, mmap leads to thrashing
+	if (runtime.GOOS == "windows" && gpus[0].Library == "cuda" && opts.UseMMap == api.TriStateUndefined) ||
+		(runtime.GOOS == "linux" && systemFreeMemory < estimate.TotalSize && opts.UseMMap == api.TriStateUndefined) ||
+		opts.UseMMap == api.TriStateFalse {
 		params = append(params, "--no-mmap")
 	}
Repository: huggingface/transformers
Pull request: Fix logic in setting self.fsdp when it is False

# What does this PR do?

This PR fixes the logic in setting `self.fsdp` in `_process_fsdp_args` in src/transformers/training_args.py. In the original logic, when `self.fsdp` is False, it will not be converted to list, and cause the later logic below failed because `self.fsdp` is a boolean (False).
```
FSDPOption.FULL_SHARD in self.fsdp and FSDPOption.SHARD_GRAD_OP in self.fsdp:
```

This diff fixes it by initializing it to list.

## Who can review?

@SunMarc 


Changed files:
filename: src/transformers/training_args.py
patch: @@ -2655,7 +2655,7 @@ def set_dataloader(
         return self
 
     def _process_fsdp_args(self):
-        if self.fsdp is None:
+        if not self.fsdp:
             self.fsdp = []
         elif self.fsdp is True:
             self.fsdp = [FSDPOption.FULL_SHARD]
Repository: vercel/next.js
Pull request: [test] Speed up refresh test

Test was introduced in https://github.com/vercel/next.js/pull/55447/ when `assertNoRedbox` wasn't waiting for 5s.

This is our slowest test at the moment (p50 of 110s).

We just can't know when the error might occur after reload (see Halting problem). We settled on waiting 5s in all the other tests so we should do the same here.

Changed files:
filename: test/development/app-dir/basic/basic.test.ts
patch: @@ -1,25 +1,17 @@
 import { nextTestSetup } from 'e2e-utils'
-import { waitFor } from 'next-test-utils'
-import { createSandbox, waitForHydration } from 'development-sandbox'
+import { assertNoRedbox } from 'next-test-utils'
+import { waitForHydration } from 'development-sandbox'
 
 describe('basic app-dir tests', () => {
   const { next } = nextTestSetup({
     files: __dirname,
   })
 
   it('should reload app pages without error', async () => {
-    await using sandbox = await createSandbox(next, undefined, '/')
-    const { session, browser } = sandbox
-    await session.assertNoRedbox()
-
-    browser.refresh()
-
-    await waitFor(750)
+    const browser = await next.browser('/')
+    await browser.refresh()
     await waitForHydration(browser)
 
-    for (let i = 0; i < 15; i++) {
-      await session.assertNoRedbox()
-      await waitFor(1000)
-    }
+    await assertNoRedbox(browser)
   })
 })
Repository: facebook/react
Pull request: Back out "[bundles] stop building legacy Paper renderer (#31429)"


Backs out the 2 related commits:
- https://github.com/facebook/react/commit/f8f6e1a21a1cac64cf6faf666367d641b2d8b171
- https://github.com/facebook/react/commit/6c0f37f94b020279fb5ada70facc008fccb7172e

Since I only realized when syncing that we need the version of `react` and the legacy renderer to match.

While I investigate if there's anything we can do to work around that while preserving the legacy renderer, this unblocks the sync.


Changed files:
filename: .github/workflows/runtime_commit_artifacts.yml
patch: @@ -137,6 +137,7 @@ jobs:
           # Delete OSS renderer. OSS renderer is synced through internal script.
           RENDERER_FOLDER=$BASE_FOLDER/react-native-github/Libraries/Renderer/implementations/
           rm $RENDERER_FOLDER/ReactFabric-{dev,prod,profiling}.js
+          rm $RENDERER_FOLDER/ReactNativeRenderer-{dev,prod,profiling}.js
 
           # Move React Native version file
           mv build/facebook-react-native/VERSION_NATIVE_FB ./compiled-rn/VERSION_NATIVE_FB

filename: scripts/rollup/bundles.js
patch: @@ -696,6 +696,40 @@ const bundles = [
       }),
   },
 
+  /******* React Native *******/
+  {
+    bundleTypes: __EXPERIMENTAL__
+      ? []
+      : [RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING],
+    moduleType: RENDERER,
+    entry: 'react-native-renderer',
+    global: 'ReactNativeRenderer',
+    externals: ['react-native', 'ReactNativeInternalFeatureFlags'],
+    minifyWithProdErrorCodes: false,
+    wrapWithModuleBoundaries: true,
+    babel: opts =>
+      Object.assign({}, opts, {
+        plugins: opts.plugins.concat([
+          [require.resolve('@babel/plugin-transform-classes'), {loose: true}],
+        ]),
+      }),
+  },
+  {
+    bundleTypes: [RN_OSS_DEV, RN_OSS_PROD, RN_OSS_PROFILING],
+    moduleType: RENDERER,
+    entry: 'react-native-renderer',
+    global: 'ReactNativeRenderer',
+    externals: ['react-native'],
+    minifyWithProdErrorCodes: false,
+    wrapWithModuleBoundaries: true,
+    babel: opts =>
+      Object.assign({}, opts, {
+        plugins: opts.plugins.concat([
+          [require.resolve('@babel/plugin-transform-classes'), {loose: true}],
+        ]),
+      }),
+  },
+
   /******* React Native Fabric *******/
   {
     bundleTypes: __EXPERIMENTAL__
Repository: ggml-org/llama.cpp
Pull request: CUDA : fix unused argument when USE_CUDA_GRAPH=OFF

ref https://github.com/ggml-org/whisper.cpp/actions/runs/20919955568/job/60102715218?pr=3606#step:3:187

Fix a minor compile warning when the CUDA graphs are disabled. Spotted in the `whisper.cpp` CI

Changed files:
filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -3737,6 +3737,7 @@ static bool ggml_cuda_graph_set_enabled(ggml_backend_cuda_context * cuda_ctx) {
 
     return cuda_ctx->cuda_graph->is_enabled();
 #else
+    GGML_UNUSED(cuda_ctx);
     return false;
 #endif // USE_CUDA_GRAPH
 }
Repository: vuejs/vue
Pull request: fix key modifier filter #2658

this line may be too long
don't know if you have any 80 max-len lint rules


Changed files:
filename: src/directives/public/on.js
patch: @@ -113,7 +113,7 @@ export default {
     // key filter
     var keys = Object.keys(this.modifiers)
       .filter(function (key) {
-        return key !== 'stop' && key !== 'prevent' && key !== 'self'
+        return key !== 'stop' && key !== 'prevent' && key !== 'self' && key !== 'capture'
       })
     if (keys.length) {
       handler = keyFilter(handler, keys)
Repository: ollama/ollama
Pull request: Bump latest fedora cuda repo to 39

Fixes #5062 

Fedora39 is now the latest.

https://developer.download.nvidia.com/compute/cuda/repos/ 

Changed files:
filename: scripts/install.sh
patch: @@ -279,7 +279,7 @@ if ! check_gpu nvidia-smi || [ -z "$(nvidia-smi | grep -o "CUDA Version: [0-9]*\
     case $OS_NAME in
         centos|rhel) install_cuda_driver_yum 'rhel' $(echo $OS_VERSION | cut -d '.' -f 1) ;;
         rocky) install_cuda_driver_yum 'rhel' $(echo $OS_VERSION | cut -c1) ;;
-        fedora) [ $OS_VERSION -lt '37' ] && install_cuda_driver_yum $OS_NAME $OS_VERSION || install_cuda_driver_yum $OS_NAME '37';;
+        fedora) [ $OS_VERSION -lt '39' ] && install_cuda_driver_yum $OS_NAME $OS_VERSION || install_cuda_driver_yum $OS_NAME '39';;
         amzn) install_cuda_driver_yum 'fedora' '37' ;;
         debian) install_cuda_driver_apt $OS_NAME $OS_VERSION ;;
         ubuntu) install_cuda_driver_apt $OS_NAME $(echo $OS_VERSION | sed 's/\.//') ;;