sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: createBufferedTransformStream is unnecessarily slow
Labels: bug,Pages Router

### Verify canary release

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

### Provide environment information

```bash
➜  next.js git:(canary) next info            

    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:23 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6020
    Binaries:
      Node: 20.5.1
      npm: 9.8.0
      Yarn: N/A
      pnpm: 8.6.11
    Relevant Packages:
      next: 13.4.20-canary.9
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      typescript: N/A
    Next.js Config:
      output: N/A
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Data fetching (gS(S)P, getInitialProps)

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/vercel/next.js/blob/2b497413087c56dedb3e04f77ea0deebb5d12d0b/packages/next/src/server/stream-utils/node-web-streams-helper.ts#L114

### To Reproduce

git clone https://github.com/wirelessben/Nextjs-async-test.git
➜  Nextjs-async-test git:(main) ✗ node setTimeout.js  
setTimeout: 1.364ms
➜  Nextjs-async-test git:(main) ✗ node setImmediate.js
setImmediate: 0.845ms
➜  Nextjs-async-test git:(main) ✗ node just_async.js  
just async: 0.227ms


### Describe the Bug

An asynchronous callback is ~6X faster than the setTimeout function.

### Expected Behavior

The asynchronous callback will perform much faster than the setTimeout function.

### Which browser are you using? (if relevant)

Chrome Version 116.0.5845.96

### How are you deploying your application? (if relevant)

Command line test app
Repository: PowerToys
Issue: Key bind to extend a window across another zone in fancy zones
Labels: Needs-Triage

### Description of the new feature / enhancement

Fancy zones allows us to be able to have a window occupy 2 zones when you hover between the zones however there isn't a way to do that via a key bind.

I'm proposing a key bind which allows fancy zones to extend a window that is currently placed in a zone to extend to another zone.

### Scenario when this would be used?

Some people use Windows arrow keys in order to snap to another window however when they want it to occupy another window they're forced to take their mouse and drag it between the window that their on and extend it to another window

### Supporting information

_No response_
Repository: angular
Issue: Accept custom error message in Validators.pattern()
Labels: area: forms,forms: validators

### Which @angular/* package(s) are relevant/related to the feature request?

forms

### Description

Currently, `Validators.pattern()` is defined as so:

```
static pattern(pattern: string | RegExp): ValidatorFn;
```
When used and the control is invalid we get this as result:

```
pattern: { 
  requiredPattern: '/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).{6,32}$/', 
  actualValue: 'hello'
}
```

Right now we can't assign a specific error message to that validator and we always need to use controlName + error type to display the error for the users.

### Proposed solution

The proposed solution is to accept a secondary parameter, with a custom error message and return that message along with the rest of the error data:

```
static pattern(pattern: string | RegExp, message: string | undefined): ValidatorFn;
```

### Alternatives considered

Perhaps this would be beneficial as well to be added to other types of Validators.
Repository: TypeScript
Issue: When assigning a generic to a generic type prop, it is not evaluated like a set
Labels: Needs More Info

### 🔎 Search Terms

generic

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about generic


### ⏯ Playground Link

https://codesandbox.io/s/ts-bugs-p9lrhh?file=/src/test.tsx

### 💻 Code

```ts
type Merge<T, U> = Omit<T, keyof U> & U;
type PropsWithAs<P, E extends React.ElementType> = P & { as?: E };
type PolymorphicProps<P, E extends React.ElementType> = Merge<
  React.ComponentPropsWithoutRef<E>,
  PropsWithAs<P, E>
>;
type Props = { color?: string };

function PolymorphicDiv<E extends React.ElementType>({ as }: { as?: E }) {
  const Tag = as ?? "div";
  return <Tag />;
}

function PolymorphicFlex<E extends React.ElementType = "div">({
  as,
  ...rest
}: PolymorphicProps<Props, E>) {
  return <PolymorphicDiv as={as} display="flex" {...rest} />;
}
function ExpectedBehavior<E extends React.ElementType = "div">({
  as,
  ...rest
}: PolymorphicProps<Props, E>) {
  return <PolymorphicFlex as={as} {...rest} />;
}

type PP<P, E extends React.ElementType> = Merge<
  PropsWithAs<P, E>,
  React.ComponentPropsWithoutRef<E>
>;

```


### 🙁 Actual behavior

```tsx
// It works like `IntrinsicAttributes && Omit<PropsWithoutRef<ComponentProps<E>>, "as" | "color"> && Props && { as?: E }`
function ExpectedBehavior<E extends React.ElementType = "div">({
  as,
  ...rest
}: PolymorphicProps<Props, E>) {
  return <PolymorphicFlex as={as} {...rest} />;
}

// Error
// Type '{ as: E | undefined; } & Omit<PolymorphicProps<Props, E>, "as">' is not assignable to type 'IntrinsicAttributes & Omit<PropsWithoutRef<ComponentProps<E>>, "as" | "color"> & Props & { ...; }'.
// Type '{ as: E | undefined; } & Omit<PolymorphicProps<Props, E>, "as">' is not assignable to type 'Omit<PropsWithoutRef<ComponentProps<E>>, "as" | "color">'.
```

It seems to be evaluated like a `&&` conditional statement which type can be assigned to a type.
However, if a type can be assigned, it must be evaluated like a set. (like a `||` conditional statement)
(When `as` is not assignable to `Omit<PropsWithoutRef<ComponentProps<E>>, "as" | "color">`, it returns `false` immediately but actually it is assignable to `PolymorphicProps` type.)

### 🙂 Expected behavior

```tsx
// When reverse merge order, it works
type PP<P, E extends React.ElementType> = Merge<
  PropsWithAs<P, E>,
  React.ComponentPropsWithoutRef<E>
>;

function ExpectedBehavior<E extends React.ElementType = "div">({
  as,
  ...rest
}: PP<Props, E>) {
  return <PolymorphicFlex as={as} {...rest} />;
}
```

And I think it is bug, because when I reverse merge order (then TypeScript evaluate `as` is assignable to `Omit<Props & { as?: E }, "color" | ...> & IntrinsicAttributes & PropsWithoutRef<ComponentProps<E>>`) it works. 

### Additional information about the issue

_No response_
Repository: flutter
Issue: Benchmark regressions after removing image decoding APIs
Labels: engine,P2,team-engine,triaged-engine

There are some rather large regressions on "time to first frame" for the complex layout benchmark. Are these to be expected?

[Skia regression link](https://flutter-flutter-perf.skia.org/e/?begin=1691652204&end=1693090952&keys=Xa2f4f2d78d99c6375b9bdf0744384fad&requestType=0&selected=commit%3D36471%26name%3D%252Carch%253Dintel%252Cbranch%253Dmaster%252Cconfig%253Ddefault%252Cdevice_type%253Dnone%252Cdevice_version%253Dnone%252Chost_type%253Dmac%252Csub_result%253DtimeToFirstFrameRasterizedMicros%252Ctest%253Dcomplex_layout_macos__start_up%252C&xbaroffset=36471)

CC @LongCatIsLooong
Repository: godot
Issue: [GDExtension] Crash in `unregister_core_types()` in `Main::cleanup()` if have accessed `GDExtensionManager`, `ResourceUID` or `IP` singletons in GDExtension.
Labels: bug,topic:core,topic:gdextension,crash

### Godot version

4.2.dev

### System information

Windows 10, Vulkan, GTX1060

### Issue description

`GDExtensionManager`, `ResourceUID` or `IP` singletons can be accessed in GDExtension, but will make godot crash in `Main::cleanup()`.

And I notice that, in "register_core_types.cpp", these three singletons is different from other singletons.

### Steps to reproduce

Just access them in GDExtension.

For example, just change "register_types.cpp" in godot-cpp's test like this.
```
/* godot-cpp integration testing project.
 *
 * This is free and unencumbered software released into the public domain.
 */

#include "register_types.h"

#include <gdextension_interface.h>

#include <godot_cpp/classes/gd_extension_manager.hpp>
#include <godot_cpp/classes/ip.hpp>
#include <godot_cpp/classes/resource_uid.hpp>
#include <godot_cpp/variant/utility_functions.hpp>

using namespace godot;

void initialize_example_module(ModuleInitializationLevel p_level) {
	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
		return;
	}

	UtilityFunctions::print(GDExtensionManager::get_singleton());
	UtilityFunctions::print(ResourceUID::get_singleton());
	UtilityFunctions::print(IP::get_singleton());
}

void uninitialize_example_module(ModuleInitializationLevel p_level) {
	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
		return;
	}
}

extern "C" {
// Initialization.
GDExtensionBool GDE_EXPORT example_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) {
	godot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);

	init_obj.register_initializer(initialize_example_module);
	init_obj.register_terminator(uninitialize_example_module);
	init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);

	return init_obj.init();
}
}
```


### Minimal reproduction project

[project.zip](https://github.com/godotengine/godot/files/12447267/project.zip)
Repository: TypeScript
Issue: Assigning property values square bracket access and exactOptionalPropertyTypes enabled has inconsistent behaviour
Labels: Bug

### 🔎 Search Terms

exact optional
indexed access
indexed assignment
square bracket access

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about exact optional property types


### ⏯ Playground Link

https://www.typescriptlang.org/play?exactOptionalPropertyTypes=true&ts=5.2.2#code/N4KABGAuCeAOCmYDKB7AtvSALAlgOwHMwBeMUCCAQwH4AuMAZ0gCd8CBucMAX064GMUeJmAAe9VBmxsSZXiC4AzAK55+kHELCUGDHATwAVFAGl40ABQBrc-RvQUi5Oky5CAGjAA3SgBtl8PRMrIRgAD5gqgAm8Ir48FEAlGRcEKIA2vYAurI+-vDsFGAA9MVg8MzMKMwKRaIAdJS5fgGFRRCl5ZXVqWLpAOSU-Tmkea1FnRVVNRDctdq6+kam5haD-Z7RsfFJnHMg5FBwiJKuMqSHVHSMLGycRQBG18F3XPICQiLizlJuRBfvCAqNQaLQ6PQGYxmSz2OzmRw-M4ebwtQI3EJECJbOJ4BLJS59bLNfJtDplPAoLrTeZpRrE8btEplKY9OoDIYjFEkibM7ozHjzcFLKGrdabPAxHF4vZAA
### 💻 Code

```ts
{
  type Something = {
    a?: string;
  };

  const x: Something = {};

  function assignToKey(key: keyof Something, value: string | undefined) {
    x[key] = value;    // error

    x.a = value;       // error
    x['a'] = value;    // error
  }

  assignToKey('a', undefined);
}

{
  type Something = {
    a?: string;
    b?: string;
  };

  const x: Something = {};

  function assignToKey(key: keyof Something, value: string | undefined) {
    x[key] = value;    // no error

    x.a = value;       // error
    x['a'] = value;    // error
  }

  assignToKey('a', undefined);
}
```


### 🙁 Actual behavior

Assigning `undefined` to properties when using variable as key shows no error, where the type of the variable is a union of strings.
Accessing a particular property and assigning `undefined` shows error.
If the variable used as key name has the type as a single string, it shows error.

### 🙂 Expected behavior

Should show error consitently across all cases.

### Additional information about the issue

_No response_
Repository: godot
Issue: C# Harmony/MonoMod.RuntimeDetour library causes System.DllNotFoundException or System.NotImplementedException
Labels: bug,topic:dotnet

### Godot version

v4.1.1.stable.mono.official.bd6af8e0e

### System information

Godot v4.1.1.stable.mono - Linux Mint 21.1 (Vera) - Vulkan (Forward+) - dedicated AMD Radeon RX 6600 (RADV NAVI23) () - AMD Ryzen 7 1800X Eight-Core Processor (16 Threads)

### Issue description

Depending on the way that Harmony is set up, two different, but both undesirable, outcomes will occur.
With both the latest Harmony pre-release, and MonoMod.RuntimeDetour referenced, as is set up in the reproduction project, any attempt to patch a method will result in an error that looks like this
```
System.DllNotFoundException: Unable to load shared library '/tmp/mm-exhelper.so.Jvmlua' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
/tmp/mm-exhelper.so.Jvmlua: undefined symbol: _Unwind_RaiseException
```
(Jvmlua is normally a completely random string of characters, I somehow got lucky enough to get that)
It will also not patch any methods, but will continue to run.
I believe this is a bug with Godot because Harmony and MonoMod.RuntimeDetour work fine outside of Godot.

With only the Harmony pre-release referenced, and not MonoMod.RuntimeDetour, it instead throws this
```
System.NotImplementedException: The method or operation is not implemented.
```
and still does not patch any methods, and also continues running.
This also does not occur outside of Godot.

### Steps to reproduce

1. Install the latest Harmony pre-release (and optionally the latest MonoMod.RuntimeDetour) into the project through Nuget
2. Write a patch using Harmony that gets triggered somewhere in the scene
3. Run the player, I don't believe Harmony would work in the editor because of assembly reloading

### Minimal reproduction project

[GodotHarmonyBug.zip](https://github.com/godotengine/godot/files/12447499/GodotHarmonyBug.zip)
Remove this line in the .csproj to get the second case
```
    <PackageReference Include="MonoMod.RuntimeDetour" Version="25.0.2" />
```
Repository: next.js
Issue: RootLayout behaves differently in dev and production mode
Labels: bug

### Verify canary release

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

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 18.16.1
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.20-canary.9
      eslint-config-next: 13.4.19
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.2.2
    Next.js Config:
      output: N/A
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App Router

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/wuxudongxd/nextjs-issue-demo

### To Reproduce

1. git clone the reproduce repository
2. npm install
3. npm run dev, and will see:
In the homepage, there will be a random color. When change to page1, the color will not change. This is as expected, the layout will not be re-rendered ([Layout docs](https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts#layouts)).
4. npm run build & npm run start, and will see:
When change to page1, the color will be changed. And when refreshing an individual page multiple times, the random color will also remain unchanged.


### Describe the Bug

There are different behavioral patterns here in development and production mode. In production mode, the content within the root layout will be replaced when the page changes. 

![image](https://github.com/vercel/next.js/assets/30227294/0103a0da-6b6b-474d-ac91-1983373f2b65)
![image](https://github.com/vercel/next.js/assets/30227294/97ccc25f-753d-4cdf-a75a-8a8b754df284)
![image](https://github.com/vercel/next.js/assets/30227294/08d9e1f6-71cb-4361-b77c-7448ddf0ea4c)



### Expected Behavior

In production mode, the content within root layout should not be replaced when the page changes, consistent with the behavior in dev mode

### Which browser are you using? (if relevant)

Chrome 116.0.5845.111、Microsoft Edge 116.0.1938.54、Firefox 115.0.2

### How are you deploying your application? (if relevant)

https://nextjs-issue-demo.vercel.app/
Repository: pytorch
Issue: [FSDP] Ignored modules on meta device seem to be initialized on CUDA device
Labels: oncall: distributed,triaged,actionable,module: fsdp

### 🐛 Describe the bug

When passing in a module as `ignored_modules`, should we also ensure FSDP does not initialize it via `to_empty` + `reset_parameters`? If `ignored_modules` contract is that FSDP ignores the module entirely, this might be what's expected especially if users want to apply different initialization / sharding to the ignored modules.

One way this could cause issues in practice is if I have a very large embedding on a meta device, wrap with FSDP and ignore it, and want to initialize + shard the embedding separately after FSDP wrap. In this case, seems like the full Embedding would be allocated by FSDP.

The following test should reproduce

```
@skip_if_lt_x_gpu(2)
    def test_fsdp_ignored_module_meta(self):
        class CPUGPUModule(nn.Module):
            def __init__(self):
                super().__init__()
                self.a = nn.Linear(1, 1)
                self.b = nn.Linear(1, 1)

        with torch.device("meta"):
            m= CPUGPUModule()
        m = FSDP(m, device_id=self.rank, ignored_modules=[m.a], use_orig_params=True)
        print(f"RV: {next(m.a.parameters()).device}")
```

### Versions

main

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin
Repository: next.js
Issue: Parallel Route Error handler does not work on production
Labels: bug

### Verify canary release

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

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.16.1
      npm: 9.5.1
      Yarn: 3.6.3
      pnpm: 8.6.12
    Relevant Packages:
      next: 13.4.20-canary.9
      eslint-config-next: 13.4.19
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.2.2
    Next.js Config:
      output: N/A

(Same behaviour in stable version)
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App Router

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/Vahor/nextjs-error-handler-bug

### To Reproduce

Steps:
- Run `pnpm dev`, the page will look like this
![image](https://github.com/vercel/next.js/assets/17593209/d6ffd73c-332b-436d-a5fe-7452eaadc45f)
- Run `pnpm build` then `pnpm start`, the page will look like this:
![image](https://github.com/vercel/next.js/assets/17593209/01548374-61cc-4f44-8291-a08b9357d885)

``

### Describe the Bug

Having a `error.tsx` file in a parallel route does not work in production. But work in dev mode.

### Expected Behavior

The behaviour should be the same in both prod and dev mode.

The `error.tsx` file in the `@nested` folder should be used.

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: godot
Issue: Geometry2D.is_point_in_polygon() give inconsistent result on exactly boundary points
Labels: topic:core,needs testing

### Godot version

4.1.1.stable

### System information

Godot v4.1.1.stable - Fedora Linux 38 (Workstation Edition) - Vulkan (Compatibility) - AMD Radeon Graphics (renoir, LLVM 16.0.6, DRM 3.52, 6.4.12-200.fc38.x86_64) () - AMD Ryzen 7 5700G with Radeon Graphics (16 Threads)

### Issue description

Geometry2D.is_point_in_polygon resulted false on some points exactly on polygon's boundary. On square polygon, it affects only on left and top boundary.

### Steps to reproduce

```GDScript
var false_values = []

for i in range(1,100):
	var square:PackedVector2Array = [Vector2(-i,-i),Vector2(i,-i),Vector2(i,i),Vector2(-i,i)]
	var left_boundary_point = Vector2(-i,0)

	if Geometry2D.is_point_in_polygon(left_boundary_point, square) == false:
		false_values.append(i)

prints(false_values)
```
prints:

```GDScript
[42, 43, 45, 46, 47, 49, 51, 54, 57, 58, 59, 61, 63, 66, 68, 69, 70, 75, 76, 77, 78, 84, 85, 86, 87, 90, 91, 92, 93, 94, 97, 98]
```

### Minimal reproduction project

steps are trivial
Repository: godot
Issue: Setting Color r g b a properties to NAN causes the values of the r8 b8 g8 a8 properties to go out of range.
Labels: bug,topic:core

### Godot version

v4.2.dev3.official.013e8e3af

### System information

Windows 10.0.19045 - GLES3 (Compatibility)

### Issue description

As documented [here](https://docs.godotengine.org/en/stable/classes/class_color.html#property-descriptions), the values of the `r8` `b8` `g8` `a8` properties of a `Color` are always supposed to be in range from `0` to `255`.
It is not possible to directly set the values to be outside of that range, for example `color.r8 = 500` will actually set the value to 255.

However, setting one of the `r` `g` `b` `a` properties of a `Color` to `NAN` causes the respective "8" property to be set to `-2147483648`.

### Steps to reproduce

Run the MPR code from below.

### Minimal reproduction project

```gdscript
var x = Color(NAN, NAN, NAN, NAN)
print(x.r8)
print(x.g8)
print(x.b8)
print(x.a8)
```
Repository: godot
Issue: Mouse pointer disappears when hold & drag in Input fields
Labels: discussion,topic:gui

### Godot version

4.0 stable, 4.2.dev

### System information

Godot v4.2.dev (6da4ad166) - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 Laptop GPU (NVIDIA; 31.0.15.3699) - 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 Threads)

### Issue description

Mostly in `4.0 stable`, When I hold & drag to adjust the value in input fields, the mouse pointer disappears and doesn't come back often. In the latest version it's happening rarely, but the pointer still vanishes and only reappears after some time or when I restart the engine.
I suggest to use some arrow icon like this ![arrow](https://github.com/godotengine/godot/assets/81252768/195dd666-188f-4a29-b6e3-7b3d0ed79a60)  if we hold and drag.



### Steps to reproduce

1. Open any project and go to the inspector
2. Select any field i.e. position, scale, rotate
3. Hold and drag to change the value.
4. See the pointer disappear

### Minimal reproduction project

N/A
Repository: ant-design
Issue: colorErrorHover sets border color in select component with error status when NOT in hover state
Labels: Inactive,improvement

### Reproduction link

[https://ant.design/theme-editor#component-color](https://ant.design/theme-editor#component-color)

### Steps to reproduce

Go to the 'Select' component and modify 'colorErrorHover'. The error example will have a border of that color regardless of hover state. 

### What is expected?

The border should only be that color when the component is hovered upon.

### What is actually happening?

The border is the 'colorErrorHover' color regardless of hover state. 

| Environment | Info |
| --- | --- |
| antd | 5.8.4 |
| React | 18.2.0 |
| System | macOS Ventura 13.2.1 |
| Browser | Chrome 115.0.5790.170 |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->