sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: conflicting implementations of trait `Borrow<std::option::Option<_>>` for type `Body<_, _>`
Labels: A-diagnostics,D-confusing,D-terse,A-coherence

``` Rust
#[derive(Debug, Default)]
pub struct Body<C, R> {
    content: Option<C>,
    resp: Option<R>,
}

impl<C, R> Deref for Body<C, R> {
    type Target = Option<C>;
    fn deref(&self) -> &Self::Target {
        self.borrow()
    }
}
impl<C, R> DerefMut for Body<C, R> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        self.borrow_mut()
    }
}

impl<C, R> Borrow<Option<C>> for Body<C, R> {
    fn borrow(&self) -> &Option<C> {
        &self.content
    }
}
impl<C, R> BorrowMut<Option<C>> for Body<C, R> {
    fn borrow_mut(&mut self) -> &mut Option<C> {
        &mut self.content
    }
}
impl<C, R> Borrow<Option<R>> for Body<C, R> {
    fn borrow(&self) -> &Option<R> {
        &self.resp
    }
}
impl<C, R> BorrowMut<Option<R>> for Body<C, R> {
    fn borrow_mut(&mut self) -> &mut Option<R> {
        &mut self.resp
    }
}
``` 
# out
```
error[E0119]: conflicting implementations of trait `Borrow<std::option::Option<_>>` for type `Body<_, _>`
   --> model/src/customer.rs:117:1
    |
107 | impl<C, R> Borrow<Option<C>> for Body<C, R> {
    | ---------------------------------------------- first implementation here
...
117 | impl<C, R> Borrow<Option<R>> for Body<C, R> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Body<_, _>`

error[E0119]: conflicting implementations of trait `BorrowMut<std::option::Option<_>>` for type `Body<_, _>`
   --> model/src/customer.rs:122:1
    |
112 | impl<C, R> BorrowMut<Option<C>> for Body<C, R> {
    | ------------------------------------------------- first implementation here
...
122 | impl<C, R> BorrowMut<Option<R>> for Body<C, R> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Body<_, _>`

For more information about this error, try `rustc --explain E0119`.
```
Repository: node
Issue: Loaders that use childProcess.fork lead to endless recursion of processes
Labels: loaders

### Version

v20.0.0

### Platform

`Linux 5.19.0-38-generic #39~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 21:16:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux`

### Subsystem

loaders

### What steps will reproduce the bug?

Use `childProcess.fork` within a loader, for example in the following loader:

```js
// loader.mjs
import childProcess from "node:child_process";

const cp = childProcess.fork("./worker.mjs");
```

```js
// worker.mjs
// Nothing needs to be in here for the behaviour to occur
```

```js
// test.mjs
import readline from "node:readline";

function input(prompt = "") {
    return new Promise((resolve) => {
        const rl = readline.createInterface({
            input: process.stdin,
            output: process.stdout,
        });
        rl.question(prompt, (answer) => {
            resolve(answer);
            rl.close();
        });
    });
}

// This is included so we can control when the process ends
await input(`[Continue] `);
```

And run `node --loader ./loader.mjs ./test.mjs`. 

### How often does it reproduce? Is there a required condition?

This happens consistently.

### What is the expected behavior? Why is that the expected behavior?

The short answer is I'm not sure what should be done here. But it seems problematic that libraries (such as `typescript`) that uses `childProcess.fork` cannot be used within a loader without endless recursion of processes.

Perhaps the solution is simply not to carry over loaders onto child processes that are forked within loaders.

### What do you see instead?

Loaders get continually created spamming the console with:

```
Loaded loader
(node:414589) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Loaded loader
(node:414589) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Loaded loader
(node:414589) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
```

while also rapidly growing memory usage from the endless chain of processes.

### Additional information

I noticed this because `ts-node` rapidly memory leaks in Node 20. I experimented it a bit and found that TypeScript is calling `childProcess.fork` which causes this error. i.e. A minimal loader that exhibits this behaviour would just be:

```js
// loader.mjs
import ts from "typescript";

// Haven't even written any hooks yet
```

Using this loader with `node --loader ./loader.mjs ./test.mjs` will rapidly consume all memory on the machine until the OS kills the process (if not terminated sooner).
Repository: PowerToys
Issue: [PT:Run] Override Win + R to open PowerToys Run Shell Plugins
Labels: Needs-Triage

### Description of the new feature / enhancement

add option to automatically open powertoys run in shell plugins (keyboard manager can't automatically do insert shell mode (>))


### Scenario when this would be used?

instead of using old plain windows run ui, using powertoys run can improve the ux too


### Supporting information

![image](https://user-images.githubusercontent.com/58063311/233030156-48007df6-215f-4b88-b4ed-d0c203718bbb.png)
Repository: material-ui
Issue: Drawer issues with lazy loaded components
Labels: component: drawer

### 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/mui-drawer-with-lazy-components-yyg5n0

Steps:

1. click the button in the page to open the drawer
2. click a link in drawer to change route
3. sometimes the drawer won't close anymore 


### Current behavior 😯

Sometimes the `Drawer` seems to ignore the `open` prop and stays opened even if set to `false`.

### Expected behavior 🤔

The `Drawer` should close if the `open` prop equals `true`

### Context 🔦

We use the drawer as a sidebar navigation, each children is a react router `<Link>` pointing to a dedicated `<Route>` which will render a `React.lazy` loaded component.

The issues is not present using standard component imports.


### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  System:
    OS: macOS 13.3
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.15.0/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Chrome: 112.0.5615.121
    Edge: Not Found
    Firefox: 107.0
    Safari: 16.4
```
</details>
Repository: PowerToys
Issue: Remapping Functionality donot detect  "." and contnuously shows ":"
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Needs-Triage

### Microsoft PowerToys version

0.69.1

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

keyboard manager > Remap a key > press " type " > now try to write ". "  using German Keyboard.

### ✔️ Expected Behavior

Remapping Functionality donot detect  **"."** and contnuously shows **":"** 

### ❌ Actual Behavior

**":"**  should only come when i press  **"shift" + "."** 

### Other Software

_No response_
Repository: ant-design
Issue: 动态设置Menu组件，设置其defaultSelectedKeys，父菜单不会高亮，需要鼠标悬浮一下才会高亮
Labels: 🐛 Bug,Inactive,unconfirmed

### Reproduction link

[https://react-tfurj5.stackblitz.io](https://react-tfurj5.stackblitz.io)

### Steps to reproduce

通过接口获取角色权限，然后过滤菜单，遍历菜单设置items，设置defaultSelectedKeys

### What is expected?

父菜单和子菜单同时高亮

### What is actually happening?

只有子菜单高亮

| Environment | Info |
| --- | --- |
| antd | 5.4.3 |
| React | 18.0.0 |
| System | macos ventura 13.2 |
| Browser | chrome 112.0.5615.49（正式版本） (arm64) |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: [web] 1Password autofill adds colored box over text field
Labels: a: text input,engine,platform-web,has reproducible steps,P2,found in release: 3.10,team-web,triaged-web

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

### Steps to reproduce

1. Flutter channel master
2. Autofill with 1Password on web

### Expected results

The blue box is behind the text (or not there at all)

### Actual results

The blue box covers the text

### Code sample

<details><summary>Code sample</summary>

https://github.com/Rexios80/flutter_autofill_test/blob/master/lib/main.dart

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

[[Upload media here]](https://user-images.githubusercontent.com/7896519/231334430-6db71f5b-40b9-497a-bb40-487e32120890.mov)

</details>


### Logs

<details><summary>Logs</summary>

Not relevant

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

Not relevant

</details>
Repository: excalidraw
Issue: Can not type √ into excalidraw
Labels: bug,font,windows

When I try to either copy paste `√` or do alt + 251 on the keyboard, it pastes `Ã`. 

When I try to copy paste this `Ã` somewhere else, it turns into a `√` back.
OS: Windows 11 pro
Browser: Opera GX

![image](https://user-images.githubusercontent.com/86198810/233050681-b73ba6cd-511f-41b1-843c-6dc2aaea0b6d.png)
Repository: opencv
Issue: Test_ONNX_layers.LSTM_cell_batchsize_5_seqlen_5/0 fails with CuDNN backend
Labels: bug,category: dnn,category: dnn (onnx)

### System Information

CI tests related to CUDA backend inference of LSTM tests fail. Therefore temporarily we add skip flag for such tests. See [here](https://github.com/opencv/opencv/pull/23501) for more information.

### Detailed description


```[  FAILED  ] Test_ONNX_layers.LSTM_cell_batchsize_5_seqlen_5/0, where GetParam() = CUDA/CUDA (5 ms)```

### Steps to reproduce

To reproduce have CUDA installed on your machine

``` bash
git clone https://github.com/opencv/opencv.git
mkdir build 
cd build 
cmake -DPYTHON3_EXECUTABLE=<path to python executable> -DPYTHON3_INCLUDE_DIR=<path to include dir> -DPYTHON3_NUMPY_INCLUDE_DIRS=<path to bumpy include dir> -DCMAKE_BUILD_TYPE=DEBUG -DBUILD_EXAMPLES=Yes ../opencv
make -j 12
cd bin 
./opencv_test_dnn
```


### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: PowerToys
Issue: add filter to keyboard remap options
Labels: Product-Keyboard Shortcut Manager,Needs-Triage

### Description of the new feature / enhancement

the settings app would add a checkbox (or switch) and input textbox to the "remap keys" page

the checkbox/switch would be labelled "only remap keys when in specific application"
the input box would be a fully qualified path to an application (perhaps add a browse button too)

if left unchecked, the existing functionality would apply
if checked, before applying any remappings, powertoys will check the currently focussed application (using getForegroundWindow) and use the appropriate Windows Api calls to determine the application that owns that window. if the window isn't the one specified in the input box, the key is not remapped.
for performance reasons, powertoys might need to maintain a cache of the last few windows actively focused, in order to prevent the expensive process of determining the application's path for every keystroke.

scope

at a minimum, a single checkbox and inputbox at the top of the "remap keys" would be enough to say "only apply these rules for this application"

if the feature proves popular, perhaps having a checkbox/input box for each individual keystroke remapping would be useful (meaning you can have some keys that are remapped globally, and others that apply to certain apps)



### Scenario when this would be used?

to allow keys to be remapped for certain applications only

### Supporting information

_No response_
Repository: storybook
Issue: [Bug]: Composition not taking into account previewHead
Labels: bug,discussion,composition

### Describe the bug

if you declared on `main.js` a custom previewHead it's not taken into account when using a composition package.

## main.ts

```js
/** @type { import('@storybook/nextjs').StorybookConfig } */
const config = {
  stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
  addons: [
    '@storybook/addon-links',
    '@storybook/addon-essentials',
    '@storybook/addon-interactions',
  ],
  framework: {
    name: '@storybook/nextjs',
    options: {},
  },
  docs: {
    autodocs: 'tag',
  },
  previewHead: (head) => `
  ${head}
  <style>
    html, body {
      background: chocolate;
    }
  </style>
  `,
  refs: {
    'design-system': {
      title: 'Fluent UI React v9',
      url: 'https://master--628d031b55e942004ac95df1.chromatic.com/',
      expanded: false, // Optional, true by default
    },
  },
};
export default config;
```

### To Reproduce

https://stackblitz.com/edit/github-wvg3tk?file=.storybook/main.js

### System

```shell
Environment Info:

  System:
    OS: macOS 13.3.1
    CPU: (8) arm64 Apple M1 Pro
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    npm: 9.6.2 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Chrome: 112.0.5615.121
    Safari: 16.4
  npmPackages:
    @storybook/addon-essentials: ^7.0.6 => 7.0.6 
    @storybook/addon-interactions: ^7.0.6 => 7.0.6 
    @storybook/addon-links: ^7.0.6 => 7.0.6 
    @storybook/blocks: ^7.0.6 => 7.0.6 
    @storybook/nextjs: ^7.0.6 => 7.0.6 
    @storybook/react: ^7.0.6 => 7.0.6 
    @storybook/testing-library: ^0.0.14-next.2 => 0.0.14-next.2
```


### Additional context

_No response_
Repository: godot
Issue: Sometimes AnimationTree can't handle Animation which in AnimationLibrary correctly.
Labels: bug,topic:animation

### Godot version

4.1.dev

### System information

Windows 10, GLES3, GTX1060

### Issue description

Refer to next section.

### Steps to reproduce


https://user-images.githubusercontent.com/61624558/233062930-6fbf450b-f664-4eba-9025-62bcbf61dda0.mp4

1. Create a two Animations in AnimationPlayer.
2. Save these two Animations as resource files, them remove from AnimaionPlayer.
3. Create two AnimationLibrarys in AnimationPlayer, them load a Animation which has been saved for each one.
4. Create a simple AnimationStateMachine to play this two Animations from AnimationLibrarys( or using a AnimationNodeTransition to switch between them).

At the last of this video, you can see when AnimationStateMachine playing "LibA_Rot", the Sprite will disappear, then recover when playing "LibB_Scale".

I found this bug when using AnimationTree to play animation for a 3D skeleton character, when this bug occur, the chareacter will be reset as T-Pose, in my demo video, the Sprite will disappear.
Actually, multi animations from different AnimationLibrarys using in AnimationTree may lead to this issue. 

### Minimal reproduction project

[Test.zip](https://github.com/godotengine/godot/files/11272659/Test.zip)
Repository: godot
Issue: force_update_transform() doesn't work for CharacterBody2D and AnimatableBody2D
Labels: bug,topic:physics,topic:2d

### Godot version

4.0.2.stable

### System information

Windows 10

### Issue description

CanvasItem.force_update_transform() is supposed to update the transform of physics objects immediately and it works with StaticBody2D and RigidBody2D, but it doesn't do anything, when called from CharacterBody2D or AnimatableBody2D.

This method is important for implementing an object pushing mechanic.

### Steps to reproduce

```
character.position += Vector2(100.0, 0.0)
print(PhysicsServer2D.body_get_state(character, PhysicsServer2D.BODY_STATE_TRANSFORM))
character.force_update_transform()
print(PhysicsServer2D.body_get_state(character, PhysicsServer2D.BODY_STATE_TRANSFORM))
```

### Minimal reproduction project

[PusherBug.zip](https://github.com/godotengine/godot/files/11272865/PusherBug.zip)
Repository: rust
Issue: Allow bootstrap to use custom test runner commands
Labels: A-testsuite,C-enhancement,A-cross,T-bootstrap,A-contributor-roadblock

Currently it's quite involved to run `x.py test` for a target other than the host - often you're forced to use the [remote-test-server](https://rustc-dev-guide.rust-lang.org/tests/running.html#running-tests-on-a-remote-machine) running in the specified environment. This is sometimes required to bless platform-specific UI tests.

This workflow could be made easier for contributors with a feature similar to [cargo's runner option](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerunner) which runs executables with the specified command. For example, in order to execute aarch64-only tests, the workflow for `x86-unknown-linux-gnu` developers could simply be:

- Install qemu and a cross-compilation system package
- Set this option to `qemu-aarch64 -L /usr/aarch64-linux-gnu` (or another libc location)
- Run `x.py test --target aarch64-unknown-linux-gnu`

More discussion [here](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/single.20target.20tests.20and.20contributing.20from.20M1)
Repository: vscode
Issue: Webview View fails to get focus
Labels: bug,webview

Using this sample with minimal modification: https://github.com/microsoft/vscode-extension-samples/tree/main/webview-view-sample

Add anywhere in `media/main.js`:

```js
window.addEventListener('focus', () => {
    document.body.append('✅✅✅ Focused', document.createElement('br'));
});
```

First (1-2) calls of `calicoColors.colorsView.focus` - doesn't focus the webivew view.

---
Version: 1.77.3
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.77.3 Chrome/102.0.5005.196 Electron/19.1.11 Safari/537.36
Repository: go
Issue: cmd/compile: range loop with large element has a significant cost
Labels: Performance,NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel go1.21-969ab34e46 Wed Apr 19 02:10:00 2023 +0000 windows/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes.

### What did you do?

Here's a benchmark of two approaches of writing `slices.Index`:

```
package main

import "testing"

type Large [4 * 1024]byte

const N = 1024

func IndexA(s []Large, v Large) int {
	for i, vs := range s {
		if v == vs {
			return i
		}
	}
	return -1
}

func IndexB(s []Large, v Large) int {
	for i := range s {
		if v == s[i] {
			return i
		}
	}
	return -1
}

func BenchmarkA_Large(b *testing.B) {
	elements := make([]Large, N)
	for k := 0; k < b.N; k++ {
		IndexA(elements, Large{1})
	}
}

func BenchmarkB_Large(b *testing.B) {
	elements := make([]Large, N)
	for k := 0; k < b.N; k++ {
		IndexB(elements, Large{1})
	}
}
```

Results:

```
BenchmarkA_Large-32         3129            352215 ns/op
BenchmarkB_Large-32       256124              4516 ns/op
```

I would have expected the results to be approximately the same, however, there's a significant cost to using `for i, v := range s` loop.

As far as I was able to tell, the slower implementation ends up making more copies of the v.

_I made a quick fix for slices package for the time being https://go-review.googlesource.com/c/go/+/486235._
Repository: go
Issue: cmd/compile: optimize recursive closure calls
Labels: Performance,NeedsDecision,FeatureRequest,compiler/runtime

It is often convenient to define recursive functions local to some outer function, either because you don't want to pollute the package namespace with helper functions, or because the recursive function wants to close over locals of the outer function. Of course Go doesn't have recursive function literals so you have to fake it by using the var trick. The escape analysis is smart enough to avoid heap-allocating the closure in such cases, but unfortunately the actual recursive call is still dynamic.

```
type Cell struct {
	Next *Cell
}

func f(c *Cell) {
	var visit func(c *Cell)
	visit = func(c *Cell) {
		if c.Next != nil {
			visit(c.Next) // generates CALL (R1) on ARM
		}
	}
	visit(c)
}
```
Could the compiler be made smart enough to notice that the `visit` variable is assigned exactly once to a func literal, and thus it is safe to turn the whole thing into a letrec so that the call to visit becomes static?
Repository: go
Issue: proposal: encoding/xml: support marshal self-closing tag in short-form mode
Labels: Proposal

## Goals
Add an option, to support marshal a self-closing tag xml struct in short-form mode which has empty content.

In xml standard, a self-closing tag is permitted.
[https://www.w3.org/TR/xml/#sec-starttags](https://www.w3.org/TR/REC-xml/#dt-empty)

## Definitions
```go
func ExampleMarshalShortForm() {
	type Address struct {
		City, State string
	}
	type Person struct {
		XMLName   xml.Name `xml:"person"`
		Id        int      `xml:"id,attr"`
		FirstName string   `xml:"name>first"`
		LastName  string   `xml:"name>last"`
		Age       int      `xml:"age"`
		Height    float32  `xml:"height,omitempty"`
		Married   bool
		Address
		Comment       string   `xml:",comment"`
		FavoriteMusic []string `xml:"favorite_music"`
		LuckyNumber   int      `xml:"lucky_number"`
	}

	v := &Person{Id: 13, FirstName: "John", LastName: ""}
	v.Comment = " Need more details. "
	v.Address = Address{"Hanga Roa", ""}
	v.FavoriteMusic = []string{"Made in Heaven", ""}

	output, err := xml.MarshalIndentShortForm(v, "  ", "    ")
	if err != nil {
		fmt.Printf("error: %v\n", err)
	}

	os.Stdout.Write(output)
	// Output:
	//   <person id="13">
	//       <name>
	//           <first>John</first>
	//           <last />
	//       </name>
	//       <age>0</age>
	//       <Married>false</Married>
	//       <City>Hanga Roa</City>
	//       <State />
	//       <!-- Need more details. -->
	//       <favorite_music>Made in Heaven</favorite_music>
	//       <favorite_music />
	//       <lucky_number>0</lucky_number>
	//   </person>
}

```

## Related questions
[#21399](https://github.com/golang/go/issues/21399)
Repository: rust
Issue: hang in fulfill due to exponential blowup
Labels: C-bug,I-hang

```rust
trait Trait {}

struct W<T>(T);

impl<T, U> Trait for W<(W<T>, W<U>)>
where
    W<T>: Trait,
    W<U>: Trait,
{}

fn impls<T: Trait>() {}

fn main() {
    impls::<W<_>>()
}
```
this program results in a hang in both rustc (fulfill) and in r-a (causing my PC to freeze).

if we prove this using a breadth first approach we try to prove `O(2^recursion_limit)` goals