sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: [go_router] Allow route restoration
Labels: c: new feature,package,c: proposal,P2,p: go_router,team-go_router,triaged-go_router

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

In Android, when you open the native image picker, if the device has low memory, the app in the background can get killed by the Android OS. We would like to be able to restore GoRouter's navigation stack, so that, if we're in a linear navigation stack A->B->C, if the user at C route opens the image picker, if Android kills the Flutter app, we can restore the app to the C route. I tried with the latest version (8.0.5), but I couldn't find any way to implement something like this, neither in any of the provided samples.

### Proposal

Ideally, an approach similar to https://pub.dev/packages/qlevar_router#restoration-management could be provided. If an automatic approach is not feasible, any way that would allow us to restore the navigation stack would be helpful.
Repository: godot
Issue: Dragging files (textures, ...) is extremely slow to their respective fields in the Inspector.
Labels: discussion,topic:editor,confirmed,topic:import,topic:3d,performance

### Godot version

4.1 b2

### System information

Windows 10, Nvidia GTX 1660Ti, Vulkan

### Issue description

When you drag a texture to albedo or normal or anything for the standard material from the FileSystem to Inspector, or an HDRI texture to Panorama sky material and so on it's extremely slow depending on the texture size.

Extreme example is an HDRI texture which has tens or hundreds of megabytes which is not a great test case for actual games but it shows the problem well: https://polyhaven.com/a/little_paris_under_tower

Real test cases are mesh textures a 2k or 4k texture which are not that uncommon for 3D are slow to drag too.

You have to drag the file, wait seconds while holding a button waiting if it actually works or not and then if the file appears under your mouse cursor you can then drag it to the appropriate place. If you release the mouse anytime before it shows the drag which can take several seconds then it won't work.

I assume godot is loading the file in some way or so when you drag it to figure out what it is or something? Would it be possible to cache somewhere what the files are so the editor knows where they can and can't go and then do the final load/processing after it's been dragged, please?
I understand that for smaller files it's not an issue but 2k or 4k textures are nothing unusual for 3D games and it's taking forever to texture the models and so on.

### Steps to reproduce

Download the link above, add a PanoramaSky and drag the EXR file into the panorama's texture field.
(I understand the EXR file is huge but that's the purpose of this report, to make sure no one misses how it works, the same issues happens with any regular texture, I assume not just textures but other file types as well)

### Minimal reproduction project

I'll add one with the texture, I have to leave right now but wanted to log this in.
Repository: go
Issue: x/image/bmp: NewNRGBA will panic when dealing with too large length and width
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
❯ go version
go version go1.20.4 darwin/arm64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
does not affect
</pre></details>

### What did you do?
```
package main

import (
	"bytes"
	"image"
	"os"

	"golang.org/x/image/bmp"
)

func main() {
	data := []byte("BM0000\x00\x00\x00\x006\x00\x00\x00(\x00\x00\x0000000000\x01\x00 \x00\x00\x00\x00\x0000000000000000000000")

	src, _, err := image.Decode(bytes.NewReader(data))
	if err != nil {
		panic(err)
	}
	file, err := os.Create("output.bmp")
	if err != nil {
		panic(err)
	}
	defer file.Close()

	err = bmp.Encode(file, src)
	if err != nil {
		panic(err)
	}
}
```
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->



### What did you expect to see?

Error returned: image size too large

### What did you see instead?

```
❯ go run main.go
panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
image.NewNRGBA({{0x3ee?, 0x24?}, {0x1400009ce68?, 0x280462c074?}})
        /usr/local/go/src/image/image.go:459 +0x64
golang.org/x/image/bmp.decodeNRGBA({0x10467e6e8, 0x14000092180}, {{0x10467e748?, 0x140000ac000?}, 0x1046703a0?, 0x104679980?}, 0x0, 0x0)
        /Users/*/go/pkg/mod/golang.org/x/image@v0.8.0/bmp/reader.go:89 +0x64
golang.org/x/image/bmp.Decode({0x10467e6e8, 0x14000092180})
        /Users/*/go/pkg/mod/golang.org/x/image@v0.8.0/bmp/reader.go:126 +0x64
image.Decode({0x10467e708?, 0x140000a01b0?})
        /usr/local/go/src/image/format.go:93 +0x8c
main.main()
        /Users/*/Desktop/src/cve/main.go:14 +0xbc
exit status 2
```

I tried to modify it to limit the length of the `decodeNRGBA` function, but it was only roughly completed. Need to know the size of `maxAlloc` in the `runtime` package. This is the fundamental solution to this bug
Repository: storybook
Issue: [Bug]: Stylus @import causes error
Labels: bug,compatibility with other tools,addon: styling

### Describe the bug

I'm using `Nx` monorepo with `Stylus` CSS preprocesor and `Storybook` v7 with `Vite` bundler.

My goal is to use shared styles library for `React` and `Vue3` UI components library. I've solved bundling issue with [This solution](https://github.com/vuejs/component-compiler-utils/issues/49#issuecomment-448624113) and my libraries pass build process with `@import` resolving totally fine. But `Storybook` fails independent of configuration.

In frontend i got: `TypeError: Failed to fetch dynamically imported module: ...` 
in console: 
```
 [vite] Internal server error: [postcss] /Users/.../libraries/vue-ui/src/lib/Badge/Badge.vue?vue&type=style&index=0&scoped=681721c9&lang.stylus:1:1: Unknown word
  Plugin: vite:css
  File: /Users/.../libraries/vue-ui/src/lib/Badge/Badge.vue?vue&type=style&index=0&scoped=681721c9&lang.stylus:1:1
  1  |  
     |   ^
  2  |    @import "~@mydse/styles/components/Badge.styl"
```

How can I fix this issue?

### To Reproduce

Looks like any usage of `@import ...` in stylus file or Vue styles section causes issue. All projects are generated with `Nx` library

### System

```shell
Environment Info:

  System:
    OS: macOS 13.4
    CPU: (12) arm64 Apple M2 Max
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Chrome: 114.0.5735.133
    Firefox: 114.0.1
    Safari: 16.5
  npmPackages:
    @storybook/addon-essentials: 7.0.22 => 7.0.22 
    @storybook/core-common: ^7.0.22 => 7.0.22 
    @storybook/core-server: 7.0.22 => 7.0.22 
    @storybook/react: 7.0.22 => 7.0.22 
    @storybook/react-vite: 7.0.22 => 7.0.22 
    @storybook/vue3: ^7.0.22 => 7.0.22 
    @storybook/vue3-vite: 7.0.22 => 7.0.22
```


### Additional context

_No response_
Repository: pytorch
Issue: Can ``torch.vmap`` add ``grad_fn``= SelectBackward when maping over some dimension of the inputs?
Labels: triaged,actionable,module: functorch

### 🐛 Describe the bug

When applying ``torch.vmap`` to calculate gradients, I come up with the error ``element 0 of tensors does not require grad and does not have a grad_fn`` with the following code:
```python
import torch
from torch import vmap

# Setup
N = 5
def f(x):
    return torch.stack([x**2, x**3, x**4, x**5, x**6], dim=0)

x = torch.randn(N, requires_grad=True)
y = f(x)
basis_vectors = torch.eye(N)

def get_vjp(y, v):
    print(y)
    return torch.autograd.grad(y, x, v)[0]

jacobian_vmap = vmap(get_vjp, in_dims=(0,0))(y, basis_vectors)
```
I check ``y`` of ``get_vjp`` and the reason is that the mapping operation does not create a computational graph.

### Versions

PyTorch version: 2.0.1
CUDA used to build PyTorch: 11.8
OS: Ubuntu 22.04.2 LTS (x86_64)

cc @zou3519 @Chillee @samdow @kshitij12345 @janeyx99
Repository: rust
Issue: `Error::downcast_ref` cannot be used from function arguments
Labels: A-borrow-checker,D-confusing,C-discussion

<!--
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:

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f794c06f76a75c9fb046df2ff7bd653a

```rust
extern crate thiserror; // 1.0.40

trait Foo {}

fn convert<T: std::error::Error + Foo + 'static>(e: &dyn std::error::Error) {
    e.downcast_ref::<T>().unwrap();
}

fn convert2<T: std::any::Any + Foo + 'static>(e: &dyn std::any::Any) {
    e.downcast_ref::<T>().unwrap();
}

#[derive(thiserror::Error, Debug)]
#[error("Foobar")]
struct Foobar;

impl Foo for Foobar {}

fn main() {
    let e: &dyn std::error::Error = &Foobar;
    
    let _f: &Foobar = { 
        e.downcast_ref().unwrap()
    };
    
    convert::<Foobar>(e);
}
```

I expected to see this happen: it compiles

Instead, this happened: 

```
error[[E0521]](https://doc.rust-lang.org/stable/error_codes/E0521.html): borrowed data escapes outside of function
 --> src/main.rs:6:5
  |
5 | fn convert<T: std::error::Error + Foo + 'static>(e: &dyn std::error::Error) {
  |                                                  -  - let's call the lifetime of this reference `'1`
  |                                                  |
  |                                                  `e` is a reference that is only valid in the function body
6 |     e.downcast_ref::<T>().unwrap();
  |     ^^^^^^^^^^^^^^^^^^^^^
  |     |
  |     `e` escapes the function body here
  |     argument requires that `'1` must outlive `'static`

For more information about this error, try `rustc --explain E0521`.

```

### 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`:
```
1.70.0
```

but also on nightly.
</details>
Repository: godot
Issue: Disable Z with world-coord particles causes particle to be clamped to z=0
Labels: bug,topic:rendering,topic:3d,topic:particles

### Godot version

3.x custom, 4.0

### System information

Fedora, RX 590 

### Issue description

Affects equally 3.x and 4.x

When spawning particles with local coord off, disable Z causes the particles to always live on the **global** X axis. I can't see a usecase where this makes sense, so I'm reporting it as an issue. This is most likely the consequence of flags that are not supposed to be used together, but currently disable_z is the only way to rotate a particle around the Z axis instead of Y axis, which is what i was using it for

https://github.com/godotengine/godot/assets/7917475/b182e230-64bc-474c-9029-784518b07064

I fully expect this issue to be promoted to a proposal on how to solve it, since i don't see a one size fits all solution. I Imagine we'll end up with separating rotation axis from simulation axis position lock or something similar.

### Steps to reproduce

Download MRP, grab the particle node and move it around.

### Minimal reproduction project

3.x: [DisableZBug.zip](https://github.com/godotengine/godot/files/11800456/DisableZBug.zip)

4.1: [DisableZBug.zip](https://github.com/godotengine/godot/files/11800501/DisableZBug.zip)
Repository: godot
Issue: Using Preload in a script breaks Exported Variables
Labels: bug,topic:gdscript,needs testing

### Godot version

3.5.2 Stable

### System information

Windows 10

### Issue description

Using Preload in a script breaks Exported Variables
No error is raised.

### Steps to reproduce

Make a new script.
Use Preload.
Exported Variables stop Working.

### Minimal reproduction project

N/A
Repository: storybook
Issue: [Feature Request]: Story `decorators` accept a function
Labels: feature request,core

### Is your feature request related to a problem? Please describe

Because the decorator inheritance applies global decorators first, we face two issues : 

1. We cannot have a story that is not wrapped by global decorators
2. Global decorators do not wrap component level decorators, therefore become quite useless.

I opened the discussion #23150 that describes the problem and the approach to a solution more thoroughly.

### Describe the solution you'd like

Make the `decorators` property accept a function.

```tsx
// Component.stories.tsx

export default {
  decorators: (globalDecorators) => [withAuthProvider, ...globalDecorators], // Custom inheritance order
}

export const NoDecorator = {
  decorators: () => [], // No decorator applied
}
```

### Describe alternatives you've considered

A feature flag to reverse the stack of decorators.

### Are you able to assist to bring the feature to reality?

yes, I can

### Additional context

_No response_
Repository: go
Issue: runtime: `sysMemStat overflow` on linux-riscv64-unmatched
Labels: NeedsInvestigation,arch-riscv,compiler/runtime

```
#!watchflakes
post <- goarch == "riscv64" && log ~ `sysMemStat overflow`
```

(pulled out from https://github.com/golang/go/issues/55167#issuecomment-1595509127)

(attn @golang/riscv64; CC @golang/runtime)

See previously #52682.
Repository: next.js
Issue: Strange history behavior with link, route group and prefetch={false}
Labels: Navigation

### 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.3.0: Mon Jan 30 20:39:35 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T8103
    Binaries:
      Node: 18.16.0
      npm: 9.5.1
      Yarn: 1.22.19
      pnpm: 8.6.1
    Relevant packages:
      next: 13.4.7-canary.1
      eslint-config-next: 13.4.6
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.3
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Routing (next/router, next/navigation, next/link)

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/ginifizz/link-prefetch-issue

### To Reproduce

You can see the bug on [this page](https://link-prefetch-issue.vercel.app/events/) page (don't click on the link, paste it on the browser or the bug will not show up), click on the "home" button and press your browser's "back" button. The events page will appear as expected, but immediately afterwards (or as soon as the page is scrolled) the "home" page will reappear without clicking. 

The problem arises when several conditions are met: 
- you are in a route group
- the link you clicked on before trying to go back is in "prefetch = {false}" mode.
- the page you're trying to return to contains Links (with or without prefetch, this doesn't change the problem).

### Describe the Bug

After clicking on a link with prefetch={false} and clicking on "previous" in the browser, I'm redirected to the wrong page.

### Expected Behavior

The browser should not redirect us twice after we go back.

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: vscode
Issue: Extension contribution point for `workbench.editor.autoLockGroups`
Labels: feature-request,api,workbench-editors

Extensions which provide an editor seem to be added to the `workbench.editor.autoLockGroups` setting automatically; however, a lot of extensions provide views which may want to be locked as well by default, especially if the extension uses a webview to offer a form.

It is possible for  users to manually add a webview into settings.json but to do so they first need to know that this is possible (it can;t be done though the UI), and secondly need to know the name the webview which requires looking at the source code.

`AUTO_LOCK_EXTRA_EDITORS` in editorConfiguration.ts allows for `mainThreadWebview-markdown.preview` to be added and also allows for a custom name to be applied; but there is no way (as far as I can see) to contribute to this as an extension alone.

Would it be possible for extensions to have a contribution point in package.json which allows them to specify that they offer a webview with a certain name, and suggest that VS Code includes them in the list of checkboxes.
Repository: rust
Issue: E0434 'can't capture dynamic environment in a fn item' can be confusing or misleading, especially in niche cases
Labels: A-diagnostics,T-compiler

### Code

```Rust
fn main() {
    let a = |i: usize| i;
    fn inner() {
        let _ = |b, c, d| a(b + c + d);
    }
}
```


### Current output

```Shell
error[E0434]: can't capture dynamic environment in a fn item
 --> src/main.rs:4:27
  |
4 |         let _ = |b, c, d| a(b + c + d);
  |                           ^
  |
  = help: use the `|| { ... }` closure form instead
```


### Desired output

```Shell
error[E0434]: can't capture dynamic environment in a fn item
 --> src/main.rs:4:20
  |
4 |         let _ = || a(3);
  |                    ^
  |
  = help: use the `|| { ... }` closure form instead
  |
3 |     fn inner() {
  |     ^^^^^^^^^^
  |
  = note: fn item declared here
  |
2 |     let a = |i: usize| i;
  |     ^^^^^^^^^^^^^^^^^^^^
  |
  = note: captured environment variable defined here
```


### Rationale and extra context

If the captured environment variable is a closure, and is later called in a closure within another function, it becomes less obvious that the error message is talking about replacing the fn item, especially if that fn item is within an impl block for an internal struct, or is located in a significantly different position to the captured variable's declaration (this may happen when translating code from other languages, particularly Python).

Additional notes, indicating the function causing the error and the variable that was captured (especially when that variable is a closure, which can easily be mistaken for a free function), would make the error easier to parse and understand correctly quickly

### Other cases

_No response_

### Anything else?

[Playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=30cf4bb8793fa810a37bfa2d8243b0e8). This is an enhancement request more than it is a bug report, but members of the Rust Programming Language Community Server suggested I post it here, to make a formal request
Repository: material-ui
Issue: Can't use theme (or any props) in the `css` function
Labels: docs,package: system,customization: css

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Steps to reproduce 🕹

Link to live example:
https://codesandbox.io/s/compassionate-kepler-zkvvp9?file=/src/App.tsx

Observe the typescript error showing that it ain't gonna work.


### Current behavior 😯

There seems to be no way to use the `theme` prop, or any other props for that matter, when creating a set of styles using the `css` function with the intention of reusing it in multiple `styled` components.

### Expected behavior 🤔

There has some some kind of way. I would definitely expect at least one of the two varieties in the linked example would work.

### Context 🔦

_No response_

### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  System:
    OS: Windows 10 10.0.19045
  Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 114.0.5735.134
    Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.51)
  npmPackages:
    @emotion/react:  11.11.1
    @emotion/styled:  11.11.0
    @mui/base:  5.0.0-beta.4
    @mui/core-downloads-tracker:  5.13.4
    @mui/material:  5.13.5
    @mui/private-theming:  5.13.1
    @mui/styled-engine:  5.13.2
    @mui/styles:  5.13.2
    @mui/system:  5.13.5
    @mui/types:  7.2.4
    @mui/utils:  5.13.1
    @types/react:  18.2.0
    react:  18.2.0
    react-dom:  18.2.0
    typescript:  4.9.5
```
</details>

I'm using Firefox 114.
Repository: vscode
Issue: Allow to recover directories from local history
Labels: feature-request,timeline-local-history

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Local history it's a very useful feature. That said, it would be nice if it can work with directories as well.
Repository: pytorch
Issue: Docker images: faster linker for `torch.compile`
Labels: triaged,module: docker,oncall: pt2

### 🚀 The feature, motivation and pitch

As we are going to u se the linker can we switch by default to a faster linker in the official pytorch image (Gold, LLVM LD or [Mold](https://github.com/rui314/mold))

See also..
https://github.com/pytorch/pytorch/issues/103417


### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @ngimel @yf225 @chenyang78
Repository: storybook
Issue: [Bug]: Component dot notation not displaying properly in storybook code
Labels: bug,needs triage

### Describe the bug

In the Storybook UI, the dot is removed from typescript component dot notation in the "view code".

How I have it in my DropdownMenu.stories.tsx

`<DropdownMenu label="ML><DropdownMenu.Item>Settings</DropdownMenu.Item><DropdownMenu.Item>Logout</DropdownMenu.Item></DropdownMenu>`

How it displays in the Storybook UI.

`<DropdownMenu label="ML><DropdownMenuItem>Settings</DropdownMenuItem><DropdownMenuItem>Logout</DropdownMenuItem></DropdownMenu>`

The dot gets removed.


### To Reproduce

_No response_

### System

_No response_

### Additional context

_No response_