sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Middleware sometimes doesn't executes
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://github.com/apuatcfbd/nextjs13-middleware-issue

### To Reproduce

When using `router.push` middleware sometimes doesn't gets executed. The issue can be produced in the provided repo. There i'm intentionally using `router.push` instead of `Link`. The issue can be seen on my screencast too. 
https://drive.google.com/file/d/19-UsJ18vxEoAK5b8X-bm0KEZpcZqrRmU/view?usp=sharing

In there if you look at the terminal, first time the middleware was executed, then thats not executing, after I waited around 15-25 seconds, that started executing again everytime I visit the `secure` path which is under protection of the middleware. Is here i'm doing something wrong?


### Current vs. Expected behavior

**Current Behavior**
Middleware is not executing everytime route gets changed. Strangely it starts work normal after few seconds!

**Expected Behavior**
Middleware should gets executed everytime route gets changed, 

### Verify canary release

- [x] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct  9 15:34:04 UTC 2
Binaries:
  Node: 20.4.0
  npm: 9.7.2
  Yarn: N/A
  pnpm: 8.10.2
Relevant Packages:
  next: 13.5.6
  eslint-config-next: 13.5.6
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Middleware / Edge (API routes, runtime)

### Additional context

_No response_
Repository: go
Issue: cmd/compile: FuncForPC on a generic struct method is different from a non-generic struct
Labels: NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.21.3 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes, including tip. [Also on Go Playground](https://go.dev/play/p/z5UHsd1HZeP).

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/mitar/.cache/go-build'
GOENV='/home/mitar/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/mitar/.go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/mitar/.go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.3'
GCCGO='/usr/bin/gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1231630685=/tmp/go-build -gno-record-gcc-switches'
</pre></details>

### What did you do?

I have the following code to get name of a function passed as a pointer:

```go
package main

import (
	"fmt"
	"reflect"
	"runtime"
)

func name(f any) string {
	fn := runtime.FuncForPC(reflect.ValueOf(f).Pointer())
	if fn == nil {
		return ""
	}
	return fn.Name()
}

func FuncName() {}

type Foo struct{}

func (_ *Foo) FuncName() {}

func (f *Foo) Get() string {
	return name(f.FuncName)
}

type Bar[T any] struct{}

func (_ *Bar[T]) FuncName() {}

func (b *Bar[T]) Get() string {
	return name(b.FuncName)
}

func main() {
	fmt.Println(name(FuncName))
	fmt.Println(name((&Foo{}).FuncName))
	fmt.Println((&Foo{}).Get())
	fmt.Println(name((&Bar[int]{}).FuncName))
	fmt.Println((&Bar[int]{}).Get())
}
```

### What did you expect to see?

```
main.FuncName
main.(*Foo).FuncName-fm
main.(*Foo).FuncName-fm
main.(*Bar[...]).FuncName-fm
main.(*Bar[...]).FuncName-fm
```

### What did you see instead?

```
main.FuncName
main.(*Foo).FuncName-fm
main.(*Foo).FuncName-fm
main.(*Bar[...]).FuncName-fm
main.(*Bar[...]).Get.func1
```
Repository: godot
Issue: NVidia driver 546.01 causes extreme lag in built C# project
Labels: platform:windows,topic:rendering,topic:thirdparty,needs testing,performance

### Godot version

v4.1.3.stable.mono.official [f06b6836a]

### System information

Godot v4.1.3.stable.mono - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Ti (NVIDIA; 31.0.15.3118) - Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz (20 Threads)

### Issue description

**GPU:** NVidia RTX 3070 TI 

Game build was working fine with 120+ fps yesterday when I had an older GPU driver installed _**(531.18 - 02/28/2023).**_

But today after updating to the **most recent drivers** the same game was running at around 5 FPS and no errors were being thrown so after like an hour of trying to debug this I ended up reverting the driver to the old one and it fixed the issue.

### Steps to reproduce

- Install most recent NVidia drivers: 546.01
- Build a game using version **equal or higher** than Godot 4.1.1
- Game must use Forward+

### Minimal reproduction project

N/A
Repository: storybook
Issue: [Documentation]: Need instruction on how to get basic extended Markdown functionalities such as table
Labels: help wanted,documentation

### Describe the problem

Storybook 7 disabled GFM and asked the user to add it as a plugin by themselves.

Yet, the current documentation for using GFM is insufficient in several ways: https://github.com/storybookjs/storybook/blob/f4455027b3feaeb9975ebc3deff14241177f8c1c/docs/writing-docs/mdx.md?plain=1#L184

1. It doesn't show possible caveats. For example, 
- the user might need to disable the `addon-docs` in the  `@storybook/addon-essentials` as shown in [here](https://github.com/storybookjs/storybook/issues/20091#issuecomment-1421040536).
- the user might need to downgrade to `remark-gfm` `3.01` as `4` might break as mentioned here (https://discord.com/channels/486522875931656193/1153938960435908661)
2. It doesn't show any direct example of setting up common features of GFM, like how can you get your Markdown table to render (cause I still couldn't get the table to render, like several others such as [here](https://github.com/storybookjs/storybook/issues/23134#issuecomment-1598766312) and [here](https://github.com/storybookjs/storybook/issues/20091#issuecomment-1548250304). 

I feel it's essential to explain how to use common documentation features such as tables in MDX2 and Storybook 7. 

After all, one of the main attractions for using MDX is precisely the markdown documentation features, because we already have stories for rendering components.

### Suggestion

- **Provide a working guide and example to show the user how to use GFM features that address the above issues.**

I'd really like to help with adding the documentation if only I could get it to work myself. So I think it's perhaps that someone on the maintenance team fixes the GFM features on v7 first.

### Additional context

_No response_
Repository: PowerToys
Issue: FancyZones: Primary zone and forced tiling
Labels: Needs-Triage

### Description of the new feature / enhancement

With FancyZones, the user could nominate a primary zone. All other windows would be force tiled (could be dynamic or onto other zones). (It could be either force tiled or just prohibit overlapping - only difference is whether empty space is allowed)
- When the user drags a window into the (primary) zone, it swaps the window which is currently there (they swap places). 
- Switching windows shortcut (alt+tab) would switch the window in the primary zone. 
- Minimised windows would not participate in the tiling or in alt+tab
- User would have the option to force a window on top of others by switching on "Always on Top" 
- A new window would automatically go into a free zone. If there is no free zone it would make space for itself by splitting a zone.
- Windows can be resized ("leave their zone") but they can never overlap. Other windows would automatically shrink when a necessary.
- (Optional) Could bring particular window to main zone with shortcut or search or modifier+click

### Scenario when this would be used?

I usually use 2 or 3 monitors but use one of them as the primary monitor and the others as secondary. I have 4-10 windows open so FancyZones in theory would be a good fit. 

There are several issues which made me stop using it:
- I regularly open/close windows. Don't want spend time rearranging things every time I do. 
- I regularly switch the window I want to be on my primary monitor but I usually want to be able to see the previous window as well somewhere. Currently I would need to manually swap them.
- I want to see all the rest of my windows. This is because I frequently loose a window :) I sometimes care about the arrangement but sometimes I just want them to be there so I can easily find them.

### Supporting information

I have never seen anything like this before, so I don't know. If you are aware of anything similar, please let me know.
Repository: transformers
Issue: Implement Cross Attention in LLAMA Model
Labels: Feature request

### Feature request


The current implementation of the LLAMA model in the Hugging Face Transformers repository supports self-attention layers as per the standard design of transformer models. I propose the addition of an option to use several or all attention layers as cross-attention layers instead of self-attention layers. 

Cross-attention layers are crucial for tasks where the model needs to attend to different inputs other than its own output (e.g., encoder-decoder tasks in translation, image-captioning, etc.). The option to use cross-attention would enhance the LLAMA model's capabilities for a broader range of applications.


https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/modeling_llama.py

### Motivation

My motivation for this proposal stems from the need to apply the LLAMA model to tasks that inherently require cross-modal attention mechanisms. The current limitation of self-attention only restricts its applicability. While self-attention mechanisms are effective for a range of tasks, the flexibility of cross-attention layers could extend the model's utility, allowing researchers and developers to tackle a wider variety of problems.

### Your contribution

I am willing to assist in the implementation of this feature. While I am not an expert in decoder-only architecture, with the right guidance, I can help.

I look forward to discussing this further with the maintainers of the repository.

Thank you for considering my proposal.
Repository: TypeScript
Issue: Inferring function parameters from the return type
Labels: Suggestion,Awaiting More Feedback

### 🔍 Search Terms

"inferring parameters types", "infer input from output types"

### ✅ Viability Checklist

- [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [X] This wouldn't change the runtime behavior of existing JavaScript code
- [X] This could be implemented without emitting different JS based on the types of the expressions
- [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

I would like to infer the types of the parameters of a function based on the return type. I have tried a few patterns and I don't think this is currently possible.

### 📃 Motivating Example

```ts
const inferReturnValuesAsKeys = <
  T extends (arg: keyof ReturnType<T> & string) => Record<string, number>,
>(
  t: T,
) => t;

/**
 * @todo arg should be typed as 'a' instead of 'string'
 */
inferReturnValuesAsKeys((arg) => ({ a: 5 }));
// ^?
```

### 💻 Use Cases

1. What do you want to use this for?

Helpful for strict typings and intellisense.

3. What shortcomings exist with current approaches?

None give a strict enough type.

5. What workarounds are you using in the meantime?

I don't have the type safety that I want.
Repository: PowerToys
Issue: Power Rename Profiles
Labels: Needs-Triage

### Description of the new feature / enhancement

Maybe it is possible to store the settings in power rename in "profiles", 
 it would be great to keep "search" and "replace" together...


### Scenario when this would be used?

Often we have different sources for renaming - so it would be great to get the regular expression in search in sync with replace with one click. Currently we always have to search and ensure the right replace mask - this is error prone...

### Supporting information

_No response_
Repository: godot
Issue: Godot Language Server throws nonexistent errors on Line:1 Col:1 saying Error(test)
Labels: bug,topic:gdscript

### Godot version

4.1.3.stable.official [f06b6836a]

### System information

Godot v4.1.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce MX110 (NVIDIA; 31.0.15.2892) - Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 Threads)

### Issue description

Godot's Language Server is not behaving like I'd expect it to. It keeps throwing errors that read "Error (test)" on top of the file (@ line1:col1, the extends NODETYPE part) but my code works just fine when I run the project. It's also inconsistent since it doesn't throw the same error on my Player.gd file. I do not understand what is happening and I don't think it's related to my code, since this happens in every project I have in my folders, including premade games, etc. I have dropped images of the errors below. If you need any other resources such as screenshots or code I can drop them too.

I should also note that I am having the same issue on Godot v4.1.2.stable.mono.official [399c9dc39] too.

Mainscene.gd:
![error1](https://github.com/godotengine/godot/assets/77782958/f29fe831-69a9-4c22-b1b4-bd2ffdce06e1)

Boulder.gd:
![error2](https://github.com/godotengine/godot/assets/77782958/03791c8f-51ec-4834-85e3-f1ee6ed533d8)

Player.gd:
![noerror](https://github.com/godotengine/godot/assets/77782958/0a012f36-62c2-4590-94e3-2601331bdc52)


### Steps to reproduce

Just create a new project in Godot 4.1.3 and make a basic 2D project that involves RigidBody2D's and CharacterBody2D's. Attach scripts to them and open the scripts in VSCode with the Godot VSCode extension. I suppose you will see the same effect.

### Minimal reproduction project

N/A
Repository: storybook
Issue: [Bug]: Interaction tests using RHF fail when configuring playwright in headed mode with devtools
Labels: bug,compatibility with other tools,test-runner,sev:S3

### Describe the bug

When using `@storybook/test-runner` to run interaction test for simple form managed by `react-hook-form`, tests will randomly fail a few times in a hundred runs. At first I thought it is caused by https://github.com/storybookjs/storybook/issues/18258, however, after upgrading everything the issue persisted. 

After a lot of trial and error, I managed to get to a consistent reproduction which can be achieved by configuring test runner to run in headed mode with devtools enabled. In that configuration, simple test will always fail. Text gets entered in the input field but empty string gets submitted. 

I'm not entirely sure the issue is in storybook. I'm assuming it is because I cannot reproduce it if I test the same storybook page using playwright directly. Or, if I run vite dev server and point playwright tests to it.

### To Reproduce

Repository of the reproduction can be found [here](https://github.com/kpericin/storybook-play-function-repro).

To reproduce, first install dependencies then start storybook dev server. Open `http://localhost:6009/?path=/story/nativerhfinteraction--text-input`, it will most likely work when run in storybook directly. Now run `test-storybook`. It will open Chromium browser with devtools enabled and you'll see toast notification in the bottom left corner which will have empty text. 

Next, try running `test` script. It will also open Chromium with devtools enabled, but this time the test will pass because notification will have the correct text.

### System

```bash
Storybook Environment Info:

  System:
    OS: macOS 14.1
    CPU: (12) arm64 Apple M2 Max
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.1.0 - /opt/homebrew/bin/npm
    pnpm: 8.8.0 - /usr/local/bin/pnpm <----- active
  Browsers:
    Chrome: 119.0.6045.105
    Safari: 17.1
  npmPackages:
    @storybook/addon-essentials: 7.5.2 => 7.5.2 
    @storybook/addon-interactions: 7.5.2 => 7.5.2 
    @storybook/addon-links: 7.5.2 => 7.5.2 
    @storybook/blocks: 7.5.2 => 7.5.2 
    @storybook/jest: 0.2.2 => 0.2.2 
    @storybook/react: 7.5.2 => 7.5.2 
    @storybook/react-vite: 7.5.2 => 7.5.2 
    @storybook/test-runner: 0.13.0 => 0.13.0 
    @storybook/testing-library: 0.2.2 => 0.2.2 
    storybook: ^7.5.2 => 7.5.2
```


### Additional context

_No response_
Repository: rust
Issue: Guarantee that it is sound to observe the bytes of `None::<P>` where `P` is a pointer type subject to NPO
Labels: T-lang,A-docs,T-opsem

In https://github.com/rust-lang/rust/pull/115333, we added a guarantee that transmuting from `[u8; N]` to `Option<P>` is sound where `P` is a pointer type subject to the null pointer optimization (NPO). It would be useful to be able to guarantee the inverse - that if all of the bytes of `P` are initialized, then all of the bytes of `None::<P>` (and thus all of the bytes of _any_ `Option<P>`) are initialized. For example, this would allow zerocopy to support safe transmutation from `Option<P>` to `[u8; N]` (https://github.com/google/zerocopy/issues/596).

I'm opening this issue first rather than a PR so there's an opportunity to discuss whether this is something we want, how it would be best to document it, etc.
Repository: PowerToys
Issue: Conflict with PowerZone and PhoneLink
Labels: Issue-Bug,FancyZones-Dragging&UI,Product-FancyZones,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.75.1

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

FancyZones

### Steps to reproduce



I have a horizontal main screen and vertical screen adjacent. 

Open Phone Link. hit the 'x' button to minimize to tray. Win-key to search 'Phone Link' and click to open. Drag phonelink to new screen. Occasionally, PhoneLink will soft-crash (i.e. resize and become unresponsive). Shift key appears inoperative. shift+(any key) is ignored. PowerZone's 'shift-drag' is activated (e.g. as if I were dragging a window and holding SHIFT, the zones (1,2) appear on my monitor, despite not actively dragging a window (only typing SHIFT+?)

### ✔️ Expected Behavior

shift key continues to perform SHIFT function to other keys, e.g. "SHIFT+a = @, shift + ; = :"



### ❌ Actual Behavior

Shift key is 'captured' by power zones. Typing into a text field works for typical keypresses (a,b, 4, keypad5, \, `, etc.) but not for SHIFT+keypresses. Nothing is typed, there is no input. SHIFT+s: <None> nothing happens, nothing is typed/entered

I can see with my cursor that PowerZones is activated (e.g. part 1 of my screen, part 2 of my screen as if you were click-dragging + shift onto other windows.)


### Other Software

OS Name	Microsoft Windows 10 Pro
Version	10.0.19045 Build 19045
Phone Link 1.23092.151.0
Powerzone 0.75.1
Repository: next.js
Issue: `@next/bundle-analyzer` generates html files with `analyzerMode: "json"`
Labels: bug

### Link to the code that reproduces this issue

https://github.com/nyarthan/next-bundle-analyzer-json

### To Reproduce

1. Buid the application with `@next/bundle-analyzer` configured to output json
2. inspect the files generated by the bundle analyzer (`ls -l .next/analyze`)

### Current vs. Expected behavior

With the output set to json (`analyzerMode: 'json'`), I expect the files to have the file extension `.json`. Currently the have the extension `.html` even though they contain json data.

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu, 26 Oct 2023 00:52:20 +0000
Binaries:
  Node: 18.18.2
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.9.2
Relevant Packages:
  next: 14.0.2-canary.11
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Additional context

_No response_
Repository: godot
Issue: Crash when cursors exists window anywhere other than the top
Labels: bug,platform:macos,topic:porting,crash

### Godot version

Godot 4.2 Beta 4

### System information

Godot v4.2.beta4 - macOS 13.5.1 - Vulkan (Forward+) - integrated Intel(R) Iris(TM) Plus Graphics - Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (8 Threads)

### Issue description

```gdscript
extends Control

func _ready() -> void:
	mouse_entered.connect(func(): Input.mouse_mode = Input.MOUSE_MODE_HIDDEN)
	mouse_exited.connect(func(): Input.mouse_mode = Input.MOUSE_MODE_VISIBLE)

```

This script causes a crash when the cursor exits the window anywhere other than from the top.

### Steps to reproduce

1. Create Godot project
2. Create a new scene with a Control as the root node
3. Size and anchor the control so that it covers the window
4. Add a script to the Control
5. Copy and paste script from above
6. If cursor is outside the window when the game starts, move it into the window (doesn't matter from where)
7. Move cursor out of window by exiting through the bottom, left side or right side of the window

Expected: Cursor exits the window and cursor is visible again
Actual: Crash

Crash report:
https://pastebin.com/dfj6qRGh

### Minimal reproduction project

[cursor-crash.zip](https://github.com/godotengine/godot/files/13257894/cursor-crash.zip)
Repository: ollama
Issue: Improved context window size management
Labels: feature request,performance,memory

Context window size is largely manual right now – it can be specified via `{"options": {"num_ctx": 32768}}` in the API or via `PARAMETER num_ctx 32768` in the Modelfile. Otherwise the default value is set to `2048` unless specified (some models in the [library](https://ollama.ai/ will use a larger context window size by default)

Context size should be determined dynamically at runtime based on the amount of memory available.