sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: "maximum call stack size exceeded error" not showing
Labels: bug

### Link to the code that reproduces this issue

https://github.com/in-ch/nextjs-bug-report/tree/master/maximum-call-stack-size-exceeded-error

### To Reproduce

1. Run <code>npx create-next-app@latest</code> from your terminal.
2. Go to <code>src/app/page.tsx</code>
3. edit the file following the code 
```typescript 
// src/app/page.tsx
export default function Home() {
  return (
      <Home />
  )
}
```
4. Run <code>npm run dev</code> from your terminal.

### Current vs. Expected behavior


```typescript 
// src/app/page.tsx
export default function Home() {
  return (
      <Home />
  )
}
```

When I structure my components to have circular references, the call stack should theoretically overflow, leading to a <code>RangeError: Maximum call stack size exceeded error.</code> However, in practice, this error does not occur (it works as expected when using a page router). 

Additionally, when I forcefully terminate the app and restart it, there is a persistent issue where the original port (e.g., 3000) remains occupied.

https://github.com/in-ch/nextjs-bug-report/assets/49556566/ce8a2344-24cd-433f-a201-b1d2706cfb26

### Expected Behavior
An error occurs with the message <code>RangeError: Maximum call stack size exceeded</code> when running the app.

### 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 Fri Jan 27 02:56:13 UTC 2023
    Binaries:
      Node: 18.16.1
      npm: 9.7.2
      Yarn: 1.22.19
      pnpm: N/A
    Relevant Packages:
      next: 13.4.20-canary.2
      eslint-config-next: 13.4.19
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A
```


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

App Router

### Additional context

_No response_
Repository: pytorch
Issue: t.contiguous() ~10 slower in eager mode compared to torch.compile
Labels: module: performance,module: cuda,triaged

### 🐛 Describe the bug

```py
In [1]: import torch

In [2]: import torch.utils.benchmark as benchmark

In [3]: @torch.compile
   ...: def transpose(src):
   ...:     return src.t().contiguous().t()
   ...:

In [4]: embs = torch.empty((32768, 8192), dtype=torch.float8_e4m3fn, device="cuda")

In [5]: eager_timer = benchmark.Timer(
   ...:     stmt='fn()',
   ...:     globals={'fn': lambda: embs.t().contiguous().t()},
   ...: )

In [6]: print(eager_timer.blocked_autorange(min_run_time=2))
<torch.utils.benchmark.utils.common.Measurement object at 0x7fc18ce28e50>
fn()
  Median: 1.98 ms
  IQR:    0.00 ms (1.98 to 1.98)
  11 measurements, 100 runs per measurement, 1 thread

In [7]: compiled_timer = benchmark.Timer(
   ...:     stmt='fn()',
   ...:     globals={'fn': lambda: transpose(embs)},
   ...: )

In [8]: print(compiled_timer.blocked_autorange(min_run_time=2))
<torch.utils.benchmark.utils.common.Measurement object at 0x7fbebc66ed10>
fn()
  Median: 223.82 us
  IQR:    0.05 us (223.79 to 223.84)
  9 measurements, 1000 runs per measurement, 1 thread

```

### Versions

PyTorch version: 2.2.0.dev20231025

cc @ptrblck @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519
Repository: go
Issue: proposal: slices: add Shift
Labels: Proposal

I propose adding the following function to slices:

```go
// Shift removes the first element from s, returning false if the slice is empty.
func Shift[S ~[]E, E any](s S) (first E, rest S, ok bool) {
	if len(s) == 0 {
		rest = s
	} else {
		first, rest, ok = s[0], s[1:], true
	}
	return
}
```

Like #64095, this is useful for parsing stuff.

---

[**Update:**](https://github.com/golang/go/issues/64103#issuecomment-1811721369) I think this is better without the `ok` return value.
Repository: ant-design
Issue: Select mode="multiple" doesn't read height from theme.json
Labels: Inactive,unconfirmed

### Reproduction link

[https://ibb.co/QkkW6Jj](https://ibb.co/QkkW6Jj)

### Steps to reproduce

create a select component with mode="multiple" and set controlHeight to 28 in theme.json, you will see that it stays at 32px not 28px.

### What is expected?

expectations is having 28px

### What is actually happening?

height is not changing

| Environment | Info |
| --- | --- |
| antd | 5.11.0 |
| React | 18 |
| System | mac |
| Browser | chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: [Framework] Add support for Kotlin auto-formatting 
Labels: framework,P2,team-android,triaged-android

Similar to #118756 Add support for running/enforcing ktformat with default 2 space implementation for gradle kotlin files.
Repository: TypeScript
Issue: better ux and ui design for debug
Labels: Needs Proposal

### 🔍 Search Terms

- format ts syntax, ux , ui

### ✅ 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

Do you think you can do something (modernize) the way TS tokenizes and formats the output for better formatting and syntax readability in vscode?
I'm still surprised that the language provides a mediocre appearance with very poorly formatted like JSON from the 80s!
Thank you



### 📃 Motivating Example

actual behavior :
![image](https://github.com/microsoft/TypeScript/assets/24865815/649e3c36-d876-4c28-8efc-2eb5fd833d7f)

---

expected behiavior:
![image](https://github.com/microsoft/TypeScript/assets/24865815/68c89910-57f9-4132-9be9-13ce79b68016)


### 💻 Use Cases

1. What do you want to use this for?
debugging
2. What shortcomings exist with current approaches?
none
3. What workarounds are you using in the meantime?
none
Repository: flutter
Issue: Consider adding Container.square or BoxDecoration to SizedBox
Labels: P3,team-design,triaged-design,Design Systems Study

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

This came up during the design review. When building a custom design system, there may be cases where developers want to create a decorated square container. Currently, there is `SizedBox.square` - but this doesn't allow for a `BoxDecoration`

### Proposal

We could consider adding `Container.square(...)` or a `boxDecoration` property to `SizedBox`
Repository: PowerToys
Issue: [Settings > Dashboard] Explorer add-ons missing
Labels: Issue-Bug,Product-Settings,Status-In progress,Area-User Interface

### Microsoft PowerToys version

0.75.1

### Installation method

GitHub, PowerToys auto-update

### Running as admin

None

### Area(s) with issue?

Settings

### Steps to reproduce

1. Open settings and navigate to the dashboard.

### ✔️ Expected Behavior

There is a crad for the Explorer add-ons.

### ❌ Actual Behavior

There is no card for the Explorer add-ons on the dashboard.

### Other Software

_No response_
Repository: next.js
Issue: 404 page not returned on dynamic pages when middleware is added (Pages directory)
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/beautiful-dawn-7r9q24

### To Reproduce

1. Visit the provided reproduction link.
2. Navigate to any todo on the index page after the 5th ID.
3. It should route to the 404 page.
4. Rename the middleware2.ts file to middleware.ts.
5. Repeat Step 2.
6. This will result in an application error.

### Current vs. Expected behavior

Current Behaviour:
- With Middleware dynamic not found pages throws application error

Expected Behaviour:
- With Middleware dynamic not found page should navigate to 404 page

### Verify canary release

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

### Provide environment information

```bash
NA
```


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

Middleware / Edge (API routes, runtime)

### Additional context

Since Next 12, I have been experiencing issues with routing to the 404 page on dynamic pages when using middleware. I am attempting to render 404 pages when a path does not exist. However, when I enable middleware, it throws an application error instead of routing to 404. Interestingly, when I remove the middleware, the routing works as expected.

```tsx
export async function middleware(request: NextRequest) {
  return NextResponse.next();
}
```
Repository: godot
Issue: Inconsistent sliding speed in simple physics interaction
Labels: topic:physics,needs testing,topic:3d

### Godot version

4.1.2

### System information

Windows 10

### Issue description

Found an issue when trying to port a small game from 3 to 4. 
There is an issue when a physics object such as characterbody3d or rigidbody3d slides across a surface (staticbody3d tested). When creating a simple physics interaction where an object should slide across the ground and gradually come to a stop, the actual speed of the object will be much lower than the velocity value.

The issue only seems to occur when the moving object starts airborne, or at least it is more prevalent in that case.

This behavior did not occur the project i made in godot 3, so i dont believe it is intended.

### Steps to reproduce

Attached is a minimum reproduction project. Simply run the project and the example will play. The console logs the collision, the velocity and the actual speed of the moving object.


### Minimal reproduction project

[example.zip](https://github.com/godotengine/godot/files/13338806/example.zip)
Repository: rust
Issue: Overflow evaluation when using a wrapper function
Labels: C-bug,T-types,fixed-by-next-solver

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
pub struct AdditiveShare<T>(T);

pub trait SharedValue {}

pub trait IntoIteratorB {
    fn into_iter_b(&self) {}
}

impl <'a, T> IntoIteratorB for &'a AdditiveShare<T>
    where
        &'a T: IntoIteratorB,
        T: SharedValue,
{}


fn addition<'a, T>(x: &'a AdditiveShare<T>)
    where
            &'a T: IntoIteratorB,
            T: SharedValue,
{
    addition_circuit(x);
}

fn addition_circuit<'a, T>(x: &'a AdditiveShare<T>)
    where
            &'a T: IntoIteratorB,
            T: SharedValue,
{
    x.into_iter_b();
}

impl SharedValue for u32{}

impl<'a> IntoIteratorB for &'a u32{
    fn into_iter_b(&self){}
}

fn main ()
{
    let u=AdditiveShare(0u32);
    (&u).into_iter_b();
    println!("Hello, world!");
}
```

I expected to see this happen: that it would compile

Instead, this happened: error[E0275]: overflow evaluating the requirement `&AdditiveShare<_>: IntoIteratorB`

Interestingly, commenting out the wrapper function does not result in a compilation error:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=887c6cfabce6e3eb64b561d278f28807

however, this does:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d3d7e05d015b3eb397eb8fe5b7433f6a

It might be related to #39959, however this code works when commenting out the wrapper function.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.75.0-nightly (fdaaaf9f9 2023-11-08)
binary: rustc
commit-hash: fdaaaf9f923281ab98b865259aa40fbf93d72c7a
commit-date: 2023-11-08
host: aarch64-apple-darwin
release: 1.75.0-nightly
LLVM version: 17.0.4
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
<backtrace>
```

</p>
</details>
Repository: pytorch
Issue: Deepcopying an exported model changes numerics for MobileNetV2
Labels: high priority,triage review,triaged,export-triage-review,oncall: export

Below is a minimally reproducible example for MobileNetV2. I would expect the output to remain exactly the same even after deepcopy. I was unable to reproduce this for a simple `conv-bn` model, however, so maybe there are specific ops in MobileNetV2 that are causing this.

```
import copy
import torch
from torch._export import capture_pre_autograd_graph
from torch.ao.quantization.quantizer.xnnpack_quantizer import (
    XNNPACKQuantizer,
    get_symmetric_quantization_config,
)
from torch.ao.quantization.quantize_pt2e import prepare_qat_pt2e
import torchvision

example_inputs = (torch.randn(1, 3, 224, 224),)
m = torchvision.models.mobilenet_v2(num_classes=2)
m = capture_pre_autograd_graph(m, example_inputs)
quantizer = XNNPACKQuantizer()
quantizer.set_global(get_symmetric_quantization_config(is_per_channel=False, is_qat=True))
m = prepare_qat_pt2e(m, quantizer)
m_copy = copy.deepcopy(m)

orig_output = m(*example_inputs)
copied_output = m_copy(*example_inputs)
print("Orig == copied? ", orig_output == copied_output)
print("Orig allclose copied? ", torch.allclose(orig_output, copied_output))
```

Output:
```
Orig == copied?  tensor([[False, False]])
Orig allclose copied?  False
```

Note: I needed to add the prepare step in this example because otherwise the above snippet would fail in the deepcopy step with the following unrelated error during symbolic trace:
```
  File "/data/users/andrewor/pytorch/torch/fx/experimental/proxy_tensor.py", line 464, in create_arg
    return super().create_arg(a)
  File "/data/users/andrewor/pytorch/torch/fx/_symbolic_trace.py", line 389, in create_arg
    return super().create_arg(a)
  File "/data/users/andrewor/pytorch/torch/fx/proxy.py", line 292, in create_arg
    raise NotImplementedError(f"argument of type: {type(a)}")
NotImplementedError: argument of type: <class 'torch.fx.graph_module.GraphModule.__new__.<locals>.GraphModuleImpl'>
```

cc @ezyang @gchanan @zou3519 @kadeng @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4
Repository: deno
Issue: FileResource-backed streams cannot be cancelled
Labels: bug,deno_core

As part of the fix for #21074, we introduced a test that started flaking. This test requires a ReadableStream to support full cancellation of all outstanding ops before the cancellation promise resolves. Unfortunately, FileResource streams do not have a any sort of read cancellation, and the op_read may last longer than the test itself.

This can likely be repro'd by opening a pipe on linux/windows and cancelling a stream when a read is outstanding.
Repository: flutter
Issue: Introduce the concept of an AppColor
Labels: c: new feature,P2,team-design,triaged-design,Design Systems Study

From the Design Systems Study

When talking about app color palettes, the material library's color scheme is (let's call it) vertical.

For an app's colors in this convention, the developer would configure multiple color schemes for each type of color setting: light, dark, lightHighContrast, darkHighContrast.

Here is a visual representation of the horizontal/vertical color scheme concept:

![Untitled drawing (4)](https://github.com/flutter/flutter/assets/16964204/d57eb8d3-9ec6-4c63-a7ef-9937c76698f2)


For example, in an app with two colors only (for simplicity's sake):

```dart
final ColorScheme light = ColorScheme.light(
  primary: Colors.white,
  secondary: Colors.black,
);
final ColorScheme dark = ColorScheme.dark(
  primary: Colors.black,
  secondary: Colors.white,
);
final ColorScheme light = ColorScheme.lightHighContrast(
  primary: Colors.white,
  secondary: Colors.black,
);
final ColorScheme light = ColorScheme.darkHighContrast(
  primary: Colors.white,
  secondary: Colors.black,
);
```

We learned in the study that some developers and designers think about app colors horizontally instead of vertically.
For example, in SwfitUI, you can specify an App's primary color along with its dark, and high contrast variants. 

Since theming already knows separately whether an app is in light, dark or a high contrast mode, we discussed maybe adding support for an AppColor, that would support the 4 colors variants, which would then represent the `primary` color of the app, and etc for the other colors of color scheme. Some designers prefer to think of app color palettes and styling this way rather than in the current way we use ColorScheme.

so looking at the example above:

```dart
final AppColorScheme(
  primary: AppColor(Colors.white),
  secondary: AppColor(Colors.white, dark: Colors.black),
);

// Or some such...


class AppColor {
  AppColor(
    this.light, {
    this.dark,
    this.lightHighContrast,
    this.darkHighContrast,
  });

  final Color light;
  final Color? dark;
  final Color? lightHighContrast;
  final Color? darkHighContrast;

  Color resolve(BuildContext context){
    final Brightness theme = Theme.of(context).brightness;
    final bool isHighContrast = MediaQuery.highContrastOf(context);
    return switch (brightness, isHighContrast) {
      (Brightness.light, true) => lightHighContrast ?? light;
      // etc....
    }
  }
}
```
Repository: PowerToys
Issue: Mouse Without Borders within PowerToys connectivity issues
Labels: Issue-Bug,Priority-1,Product-Mouse Without Borders

### Microsoft PowerToys version

0.75.1

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

Mouse Without Borders

### Steps to reproduce

I used to use the Mouse Without Borders stand-alone tool - that was extremely reliable.

I recently switched to Mouse Without Borders within Powertoys and that has been quite unreliable.  I am constantly running into issues with the two computers losing connectivity to each other while both are still reliably connected to the network.  They will not re-connect when I try reconnecting.  Typically the only thing that works is to reboot one or both computers.

I have experienced this problem utilizing Mouse Without Borders with: 
Windows 10 <-> Windows 11
Windows 11 <-> Windows 11

[Log_2023-11-13.txt](https://github.com/microsoft/PowerToys/files/13340280/Log_2023-11-13.txt)


### ✔️ Expected Behavior

Mouse Without Borders will reliably maintain a connection between the two computers.
Mouse Without Borders within PowerToys will have the same functionality as the stand-alone Mouse Without Borders.

### ❌ Actual Behavior

Mouse Without Borders within PowerToys drops the connection and does not reconnect when using the shortcut to try reconnecting or when pressing the Refresh connections button.

### Other Software

_No response_
Repository: pytorch
Issue: Creating Gaussian Mixture Models with MultivariateNormal
Labels: module: distributions,module: nn,triaged

### 📚 The doc issue

I want to create a Gaussian mixture model (GMM) using the `MixtureSameFamily`, `Categorical` and `MultivariateNormal` classes. The [example within MixtureSameFamily](https://pytorch.org/docs/stable/distributions.html#torch.distributions.mixture_same_family.MixtureSameFamily) provides a clear way for creating a GMM using `Normal`. However, I get errors when I attempt to create the mixture model using `MultivariateNormal`. For example, following the code example for `Normal`, the following code produces an error using `MultivariateNormal`:
```
if __name__ == "__main__":
    batch_size = 3
    n_comps = 5
    y_dim = 2

    # Compute pi.
    pi_logits = torch.tensor(range(batch_size * n_comps), dtype=torch.float32).reshape(batch_size, n_comps)
    pi_dist = Categorical(pi_logits)

    # Compute the multivariate normal.
    mu = torch.zeros(batch_size, n_comps, y_dim, dtype=torch.float32)
    sigma = torch.tensor(range(batch_size * n_comps * y_dim), dtype=torch.float32).reshape(batch_size, n_comps, y_dim)
    sigma = torch.diag_embed(sigma, dim1=-2, dim2=-1)
    normal_dist = MultivariateNormal(loc=mu, covariance_matrix=sigma)
    indp_normal_dist = Independent(normal_dist, 1)

    # Compute the mixture.
    mix_dist = MixtureSameFamily(pi_dist, indp_normal_dist)
```

### Suggest a potential alternative/fix

One suggestion would be to add documentation/examples for `MultivariateNormal` to `MixtureSameFamily`.

cc @fritzo @neerajprad @alicanb @nikitaved @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: node
Issue: Corrupted file read/write
Labels: fs

We noticed some corrupted files on our system and basically it seems that file read/write does not seem to increment the file handle offset. Hence writes will always write to offset 0 and reads will always read from offset 0.

From preliminary testing the issue seems to have been introduced in v20.3. I suspect https://github.com/nodejs/node/pull/48078 and  https://github.com/libuv/libuv/pull/3952.

Host kernel: 5.15.104-0-lts
Docker Daemon: 20.10.9
Docker Image: node:21.1.0-bullseye and 20.9.0-bullseye

The issue only seems to occur when writing/reading to a specific SMB mount.

```
volumes:
  backup:
    driver: local
    driver_opts:
      type: cifs
      o: 'username=secret,password=secret'
      device: '//somednsname/nxt_backup'
 ```

```js
import fs from 'fs'
import assert from 'assert'
const srcPath = '/backup/backup/0/0/0/0006d3befc1c41.mp4/0-TPtirLqtxVa6LP'
const dstPath = srcPath + '.tmp'
let position = 0
const src = await fs.promises.open(srcPath, 'r')
const dst = await fs.promises.open(dstPath, 'wx+')
try {
  while (true) {
    const { bytesRead, buffer } = await src.read() // { position })
    console.log('chunk', bytesRead, position)
    if (bytesRead === 0) {
      break
    }
    const chunk = buffer.subarray(0, bytesRead)
    await dst.write(chunk) // { position })
    position += bytesRead
  }
  await dst.sync()
} finally {
  await dst.close()
  await src.close()
}
const stat = fs.statSync(dstPath)
console.log('copied', dstPath, stat.size, position)
assert(position === stat.size, `${dstPath}: ${position} !== ${stat.size}`)
```

If we instead pass an explicit position to write/read then everything works as expected.

This also affects, `fs.createWriteStream` and `fs.createReadStream`.