sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Matching on ASCII digits no longer optimized
Labels: A-LLVM,I-slow,A-codegen,P-medium,T-compiler,regression-from-stable-to-stable,C-bug,C-optimization

### Code

This 

```rust
pub fn f(character: u8) -> Option<u8> {
    match character {
        b'0' => Some(0),
        b'1' => Some(1),
        b'2' => Some(2),
        b'3' => Some(3),
        b'4' => Some(4),
        b'5' => Some(5),
        b'6' => Some(6),
        b'7' => Some(7),
        b'8' => Some(8),
        b'9' => Some(9),
        _ => None,
    }
}
```

used in 1.76.0 to be optimized to 

```asm
f:
        lea     edx, [rdi - 48]
        cmp     dl, 10
        setb    al
        ret
```

but in 1.77 and nightly, this remains

```asm
f:
        movzx   eax, dil
        add     eax, -48
        cmp     eax, 9
        ja      .LBB0_3
        lea     rcx, [rip + .LJTI0_0]
        movsxd  rax, dword ptr [rcx + 4*rax]
        add     rax, rcx
        jmp     rax
.LBB0_2:
        mov     al, 1
        xor     edx, edx
        ret
.LBB0_3:
        xor     eax, eax
        ret
.LBB0_5:
        mov     dl, 1
        mov     al, 1
        ret
.LBB0_6:
        mov     al, 1
        mov     dl, 2
        ret
.LBB0_7:
        mov     al, 1
        mov     dl, 3
        ret
.LBB0_8:
        mov     al, 1
        mov     dl, 4
        ret
.LBB0_9:
        mov     al, 1
        mov     dl, 5
        ret
.LBB0_10:
        mov     al, 1
        mov     dl, 6
        ret
.LBB0_11:
        mov     al, 1
        mov     dl, 7
        ret
.LBB0_12:
        mov     al, 1
        mov     dl, 9
        ret
.LBB0_13:
        mov     al, 1
        mov     dl, 8
        ret
.LJTI0_0:
        .long   .LBB0_2-.LJTI0_0
        .long   .LBB0_5-.LJTI0_0
        .long   .LBB0_6-.LJTI0_0
        .long   .LBB0_7-.LJTI0_0
        .long   .LBB0_8-.LJTI0_0
        .long   .LBB0_9-.LJTI0_0
        .long   .LBB0_10-.LJTI0_0
        .long   .LBB0_11-.LJTI0_0
        .long   .LBB0_13-.LJTI0_0
        .long   .LBB0_12-.LJTI0_0
```
Interestingly, 

```rust
pub fn f(character: u8) -> Option<u32> {
    match character {
        b'0' => Some(0),
        b'1' => Some(1),
        b'2' => Some(2),
        b'3' => Some(3),
        b'4' => Some(4),
        b'5' => Some(5),
        b'6' => Some(6),
        b'7' => Some(7),
        b'8' => Some(8),
        b'9' => Some(9),
        _ => None,
    }
}
```

and

```rust
pub fn f(character: u8) -> Option<u8>
{
    match character {
        b'0' => Some(0),
        b'1' => Some(1),
        b'2' => Some(2),
        b'3' => Some(3),
        b'4' => Some(4),
        b'5' => Some(5),
        b'6' => Some(6),
        b'7' => Some(7),
        //b'8' => Some(8),
        //b'9' => Some(9),
        _ => None,
    }
}
```

Get well optimized.

Bisected to #118991

@rustbot modify labels: +regression-from-stable-to-stable

I'd like to have a go at this so @rustbot claim


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"krtab"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: neovim
Issue: LSP: hook into hover doc floating windows
Labels: enhancement,lua,lsp,events

### Problem

As far as I am aware, there is not a straightforward way to attach hook into lsp hover windows. Autocmds don't provide enough information to reliably extend hover doc functionality and I am unaware of a reliable strategy to get the window or buffer ids of hover floats.

It is possible to hook into them by overriding the `vim.lsp.handlers[vim.lsp.protocol.Methods.textDocument_hover]` function, but overriding built-in functions is a hack way of solving this problem.

### Expected behavior

Users should be able to hook into the creation of lsp hover windows to attach keymaps, modify buffer contents, apply custom functions, etc.

For example, adding a keymap to scroll the hover docs window without entering the window should be straightforward and not require overriding built-in functions (see #27288).

I could be totally ignorant to some strategy for doing this, but I cannot find anything useful after hours of research.
I am also unfamiliar with Neovim's source, so the suggested solutions could be terrible ideas.

I would love to implement these solutions myself, but I'm curious if this is even wanted/needed before working on it.

### Possible Solutions

#### Give Hover Doc Buffers a Unique Filetype

This is the most simple solution. This allows users to hook into the window creation via the `FileType` auevent.
One downside of this solution is that you have to discover the window id via the buffer id, which isn't ideal.

```lua
vim.api.nvim_create_autocmd('Filetype', {
    pattern = 'LspDocFloat',
    callback = function(args)
        vim.keymap.set('n', 'T', function() userFunction() end, { buffer = args.buf })
    end
})
```

#### Add an auevent for hover window creation

More complicated that adding a filetype, but potentially more useful. Would need to expose `args.win` and `args.buf`.

```lua
vim.api.nvim_create_autocmd('HoverNew', {
    callback = function(args)
        vim.keymap.set('n', 'T', function() userFunction(args.win) end, { buffer = args.buf })
    end
})
```

#### Expose the buffer and window ids via `vim.lsp.buf.hover()`

Probably not even possible since the handler that creates the float seems to only be invoked on server response.
Users could then wrap their own function and call it in a keymap.

```lua
function M.hover()
    local winnr, bufnr = vim.lsp.buf.hover()
    -- do whatever you want that requires the winnr/bufnr
end

vim.keymap.set('n', 'K', function() M.hover() end)
```
Repository: pytorch
Issue: [JIT archive] Add a flag to not include debug files
Labels: oncall: jit

### 🚀 The feature, motivation and pitch

While comparing TorchScript vs ONNX in terms of file size, I notice ONNX file is always smaller than TorchScript. Upon inspecting the JIT archive generated by `torch.jit.trace()` and `torch.jit.save()`, I notice that there are a lot of `.debug_pkl` files. It seems like they are only used for debugging purpose (#23582). When I delete them manually, I could still run the model.

For small models, especially with quantization, these debug files can be quite large compared to the model weights. For one of my models, 0.9MB (out of 6.8MB) is occupied by the `.debug_pkl` files. For deploying to mobile devices, any amount counts.

```python
import torch
from torch.ao.quantization import quantize_dynamic
import timm
from pathlib import Path
import shutil

model = timm.create_model("vit_tiny_patch16_224.augreg_in21k", num_classes=0).eval()
model = quantize_dynamic(model)  # quantize to make a small model
torch.jit.save(torch.jit.trace(model, torch.randn(1, 3, 224, 224)), "test.zip")

# remove .debug_pkl files
shutil.unpack_archive("test.zip")
for debug_file in Path("test").glob("code/**/*.debug_pkl"):
    debug_file.unlink()
shutil.make_archive("test_compact", "zip", base_dir="test")

# correctness checks
model1 = torch.jit.load("test.zip")
model2 = torch.jit.load("test_compact.zip")

x = torch.randn(1, 3, 224, 224)
torch.testing.assert_close(model1(x), model2(x))
```

The code above produces 2 files
- `test.zip`: 6.7MB
- `test_compact.zip`: 5.6MB

I'm proposing adding a flag to `torch.jit.save()` to not include debug files. Example usage

```python
torch.jit.save(model_jit, "model_path.pt", include_debug_files=False)
```

### Alternatives

Run a script to automatically remove `.debug_pkl` files after JIT export, like I did above.

### Additional context

_No response_

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
Repository: go
Issue: proposal: reflect: Add Type.Fields() iter.Seq[StructField] and Type.Methods() iter.Seq[Method]
Labels: Proposal

### Proposal Details

`reflect.Type.Fields() iter.Seq[StructField]` and `reflect.Type.Methods() iter.Seq[Method]` would be more convenient than having to call `i :=  range myType.NumFields()` and `myType.Field(i)` etc.

You could also add iterators to `reflect.Value` as well but those are less obviously useful. Probably worth doing just for completeness though.

**Edit**: The proposal is now to return an `iter.Seq2[int, StructField]` so you can use `.Field(i)`.
Repository: awesome-mac
Issue: 🎉 Add dsq 
Labels: addition

### 🪩 Provide a link to the proposed addition

https://github.com/multiprocessio/dsq

### 😳 Explain why it should be added

Commandline tool for running SQL queries against JSON, CSV, Excel, Parquet, and more

### 📖 Additional context

_No response_

### 🧨 Issue Checklist

- [X] I have checked for other similar issues
- [X] I have explained why this change is important
- [X] I have added necessary documentation (if appropriate)
Repository: vscode
Issue: Terminal in Floating Window Does Not Echo Characters in Real Time When Remotely Connected
Labels: bug,confirmation-pending,terminal-process,workbench-auxwindow

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.87.2
- OS Version: Windows 11

## Steps to Reproduce:

1. Open a folder (remotely).
2. Open the terminal.
3. Click on the terminal icon and select "Move Terminal to New Window". Now the terminal is in a floating window.
4. Minimize all windows.
5. Wait for a while.
6. Only restore the minimized terminal floating window.
7. Type characters and observe that they are not displayed in the terminal, as if it has frozen.
8. Restore the minimized main folder window. The characters typed earlier are instantly displayed in the popped-up terminal.

## Expected Result:

Characters typed in the terminal should be echoed in real time, even when the terminal is in a floating window and the main window is minimized.

## Actual Result:

When the terminal is in a floating window and the main window is minimized, characters typed in the terminal are not echoed in real time. They only appear when the main window is restored.

## Additional Information:

This bug does not occur with local terminals, only with remote connections such as WSL or SSH. When the main window is restored, the terminal content is updated, so it's not a real freeze. I suspect that when the main window is minimized, the remote connection enters a special "sleep" state. Only opening the terminal window does not "wake it up", causing communication issues with the remote host.
Repository: tauri
Issue: [bug] Application page size displays abnormally on win11
Labels: type: bug,status: needs triage

### Describe the bug

When set computer resolution to 125% on win11，application page size displays very small. My application settled size to `1280*800`，but show size is `100*50` actually. Supplement: On win 11, the resolution is 100%, no problem.

### Reproduction

_No response_

### Expected behavior

_No response_

### Full `tauri info` output

```text
none
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: rust
Issue: closure rvalue not checked for WF allowing it to assume more implied bounds
Labels: A-closures,A-borrow-checker,A-NLL,C-bug,NLL-sound,T-types

The following should not compile because the bound `D: 'static` is not satisfied in fn `test`:

```rust
struct Static<D: 'static>(Option<D>);

pub fn test<D>() {
    let _ = || {
        Static(None::<D>)
    };
}
```
Repository: excalidraw
Issue: locked objects can be edited after right clicking them
Labels: UX/UI

let's say object is locked by right clicking and selecting lock.
now LMB does not select it, but if we click RMB on locked object, context menu pops up and left sidebar for editing, without closing context menu if click something on sidebar, the object can be edited.

![83 10_27 - 01 April 2024](https://github.com/excalidraw/excalidraw/assets/26621232/2a3f86b9-3a4c-4f0e-94f8-81c42b1c546e)


expected behavior: it should not be editable and should show a little toast like "object locked" or the sidebar should pop up, only context menu should show.

also allow LMB to select locked objects, it will be a better experience.
Repository: kubernetes
Issue: APF borrowing by exempt does not match KEP
Labels: kind/bug,sig/api-machinery,triage/accepted

### What happened?

In reviewing the KEP and the implementation, I noticed a difference in the way that the exempt priority level borrows from the others. In the KEP, in section https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1040-priority-and-fairness#dispatching (this material was added in https://github.com/kubernetes/enhancements/pull/3906), we see (among many other things) the following definition.

```
MinCurrentCL(i) = max( MinCL(i), min( NominalCL(i), HighSeatDemand(i) ) ) -- if non-exempt
MinCurrentCL(i) = max( MinCL(i), HighSeatDemand(i) )                      -- if exempt
```

But in the implementation (https://github.com/kubernetes/kubernetes/blob/3dedb8eb8c122d0a3221a5842c1d6697d8958151/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go#L407, introduced in #118782) there is no special treatment for exempt. It gets its MinCurrentCL computed by the same formula as non-exempt levels. In the default configuration (in which the exempt priority level has a nominal concurrency limit of zero), this means that the exempt priority level gets MinCurrentCL=0.

The KEP continues with some considerations for what to do if the exempt priority levels want to use up the whole server concurrency limit, or enough to prevent the non-exempt priority levels from getting their minimum allocations. These are also absent from the implementation --- naturally enough, since those situations cannot arise in the current implementation.

### What did you expect to happen?

Consistency

### How can we reproduce it (as minimally and precisely as possible)?

This is from code and doc inspection, as described above.

### Anything else we need to know?

_No response_

### Kubernetes version

1.28.0 and later.


### Cloud provider

<details>
N/A
</details>


### OS version

<details>

N/A

</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: go
Issue: x/build/internal/installer/windowsmsi: Windows installer always adds %USERPROFILE%\go\bin to PATH even if user overrode GOPATH to point to another directory
Labels: OS-Windows,Builders,NeedsInvestigation,FeatureRequest

### Go version

go version go1.22.1 windows/amd64

### Output of `go env` in your module/workspace:

```shell
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=E:\Caches\go\cache
set GOENV=C:\Users\user\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=E:\Tools\Go\gopath\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=E:\Tools\Go\gopath
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=E:\Caches\go\tmp
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.22.1
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=E:\Caches\go\tmp\go-build937642864=/tmp/go-build -gno-record-gcc-switches
```


### What did you do?

1. Install Go on Windows via the [MSI installer](https://go.dev/dl/go1.22.1.windows-amd64.msi)
2. Open environment variables settings and observe the value of the user's PATH variable

### What did you see happen?

Despite that I have `GOPATH=E:\Tools\Go\gopath` and `E:\Tools\Go\gopath\bin` is present in my `PATH`, the installer still appends the default value `%USERPROFILE%\go\bin` to my PATH.

### What did you expect to see?

Expected to not have `PATH` modified by the installer.

At the very least, it should ask if the user would like to add `%GOPATH%\bin` to PATH during installation, similar to how other software does it, e.g. OpenJDK (Eclipse Temurin) does that.
Repository: material-ui
Issue: [joy-ui][Input] Input element `onChange` nested in MenuItem does not fire.
Labels: on hold,component: text field,package: joy-ui

### Steps to reproduce

(All text is translated by DeepL.)

[Here](https://github.com/azishio/BUGREPORT-Joy-upload_in_menu) is a repository you can run right away.

Later, after reading the documentation, I tried to reproduce the code with this repository in StackBlitz, but was unable to do so because the preview showed "Error fetching cached project bundle for preview.".

It does not work in my environment, but I will share the [link](https://stackblitz.com/edit/github-hqzy4g?file=src%2FApp.tsx).


Steps:
1. Start a dev server from a project in the repository or StackBlitz (if it works).
2. Upload files from the Input element wrapped in a menu.
3. Check the Console in the developer tools.

### Current behavior

When I check the Console in the developer tools, there is no output.

(Is it the intended behavior that `onChange` does not fire here?)

### Expected behavior

The following log output is expected
```
menuInput ▶ FileList {0: File, length: 1}
```

### Context

We would like to be able to access the ability to upload files from the menu, as mentioned in the example repository.

### Your environment

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  System:
    OS: Linux 6.6 Manjaro Linux
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 83.47 GB / 94.20 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 21.6.2 - /usr/bin/node
    npm: 10.5.0 - /usr/bin/npm
    bun: 1.0.35 - ~/.bun/bin/bun
  Managers:
    Cargo: 1.77.0 - /usr/bin/cargo
    pip3: 24.0 - /usr/bin/pip3
    RubyGems: 3.3.25 - /usr/bin/gem
  Utilities:
    CMake: 3.28.3 - /usr/bin/cmake
    Make: 4.4.1 - /usr/bin/make
    GCC: 13.2.1 - /usr/bin/gcc
    Git: 2.44.0 - /usr/bin/git
    Clang: 16.0.6 - /usr/bin/clang
    Ninja: 1.11.1 - /usr/bin/ninja
    FFmpeg: 6.1.1 - /usr/bin/ffmpeg
    Curl: 8.6.0 - /usr/bin/curl
  Virtualization:
    Docker: 25.0.3 - /usr/bin/docker
  IDEs:
    Nano: 7.2 - /usr/bin/nano
    Vim: 9.1 - /usr/bin/vim
  Languages:
    Bash: 5.2.26 - /usr/bin/bash
    Go: 1.22.0 - /usr/bin/go
    Java: javac 22 - /usr/bin/javac
    Perl: 5.38.2 - /usr/bin/perl
    Protoc: 25.3 - /usr/bin/protoc
    Python: 3.11.8 - /usr/bin/python
    Python3: 3.11.8 - /usr/bin/python3
    Ruby: 3.0.6 - /usr/bin/ruby
    Rust: 1.77.0 - /usr/bin/rustc
  Databases:
    SQLite: 3.45.1 - /usr/bin/sqlite3
  Browsers:
    Chromium: 123.0.6312.58
```
</details>


**Search keywords**: joy input file onChange
Repository: terminal
Issue: Set different color schemes for light mode and dark mode via UI settings
Labels: Product-Terminal,Issue-Task,Area-SettingsUI

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->



# Description of the new feature/enhancement

For myself I prefer to use a light scheme for the light mode and a dark scheme for the dark mode. But we can't let Windows Terminal automatically changes the scheme like VSCode.

I'm weak at C++ programming but I'll try my best to understand how it works.
Repository: material-ui
Issue: [joy-ui] How to adjust  theme spacing with HTML font-size: 10px
Labels: on hold,package: joy-ui,customization: theme

Im trying to embed Joy-UI components into HTML page with 
```
:root {
  font-size: 62.5%;
}
```
The UI looks small and unreadable.
I increased default theme with bigger fontSize and lineHeight, but it fixed only part of Typogaphy, TextBoxes and buttons are still smaller then expected

```
const theme = extendTheme({
  fontSize: {
    xl4: "3.6rem",
    xl3: "3rem",
    xl2: "2.4rem",
    xl: "2rem",
    lg: "1.8rem",
    md: "1.6rem",
    sm: "1.4rem",
    xs: "1.2rem",
  },
  lineHeight: {
    xs: "2.133344", // largest font sizes: h1, h2
    sm: "2.285728", // normal font sizes
    md: "2.4", // normal font sizes
    lg: "2.488896", // large font sizes for components
    xl: "2.666672", // smallest font sizes
  },
});
```

What else do I need to extend?
Is there a more generic approach to it?

**Search keywords**:
Repository: ui
Issue: [bug]: dashboard-07 block overflow
Labels: bug

### Describe the bug

Dashboard-7 block overflows in mobile width

![](https://github.com/shadcn-ui/ui/assets/91976421/36e5f500-5670-4eff-acc1-779f668d1ceb)


### Affected component/components

dashboard-07 block

### How to reproduce

1. Go to dashboard-07 block
2. Switch to mobile width

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
Chrome 123
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: godot
Issue: 3D Read Screen Shaders didn't work well with SSR
Labels: bug,topic:rendering,needs testing,topic:3d

### Tested versions

- Reproduce in Godot 4.1 stable， Godot 4.2.1 stable，Godot 4.3-dev5

### System information

Windows 11 - Godot v4.1.0 stable - Vulkan (Forward+) - dedicated !

### Issue description

I create a Water ( a plain mesh) in my test_map.tscn, using ShaderMaterial to make refraction effect. But when I put test_map into MainWorld.tscn (With SSR open in Environment), water cannot correctly read screen texture and everything under water surface became compeletely invisible

 - Without SSR
![屏幕截图 2024-04-01 170445](https://github.com/godotengine/godot/assets/36142896/4bccf1a9-5d4b-47e3-bca9-e89879365501)

- SSR opened
![屏幕截图 2024-04-01 170509](https://github.com/godotengine/godot/assets/36142896/d43c77f4-e448-4fe0-9b2f-4e017df43075)


### Steps to reproduce

In MRP, you just need to switch the **SSR checkbox** and you can see the problem.

### Minimal reproduction project (MRP)
[MRP.zip](https://github.com/godotengine/godot/files/14821925/MRP.zip)