sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: `*x == *y` for trait objects produce move error, so it is not equivalent to `PartialEq::eq(&*x, &*y)` even though the reference says it is
Labels: A-diagnostics,A-borrow-checker,T-compiler,A-docs,C-bug,A-trait-objects

[The following code produces a move error](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=45b377544d27adffcaa1f0b38cbe22e0):

```rust
trait Animal {
    fn noise(&self) -> String;
}

impl PartialEq for dyn Animal {
    fn eq(&self, other: &Self) -> bool {
        self.noise() == other.noise()
    }
}

fn f(a1: &Box<dyn Animal>, a2: &Box<dyn Animal>) {
    println!("{}", *a1 == *a2); // doesn't work
}
```
```
error[E0507]: cannot move out of `*a2` which is behind a shared reference
  --> src/lib.rs:12:27
   |
12 |     println!("{}", *a1 == *a2); // doesn't work
   |                           ^^^ move occurs because `*a2` has type `Box<dyn Animal>`, which does not implement the `Copy` trait
````

[But according to the reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#comparison-operators), it should be equivalent to the following, which does work:

```rust
fn f(a1: &Box<dyn Animal>, a2: &Box<dyn Animal>) {
    println!("{}", PartialEq::eq(&*a1, &*a2)); // works
}
```

It seems to be specific to trait objects; e.g. replacing `Box<dyn Animal>` with `Box<[String]>` will make both versions of `f` compile.

_Originally reported in https://github.com/rust-lang/rust/issues/123056#issuecomment-2067785879_
Repository: pytorch
Issue: proxy tracing overwrites proxies when tracing mutations
Labels: triaged,oncall: pt2,module: ProxyTensor,module: pt2-dispatcher

Example:
```
import torch

def f(x):
    buf = torch.zeros(2)
    torch.ops.fsdp.set_(x, buf)
    return x * x
x = torch.zeros(2, requires_grad=True)
out = torch.compile(f, backend="aot_eager")(x)
out.sum().backward()
```

Which traces out this forward graph:
```
 ===== Forward graph 0 =====
 /home/hirsheybar/local/b/pytorch/torch/fx/_lazy_graph_module.py class GraphModule(torch.nn.Module):
    def forward(self, primals_1: "f32[2][1]cpu"):
         # File: /home/hirsheybar/local/b/pytorch/tmp.py:4 in f, code: buf = torch.zeros(2)
        zeros: "f32[2][1]cpu" = torch.ops.aten.zeros.default([2], device = device(type='cpu'), pin_memory = False)

         # File: /home/hirsheybar/local/b/pytorch/tmp.py:5 in f, code: torch.ops.fsdp.set_(x, buf)
        set_: "f32[2][1]cpu" = torch.ops.aten.set_.source_Tensor(primals_1, zeros);  primals_1 = zeros = None

         # File: /home/hirsheybar/local/b/pytorch/tmp.py:6 in f, code: return x * x
        mul: "f32[2][1]cpu" = torch.ops.aten.mul.Tensor(set_, set_)
        return [mul, set_]
```

You can see that although the result of the `set_` call is discarded (and it is not passed into the mul() call later), the `set_` node shows up as having been passed into the `aten.mul` node in the graph.

This happens today because we have a mapping from `Dict[FakeTensor, Proxy]` during tracing, and we will overwrite the dict with a new proxy when one already exists: `y = aten.set_(x, ...)` returns `x` directly, so when we [set a proxy slot](https://github.com/pytorch/pytorch/blob/fdd0a7f9b4fb80c4d4870569909505a9beb6ccb3/torch/fx/experimental/proxy_tensor.py#L104) for `y`, it overwrites the slot for `x`.

This behavior is not **wrong** - although it might simplify FSDP tracing if we tweak proxy tracing to instead not overwrite the proxy, and generate a graph like this for the above example.
```
 ===== Forward graph 0 =====
 /home/hirsheybar/local/b/pytorch/torch/fx/_lazy_graph_module.py class GraphModule(torch.nn.Module):
    def forward(self, primals_1: "f32[2][1]cpu"):
         # File: /home/hirsheybar/local/b/pytorch/tmp.py:4 in f, code: buf = torch.zeros(2)
        zeros: "f32[2][1]cpu" = torch.ops.aten.zeros.default([2], device = device(type='cpu'), pin_memory = False)

         # File: /home/hirsheybar/local/b/pytorch/tmp.py:5 in f, code: torch.ops.fsdp.set_(x, buf)
        set_: "f32[2][1]cpu" = torch.ops.aten.set_.source_Tensor(primals_1, zeros);  zeros = None

         # File: /home/hirsheybar/local/b/pytorch/tmp.py:6 in f, code: return x * x
        mul: "f32[2][1]cpu" = torch.ops.aten.mul.Tensor(primals_1, primals_1)
        return [mul, primals_1]
```

So I am curious: is there an argument for choosing one representation over the other? ("it makes tracing FSDP simpler" is a nice bonus, although it probably shouldn't be the single guiding decision).

cc @ezyang @anijain2305 @chauhang @penguinwu @zou3519
Repository: ollama
Issue: Improve ollama's Output Speed
Labels: feature request,performance

I have noticed that ollama always outputs content at a fixed speed, and most of the time, the GPU is not fully utilized(0% load), indicating that the bottleneck in generating content is not in the GPU.

At the same time, I have observed that during content output, one CPU core consistently has a high load(70% load), suggesting that the bottleneck might be in the CPU decoding process.

Therefore, could you consider implementing multi-threaded decoding to leverage the multi-core capabilities of the CPU to accelerate the output speed?

I have already searched Google for discussions on this issue but did not find anything relevant.

If my analysis is incorrect or the issue cannot be resolved, you can directly close this issue. Thank you.
Repository: go
Issue: x/pkgsite: show version when global variables and constants are added
Labels: pkgsite

### What is the URL of the page with the issue?

https://pkg.go.dev/context#pkg-variables

### What is your user agent?

N/A

### Screenshot

![image](https://github.com/golang/go/assets/58842577/d21abd18-07dd-43f8-b9cb-78ed8c4b6105)


### What did you do?

N/A

### What did you see happen?

The variable like `Canceled, DeadlineExceeded` does not have the available version. In comparison, the function defined below `AfterFunc()` do have available version. 

### What did you expect to see?

The Variables and Constants should also have this information displayed in the pkg.go.dev.
Repository: rust
Issue: Fix (?) dependency tracking for the metavar span table
Labels: A-macros,T-compiler,A-incr-comp,C-bug,WG-incr-comp,A-query-system

`metavar_spans` is a piece of global data that lives in `SessionGlobals`, it is similar to hygiene data in the same `SessionGlobals`.

This table is populated during macro expansion and after that it doesn't change.
Data from the table can be read from any query that performs the `span1.to(span2)` operation.

This table is clearly a piece of untracked data.
We also cannot querify accesses to it by passing `tcx` to all `span1.to(span2)` operations.
I suspect the whole table should be hashed at some point after macro expansion so it becomes an initial input to the query system.
Repository: ui
Issue: [bug]: combobox should open on ArrowDown key press when focused
Labels: bug

### Describe the bug

when a Combobox input is focused, the combobox popover should open when pressing ArrowDown (similar to the behavior of a Select component)

### Affected component/components

Combobox

### How to reproduce

- go to https://ui.shadcn.com/docs/components/combobox
- focus the example combobox
- press ArrowDown
- popover stays closed, instead the page scrolls

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
Firefox 126
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: transformers
Issue: Pass `HFQuantizer` to `from_pretrained` kwargs
Labels: Feature request,Quantization

### Feature request

Currently, when loading a model in quantized form, the `HFQuantizer` is created based on other kwargs passed into the `from_pretrained` function. See current implementation below:
```python
# modeling_utils::from_pretrained()
    if pre_quantized or quantization_config is not None:
        if pre_quantized:
            config.quantization_config = AutoHfQuantizer.merge_quantization_configs(
                config.quantization_config, quantization_config
            )
        else:
            config.quantization_config = quantization_config
        hf_quantizer = AutoHfQuantizer.from_config(config.quantization_config, pre_quantized=pre_quantized)
    else:
        hf_quantizer = None
```
This should be a straightforward addition, by adding the following lines:
```python
# modeling_utils::from_pretrained()
    hf_quantizer = kwargs.pop("hf_quantizer", None)
    if hf_quantizer is not None:
        pass
    elif pre_quantized or quantization_config is not None:
        ...
```

### Motivation

This would give users more flexibility, and allow one to easily create and integrate custom implementations of the `HFQuantizer` class. I am personally working on a project where this change is necessary to work with quantization methods that have not yet been added to the library

### Your contribution

I can make a PR and contribution
Repository: vscode
Issue: SEGFAULT in @vscode/sqlite3
Labels: bug,freeze-slow-crash-leak,linux

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
Does this issue occur when all extensions are disabled?: Yes

- VS Code Version: 1.90.2
- OS Version: 6.9.6-arch1-1

Steps to Reproduce:

1. Run VSCode on a Linux system
2. Use KDE's "Crashed Processes Viewer"

Backtrace:
```
#0  sqlite3VdbeExec (p=p@entry=0x2c03bc8ca0) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:98848
#1  0x00007ffff5566d24 in sqlite3Step (p=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91222
#2  sqlite3_step (pStmt=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91283
#3  sqlite3_step (pStmt=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91272
#4  0x00007ffff15edec6 in node_sqlite3::Statement::Work_Run(napi_env__*, void*) ()
    at /opt/visual-studio-code/resources/app/node_modules.asar.unpacked/@vscode/sqlite3/build/Release/vscode-sqlite3.node
#5  0x000055555ea7ab20 in ??? ()
#6  0x0000000000000214 in ??? ()
#7  0x0000000000000000 in ??? ()
```

Issue in the module's repo: https://github.com/microsoft/vscode-node-sqlite3/issues/45
Repository: PowerToys
Issue: Can't use every unicode characters on keyboard mapping
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.81.1

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

I was changing my Ç keyboard key to a Greek omega (U+03A9). But I saw that keyboard mapping doesn't support specific keys, like most of the Unicode characters.

### ✔️ Expected Behavior

I expected my Ç key to result in being typed as an “Ω”.

### ❌ Actual Behavior

Instead, it still resulted in typing in the letter Ç.

### Other Software

_No response_
Repository: pytorch
Issue: [dynamo] memory leak when compiling symbolic_trace result
Labels: triaged,oncall: pt2,module: dynamo

Reported from https://github.com/pytorch/pytorch/pull/122836#issuecomment-2181247977.

Repro:
```python
import gc
import weakref
import torch

def test(device, backend):
    value = torch.randn(6, 4, device=device)
    m = torch.nn.Linear(4, 6, device=device)
    ref = weakref.ref(m.weight, lambda _: print("m.weight freed!"))
    symbolic_traced: torch.fx.GraphModule = torch.fx.symbolic_trace(m)
    weakref.finalize(symbolic_traced, lambda: print("symbolic_traced freed!"))
    opt_m = torch.compile(symbolic_traced, backend=backend)
    opt_m(value)
    return ref

ref = test("cpu", "eager")
gc.collect()
print("done!")
```

Output:
```
symbolic_traced freed!
done!
m.weight freed!
```

Expected:
```
symbolic_traced freed!
m.weight freed!
done!
```


cc @ezyang @anijain2305 @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng
Repository: rust
Issue: Incorrect "closure bodies that contain statements must be surrounded by braces" error in unrelatedly invalid code
Labels: A-diagnostics,T-compiler

### Code

```Rust
fn test() {
    let value = || {};

    (value;);
}
```


### Current output

```Shell
error: closure bodies that contain statements must be surrounded by braces
 --> src/lib.rs:2:17
  |
2 |     let value = || {};
  |                 ^^
3 |
4 |     (value;);
  |            ^
  |
note: statement found outside of a block
 --> src/lib.rs:4:11
  |
2 |     let value = || {};
  |                    -- this expression is a statement because of the trailing semicolon
3 |
4 |     (value;);
  |           ^ this `;` turns the preceding closure into a statement
note: the closure body may be incorrectly delimited
 --> src/lib.rs:2:17
  |
2 |     let value = || {};
  |                 ^^^^^ this is the parsed closure...
3 |
4 |     (value;);
  |            - ...but likely you meant the closure to end here
help: try adding braces
  |
2 ~     let value = || { {};
3 |
4 ~     (value;});
  |
```


### Desired output

```Shell
error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `{`, or an operator, found `;`
 --> src/lib.rs:4:11
  |
4 |     (value;);
  |           ^ expected one of 8 possible tokens
```


### Rationale and extra context

This error is unrelated to the closure, and indeed, applying the suggestion leaves us with:
```rs
fn test() {
    let value = || { {};

    (value; });
}
```
Which now has an improperly closed brace. The correct code would (most likely) be `(value)`

The original code I had made the suggestion even weirder since the closure was an argument to a Higher Order Function (instead of bound to a variable) and the last line was a function call with a `;` after its argument (instead of a paren expression), which happened due to a typo 😅. Just in case something following that structure would make for a useful test case as well:
```rs
fn test() {
    let value = std::iter::once_with(|| ());

    std::men::drop(value;);
}
```

### Other cases

_No response_

### Rust Version

```Shell
❯ rustc +nightly --version --verbose
rustc 1.81.0-nightly (6868c831a 2024-06-30)
binary: rustc
commit-hash: 6868c831a1eb45c5150ff623cef5e42a8b8946d0
commit-date: 2024-06-30
host: aarch64-apple-darwin
release: 1.81.0-nightly
LLVM version: 18.1.7
```


### Anything else?

_No response_
Repository: vscode
Issue: Git - Provide way to open the merge editor even if the "source control" pane doesn't load
Labels: feature-request,git,merge-editor


Type: <b>Feature Request</b>

I'm fixing up old PRs; merging main leads to far too many changes for the Source Control pane to load. But, now I can't click on a conflicted file to be open it in the new merge editor. The only option I get are the inline buttons to accept specific changes, when I just really want the option that will let me accept the combination (the best merge editor feature).

VS Code version: Code - Insiders 1.91.0-insider (aea213b7fcc7de5c24ad797ac1af209b159d451f, 2024-06-28T05:56:20.804Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2


<!-- generated by issue reporter -->
Repository: ollama
Issue: Verify and re-order GGUF files on `ollama create`
Labels: bug

### What is the issue?

In certain cases GGUF files don't have ordered tensors – this creates a problem when estimating memory utilization because the start and end of a layer may be far apart

### OS

_No response_

### GPU

_No response_

### CPU

_No response_

### Ollama version

_No response_
Repository: ollama
Issue: `ollama create` progress
Labels: feature request

Ollama create doesn't report back any progress similar to `ollama pull` or `ollama push`.

- [x] Copying files (transferring model data)
- [x] Quantization
- [ ] Converting

Note, a full progress bar isn't required, it can be as simple as adding a percentage:

```
% ollama create -f Modelfile test
transferring model data 5% ⠇
```
Repository: rust
Issue: rustdoc: support for `async Fn*` trait bounds
Labels: T-rustdoc,C-bug,S-blocked,F-async_closure

Source:

```rs
#![feature(async_closure)]

pub fn demo(_: impl async Fn() -> i32) {}
```

Current rendered output (local, etc. — more generally: HIR-based) below (issue: dropping the trait bound modifier `async`).

```rs
pub fn demo(_: impl Fn() -> i32)
```

Current rendered output (inlined cross-crate re-export, etc. — more generally: middle-based) below (issue: leaking the internal desugaring):

```rs
pub fn demo(_: impl AsyncFn<(), Output = i32>)
```

Tracking:

- https://github.com/rust-lang/rust/issues/62290
Repository: PowerToys
Issue: Quits on SP11 
Labels: Issue-Bug,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.81.1.0

### Installation method

WinGet

### Running as admin

Yes

### Area(s) with issue?

General

### Steps to reproduce

When attempting to invoke PowerToys Run, I often (nearly always) find that PowerToys Run has quit.

### ✔️ Expected Behavior

for PowerToys to be running

### ❌ Actual Behavior

When attempting to invoke PowerToys Run, I often (nearly always) find that PowerToys Run has quit.



### Other Software

_No response_
Repository: ollama
Issue: Supports voice recognition and text-to-speech capabilities, with customizable extension abilities
Labels: feature request

Feature Request: Support for Voice Recognition and Text-to-Speech with Custom Extension Capabilities

I would like to propose the addition of voice recognition and text-to-speech functionalities to the project. These features would greatly enhance the user experience by allowing for hands-free interaction and accessibility.

Additionally, I suggest implementing a customizable extension framework that would enable developers to integrate their own voice commands or speech synthesis options, thereby expanding the project's versatility and adaptability to various use cases.

Thank you for considering this enhancement to the project. I believe these features would be a valuable addition and open up new possibilities for users and developers alike.
Repository: TypeScript
Issue: useUnknownInCatchVariables would do much better to require ": unknown" rather than magically injecting it
Labels: Needs Proposal,Domain: Error Messages,Experience Enhancement

### 🔎 Search Terms

useUnknownInCatchVariables

### 🕗 Version & Regression Information


- This is the behavior in every version I tried, and I reviewed the FAQ for entries about useUnknownInCatchVariables


### ⏯ Playground Link

_No response_

### 💻 Code

_No response_

### 🙁 Actual behavior

With `useUnknownInCatchVariables` `:unknonw` is magically injected after err (in `catch (err)`)

```ts
try {
  console.log("in try")
}
catch (err) {
  console.log("in catch")
  console.log(err.message)
}
```

This results in a mysterious failure like so (from deno i.e. swc):
```
error: TS18046 [ERROR]: 'err' is of type 'unknown'.
    console.log(err.message)
```

The design of this option is very wrong, it's not worth the tiny saving of not having to type `:unknown` give how mysterious the above error is for a user who isn't aware of this option.  It should have been designed to require this declaration rather than injecting it.

I realize this option can't be fixed at this point and it's probably not worth introducing a similar one with the better behavior.  Perhaps as an alternative swc (and maybe other compilers) could be fixed to give an error that at least mentions useUnknownInCatchVariables.

### 🙂 Expected behavior

Something less mysterious :)

### Additional information about the issue

None
Repository: godot
Issue: Project or editor crashes randomly with XIO fatal IO error 11
Labels: bug,needs testing,crash

### Tested versions

Godot Engine v4.2.2.stable.official.15073afe3

### System information

Godot v4.2.2.stable - Arch Linux #1 SMP PREEMPT_DYNAMIC Thu, 27 Jun 2024 12:26:27 +0000 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 (nvidia; 555.58) - 12th Gen Intel(R) Core(TM) i5-12600K (16 Threads)

### Issue description

I've been somewhat following #75308 for a while, and I saw someone suggest that building libx11 from the official PKGBUILD (on arch linux) would be a workaround, so I should state for context that I built and installed the package earlier today. However, since then, I'm still experiencing several crashes.

The crash message I'm seeing is:
```
Godot Engine v4.2.2.stable.official.15073afe3 - https://godotengine.org
Vulkan API 1.3.278 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3080
 
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 1297324 requests (1297323 known processed) with 0 events remaining.
ERROR: BUG: Unreferenced static string to 0: @rpc
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: @export_exp_easing
   at: unref (core/string/string_name.cpp:129)
...
```

After doing some digging, it seems that some people have reported crashes with a similar error message (in #26907 for instance) when using optimus / primusrun. I'm in a _similar_ situation I guess? I have a dedicated GPU and a CPU with integrated graphics:
```
OS: Arch Linux x86_64 
Host: B660M DS3H DDR4 
Kernel: 6.6.36-1-lts 
Uptime: 6 hours, 32 mins 
Packages: 2055 (pacman), 55 (flatpak) 
Shell: bash 5.2.26 
Resolution: 2560x1440, 1920x1080, 1920x1080 
DE: Plasma 6.1.1 
WM: KWin 
Theme: [Plasma], Breeze-Dark [GTK2], Breeze [GTK3] 
Icons: [Plasma], breeze-dark [GTK2/3] 
Terminal: konsole 
Terminal Font: Lilex Nerd Font Mono 10 
CPU: 12th Gen Intel i5-12600K (16) @ 4.900GHz 
GPU: NVIDIA GeForce RTX 3080 
GPU: Intel AlderLake-S GT1 
Memory: 14263MiB / 15765MiB 
```

However, I do not use optirun or primusrun or anything like that, so I'm not sure how closely related this is to the previous issues.

### Steps to reproduce

Be running and using Godot, it seems to only crash when receiving an input like control Z to undo, or F5 to launch the game, but it happens somewhat rarely. I can't identify a repeatable series of actions to cause it to crash, it just sorta does after maybe 30-60 minutes. Often enough to where i've had maybe five or six crashes today. It crashes regardless of what project I have open, too.

### Minimal reproduction project (MRP)

N/A