sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Type inference/resolution error in the presence of Pointee::Metadata in recursive data-structure
Labels: A-associated-items,A-inference,C-bug,fixed-by-next-solver

The following code causes the latest nightly (2023-05-16) to choke, it can also be seen on [the playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=dfd459dacc72328179e8bce4ec6e9919).

```rust
#![feature(ptr_metadata)]

use core::ptr::Pointee;

struct TypedHandle<E: ?Sized> {
    metadata: <E as Pointee>::Metadata,
}

type NodeHandle<T> = TypedHandle<Node<T>>;

struct Node<T> {
    element: T,
    next: NodeHandle<T>,
    prev: NodeHandle<T>,
}
```

_Credits to [Chayim Friedman](https://stackoverflow.com/users/7884305/chayim-friedman) for this reduced example._

And the compiler, much confused it appears, spits out the following error:

```rust
error[[E0284]](https://doc.rust-lang.org/nightly/error_codes/E0284.html): type annotations needed
  --> src/lib.rs:13:11
   |
13 |     next: NodeHandle<T>,
   |           ^^^^^^^^^^^^^ cannot infer type
   |
   = note: cannot satisfy `<Node<T> as Pointee>::Metadata == _`
note: required because it appears within the type `TypedHandle<Node<T>>`
  --> src/lib.rs:5:8
   |
5  | struct TypedHandle<E: ?Sized> {
   |        ^^^^^^^^^^^
   = note: only the last field of a struct may have a dynamically sized type
   = help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
   |
13 |     next: &NodeHandle<T>,
   |           +
help: the `Box` type always has a statically known size and allocates its contents in the heap
   |
13 |     next: Box<NodeHandle<T>>,
   |           ++++             +
```

The compiler accepts the code:

 - If the metadata is stored in a `NonNull<E>` in `TypedHandle`.
 - If the `?Sized` bound is removed from `E` in `TypedHandle`.
 - If the `where NodeHandle<T>: Sized` bound is added on `Node`.

Given the messages, and the fixes, it appears that the compiler fails to realize that `<E as Pointee>::Metadata` is always `Sized`, regardless of whether `E` is `Sized` or not, even though `Metadata` is necessarily `Sized` since its bounds do not specify `?Sized`. This in turn would lead the compiler to expect that `TypedHandle` may be unsized, and thus reject any code where it is not the last field of a struct.
Repository: TypeScript
Issue: Generic typing used for "input" event listeners
Labels: Help Wanted,Domain: lib.d.ts,Possible Improvement

**#** Bug Report

### 🔎 Search Terms

`typescript input event`
`ts InputEvent`
`typescript addEventListener("input", `

### 🕗 Version & Regression Information

I just found it today but verified it was present back to `3.3.3333`
I also verified it existed on `nightly`

Please keep and fill in the line that best applies:

This is the behavior in every version I tried, and I reviewed the FAQ for entries about... **I looked at entries about event listeners, HTML element types, and callbacks.**

### ⏯ Playground Link

[Demo Playground Link](https://www.typescriptlang.org/play?ts=5.2.0-dev.20230521#code/PTAEEEGNIewJwCYEsB2BzUAXGoAWnMAHAZwC4QEBTAN0oBsZDK4A6AWxgC8k66BDFvDTBKKALQBVAMrAEMSMWAB1SgCNg4AAoBJYAAkAKgFkAMgFE6lNqMzBUhAK6YA+jRsBYAFAhQAPlAAYvCgADyYlAAemHxwlHz+fCgIofZO-vRWNsRYuHyYoHzQlIT54VGgqfkAFJgAnkwAvGWYADRY9ZRN9G2UmJAsAJRtmLiUFSjhcABmhWNI2doojphmtBMA3KBTwTAjzMTDo+OTM5Bz2as2LF5eVSgOvAXZibVPoIami8sWmRMDLHwEAhLhMTPNwihmFUAESVaFtKqUUigL5OEGYAagBr+ADeAF8ButbvdHnxnihXmT3sYTAZIphwLE+D9rH8AUD0WDiBCobClk54aBEcjUSs1hisbiCesgA)

### 💻 Code

```ts
// Error on the typing of the event parameter
(null as any as HTMLInputElement).addEventListener("input", (e: InputEvent) => {});
(null as any as HTMLTextAreaElement).addEventListener("input", (e: InputEvent) => {});
```

### 🙁 Actual behavior

The sample code fails to compile because the `input` event is always typed as an `Event`, not `InputEvent`.

### 🙂 Expected behavior

For most elements, the callback event should be `Event`, but for `<textarea>` and `<input>`, it should be `InputEvent`. 

[According to MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event)
> For [<textarea>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea) and [<input>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) elements that accept text input (type=text, type=tel, etc.), the interface is [InputEvent](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others, the interface is [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event).

According to [the W3C spec](https://w3c.github.io/uievents/#event-type-input), it should be `InputEvent` for any element that is `contenteditable`. I don't know that you can trigger an `input` event on other non-`contenteditable` elements so perhaps the event type can be made `InputEvent`, regardless of the element type it is called on.
Repository: kubernetes
Issue: Split `/healthz` into `/livez` & `/readyz` for kube-controller-manager
Labels: sig/api-machinery,kind/feature,triage/accepted

### What would you like to be added?

### What would you like to be added?

Quoted from @wojtek-t 's [comment](https://github.com/kubernetes/kubernetes/pull/115754#discussion_r1192068894)

Splitting healthz/ into livez/ and readyz/ 


### Why is this needed?

```
I agree that splitting into livez/ and readyz/ is what we need here:

* livez/ inherits the existing behavior of healthz/ [it just becomes true once the component starts]
* readyz/ is failing when the component isn't initialized (i.e. it's only true after informers are already synced)

Now what we get is:

* non-leader with delayed caching will always be non-ready
* non-leader without delayed caching will be ready as soon as its cache initializes
* leader currently initializing can be distinguished from non-leader using the leader-election metrics
```
Repository: storybook
Issue: [Bug]: Cannot access 'x' before initialization (Web Components + Vite)
Labels: bug,needs triage

### Describe the bug


By using the classes static properties or methods with static initialization blocks this error will appear:

`ReferenceError: Cannot access 'x' before initialization`

Example:

```
export class MyTest {
    static staticMethod() {
        console.log('static method');
    }

    static staticProperty = console.log('static property');

    static {
        console.log(this);
    }
}
```

Note:
- This issue occurs for TypeScript files only.
- This issue is related to Vite only, I have tested it with `Webpack 5` and the error did not happen.
- As I have understood, the issue is because of the `this` keyword.
- Removing the static property and static methods makes the error not happen.


### To Reproduce

I have created a reproduction using Lit + Vite: [Reproduction link](https://stackblitz.com/edit/github-oggfwr?file=src%2Fstories%2FButton.stories.ts)

I just created a new file named `getError.ts` and import it from `Button.stories.ts` that's it.

### System

```shell
System:
    OS: Windows 10 10.0.23451
    CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz
  Binaries:
    Node: 18.14.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.23451.1000.0), Chromium (113.0.1774.42)
  npmPackages:
    @storybook/addon-essentials: ^7.0.12 => 7.0.12
    @storybook/addon-links: ^7.0.12 => 7.0.12
    @storybook/blocks: ^7.0.12 => 7.0.12
    @storybook/web-components: ^7.0.12 => 7.0.12
    @storybook/web-components-vite: ^7.0.12 => 7.0.12
```
Repository: TypeScript
Issue: Comment referencing an undefined `ClassDecoratorFunction` type
Labels: Bug,Help Wanted

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

ClassDecoratorFunction, decorators.d.ts, lib ClassDecoratorContext

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->

From https://github.com/microsoft/TypeScript/commit/5b1897969769449217237aecbe364f823096c63e

### 💻 Code

In
https://github.com/microsoft/TypeScript/blob/b1ef88c882ca64c7dc6f4ba8b1c578a6a77981e5/src/lib/decorators.d.ts#L38
The `ClassDecoratorFunction` type is not defined.
Repository: material-ui
Issue: [Sizing] New prop in createTheme
Labels: docs,package: system

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

I have a question, and propose in once.

I need to use variable declare in theme for width and height, and i find a solution with 'Module Augmentation'

And i create this:

```ts
declare module '@mui/system/createTheme' {
    /* eslint-disable  */
    interface ICustomTheme {
        sizing?: Record<string, any>;
    }

    interface Theme extends ICustomTheme {}

    interface ThemeOptions extends ICustomTheme {}
}
```

But it's not working with 

```ts
styled('img')(({ theme }) =>
    theme.unstable_sx({
        width: 'theme.sizing.mini.width',
        height: 'theme.sizing.mini.height'
    })
);
```

But i think this should be in default Theme interface implementation.

Cause it's useful in cases like that.

### Examples 🌈

_No response_

### Motivation 🔦

Cause i have a problem with that, in docs i don't see notihing about that, only this:

![image](https://github.com/mui/material-ui/assets/64608510/df71ca6c-ada4-4586-9c33-8c5650029130)

But it's not helpful.
Repository: react-native
Issue: Fetch API does not support getReader (response.body is undefined)
Labels: 🌐Networking,Needs: Triage :mag:,Newer Patch Available

### Description

When trying to read the response from Fetch as a stream, via `getReader()`, I get an error saying that `resp.body` is undefined. Logging the value of `resp` shows this:

```js
{"_bodyBlob": {"_data": {"__collector": [Object], "blobId": "xxx", "name": "chat.txt", "offset": 0, "size": 42, "type": "text/plain"}}, "_bodyInit": {"_data": {"__collector": [Object], "blobId": "xxx", "name": "chat.txt", "offset": 0, "size": 42, "type": "text/plain"}}, "bodyUsed": false, "headers": {"map": {"cache-control": "no-store", "content-length": "42", "content-type": "text/plain; charset=utf-8", "date": "Sun, 21 May 2023 18:53:09 GMT", "expect-ct": "max-age=2592000, report-uri=\"https://sentry.repl.it/api/10/security/?sentry_key=xxx\"", "replit-cluster": "hacker", "strict-transport-security": "max-age=6123043; includeSubDomains", "uwebsockets": "20"}}, "ok": true, "status": 200, "statusText": "", "type": "default", "url": "https://xxx.luisafk.repl.co/chat"}
```

Duplicate of #25701 and #25910, but they were closed.

### React Native Version

0.71.7

### Output of `npx react-native info`

```
System:
    OS: macOS 12.6.3
    CPU: (8) x64 Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
    Memory: 346.30 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.7.0 - ~/.nvm/versions/node/v19.7.0/bin/node
    Yarn: 1.22.15 - ~/.nvm/versions/node/v19.7.0/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v19.7.0/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: Not Found
  SDKs:
    iOS SDK: Not Found
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.7 => 0.71.7 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
```

### Steps to reproduce

Try the code example below.

### Snack, code example, screenshot, or link to a repository

```
const resp = await fetch('https://example.com');
const reader = resp.body.getReader();
```
Repository: stable-diffusion-webui
Issue: [Bug]: warnings.warn(old_gpu_warn % (d, name, major, minor, min_arch // 10, min_arch % 10)) Loading weights [cc6cb27103] from C:\Users\alime\OneDrive\Escritorio\stable-diffusion-webui-master\stable-diffusion-webui-master\models\Stable-diffusion\v1-5-pruned-emaonly.ckpt
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?

me da ese error y me da el link y cuando lo abro y ponga a la ia que genere algo me da este error
RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

### Steps to reproduce the problem

lo instale y me dada muchos errore inventigue y tenia que poner --xformers --medvram --skip-torch-cuda-test y me dada menos errores y me da un error cuando quiero que genere una imagen


### What should have happened?

generarme una imagen

### Commit where the problem happens

--xformers --medvram --skip-torch-cuda-test

### What platforms do you use to access the UI ?

Windows

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
warnings.warn(old_gpu_warn % (d, name, major, minor, min_arch // 10, min_arch % 10))
Loading weights [cc6cb27103] from C:\Users\alime\OneDrive\Escritorio\stable-diffusion-webui-master\stable-diffusion-webui-master\models\Stable-diffusion\v1-5-pruned-emaonly.ckpt
este es el segundo error

RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
```


### List of extensions

--xformers --medvram --skip-torch-cuda-test


### Console logs

```Shell
cmd/terminal
```


### Additional information

_No response_
Repository: godot
Issue: Editor mouse wheel sometimes randomly inverts function
Labels: platform:windows,topic:editor,needs testing,topic:input

### Godot version

4.0.2-mono, 4.0.3-mono

### System information

Windows 10

### Issue description

This has happened to me twice now and it's really frustrating.  Sometimes I'm working and all-the-sudden, randomly, the function of scrolling the mouse becomes zoom (normally it scrolls up and down) and control+scrolling the mouse becomes scrolling up and down (normally it's zoom).  I haven't changed any settings at all, it just happens randomly at times.

Restarting Godot doesn't fix it, rebooting didn't help, creating a new scene didn't fix it, and creating a brand new project didn't fix it.  I also tried updating Godot from 4.0.2-mono to 4.0.3-mono and that also didn't help.

### Steps to reproduce

Unsure

### Minimal reproduction project

I think it's an editor issue, not a project one.
Repository: godot
Issue: Editor: inner classes and scripts without class_name are not exported correctly in the editor
Labels: topic:editor,needs testing

### Godot version

v4.1.dev1.official

### System information

Windows 8.1, Forward+, NVIDIA GTX 650

### Issue description

Probably this is intended or there are severe limitations but that's the problem; inner classes and scripts that don't have a class_name are not exported correctly in the editor. Also resource files can't inherit from classes that are not a globally scoped class name. This doesn't seem significant but it seems godot almost always forces you to use class_name for everything

### Steps to reproduce

extends Node

class TestResource extends Resource:
	@export var meow : float

@export var t_res : TestResource


### Minimal reproduction project

N/A
Repository: rust
Issue: What is the behavior of `std::env::split_paths` when given an empty string?
Labels: T-libs-api,A-docs,A-process

### Location

https://doc.rust-lang.org/nightly/std/env/fn.split_paths.html

### Summary

The iterator returned by `std::env::split_paths` yields a single empty empty string when given a `""` or `OsStr::new("")` argument. Is this by design or a bug?

I found it unexpected that an empty path string yielded any paths at all and was curious if this is a quirk of the implementation using `slice::Split` on the internals.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=a57d0e83edebdcbe70e5e2a54424ee9f

```rust
use std::env::split_paths;

fn main() {
    println!("{:?}", split_paths("").collect::<Vec<_>>());
    println!("{:?}", split_paths(":").collect::<Vec<_>>());
    println!("{:?}", split_paths("::").collect::<Vec<_>>());
}
```

outputs:

```
[""]
["", ""]
["", "", ""]
```

The second and third output make sense to me. In the absence of documented behavior, I'm not sure about the first one.

If this is the expected behavior, can it be added to the documentation?
Repository: rust
Issue: Possible useless `cmp` instruction not removed
Labels: I-slow,A-codegen,T-compiler,C-bug,C-optimization

I tried this code:

```rust
pub fn foo(v: Result<String, String>, f: fn(String) -> Vec<u8>) -> Vec<u8> {
    v.map_or_else(f, f)
}
```

I expected to see this happen:

The compiler generates the same instructions as:

```rust
use std::convert;

pub fn foo(v: Result<String, String>, f: fn(String) -> Vec<u8>) -> Vec<u8> {
    f(v.map_or_else(convert::identity, convert::identity))
}
```

Instead, this happened:

See <https://godbolt.org/z/sbTETdYxK>, an extra `cmp` instruction is generated.

```diff
  example::foo:
          push    rbx
          sub     rsp, 32
          mov     rbx, rdi
+         cmp     qword ptr [rsi], 0
          mov     rax, qword ptr [rsi + 24]
          mov     qword ptr [rsp + 16], rax
          movups  xmm0, xmmword ptr [rsi + 8]
          movaps  xmmword ptr [rsp], xmm0
          mov     rsi, rsp
          call    rdx
          mov     rax, rbx
          add     rsp, 32
          pop     rbx
          ret
```

### Meta

`rustc --version --verbose`:

```text
rustc 1.71.0-nightly (521f4dae1 2023-05-19)
binary: rustc
commit-hash: 521f4dae1bdf7fe9cf9436ecef9ee7c7442708bf
commit-date: 2023-05-19
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.4
Compiler returned: 0
```
Repository: next.js
Issue: Freeze when using Link component to a custom not found page
Labels: bug,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.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.14.0
      npm: 9.3.1
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.4.3
      eslint-config-next: 13.4.3
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
```


### 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 or a replay of the bug

https://github.com/mlazuardy/nextjs-starter

### To Reproduce

run app in dev mode

on the main page, click the `Docs` link which is changed to the /not-found-page url

### Describe the Bug

when using `Link` component and navigate to not found page, the app freezed except we reload the browser

it only happened when using custom `not-found.tsx` file inside app/not-found.tsx`

### Expected Behavior

should navigate and return a custom not found page

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

Chrome 113.0.5672.126

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

Local
Repository: vscode
Issue: Support 'textEdit.newText' in 'resolveSupport' of 'CompletionClientCapabilities'
Labels: suggest,under-discussion

<!-- ⚠️⚠️ 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. -->

### Proposal

Today, VS Code declares the `resolveSupport` of `CompletionClientCapabilities` as:

```
"resolveSupport": {
    "properties": [
        "documentation",
        "detail",
        "additionalTextEdits"
    ]
}
```

The `textEdit` is not included since the `range` of the `textEdit` is a key information to let the client do filtering correctly.

What if we limit the scope to `textEdit.newText` only? By doing this, the range is guaranteed to be available in the response of `textDocument/completion`. Only the content may have an update in `completionItem/resolve`.

### Example

For example, when completing the constructor `new String(byte[] bytes)` in Java. If we support lazy-resolve the `newText` of `TextEdit`, we can first return
```
"textEdit": {
    "newText": "String()",
    "range": xxx
}
```
in `textDocument/completion`. And then give a more accurate content in `completionItem/resolve`:

```
"textEdit": {
    "newText": "String(${1:bytes})",
    "range": xxx
}
```
Even if the item is committed before the resolve result comes, the completion result is still acceptable.

> I experimented and found that VS Code already supports update the `newText` of `textEdit` during resolve. If I change the content of it during `completionItem/resolve`, VS Code can apply the change correctly.

### More background
The completion performance is always a key metric for a Language Server. Specific to Java Language Server, we found that the `textEdit` always takes a lot of time to calculate, mostly caused by the calculation of `newText` part (Because it requires to append parameter names. When it comes to constructor completion, the situation becomes like a disaster because the server needs to fetch source code from different types to get the parameter names of different constructors). This is how this idea came about.