sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Generic type comparison results in incorrect error when inferring from undefined type
Labels: Help Wanted,Possible Improvement

### 🔎 Search Terms

"generics", "infer undefined type", "not assignable"

### 🕗 Version & Regression Information

- This changed between versions 3.6.3 and 3.7.5


### ⏯ Playground Link

https://www.typescriptlang.org/play?ts=5.4.0-dev.20240128#code/C4TwDgpgBA4hB2EBOBLAxgHgCoD4oF4oBvAKCnKgHpKoBJeANwEMAbFAEy3GhQGcp4Ae2BR2EAGYpE7MhQAeALihYoEOcATt+9Zm07cMU8cigBlPAH4zUJQAYSAXxIlqUAMKCkSCGhEAjCAALJgYUQQBXJAUXGgBROSZfFhAoAFsmYDRAqQBzKByEZHQoUEgoAHdPAGt+NE9vJJASOvheETqvH2AARiU4RFRMeHDUgKQ8QiIHKCZ+fqKhkbGcGKgAOUF4AFp0zOz4PIKB4tLob15wlmB+KVUvTygACjVIXwh2AEpmzbaoDobgAAmPqFQYYYajZATYjTWawUHoDBtVAHFarACqiDkrw07CgAWCoU8qwAsp5oLxXihJGh8gjaacoOdLtcoLcmBUICgkHjkEhPNFXFwygByeZggAsgJwIrZ-CEIlmvBQOXgTD8LGgwEEJW4UDF9PBSyhIoAdKtlHqRRCxrK+AJhDNeMrVerNSUdYyRVKzd9WiIpLoOCDjotIeMCDCnfDQxgpTggA

### 💻 Code

```ts
type Generic<T> = {
    // In this scenario, "InvalidType" is not defined
    x: T extends InvalidType<infer S> ? S : 0
}

// Correct behaviour:
// Exactly matching generic type works correctly
const correct1: Generic<number> = {} as Generic<number>
// Non-matching generic type results in error (expected)
const correct2: Generic<number> = {} as Generic<string>

// Unexpected behavior
// More specific generic type results in a weird error:
// Type 'Generic<42>' is not assignable to type 'Generic<number>'.
//  Type 'number' is not assignable to type '42'.
const invalid: Generic<number> = {} as Generic<42>
```


### 🙁 Actual behavior

TS error:
```
Type 'Generic<42>' is not assignable to type 'Generic<number>'.
  Type 'number' is not assignable to type '42'.
```

### 🙂 Expected behavior

There should be no TypeScript error, or at least not a confusing error message like that.

It is not clear where the actual error comes from (undefined type `InvalidType`), and the current
error message does not really make sense - to a user it looks like the type comparison (`42` -> `number`) was inverted (`number` -> `42`).

### Additional information about the issue

This also seems to happen in more complex scenarios where all involved types are correctly defined but another TS error like `Type instantiation is excessively deep and possibly infinite` occurs somewhere in the chain.
Repository: deno
Issue: `Deno.consoleSize` gives a poor error message when both stdout and stderr are piped
Labels: bug,runtime

```
> deno eval 'console.log(Deno.consoleSize())' 2>&1 | deno eval 'Deno.stdin.readable.pipeTo(Deno.stdout.writable)'
error: Uncaught (in promise) Error: The handle is invalid. (os error 6)
console.log(Deno.consoleSize())
                 ^
    at Object.consoleSize (ext:runtime/40_tty.js:14:3)
    at file:///V:/scratch/$deno$eval:1:18
```

Version: Deno 1.40.1

Related: https://github.com/denoland/deno/issues/17982
Repository: go
Issue: all: add GOOS=wasip2 port
Labels: NeedsInvestigation,arch-wasm

WASI preview 2 was [officially released](https://github.com/WebAssembly/WASI/tree/main/preview2).

With the launch of preview2, preview1 will be deprecated and transitioned to legacy support across various tools. For instance, the [documentation for wasmtime](https://docs.rs/wasmtime-wasi/latest/wasmtime_wasi/preview2/index.html) indicates that legacy code will be removed after 2 releases after the landing of preview 2.

The main differences between WASI Preview 1 and Preview 2 are:

- **Capability-based Security**: WASI Preview 2 introduces capability-based security principles, using the facilities provided by the Wasm component model. All access to external resources is provided by capabilities. Handles, defined in the component-model type system, dynamically identify and provide access to resources.

- **Modularity**: WASI Preview 2 uses the component model's worlds mechanism to allow specific sets of APIs to be described which meet the needs of different environments. 

- **New Interface Definitions**: For those familiar with WASI preview 1, interfaces have been adapted to use high-level types defined by the Component Model and are defined with WIT, including WASI IO, Filesystem, Clocks, and Random. A WIT package is a collection of WIT interfaces and worlds. A world is a complete description of both imports and exports of a component and may be used to represent the execution environment of a component

When we get a stable GOOS=wasip2 we might have to think on ways to deprecate (or remove) wasip1 in a future Go version.

It should be possible to ["bridge"](https://github.com/bytecodealliance/wasmtime/tree/main/crates/wasi-preview1-component-adapter) preview1 and preview2 in such a way that preview1 programs still work on preview2.

---

This issue now tracks discussions and feature requests regarding the new port.

## Related Issues

GOOS=wasip1 [tracking issue](https://github.com/golang/go/issues/58141)

cc @golang/wasm
Repository: rust
Issue: Consider use of `IndexMap::(swap_)remove` and `IndexSet::(swap_)remove`
Labels: T-compiler,C-discussion

https://github.com/rust-lang/rust/pull/120454#discussion_r1468930658

`indexmap` 2.2.0 made the `remove` methods deprecated, as they forward directly to `swap_remove`. #120454 will update these callsites to use `swap_remove`, but we should consider if this is the correct behaviour. Alternatives are `shift_remove` (invalidating existing indexes) or using a different map.
Repository: godot
Issue: Boot splash flickers a solid color before displaying the boot splash image
Labels: bug,topic:rendering

### Tested versions

v4.2.2.rc1.official [c7fb0645a]

### System information

Windows 10, all renderers affected

### Issue description

This flicker applies to all boot splash images, but it is most apparent and very ugly if you're attempting to use a transparent boot splash image.

https://github.com/godotengine/godot/assets/15337628/1d66dfbf-b0bb-4c4d-94a6-a79bb8bd6fb8

This ugliness is the issue. Ideally the boot splash image should show for the duration of the solid black color too. But if that's not possible then the solid black colour should respect the `BG Color` alpha and `transparent` settings.

### Steps to reproduce

To reproduce ... just use a boot splash image. This seems like such an obvious issue.

Slightly irrelevant but here's steps to use a transparent boot image:
- Open `Project Settings` -> `Boot Splash`
- `Image` = Use a transparent .png file
- `BG Color` = alpha to 0 and black
- `Fullsize` = false
- Open `Display` -> `Window`
- `Borderless` = true
- `Transparent` = true
- Then in-game you set `borderless` = false to have a proper window again.

### Minimal reproduction project (MRP)

[bootsplashissue.zip](https://github.com/godotengine/godot/files/14077654/bootsplashissue.zip)
Repository: excalidraw
Issue: Images missing when loading from blob
Labels: images

Issue:
1. The scene is saves as either an embedded image or json. The scene contains images.
2. When the scene is loaded using loadFromBlob(blob, null, null), the images do not appear in the scene (including on re-render).

<img width="690" alt="image" src="https://github.com/excalidraw/excalidraw/assets/38274533/c2a4d5af-634b-4b0f-889a-0d3fe9e86df8">
Repository: godot
Issue: Rounded Progressbar does not behave well for values below the corner radius
Labels: bug,discussion,topic:gui

### Tested versions

v4.2.1.stable.official [b09f793f5]

### System information

Godot v4.2.1.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 31.0.15.4633) - AMD Ryzen 9 7900X 12-Core Processor (24 Threads)

### Issue description

The progressbar with a StyleBoxFlat is distorted for values below the corner radius.
![image](https://github.com/godotengine/godot/assets/10883690/c00bf392-55fd-4bb3-9515-5ff5c8fe824b)
For larger values it is ok again
![image](https://github.com/godotengine/godot/assets/10883690/7ba3fd4b-7f56-4a95-8395-be7e5b46fc3e)

The stylebox needs to be cut off at that value, instead of being distorted.

Related to https://github.com/godotengine/godot/issues/44015, but with StyleBoxTexture.

### Steps to reproduce

Create Progressbar with a StyleBox who has larger rounded corners, to make it visible.

### Minimal reproduction project (MRP)

N/A
Repository: flutter
Issue: ValueNotifier documentation blurs the line between equality and identity
Labels: framework,d: api docs,d: examples,P3,team-framework,triaged-framework

### Steps to reproduce

In the docs for ValueNotifier, we see:

/// Because this class only notifies listeners when the [value]'s _identity_
/// changes, listeners will not be notified when mutable state within the
/// value itself changes.

But in fact, if you check the code, it calls `==`, not `identical()` so it will in fact notify if an overridden equality reports false.
The docs go on to blur this by using List, which does an identity check for equality, and is thus a common but bad example.

The docs could be updated to show that `==` is being used, and will properly use a deeper equality test if the object class provides it.

### Expected results

Reader is informed, and can properly infer the behavior looking only at the documentation.

### Actual results

Reader is confused, and must dig into the source code to explain a bug.
Repository: vscode
Issue: Pick mic device for "hey code"
Labels: feature-request,workbench-voice

Testing #202926

I'd like to use the builtin macbook pro mic, instead of the airpods mic, because that puts the airpods into "mic mode" and makes audio sound bad. Is it possible to select the mic device, with the APIs that you have?
Repository: tauri
Issue: [bug] failed to create webview: WebView2 error: WindowsError(Error { code: 0x80070057, message: The parameter is incorrect. })
Labels: type: bug,status: needs triage

### Describe the bug

Sometimes, I am receiving errors in my Sentry.
They all look like this.
`CreateWebview: failed to create webview: WebView2 error: WindowsError(Error { code: 0x80070057, message: The parameter is incorrect. })`
I don't know why it could be, and don't know how to solve them or where should I look into, to discover it.
The problem is floating, because for some PC's I see events, that related to successfully running application (that means client was able to start application).

I am sure, that customer have installed WebView due to JSON of error in Sentry, here is DLL of WebView presented, and version here too.

Versions of Windows where I saw this error:
windows 10.0.22621,
windows 10.0.19045,
windows 10.0.19044,
windows 10.0.19042,
windows 10.0.18363,
windows 10.0.17763,
windows 6.3.9600.

One customer told me, that he saw this error (then I saw error in Sentry), but next run was success.

### Reproduction

Have no idea how to reproduce it,
tried with installing fresh and clean versions, my attempt was successfull, and I wasn't able to reproduce bug.



### Expected behavior

_No response_

### Full `tauri info` output

```text
[✔] Environment
    - OS: Windows 10.0.19045 X64
    ✔ WebView2: 120.0.2210.144
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.74.1 (a28077b28 2023-12-04)
    ✔ cargo: 1.74.1 (ecb9851af 2023-10-18)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
    - node: 21.2.0
    - pnpm: 8.10.5
    - npm: 10.2.3

[-] Packages
    - tauri [RUST]: 1.5.2
    - tauri-build [RUST]: 1.5.0
    - wry [RUST]: 0.24.4
    - tao [RUST]: 0.16.5
    - tauri-cli [RUST]: 1.5.8
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 1.5.8 (outdated, latest: 1.5.9)
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: Web-Dev-For-Beginners
Issue: Source control workflow
Labels: no-issue-activity

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: [e.g. iOS]
 - Browser [e.g. chrome, safari]
 - Version [e.g. 22]

**Smartphone (please complete the following information):**
 - Device: [e.g. iPhone6]
 - OS: [e.g. iOS8.1]
 - Browser [e.g. stock browser, safari]
 - Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
Repository: next.js
Issue: Interception + Modal intercepts itself causing bad history state 
Labels: bug,Parallel & Intercepting Routes

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/sleepy-williams-wp7n88

### To Reproduce

First of all, thanks to the Vercel devs for fixing the 20+ interception bugs. Sorry in advance for filing some more 👉 👈 

1. Go to [codesandbox](https://codesandbox.io/p/devbox/sleepy-williams-wp7n88) link and run app ([here](https://wp7n88-3000.csb.app/photos))
2. Click on the "Lee Robinson" link
3. Notice the modal popping up, it contains 2 links: `/photos/LeeRobinson/chad` and `/photos/LeeRobinson/chad/details`

Bug 1: 
If you click on `/photos/LeeRobinson/chad/detail`, then outside the modal, it properly dismisses.
But if you reopen the modal, click on `/photos/LeeRobinson/chad/detail` and then on `/photos/LeeRobinson/chad`... now if you click outside the modal, it does not dismiss because the segments and history stack aren't aligned.

Bug 2: 
If you go directly to the nested intercepted url: `https://wp7n88-3000.csb.app/photos/LeeRobinson/chad/detail`, the expectation is that we don't want any modals here because the UX is jarring.
EG: if you click on `/photos/LeeRobinson/chad/detail`, then the modal intercepts itself causing 2 instances of the same component.

It's best if Next does not intercept any routes if you're already inside a non-intercepted modal.

### Current vs. Expected behavior

When inside an intercepted modal, the history state should be properly sync with `Link` navigation.
When going directly to a nested interceptable route, `Link` navigation should not trigger route interception because it causes double component and the UX is jarring to user.

### Provide environment information

```bash
Latest 14.1.1-canary.17, on all OS
```


### Which area(s) are affected? (Select all that apply)

App Router, Routing (next/router, next/navigation, next/link)

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed)

### Additional context

Kind of hard to understand from the gifs, but the first one:
Clicking on the `Link` while inside the modal messes up the segment history
![modal1](https://github.com/vercel/next.js/assets/811298/eb3b1d75-ed31-45f0-9ebd-293cee6dc413)

2nd gif: grauch is intercepting himself
![modal2](https://github.com/vercel/next.js/assets/811298/1e3a71c7-b0ad-4723-ae57-7b05a6b13525)

_No response_
Repository: stable-diffusion-webui
Issue: [Feature Request]: User Profiles
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

The UI should offer a way to create user profiles.

I imagine a script that will be ran to create folders like outputs, models, etc... within a new folder named after each user. Perhaps the repo will be initialized with a "users/default" folder to house the ones that exist already.

### Proposed workflow

1. A dropdown will appear at the top right corner of the UI. Labeled as "Logged in as:", it will list the folders inside `stable-diffusion-webui/users`  and also `(Create new)`
2. Selecting the creation option will lead you to a UI page that asks you for information like what the user's name will be and what models and such you want to move over.
3. After the user presses a submit button, a script will run to create the necessary folders and move the necessary files.


### Additional information

**Possible complications**
At first blush, the use of the config.json file and `--ui-settings-file` param may seem like an easy way to address the different users. However, things could get complicated where users decide that they want to share models. I'm not sure if there's a way to pull from multiple folders for things like "outdir_txt2img_samples".
Repository: go
Issue: proposal: strings: string transformation functions for Builder
Labels: Performance,Proposal

### Proposal Details

There is currently no support for appending the result of any of the string transformation functions[^1] (`Join`, `Replace(All)?`, `Repeat`, `Map`, `To(Title|Upper|Lower)(Special)?`, `ToValidUtf8`) directly to a `Builder`, bypassing the intermediate temporary allocation:

```go
// var b strings.Builder (assume that the backing buffer has been preallocated)
s := strings.Repeat(...) // intermediate temporary allocation
b.WriteString(s) // s dead here
```

The necessary presence of that temporary allocation partially defeats the purpose of `Builder`. I most recently ran into this while building SQL queries with varying number of placeholders (`Repeat`) and columns (`Join`).

Any of the following would address this issue, with different tradeoffs:

1. somehow ensure that the compiler is able to elide that intermediate temporary allocation
2. add variants of the transformation functions[^1] that target either a `Builder` (or more in general a `io.Writer`, but in this case we will still want to add special handling for the case in which the `io.Writer` is a `Builder`) -- e.g. for function `Foo(...) string` we would get something like `AppendFoo(*Builder, ...) int` or `AppendFoo(io.Writer, ...) (int, error)`[^2]
3. add a wrapper type in package strings that can be used to add all these string transformation methods[^1] to an existing `io.Writer` (again, with the case of the `io.Writer` being a `Builder` being handled specially) -- e.g. for function `Foo(...) string` we would get something like `WriteWapper(io.Writer).Foo(...) (int, error)`[^2]

Option 1 would be possibly the best from a user perspective, as it would transparently apply to existing code and would not require new APIs (nor a full-blown proposal), but seems a bit tricky as it would involve teaching the compiler about some of these functions/types and/or significantly strengthening escape analysis.

Option 2 and 3 could be useful beyond strings.Builder, but they require duplicating a number of existing APIs.



[^1]: internally most of these strings transformation methods already instantiate an ephemeral `Builder` to accumulate the result of their work, so the existing methods could likely share their implementation with the ones being proposed
[^2]: the proposed names, `AppendFoo` and `WriteWrapper`, are currently just placeholders... suggestions welcome
Repository: next.js
Issue: Next.js dev server gets stuck. user has to reload to make it work again
Labels: bug

### Link to the code that reproduces this issue

https://github.com/mjm/courier-js

### To Reproduce

Next js Version : 14.0.4 When i am  opening my website, at random intervals its showing a blank page with a 500 server error  , on reloading its working as expected.

### Current vs. Expected behavior

It should work without manual user refresh i want it to work 

### Provide environment information

```bash
OS: macOS Catalina, 
Browser (if applies): I've seen in both Chrome and Safari
Version of Next.js: 14.0.4, 
Version of Now CLI: 16.7.3
```


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

Not sure

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

next start (local)

### Additional context

 I'm on the latest release. Its shows 500 server error on initial load sometimes after refresh it works fine. error logs  stack up on server error 500.
Repository: kubernetes
Issue: wrong document link in apiserver code
Labels: kind/documentation,sig/api-machinery,triage/accepted

### What happened?

https://github.com/kubernetes/kubernetes/blob/eb0fcf9e216f83e200e1c04e24d0484394da6b86/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go#L100

`https://kubernetes.io/docs/user-guide/kubeconfig-file/` not exist

### What did you expect to happen?

-

### How can we reproduce it (as minimally and precisely as possible)?

-

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
master
```

</details>


### Cloud provider

<details>
none
</details>


### OS version

<details>

```console
none
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: vscode
Issue: Code duplication between `callHierarchyPeek.ts` and `typeHierarchyPeek.ts`
Labels: debt,perf-bloat

Running `npx jscpd . -c ./.jscpd.json` over our sources with `.jscpd.json` containing:

```json
{
	"ignore": [
		"**/*.svg",
		"**/node_modules/**",
		"**/.git/**",
		"**/fixtures/**",
		"**/*.test.ts",
		"**/*.integrationTest.ts",
		"**/keybinding/test/**",
		"**/browser/keyboardLayouts/**",
		"**/out/**",
		"test/**",
		"extensions/**"
	],
	"reporters": ["console"],
	"minLines": 30
  }
```

Revealed duplication between the two:

```
Clone found (typescript):
 - src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts [148:17 - 194:10] (46 lines, 354 tokens)
   src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.ts [149:17 - 195:10]

Clone found (typescript):
 - src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts [209:10 - 301:28] (92 lines, 807 tokens)
   src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.ts [210:10 - 302:28]

Clone found (typescript):
 - src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts [399:23 - 430:2] (31 lines, 367 tokens)
   src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.ts [393:23 - 424:2]
```
Repository: pytorch
Issue: DISABLED test_inductor_inplace_op_on_view (__main__.C10DFunctionalNativeTest)
Labels: module: rocm,triaged,skipped

Platforms: rocm
Probably same as #118403

This test was disabled because it is failing on main branch ([recent examples](https://torch-ci.com/failure?failureCaptures=%5B%22distributed%2Ftest_c10d_functional_native.py%3A%3AC10DFunctionalNativeTest%3A%3Atest_inductor_inplace_op_on_view%22%5D)).

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang
Repository: godot
Issue: Big tiles are not drawn according to the actual texture area, but are drawn according to the tilesize
Labels: discussion,topic:editor,documentation,topic:2d

### Tested versions

Godot_v4.2.2-rc1

### System information

Godot v4.2.2.rc1 - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Ti (NVIDIA; 31.0.15.4633) - 13th Gen Intel(R) Core(TM) i7-13700KF (24 Threads)

### Issue description

The tile_size of my TileSet = 16 * 16. According to the prompt, I hold down Shift in the TileSet to create a large tile with a size of 32*32. After setting it, I draw this large tile in the TileMap. I hold down the mouse Left-click to draw. The drawn graphics are not drawn according to the size of 32*32. Adjacent tiles overlap or are lost.

### Steps to reproduce


https://github.com/godotengine/godot/assets/52156002/919c44a4-5957-418b-b1a0-27699f6330d8



### Minimal reproduction project (MRP)

N/A