sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: add raiseWindow function
Labels: feature-request,api

<!-- ⚠️⚠️ 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. -->

**Background**: we maintain the Go language server ([gopls](https://pkg.go.dev/golang.org/x/tools/gopls#section-readme)). This server is both an LSP server and an integrated web server. The web server provides documentation, reports, profiles, forms, and other graphical query responses that don't easily fit into an existing LSP response. Some links in these web documents are references to source file locations. Clicking on such links causes the browser to send a request to the web server; but instead of navigating the browser to that location, the server sends an LSP showDocument downcall to the client editor, causing the editor to navigate to that location. In this manner, the client editor and the browser can ping-pong back and forward between each other, providing a richly integrated yet editor-portable user experience.

However, in the VS Code implementation of the [LSP showDocument request](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_showDocument), if the browser window is on top of the VS Code window, the editor moves its cursor and takes focus, but does not raise the window. This can make it hard to tell to the user clicking in the browser that anything happened at all. The solution is for the LSP showDocument request to raise the window (and to document this behavioral requirement). This could be done in one of several ways, including:

1. Unconditionally raising the window when the LSP showDocument request specifies external=false and takeFocus=true. This is the simplest approach and my favored one, but perhaps raising the window is not always desirable.
2. Adding yet another boolean field to to the LSP showDocument request indicating that the window should be raised.
3. Raising the window only when a showDocument request is received asynchronously; that is, not during an active client-to-server LSP call initiated by a user interaction, which would imply that the editor window is already visible.

Whichever approach is decided for the LSP integration, VS Code needs to provide a function to raise the editor window. Therefore:

**Proposal**: we add a function, `raiseWindow`, that raises the current editor window.


Related: https://github.com/microsoft/vscode/issues/207634
Repository: rust
Issue: match generates more branch instructions
Labels: A-LLVM,I-slow,A-codegen,C-optimization

I tried this code:

```rust
fn foo(a: Option<i32>, b: Option<i32>) -> i32 {
  match (a, b) {
    (None, None) => 0,
    (Some(a), Some(b)) => a + b,
    (Some(a), _) => a,
    _ => 1,
  }
}z
```

The generated assembly code:

```asm
foo:
        xor     eax, eax
        test    edi, edi
        je      .LBB0_1
        cmp     edx, 1
        cmove   eax, ecx
        add     eax, esi
        ret
.LBB0_1:
        test    edx, edx
        setne   al
        ret
```

godbolt: https://rust.godbolt.org/z/7dGEccqcW.

We can get less code with [alive2](https://alive2.llvm.org/ce/z/fRn5Cq) validation:

```asm
tgt:                                    # @tgt
        test    edx, edx
        cmove   ecx, edx
        lea     eax, [rcx + rsi]
        test    edi, edi
        cmove   eax, edx
        ret
```

godbolt (llc): https://llvm.godbolt.org/z/331WYovKG

### Meta

`rustc --version --verbose`:
```
rustc 1.78.0-nightly (3cbb93223 2024-03-13)
binary: rustc
commit-hash: 3cbb93223f33024db464a4df27a13c7cce870173
commit-date: 2024-03-13
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 18.1.0
```

@rustbot modify labels: +C-optimization +A-codegen +A-LLVM +I-slow

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"DianQK"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: react-native
Issue: Android View doesnt go to bottom screen edge 
Labels: Issue: Author Provided Repro,Platform: Android,Newer Patch Available

### Description

Our team realised that our apps we made, on certain Android device, the view doesnt go to the bottom edge of the screens. there's always a spacing. At first we thought it was React navigation that would create that spacings but we recently started a new project and we come to realise that it is native from React native. From the default source files of React native (the template we get from npx create-react-app) we have seen that the template use the SafeArea component, so we replaced it with a View component and tried with and without flex: 1 to his styles property but nothing changes, the spacings is still there. Is there a way of getting rid of it ?


PREVIEW OF CODE
<img width="696" alt="Screenshot 2024-03-19 at 10 22 09 AM" src="https://github.com/facebook/react-native/assets/73765089/612fc60e-6b82-48ff-996f-0f97497213e0">

PREVIEW ANDROID DEVICE (the spacings would be the black bar under the white scrollview)
![Screenshot_20240319-112232](https://github.com/facebook/react-native/assets/73765089/350e97ab-3bd2-4b6d-9f36-b2dedb4c5648)


### Steps to reproduce

1. npx create-react-app
2. npm run android (i'm using PIXEL 6)

### React Native Version

0.72.12

### Affected Platforms

Runtime - Android

### Output of `npx react-native info`

```text
System:
  OS: macOS 14.1.2
  CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Memory: 2.76 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.19.0
    path: /usr/local/opt/node@18/bin/node
  Yarn: Not Found
  npm:
    version: 10.2.3
    path: /usr/local/opt/node@18/bin/npm
  Watchman:
    version: 2023.12.04.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/michaellabelle/.rvm/gems/ruby-2.7.4/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10671973
  Xcode:
    version: 15.0.1/15A507
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.21
    path: /usr/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/michaellabelle/.rvm/rubies/ruby-2.7.4/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.12
    wanted: 0.72.12
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
```


### Stacktrace or Logs

```text
No crash or failure
```


### Reproducer

```text
https://snack.expo.dev/@mlabelle/rn---spacing-from-bottom-edge?platform=android
```

### Screenshots and Videos

_No response_
Repository: next.js
Issue: <Link  scroll = { false } /> is not working on next 14.1.3
Labels: bug

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/scroll-issue-l6dj6m

### To Reproduce

1. Scroll down the page.
2. Click on the home link.
3. Click on the back link to return.

### Current vs. Expected behavior

The expected behavior is for the scroll to restore to the last position, but currently, the scroll returns to the top of the page instead.

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 14.1.3
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


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

App Router

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

next dev (local), next start (local), Vercel (Deployed), Other (Deployed)

### Additional context

_No response_
Repository: stable-diffusion-webui
Issue: [Feature Request]: Trajectory consistency distillation sampler
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 ?

Currently Trajectory consistency distillation sampler has achieved great performance on fast inference of diffusion models. It would be great if A1111 could support the TCD sampler for further usage.
https://github.com/jabir-zheng/TCD


### Proposed workflow

1. Go to Sampler.
2. Press TCD sampler.
3. change the related CFG score and steps, i.e. CFG=1.0; steps=4 for inference.


### Additional information

_No response_
Repository: next.js
Issue: static route with revalidation doesn't switch between 404 and 200 status codes correctly
Labels: bug

### Link to the code that reproduces this issue

https://github.com/tdanecker/404-test

### To Reproduce

Use a static route (`/` in the linked repo) with `const export revalidate = <some number>` which, depending on a fetch request, either returns `notFound()` or the actual content.

In the linked repo:

1. Start mocked 404 API responses: `docker-compose up response-404`
2. Start app: `npm run build && npm run start`
3. Observe responses:
   first response: 404 Page, but status code 200 :x:
   subsequent responses after revalidation: 404 Page, status code 404 :white_check_mark:
4. Switch mocked API response to 200: `docker-compose up response-200`
5. Observe responses:
   first response: 404 Page, status code 404 (old stale response)
   subsequent responses: correct page content, but 404 status code :x:

### Current vs. Expected behavior

Current:
- Next.js first returns a 200 status code for a notFound / 404 page.
- The route doesn't recover correctly from a notFound / 404 page. It sends back the correct content but gets stuck at the 404 status code.

Expected:
- The first response returns the correct 404 status code for notFound.
- After the content is available, the route responds with the content and a 200 status code.

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2
  Available memory (MB): 31695
  Available CPU cores: 16
Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: 3.6.1
  pnpm: 7.33.5
Relevant Packages:
  next: 14.2.0-canary.31 // Latest available version is detected (14.2.0-canary.31).
  eslint-config-next: 14.1.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.2
Next.js Config:
  output: N/A
```


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

App Router

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

next start (local), Other (Deployed)

### Additional context

On our production setup, after some time (sometimes hours), the status code seems to recover to a correct 200 status code. My theory is, that it recovers once the whole route got ejected from the full route cache.
Repository: pytorch
Issue: Dynamo compilation should always run with empty functorch interpreter stack, even if ambient context has functorch
Labels: triaged,oncall: pt2,module: functorch,module: dynamo,module: pt2-dispatcher

### 🐛 Describe the bug

Today, functorch modes are unconditionally turned on during compilation, and you have to be careful to turn them off if you want to do some, e.g., constant propagation Tensor logic that shouldn't hit the functorch mode. @zou3519  and I think it would make more sense if functorch modes are all disabled in torch.compile, and you'd be responsible for consulting / turning them on locally when you do fake tensor propagation.

https://gist.github.com/ezyang/72bd4df4caf2b32301defb70b5d75354 is a start of the kind of change you'd need to make, but we need to (1) stash the functorch interpreter stack somewhere well known, so that (2) we can restore it when we do fake tensor propagation.

### Versions

main

cc @msaroufim @bdhirsh @anijain2305 @zou3519 @chauhang @Chillee @samdow @kshitij12345 @janeyx99 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng
Repository: godot
Issue: [Rendering] RendererRD allocates excessive RIDs
Labels: discussion,topic:rendering,topic:2d

### Tested versions

4.x, at least in 4.2 and later, haven't checked code in 4.1 and prior

### System information

N/A

### Issue description

As seen in:
* https://github.com/godotengine/godot/issues/89602

The renderer (Forward+ and Mobile only) allocates a lot of RIDs for seemingly simple operations, this isn't necessarily a problem but at least to me the general assumption is that RIDs won't be allocated unless you create or update some resource, adding or changing surfaces for meshes, updating shaders, etc. makes sense but in this case it feels excessive

While the specific case above might be considered extreme it isn't obvious that there's a maximum number of polygons (or circles, or other things drawn with a polygon as backing) you can draw ever, until you hit RID exhaustion, at first I couldn't even figure out what was wrong in that case as it shouldn't have been exhausting these

I'm not sure how to best solve this, but seeing how the data here is strictly internal to the renderer, and the RIDs won't pass to the user, I'd say it would be safe to re-use the RIDs and have a pool of them for drawing (i.e. reuse the storage, instead of freeing and allocating), if some alternative method for doing this entirely can't be done and avoid allocations entirely, I'm not fully familiar with the low level details on the ways to allow reusing these etc., but I imagine it should be possible 

I was trying to figure out how to solve this but the complexity of updating the data correctly was a bit too complex for my current understanding of the internals so I though I'd bring it to broader attention to discuss how to improve on it

Tl;Dr; the renderer allocates 4 RIDs every time you draw a circle, this exhausts them and makes just drawing a circle an action you can do a finite number of times, this is unexpected and hard to manage

To put this into perspective:
If you draw just 100 circles every frame, and render at 120 FPS, it takes just 12 hours to run out

### Steps to reproduce

N/A

### Minimal reproduction project (MRP)

N/A
Repository: next.js
Issue: On demand revalidation removes statically generated pages with `generateStaticParams()` and `dynamicParams = false`
Labels: bug

### Link to the code that reproduces this issue

https://github.com/Javad9s/nextjs-revalidate-breaks-static-params

### To Reproduce

1. Build and start the application (`npm run build` ,  `npm start`)
2. Open http://localhost:3000/params/01    => returns **Params : 01**
3. Open http://localhost:3000/ and click on `Revalidate`
4. Open http://localhost:3000/params/01    => returns **404**

### Current vs. Expected behavior

**Current** : returns **404** after revalidation
**Expected** : should return **Params : 01** again

### Provide environment information

```bash
Binaries:
  Node: 20.9.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.0-canary.31 // Latest available version is detected (14.2.0-canary.31).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.2
Next.js Config:
  output: N/A
```


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

App Router

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

next start (local)

### Additional context

Any unexpected revalidation like `revalidatePath("/", "layout")` or revalidating a common cache tag will flush statically generated pages and we have to build the entire application again.
Repository: godot
Issue: FPS cap with V-Sync enabled is incorrect with multiple monitors with different refresh rates
Labels: bug,topic:rendering

### Tested versions

- Reproducible in 4.2.stable
- Not reproducible in 3.5.3.stable

### System information

Windows 10

### Issue description

I have two monitors: one is 144Hz and the other is 60Hz. If I run an empty project with V-Sync enabled, the FPS is always capped at 144. Even if I drag the game window to my 60Hz monitor, the game is still capped at 144 FPS. This is different from Godot 3.5.3, where if I dragged the game window to my 60Hz monitor, the FPS cap would update to 60, which I believe should be the intended behavior.
Even if I launch the game window on my 60Hz monitor by setting the initial_position_type in ProjectSettings, the FPS is still capped at 144 rather than 60.

### Steps to reproduce

Create a new project with V-Sync enabled. Check the fps as you move the game window between two monitors with different refresh rates.

### Minimal reproduction project (MRP)

N/A
Repository: godot
Issue: [GDExtension] Incorrect signature or documentation in generated gdextension_interface.h
Labels: discussion,documentation,topic:gdextension

### Tested versions

Reproducible in 4.2.1.stable.mono.official.b09f793f5

### System information

Godot v4.2.1.stable.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.4665) - AMD Ryzen 7 5800X3D 8-Core Processor (16 Threads)

### Issue description

The generated `gdextension_interface.h` file contains a function signature that incorrectly drops the `const` qualifier from its return value.

```c
typedef GDExtensionTypePtr (*GDExtensionInterfacePackedColorArrayOperatorIndexConst)(
	GDExtensionConstTypePtr p_self, 
	GDExtensionInt p_index);
```

This function should return `GDExtensionConstTypePtr` to preserve the `const` qualifier on the input `p_self`. Additionally, this is the expected behaviour described in its documentation:

```c
/**
 * @name packed_color_array_operator_index_const
 * @since 4.1
 *
 * Gets a __const__ pointer to a color in a PackedColorArray.
 *
 * @param p_self A const pointer to a const PackedColorArray object.
 * @param p_index The index of the Color to get.
 *
 * @return A __const__ pointer to the requested Color.
 */
```

There are a number of similar functions operating on various `PackedArray` types which do correctly return `const` qualified values. E.g.:

* `packed_float32_array_operator_index_const`
* `packed_float64_array_operator_index_const`
* `packed_int32_array_operator_index_const`
* etc.

### Steps to reproduce

Generate the file using:

```
godot --dump-gdextension-interface --headless
```

### Minimal reproduction project (MRP)

N/A
Repository: next.js
Issue: Dynamic routes cache 404 pages with `dynamic = 'force-static'` and calling `notfound()`
Labels: bug

### Link to the code that reproduces this issue

https://github.com/Javad9s/nextjs-dynamic-params-cached-notfound/

### To Reproduce

1. Build and start the application (`npm run build` ,  `npm start`)
2. Open http://localhost:3000/params/aa => calls `notfound()`, also caches the result
3. Refresh the page => returns the same result
4. Open http://localhost:3000/params/bb => calls `notfound()`, caches a new page
5. Open http://localhost:3000/params/cc => calls `notfound()`, caches a new page
6. Open ...

This way there is no control over memory and storage usage. Can cause problems in large scale applications.


### Current vs. Expected behavior

**Current** : caches every `notfound()` call
**Expected** : not cache any `notfound()` call

### Provide environment information

```bash
Binaries:
  Node: 20.9.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.0-canary.31 // Latest available version is detected (14.2.0-canary.31).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router

### Which stage(s) are affected? (Select all that apply)

next start (local)

### Additional context

Using `generateStaticParams()` also opts the page into static generation and is equivalent to setting `dynamic = 'force-static'` in the context of this issue
Repository: flutter
Issue: [google_maps_flutter] Harmonize heatmap radius behavior across platforms
Labels: platform-android,platform-ios,p: maps,platform-web,package,team-ecosystem,P2,triaged-ecosystem

There are inconsistencies in the heatmap radius parameter's behavior across iOS, Android, and web platforms within the google_maps_flutter plugin. The core challenge is the platform-specific interpretation of "radius," affecting its functionality and integration.

See https://github.com/flutter/packages/pull/3257#discussion_r1128552963 for existing discussion

ChatGPT summary of that thread:
The conversation centers on addressing the inconsistencies of the heatmap radius parameter in a Flutter plugin for Google Maps across various platforms and versions. Contributors discussed the differences in how the radius is interpreted on different platforms, such as Android, iOS, and web, and explored potential solutions to harmonize its behavior. The discussion culminated in a proposal by Stuart Morgan to introduce a HeatmapRadius object with a platform-specific constructor to manage these differences more effectively. This approach aims to provide a temporary workaround while leaving room for future improvements that could offer a more standardized handling of the heatmap radius across platforms without necessitating breaking changes.
Repository: PowerToys
Issue: Shift/Ctrl/Alt keys don't keep their state
Labels: Issue-Bug,Product-Mouse Without Borders

### Microsoft PowerToys version

0.79.0

### Installation method

WinGet

### Running as admin

No

### Area(s) with issue?

General

### Steps to reproduce

In any text editor press  and hold the Shift key and keep pressing any other key (e.g. A). 

### ✔️ Expected Behavior

Every single time you get the letter "A"

### ❌ Actual Behavior

At first everything is fine, but after few seconds it looks like Shift was not pressed and instead of "A" you get "a". Powertoys cause the Shift/Crtl/Alt keys to behave as if they were not pressed.

### Other Software

Windows 10 Enterprise 22H2 19045.4046
Repository: rust
Issue: Match on two-variant enum optimizes poorly
Labels: A-LLVM,I-slow

https://godbolt.org/z/f3TMe3rcW

`good` gets optimal codegen since the LLVM 18 bump, but `bad` has had poor codegen for some time. Codegen also becomes optimal if `a` and `b` are references rather than passed by value.
Repository: puppeteer
Issue: [Feature]:  Expose handshakeTimeout to abort early
Labels: feature,P3

### Feature description

Expose handshakeTimeout to abort early in case the container running chrome is down ,if there is any other way to abort early in case container is down, kindly point me to it

reference https://github.com/websockets/ws/blob/master/doc/ws.md

 it seems only headers can be set currently

https://github.com/puppeteer/puppeteer/blob/6ba6bef1b99742543942cef2f6c840bd543f5dee/packages/puppeteer-core/src/node/NodeWebSocketTransport.ts#L14