sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: storybook
Issue: [Bug]: [7.0.0-beta.31] Framework API Breaks When Using Next.js 13
Labels: question / support,has workaround,nextjs

### Describe the bug

When you initialize `Storybook7` in a pre-existing `nextjs 13` application using the new `@storybook/nextjs` framework, and use components with hooks; React rendering appears broken.

In the reproduction repo I've provided, I've used a redux provider component as a global decorator to trigger the issue. I've also changed all stories to use typescript but otherwise there are no code changes to the demo components. 

The dev server spins up but when you navigate to the any of the demo components, none of them are rendered and the following errors are shown in the console.

![Screenshot 2023-01-20 at 2 58 16 PM](https://user-images.githubusercontent.com/10948133/213794173-53fb206a-e30e-424d-be6e-147281a2bf5d.png)

![Screenshot 2023-01-20 at 2 24 21 PM](https://user-images.githubusercontent.com/10948133/213790147-873b57f9-4dbb-48b4-af87-65c05d68123b.png)


### To Reproduce

```shell
https://github.com/guptamo/sb7_issue_repro

1. Clone the repo
1. Run `npm ci`
1. Run `npm run storybook:install`
1. Run `npm run storybook:build`
1. Run `npm run storybook:open`

Note: I didn't use the sandbox script to produce this repo however it is a minimum reproduction of the issue. The storybook folder is nested within the application folder for deployment purposes (storybook is deployed separately from the main next.js 13 app).
```


### System

```shell
Environment Info:

  System:
    OS: macOS 13.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    npm: 9.2.0 - ~/.nvm/versions/node/v18.12.1/bin/npm
  Browsers:
    Chrome: 109.0.5414.87
    Safari: 16.2
```


### Additional context

We're currently adding storybook to an existing next.js 13 application and are forced to initialize storybook nested in a storybook folder. I used the `sb@next init` command to initialize the storybook instance and selected the nextjs option and ran all the automigrations.
Repository: pytorch
Issue: set_default_device/torch.device has performance impact for non-factory functions
Labels: module: performance,triaged,module: __torch_function__

### 🐛 Describe the bug

Because it is implemented as a TorchFunctionMode, we interpose ALL functions even if we actually do nothing on those functions. We have ideas for how to optimize this but have delayed doing so until someone actually has a problem.  This is a placeholder issue to track people having this problem.

### Versions

master

cc @hameerabbasi @rgommers @peterbell10 @soumith @msaroufim @wconstab @ngimel @bdhirsh
Repository: material-ui
Issue: useMediaQuery does not play well with dynamic components in Next.js
Labels: bug 🐛,hook: useMediaQuery,ready to take,nextjs

### 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/p/sandbox/usemediaquery-and-suspense-ipi2y0

Steps:

1. Navigate to https://ipi2y0-3000.preview.csb.app/example for the reproduction of the error.
2. We can also produce the same error by updating states in `useLayoutEffect` https://ipi2y0-3000.preview.csb.app/possible-cause.
3. If updating states in `useLayoutEffect` is the root cause in this case, a possible fix is to wrap these functions in `startTransition` as in https://ipi2y0-3000.preview.csb.app/possible-fix

### Current behavior 😯

Next.js emits the following error when `useMediaQuery` is used in a component with dynamically imported components.

```
Error: This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.
```

### Expected behavior 🤔

There should not be any errors when using the hook with dynamically imported components.

### Context 🔦

I am using `useMediaQuery` in a component with lazy-loaded components.

### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
 Browser: Google Chrome 109

 System:
    OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @emotion/react: ^11.10.5 => 11.10.5 
    @emotion/styled: ^11.10.5 => 11.10.5 
    @mui/base:  5.0.0-alpha.114 
    @mui/core-downloads-tracker:  5.11.5 
    @mui/material: ^5.11.5 => 5.11.5 
    @mui/private-theming:  5.11.2 
    @mui/styled-engine:  5.11.0 
    @mui/system:  5.11.5 
    @mui/types:  7.2.3 
    @mui/utils:  5.11.2 
    @types/react: 18.0.26 => 18.0.26 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    typescript: 4.9.4 => 4.9.4 
```
</details>
Repository: flutter
Issue: With the `--machine` flag `Logger.startProgress` did not emit valid json
Labels: tool,P3,team-tool,triaged-tool

https://github.com/flutter/flutter/pull/118104 had the line:
```
_logger.startProgress(
  'Loading devices...',
);
```
With `--machine` that line emitted to stdout, and not as valid JSON.  It was reverted https://github.com/flutter/flutter/pull/118826.

`startProgress` should be fixed to handle `--machine`.
Repository: godot
Issue: Not all code paths return a value for enums
Labels: enhancement,topic:gdscript,documentation

### Godot version

v4.0.beta13.official [caacade56]

### System information

Windows 10

### Issue description

The following code covers all execution path

```gdscript
enum Direction{UP,DOWN,LEFT,RIGHT}

func turn_left(dir)->Direction:
	match dir:
		Direction.LEFT:
			return Direction.DOWN
		Direction.RIGHT:
			return Direction.UP
		Direction.UP:
			return Direction.LEFT
		Direction.DOWN:
			return Direction.RIGHT
```
Yet it triggers "Not all code paths return a value"

### Steps to reproduce

Copy paste the following code into a node:

```gdscript
enum Direction{UP,DOWN,LEFT,RIGHT}

func turn_left(dir)->Direction:
	match dir:
		Direction.LEFT:
			return Direction.DOWN
		Direction.RIGHT:
			return Direction.UP
		Direction.UP:
			return Direction.LEFT
		Direction.DOWN:
			return Direction.RIGHT
```

### Minimal reproduction project

N/A
Repository: godot
Issue: [3.x] Possible unused variables/functions in engine code (cppcheck report)
Labels: bug,topic:core,topic:codestyle

### Godot version

3.x at d4f66544cee042d2ffa3340b7a0bce9ad57f5c3a

### System information

Arch Linux

### Issue description

Found possible unused variables/functions with `cppcheck`.

This issue is the `3.x` equivalent of #26780.

### Steps to reproduce

Open a terminal and do the following:

```sh
cd /path/to/godot/source
scons -s platform=x11 udev=yes target=release_debug debug_symbols=no tools=yes bits=64 compiledb=yes -j$(nproc)
cppcheck -ithirdparty -i3rdparty -itests -itest -itoolchain -itools  --enable=all --force --output-file=cppcheck.xml --xml --xml-version=2 .
cppcheck-htmlreport --source-dir=. --title=project --file=cppcheck.xml --report-dir=report
```

And an HTML report can be accessed by opening `report/index.html` with a browser. Once opened, only enable `unusedFunction`, `unusedPrivateFunction`, and `unusedStructMember` on the left sidebar to see the possible unused variable and functions. Some of these may be false-positive.

Here's a [report example](https://github.com/godotengine/godot/files/10470219/report.zip) generated with `cppcheck` version 2.9.3 against Godot commit  d4f66544cee042d2ffa3340b7a0bce9ad57f5c3a.


### Minimal reproduction project

N/A - This issue requires the engine source code to generate the `cppcheck` reports.
Repository: material-ui
Issue: AvatarGroup Spacing Doesn't Work with React Components
Labels: component: avatar,enhancement,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/clever-lake-4vjtt5?file=/src/App.js

Steps:

1. Add AvatarGroup to your component and set the spacing property
2. Create a custom component that returns an AvatarItem
3. Place your custom component as a child to the AvatarGroup


### Current behavior 😯

There is no spacing between the AvatarItems

### Expected behavior 🤔

AvatarItems have spacing 

### Context 🔦

The spacing property only works if you add `AvatarItem` as children to `AvatarGroup`, but if you try to move the `AvatarItem` to a subcomponent the spacing won't get applied. Hopefully there's a simple fix with forwarding refs or something but not seeing anything in the documentation.

### Your environment 🌎

<details>
  <summary><code> 
(This is my development system, but see above code sandbox for the same issue on latest versions.)
System:
    OS: macOS 12.6.1
  Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    Yarn: Not Found
    npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.87
    Edge: Not Found
    Firefox: 103.0.1
    Safari: 15.6.1
  npmPackages:
    @emotion/react: ^11.10.0 => 11.10.4 
    @emotion/styled: ^11.10.0 => 11.10.4 
    @mui/base:  5.0.0-alpha.100 
    @mui/core-downloads-tracker:  5.10.8 
    @mui/icons-material: ^5.10.2 => 5.10.6 
    @mui/lab: ^5.0.0-alpha.96 => 5.0.0-alpha.102 
    @mui/material: ^5.10.2 => 5.10.8 
    @mui/private-theming:  5.10.6 
    @mui/styled-engine:  5.10.8 
    @mui/styles: ^5.10.2 => 5.10.8 
    @mui/system:  5.10.8 
    @mui/types:  7.2.0 
    @mui/utils:  5.10.6 
    @mui/x-date-pickers: ^5.0.0-beta.6 => 5.0.4 
    @types/react: ^17.0.47 => 17.0.47 
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 
    typescript: ^4.7.4 => 4.7.4 </code></summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>
Repository: rust
Issue: `fs::copy` emits FS events on the source file on macOS
Labels: O-macos,C-bug,A-io

I've got a bizarre behavior here. Here is the code:

```rust
#[test]
fn test() {
    std::fs::copy(
        "/Users/wdanilo/Dev/enso/lib/rust/ensogl/pack/js/src/wasm-pack-bundle/wasm-pack-bundle.ts",
        "/tmp/out.txt",
    )
    .unwrap();
}
```

I'm also running in terminal:

```
fswatch /Users/wdanilo/Dev/enso/lib/rust/ensogl/pack/js/src/wasm-pack-bundle/wasm-pack-bundle.ts -x -v -t
```

1. If `/tmp/out.txt` EXISTS, then running this test DOES NOT cause `fswatch` to print anything to the console.
2. If `/tmp/out.txt` DOES NOT EXIST, then running the test DOES cause `fswatch` to print: 

```
notify_events: Notifying events #: 1.
Fri Jan 20 22:16:39 2023 /Users/wdanilo/Dev/enso/lib/rust/ensogl/pack/js/src/wasm-pack-bundle/wasm-pack-bundle.ts IsFile
```

I discovered that when debugging why my `cargo-watch` loops forever on building our sources. It seems that when we are copying files, the source file triggers an event, which triggers `cargo-watch` ...

Please note, that this does not happen when using system's `cp` command. I'm wondering if this is the correct behavior and if so, it should probably be documented better.

### Meta

`rustc --version --verbose`:
```
rustc 1.58.1 (db9d1b20b 2022-01-20)
```
Repository: godot
Issue: Jumping from the edge of a "one way collision" shape results with the player falling through the platform he was just standing on
Labels: bug,topic:physics,topic:2d

### Godot version

3.5 and 4

### System information

Windows 10

### Issue description


https://user-images.githubusercontent.com/43501741/213817878-e71caa54-16fa-4d79-855c-3b3e158dc3b2.mp4



### Steps to reproduce

Run MRP and press Space to jump.

### Minimal reproduction project

[onew.zip](https://github.com/godotengine/godot/files/10470699/onew.zip)
Repository: next.js
Issue: `redirects` config doesn't take into account `trailingSlash` config
Labels: bug,stale

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```
    Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64
    Binaries:
      Node: 16.17.0
      npm: 8.15.0
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.0.5 // I also checked with canary (13.1.4-canary.1)
      eslint-config-next: 13.0.2
      react: 18.2.0
      react-dom: 18.2.0
```

### Which area(s) of Next.js are affected? (leave empty if unsure)

Routing (next/router, next/navigation, next/link)

### Link to the code that reproduces this issue

https://github.com/goliney/next-redirects-trailing-slash

### To Reproduce

1. Run the project (`npm run dev`)
2. Open dev tools to track network calls
3. Click the `go to the old route` link
4. Observe one redundant redirect call on the Network tab

### Describe the Bug

<img width="800" alt="image" src="https://user-images.githubusercontent.com/2017344/213818818-fdc4c5e9-194d-443b-87ab-4c14f727b35c.png">

In `next.config.js` I have both `trailingSlash: true` and `redirects` options:
```js
module.exports = {
  trailingSlash: true,
  async redirects() {
    return [
      {
        source: '/old-prefix/:path*',
        destination: '/:path*',
        permanent: true,
      },
    ];
  },
};
```

But when the redirect from the `/old-prefix/...` happens, **it first redirects to the address without the trailing slash**. Then `Next` makes another extra redirect to the route with the trailing slash:
```
/old-prefix/about/ --> /about --> /about/
```

### Expected Behavior

There should be only one redirect:
```
/old-prefix/about/ --> /about/
```

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: flutter
Issue: Add feature to enable iOS wireless debugging from a `flutter` command.
Labels: c: new feature,tool,t: xcode,P2,team-tool,triaged-tool

Add feature to turn on and off the wireless debugging feature for a USB tethered device so the user does not need to open Xcode.
```
xcdevice enable [--timeout=sec] <udid>
	Waits for the specified device to appear and enables wireless debugging for the current host.

xcdevice disable [--timeout=sec] <udid>
	Waits for the specified device to appear and disables wireless debugging for the current host.

xcdevice check [--timeout=sec] <udid>
	Waits for the specified device to appear and reports on the status of wireless debugging for the current host.
```

cc @vashworth
Repository: flutter
Issue: [Impeller] Alpha behavior different DrawAtlas/DrawVertices with per color blending.
Labels: engine,P2,e: impeller,team-engine,triaged-engine

On the advanced blends, the alpha behavior on destinaton appears different than on the Skia backend. it looks like for the per-color destination, instead of being premultiplied the alpha is factored out then applied before blending. Need to investigate the exact behavior of the Skia backend to determine if this is a bug in Impeller or a misunderstanding of the API
Repository: flutter
Issue: device_doctor cannot fix missing ios symbols because it can't open xcode
Labels: team-infra,P2,triaged-infra

Looks like its getting stuck at this dialog when trying to open xcode, and so cannot fix the missing symbols issue some hosts are facing.

![image](https://user-images.githubusercontent.com/91688203/213828516-4346e391-5e44-4b0e-b74d-1a740503c1a9.png)
Repository: PowerToys
Issue: Option to play GIF/Video files in the File Explorer Add-Ons for Image Previews.
Labels: Needs-Triage

### Description of the new feature / enhancement

GIFs/Videos can play in the preview if the option is enabled.





### Scenario when this would be used?

Occaisionally, especially when collecting a large number of image files, some GIF files are hard to discern without an animated preview. This would resolve this issue. For example:

https://user-images.githubusercontent.com/3858960/213831757-5c3bdf36-6af5-4f7b-b036-7c22544a9b9c.mp4

vs

https://user-images.githubusercontent.com/3858960/213831832-a350ef26-ac97-43f4-93db-25bbffbeeaac.mp4

I have more, bigger than Github would allow, like variations of animated Discord Banners, etc. This feature is already present in Linux with multiple file explorers (though, implemented directly from the icon IIRC).

### Supporting information

_No response_
Repository: stable-diffusion-webui
Issue: [Bug]: Newest Dreambooth throws exceptions regarding config.json in the tokenizer directory
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

I tried the new version of Dreambooth and at first received the error:
**_Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96_**
The path it was referring to was model/dreambooth/[modelname]/working/tokenizer'.'

So I created the folder "tokenizer" as it seemed it added that dot out of nowhere, which now leads to the following exception when trying to train my model:
**_Exception training model: '[..\models\dreambooth\[modelname]\working\tokenizer does not appear to have a file named config.json. Checkout 'https://huggingface.co/[..\models\dreambooth\[modelname]\working\tokenizer/0' for available files.'._**

What should I do to fix this issue?

### Steps to reproduce the problem

1. Create Model
2. Set Checkpoint
3. Set Intervals of training
4. Learning Rate scheduler to constant, Learning Rate to 0,000001, Constant/Linear Starting Factor 1, Scale Position 1
5. Set Sanity Sample prompt
6. Check 8bit Adam
7. Mixed Precision fp16 & Memory Attention to xformers
8. Uncheck Cache Latents and Shuffle Tags
9. Set Dataset directories
10. Set Prompts
11. Train

### What should have happened?

It should usually just train my model and that's all.

### Commit where the problem happens

889b851a5260ce869a3286ad15d17d1bbb1da0a7

### What platforms do you use to access UI ?

Windows

### What browsers do you use to access the UI ?

Brave

### Command Line Arguments

_None_

### Additional information, context and logs

_None_
Repository: rust
Issue: Wrap std::sys::windows::process::Process's main_thread_handle with Option<T>.
Labels: O-windows,A-process

how about make main_thread_handle as Option<Handle>?

Except creating a child process, it is difficult for us to get the main_thread_handle of another process. If we make this item Option, we could extend struct Process's use case. Such as building a process manager, which holds some process's handle without main_thread_handle.

```rust
pub struct Process {
    handle: Handle,
    main_thread_handle: Option<Handle>,
}

impl Process {
    ...

    pub fn main_thread_handle(&self) -> Option<BorrowedHandle<'_>> {
        self.main_thread_handle?.as_handle()
    }

    ...
}
```

Maybe related to #96723
Repository: godot
Issue: Parser incorrectly detects 'Invalid cast'
Labels: discussion,topic:gdscript

### Godot version

v4.0.beta14.official [28a24639c]

### System information

Ubuntu 22.04.1 LTS

### Issue description

If you try to cast from a variable statically typed as something that the casting will return null, it won't compile.

At best the should say it is an 'Invalid Cast' and just giving a warning that it will always return null

just as "Unreachable code (statement after return)" doesn't keep the script from compiling

### Steps to reproduce

```godot
func _ready() -> void:
	var box := BoxContainer.new()
	var foo : Node3D = fizz(box)
	print(foo)
func fizz(arg) -> Node3D:
	return arg as Node3D
```
will print ```<null>```
while ```godot
func _ready() -> void:
	var box := BoxContainer.new()
	var foo :  = box as Node3D
```
Will get a parser error: Invalid cast. Cannot convert form "BoxContainer" to "Node3D"

### Minimal reproduction project

[MRE.zip](https://github.com/godotengine/godot/files/10471394/MRE.zip)
Repository: go
Issue: x/exp/jsonrpc2: TestIdleTimeout failures
Labels: NeedsInvestigation

```
#!watchflakes
post <- pkg == "golang.org/x/exp/jsonrpc2" && test == "TestIdleTimeout"
```

Issue created automatically to collect these failures.

Example ([log](https://build.golang.org/log/5a7566969c986941ed1f64171ce4b66c32c7bf29)):

    time="2023/01/20 22:32:20" name=no_args method=no_args direction=out id="{'\\x01'}" trace=1
    time="2023/01/20 22:32:20" parent=1 metricValue=1 metric="&{started {golang.org/x/exp/jsonrpc2 Count of started RPCs. 1}}" method=no_args
    time="2023/01/20 22:32:20" parent=1 metricValue=43 metric="&{sent_bytes {golang.org/x/exp/jsonrpc2 Bytes sent. By}}"
    time="2023/01/20 22:32:20" name=no_args method=no_args direction=in id="{'\\x01'}" trace=1
    time="2023/01/20 22:32:20" parent=1 metricValue=1 metric="&{started {golang.org/x/exp/jsonrpc2 Count of started RPCs. 1}}" method=no_args
    time="2023/01/20 22:32:20" parent=1 metricValue=43 metric="&{received_bytes {golang.org/x/exp/jsonrpc2 Bytes received. By}}" method=no_args
    time="2023/01/20 22:32:20" parent=1 status.code=NONE end
    time="2023/01/20 22:32:20" parent=1 metricValue=38 metric="&{sent_bytes {golang.org/x/exp/jsonrpc2 Bytes sent. By}}"
    time="2023/01/20 22:32:20" parent=1 status.code=OK end
    time="2023/01/20 22:32:20" name=one_string method=one_string direction=out id="{'\\x01'}" trace=1
    ...
    time="2023/01/20 22:32:20" parent=111 metricValue=71 metric="&{received_bytes {golang.org/x/exp/jsonrpc2 Bytes received. By}}" method=unblock
    time="2023/01/20 22:32:20" parent=111 status.code=OK end
    time="2023/01/20 22:32:20" parent=87 metricValue=60 metric="&{sent_bytes {golang.org/x/exp/jsonrpc2 Bytes sent. By}}"
    time="2023/01/20 22:32:20" parent=87 status.code=OK end
    time="2023/01/20 22:32:20" parent=28 metricValue=71 metric="&{sent_bytes {golang.org/x/exp/jsonrpc2 Bytes sent. By}}"
    time="2023/01/20 22:32:20" parent=28 metricValue=1 metric="&{finished {golang.org/x/exp/jsonrpc2 Count of finished RPCs (includes error). 1}}"
    time="2023/01/20 22:32:20" parent=28 end
    time="2023/01/20 22:32:20" parent=1 status.code=NONE end
    --- FAIL: TestIdleTimeout (0.31s)
        serve_test.go:38: dial tcp 127.0.0.1:49175: connect: connection refused


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: node
Issue: win: block running nodejs on Windows 8.1 and before?
Labels: windows,discuss

Per https://github.com/nodejs/node/pull/31954, the current nodejs policy appears to be do block running on EOL systems. Windows 8.1 extended security update support ended more than a week ago now (on January 10, 2023)[^1]. I am proposing therefore that libuv drop support entirely as well[^2], so I wanted to raise awareness here as well, to give opportunity for anyone to voice objects to this timeline, before making changes there.

[^1]: https://support.microsoft.com/en-us/windows/windows-8-1-support-ended-on-january-10-2023-3cfd4cde-f611-496a-8057-923fba401e93
[^2]: https://github.com/libuv/libuv/issues/3889