sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Control flow analysis for dependent parameters only works when checking against literals
Labels: Help Wanted,Possible Improvement

### 🔎 Search Terms

narrow, parameters, typeof

### 🕗 Version & Regression Information

It never worked for `typeof` / `asserts` checks since the feature introduction in https://github.com/microsoft/TypeScript/pull/47190; it's been mentioned here:

https://github.com/microsoft/TypeScript/pull/47190#issuecomment-1041216006

### ⏯ Playground Link

https://www.typescriptlang.org/play?#code/MYewdgzgLgBAZmAMgSygUwE4EMA2AuGACgDpSsMBzCAgbQAMs6AaGMAVwFsAjTAXRgA+Mel2YxoGZGAq8AlDAC8APhgA3EMgAmiolhZd5ymAG8AUDBjI4uxQoUwARFgfyzFi6EggcaYjhAUhAYA3ObuAPTh7tHuAHoA-GEAvqYppp7Q8GAAghAQmFAEJGSU1MIMYuzcfILloiwSUjKGKupaOoR6MAaKKm6W1oTIENmdsq5hHuAQ3r7+gSGTMJExMQnJqenTsAgAKgCeAA5oIHBFpMTkVLRVPBgstzVCNI3SDVCS0nK9ahra9p19C0TGErEQoEcTtYsLZ7A5HhgXCDohlZn4AkFZKFoitVnFEhYUmk4GwwMAoMhwJYRoRVLgCKSANZgEAAdzAsgIdJw1JgFWRMAwaCgbAwYBgHzYaFCKSAA

### 💻 Code

```ts
const fnLiteral: (...args: [`a`, number] | [`b`, string]) => void = (a, b) => {
  if (a === "a") {
    console.log(b);
    //          ^? number
  }
}

const fnAssert: (...args: [`a`, number] | [`b`, string]) => void = (a, b) => {
  if (isA(a)) {
    console.log(b);
    //          ^? number | string
  }
}
const fnTypeof: (...args: [number, number] | [string, string]) => void = (a, b) => {
  if (typeof a === "number") {
    console.log(b);
    //          ^? number | string
  }
}

function isA(val: unknown): val is `a` {
  return true;
}
```


### 🙁 Actual behavior

Both `fnAssert` and `fnTypeof` are unable to get TS to recognize `b` as its narrowed type (`number`). Only if `a` is checked against a literal does the narrowing works.

### 🙂 Expected behavior

The `b` parameter should be narrowed to `number`.

### Additional information about the issue

_No response_
Repository: flutter
Issue: "flutter run" will unconditionally rewrite plugin registrants
Labels: tool,a: desktop,a: build,good first issue,has reproducible steps,P2,a: plugins,team-tool,triaged-tool,found in release: 3.13,found in release: 3.14

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

Consecutive runs of `flutter run` will regenerate and rebuild the C++ boilerplate, which makes the build slower.

On Desktop (at least Linux, but probably others as well), `flutter run` generates some C++ files such as:

```
linux/flutter/generated_plugin_registrant.cc
windows/flutter/generated_plugin_registrant.cc
```

The problem is that it will regenerate them even if they already exist. Flutter should 1st compare the contents before regenerating them, otherwise `cmake` will notice the new timestamp and trigger a rebuild.



### Expected results

`flutter run -v` should not show any time spent running `cmake` and `ninja` if source files haven't changed since the last good build.

### Actual results

unneeded rebuilds

### Code sample

```
flutter create foo
cd foo
flutter run
flutter run -v
```

### Screenshots or Video

_No response_

### Logs

```
[ +414 ms] [2/5] Building CXX object CMakeFiles/pointless.dir/flutter/generated_plugin_registrant.cc.o
[  +20 ms] [3/5] Building CXX object CMakeFiles/pointless.dir/my_application.cc.o
[  +99 ms] [4/5] Linking CXX executable intermediates_do_not_run/pointless
[        ] [4/5] Install the project...
```

### Flutter Doctor output

```
Flutter 3.13.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision efbf63d9c6 (5 weeks ago) • 2023-08-15 21:05:06 -0500
Engine • revision 1ac611c64e
Tools • Dart 3.1.0 • DevTools 2.25.0
```
Repository: godot
Issue: Screen flickering at random
Labels: bug,platform:windows,topic:editor,needs testing

### Godot version

4.1.1-stable_win64

### System information

Windows 10 Pro 21H2 - AMD CPU & GPU

### Issue description

I'm having this problem at random moments. I use Wallpaper Engine, but in the time I was recording I stopped it and closed it just in case. It happen frecuently, also it doesn't matter if I'm recording or not and it happen in any window of the program. I tried with Compatibility renderer and it also happen.

https://github.com/godotengine/godot/assets/43476781/2bbca122-91bb-4c33-950e-f8ec49a44070



### Steps to reproduce

- Just open any project.
- Wait for the flicker to happen.

### Minimal reproduction project

It happening in any project I run.
Repository: godot
Issue: Editor sometimes randomly "freezes" and alt+tab fixes it
Labels: bug,platform:linuxbsd,topic:porting

### Godot version

v4.1.1.stable.arch_linux

### System information

Godot v4.1.1.stable unknown - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 08:37:16 +0000 - Vulkan (Compatibility) - Mesa Intel(R) UHD Graphics (TGL GT1) () - 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 Threads)

### Issue description

Usually when I'm dealing with nodes and node logic, the engine "freezes". I say that in quotation marks, since it doesn't really freeze but no button or UI element responds to my inputs. With the nature of this bug in mind, here are the things I found out:
* It doesn't happen while using the code editor, or at least I haven't seen that happen.
* Whenever it happens, clicking randomly seems to fix it, though Alt+Tab works way better. It reliably fixes it 100% of the time.
* Alt+Tab works even if you have no other applications open in the workspace.
* I don't remember it happening with my previous DE (KDE Plasma)


### Extra system information
I have a hunch that this is DE-specific, so I'll put my full neofetch output here:
```
>> neofetch
      /\         p@PC 
     /  \        ---- 
    /\   \       OS: Arch Linux x86_64 
   /      \      Host: Nitro AN515-57 V1.19 
  /   ,,   \     Kernel: 6.5.3-zen1-1-zen 
 /   |  |  -\    Uptime: 1 hour, 48 mins 
/_-''    ''-_\   Packages: 1061 (pacman) 
                 Shell: zsh 5.9 
                 Resolution: 1920x1080 
                 DE: Xfce 4.18 
                 WM: Xfwm4 
                 WM Theme: Alternate 
                 Theme: Adwaita-dark [GTK2], Breeze [GTK3] 
                 Icons: Adwaita [GTK2], breeze-dark [GTK3] 
                 Terminal: xfce4-terminal 
                 Terminal Font: Monocraft Medium 9 
                 CPU: 11th Gen Intel i7-11800H (16) @ 4.600GHz 
                 GPU: NVIDIA GeForce RTX 3050 Ti Mobile 
                 GPU: Intel TigerLake-H GT1 [UHD Graphics] 
                 Memory: 4009MiB / 15771MiB 
```

### Steps to reproduce

1. Open a project.
2. Work on it for a while.
3. Editor becomes unresponsive, Alt+Tab fixes it.

### Minimal reproduction project

I'll upload one if necessary.
Repository: next.js
Issue: Vercel production environment the post handle function cause the get handle function response error data
Labels: bug,Pages Router

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/linzhe141/minimal-nextjs-isssue

### To Reproduce

1、Don't Comment out the POST handle function of the `app/api/nav/route.ts` file
2、Deploy via vercel that use default selection is nextjs framework


### Current vs. Expected behavior

I expected that the response should contain the data of `"page.tsx"`

but it did not contain the data of `"page.tsx"`.

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home China
    Binaries:
      Node: 18.17.1
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.19
      eslint-config-next: 13.4.19
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.2.2
    Next.js Config:
      output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router, Data fetching (gS(S)P, getInitialProps)

### Additional context

The GET and POST handle functions are written in the api/nav/route.ts file at the same time. The development environment is normal. However, after deployment through vercel, the GET request returns an abnormal result. If the POST handle function is commented out at that time, the GET request returns a normal result?

My entire application did not initiate a corresponding post request, regardless of whether it was commented out or not.

![image](https://github.com/vercel/next.js/assets/40790268/78f9b218-6177-49cb-9781-0bb9be152185)
The page.tsx file does exist

### app/api/nav/route.ts
```typescript
export async function GET(request: Request) {
  const test = []
  for (const name of await fs.readdir(
    path.resolve(process.cwd(), 'app/blog/data_structure/tree')
  )) {
    test.push(name)
  }
  const result = {
    code: 200,
    test: test,
  }
  return NextResponse.json(result)
}

export async function POST(request: Request) {
  return NextResponse.json({ data: true })
}
```
### app/page.tsx
```typescript
"use client"
import { useEffect } from "react";

export default function Home() {
  function foo() {
    fetch("/api/nav");
  }
  useEffect(() => {
    foo();
  }, []);
  return <main>testxxxxxxx</main>;
}

```
- abnormal response: the post handle function `is not commented` on the vercel production environment, `page.tsx file name is missing`

  ```json
  {
      "code": 200,
      "test": [
          "readme.mdx"
      ]
  }
  ```

- normal response:  the post handle function `is commented` on the vercel production

  ```json
  {
      "code": 200,
      "test": [
          "page.tsx",
          "readme.mdx"
      ]
  }
  ```
Repository: godot
Issue: Random and varying GDScript VM errors
Labels: bug,topic:gdscript,needs testing

### Godot version

v4.1.1.stable.official [bd6af8e0e]

### System information

Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 () - Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz (4 Threads)

### Issue description

Whenever I try to run my project, it will produce a seemingly random script-related error. On rare occasion, the game will run for 30 seconds before closing.
The most common error I receive is this:
`Invalid get index '' (on base: 'Node (Rhythia.gd)').`
![image](https://github.com/godotengine/godot/assets/46307433/5a2f0760-ed0c-4ca3-9683-882518d0b76c)
The problem here is that there is no code on that line of Rhythia.gd as the entire line is commented. No error message is output in this case.
Opcode errors I receive include:
`Internal script error! Opcode: 110 (please report).`
![image](https://github.com/godotengine/godot/assets/46307433/3071b8bf-4013-4e08-a6de-58782339928c)
`Internal script error! Opcode: 114 (please report).`
![image](https://github.com/godotengine/godot/assets/46307433/f861c9f7-5d6d-4fa5-ab2b-f0c06e73ff4d)
`Internal script error! Opcode: 0 (please report).`
![image](https://github.com/godotengine/godot/assets/46307433/9c953298-46c6-4e44-b6d1-4c4f7f1d60fb)
All the scripts and lines it gives me seem completely random. The only pattern between these is that the opcode seems to be correct for the corresponding line. I have received other similar opcode errors with different numbers and different scripts.
When I get opcode errors, looking into the Errors tab gives me this:
```
EnergyHUD.gd:11 @ @implicit_new(): Condition ' (ip + 8) > _code_size ' is true. Breaking..:
<C++ Source> modules/gdscript/gdscript_vm.cpp:3039 @ call()
<Stack Trace> EnergyHUD.gd:11 @ @implicit_new()
```
![image](https://github.com/godotengine/godot/assets/46307433/06ac2849-2c8f-4710-9023-df6fb1c1bed2)
Yesterday, I also received this but have been unable to get it again:
`Stack Underflow (Engine Bug)`
![image](https://github.com/godotengine/godot/assets/46307433/0bac07da-4759-4a87-a3ba-e2fb40715ebf)


### Steps to reproduce

I have no idea. This just randomly started happening when I opened Godot yesterday.
1. Open Godot
2. Open a project
3. Try to run it

### Minimal reproduction project

I don't think I can make this minimal. The closest thing here would be the entire project itself.
https://github.com/Rhythia/Rhythia/archive/2e8d3d45a6aff57f245724da6e3691f9c2fcf080.zip
Repository: godot
Issue: Even with Move anchors option enabled, moving rectangle via drag or translate does not move anchors along
Labels: bug,topic:editor,topic:2d

### Godot version

v4.1.1.stable.official [bd6af8e0e]

### System information

Godot v4.1.1.stable - Ubuntu 22.04.3 LTS 22.04 - Vulkan (Compatibility) - Mesa Intel(R) HD Graphics 4600 (HSW GT2) () - Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz (8 Threads)

### Issue description

When dragging a control rectangle, or translating it in Move Mode, even with the "Move anchors" option enabled (when the anchor button in the top bar of the 2D view is blue), the control anchors stay in place. They only move when resizing the rectangle, which is less convenient if you want to keep the same size.

It may be a bug or by design, but I thought it used to work at some point. Or maybe I was always resizing the rectangle by placing the top-left, then bottom-right corner?

![Godot 4 1 1 - moving whole rectangle does not move anchors](https://github.com/godotengine/godot/assets/1067772/1274485a-dee7-4829-be47-142c0b7d48db)

I tried holding modifiers like Ctrl and Alt during the drag, to no avail.

If it is by design, the anchor button tooltip should be changed to explain that. And then I will open a proposal to add the behavior to move anchors during drag (either as part of the same anchor button if most users prefer this, else as a second option button).

I get it if you don't want to move anchors during a translation via Move Mode as user cannot see anchors during this operation, but this feels important during a Select Mode drag.

### Steps to reproduce

1. Create a Control node
2. Enable Move anchor option (click on anchor button so it becomes blue)
3. In Select mode, drag the Control rectangle elsewhere

### Minimal reproduction project

N/A
Repository: PowerToys
Issue: Bind windows so they are always visible together
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

"Group" windows together, so that whenever one is brought-to-front or sent-to-back, the others in the group are treated likewise.

### Scenario when this would be used?

Often I need two windows to always be visible together - e.g. when I am using two websites in two separate Chrome windows, and I need to move back and forth between them repeatedly, or keep one window visible while entering data into the other.

In this scenario it would be useful if activating ONE of these windows would bring BOTH windows to front. Likewise, when using `Alt+ESC` - sending either one of the windows to back would send BOTH windows to back.

But allow any number of windows in a group, not just two.

### Supporting information

_No response_
Repository: node
Issue: Fs benchmarks take 10+ hours
Labels: fs,benchmark

Current node:fs benchmarks take 10+ hours on our CI, making it impossible to run all of them and have a healthy emotional state. It also blocks other benchmark jobs. 

I recommend aiming for 2-3 hours and changing the benchmarks according to fit into this deadline. 

cc @nodejs/performance
Repository: PowerToys
Issue: Peek : Allow multiple instances
Labels: Idea-Enhancement,Product-Peek

### Description of the new feature / enhancement

When we are using Peek to have a preview of a file (like a picture), it would be nice to keep this preview open, and when we launch again Peek by using Ctrl + space, a new preview window is open.
A setting, could be added to allow this. 
You can add a "pin" button on Peek Preview to keep this preview open.
Another setting could be added to "pair" or "synchronize" the use of left and right arrow from keybord on all the preview

### Scenario when this would be used?

1. I use Ctrl+Space on a file in the directory "c:\myPicture\2023\" a Peek preview is open.
2. I use the "pin button" on the top of the peek preview to keep this preview open
3. I use Ctrl+Space on a file in the directory "c:\myPicture\2022\",
4. I should have a new instance of Peek preview. 

Using left ou right arrow from keybord would show previous or next file from the preview which has focus or all preview if the setting is enable.

This is a convenient way to compare picture or PDF file in two different folder.

### Supporting information

By the way this new feature impose that the Peek Preview windows should be always on top.
The current index of file and the number of files in the directory should be added on the top of the Peek Preview windows. eg : 4/29
Repository: godot
Issue: Image.load_*_from_buffer() freezes UI when loading large or many images
Labels: topic:core,documentation

### Godot version

v3.5.2.stable.official [170ba337a]

### System information

Linux x64

### Issue description

When loading image data with one of the `Image.load_*_from_buffer()` methods it causes the UI to freeze if loading a large image or many consecutively.

I have mainly tested this with `load_png_from_buffer()` and have attempted numerous work-arounds which all failed, including:
- `yield()`ing on a function which creates the Image object from the data
- calling a function asynchronously using a signal
- calling a function asynchronously which then runs the code in a `Thread`
- creating a GDNative extension which loads the data into the Image using `std::async`

At this point all I can assume is that the Image.load_*_from_buffer() methods are synchronized with the rendering of the UI. But I am hoping that someone can provide some insights on how I can resolve this issue.

### Steps to reproduce

If you run the example project attached you will see that every time an image is loaded you will be unable to scroll for a moment, creating a very jerky motion. If all the images were loaded at once it would freeze the UI for a few seconds.

### Minimal reproduction project

[example_project.zip](https://github.com/godotengine/godot/files/12643321/example_project.zip)
Repository: stable-diffusion-webui
Issue: [Bug]: Changing lora file location change image generated output to not be the same
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?

When you generate an image with a lora if you was to move this lora file into another different folder within "stable-diffusion-webui\models\Lora" such as from "stable-diffusion-webui\models\Lora" to "stable-diffusion-webui\models\Lora\something" then generate the exact same prompt to try get the same image it will change the image slightly and not produce the same image as before.

### Steps to reproduce the problem

1. Generate image with a Lora prompt
2. Move Lora file from "stable-diffusion-webui\models\Lora" to "stable-diffusion-webui\models\Lora\something" folder
3. Generate exact same prompt to try get same image with the lora


### What should have happened?

Should produce exact same image no matter where the lora file is located

### Sysinfo

N/A

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

Mozilla Firefox

### Console logs

```Shell
N/A
```


### Additional information

_No response_
Repository: rust
Issue: Performance regression in Rust 1.71
Labels: I-slow,T-compiler,A-mir-opt,T-libs,A-mir-opt-inlining

Hi, on linux x86, I'm seeing a 120+ms regression in wall time with 1.71, which is small but is noticeable when running the cli application as it is already quite fast.

```
1.70:

frost$ hyperfine -w 5 "./target/release/frost info frost/tests/fixtures/test_large.bag"
Benchmark 1: ./target/release/frost info frost/tests/fixtures/test_large.bag
  Time (mean ± σ):     580.8 ms ±   0.9 ms    [User: 311.6 ms, System: 269.4 ms]
  Range (min … max):   579.7 ms … 582.2 ms    10 runs

1.71:
Benchmark 1: ./target/release/frost info frost/tests/fixtures/test_large.bag
  Time (mean ± σ):     708.8 ms ±   4.9 ms    [User: 447.1 ms, System: 261.6 ms]
  Range (min … max):   703.3 ms … 716.7 ms    10 runs
```  

```
********************************************************************************
Regression in 915aa06700af4a2363639bae70201cd7387470ad
********************************************************************************

Attempting to search unrolled perf builds
ERROR: couldn't find perf build comment
==================================================================================
= Please file this regression report on the rust-lang/rust GitHub repository     =
=        New issue: https://github.com/rust-lang/rust/issues/new                 =
=     Known issues: https://github.com/rust-lang/rust/issues                     =
= Copy and paste the text below into the issue report thread.  Thanks!           =
==================================================================================

searched nightlies: from nightly-2023-01-01 to nightly-2023-09-16
regressed nightly: nightly-2023-04-24
searched commit range: https://github.com/rust-lang/rust/compare/b628260df0587ae559253d8640ecb8738d3de613...7f94b314cead7059a71a265a8b64905ef2511796
regressed commit: https://github.com/rust-lang/rust/commit/915aa06700af4a2363639bae70201cd7387470ad

<details>
<summary>bisected with <a href='https://github.com/rust-lang/cargo-bisect-rustc'>cargo-bisect-rustc</a> v0.6.7</summary>


Host triple: x86_64-unknown-linux-gnu
Reproduce with:
```bash
cargo bisect-rustc --script=./bench.sh --start=2023-01-01 --end=2023-09-16 --preserve 
```

The PR in question does have a perf signoff after weighing the trade-off, but I am raising the issue in case further investigation could lead to more optimizations. 

The project is pretty messy but I have steps on how to benchmark here https://github.com/dantheman3333/frost/issues/33. 

A differential flamegraph shows flatmap's next has taken a hit. I am unsure if this is an aggregate view of all of the nexts or if this is a specific call site - is it possible to get line numbers from this? 

I am unsure of how to proceed from here but I would love to learn if anyone has tips