sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: When a trait is missing items, there are many follow-up errors distracting from the root cause
Labels: A-diagnostics,T-compiler,D-verbose

To reproduce, check out commit cdc509f7c09361466d543fc8311ce7066b10cc4f of rustc and remove this line:

https://github.com/rust-lang/rust/blob/7a5d814a047376223da9331061d9642dd33b3f9a/compiler/rustc_const_eval/src/const_eval/machine.rs#L375

I would expect some complaints about missing trait items. Those do show up, but they are drowned in tons of other errors like:
```
error[E0599]: the method `allocate` exists for struct `InterpCx<'_, '_, CompileTimeInterpreter<'_, '_>>`, but its trait bounds were not satisfied
   --> compiler/rustc_const_eval/src/util/check_validity_requirement.rs:53:10
    |
52  |       let allocated = cx
    |  _____________________-
53  | |         .allocate(ty, MemoryKind::Machine(crate::const_eval::MemoryKind::Heap))
    | |_________-^^^^^^^^
    |
   ::: compiler/rustc_const_eval/src/interpret/eval_context.rs:37:1
    |
37  |   pub struct InterpCx<'mir, 'tcx, M: Machine<'mir, 'tcx>> {
    |   ------------------------------------------------------- method `allocate` not found for this struct
    |
note: trait bound `{type error}: std::marker::Sized` was not satisfied
   --> compiler/rustc_const_eval/src/interpret/place.rs:386:24
    |
386 | impl<'mir, 'tcx: 'mir, Prov, M> InterpCx<'mir, 'tcx, M>
    |                        ^^^^     -----------------------
    |                        |
    |                        unsatisfied trait bound introduced here
help: consider relaxing the type parameter's implicit `Sized` bound
   --> compiler/rustc_const_eval/src/interpret/place.rs:386:28
    |
386 | impl<'mir, 'tcx: 'mir, Prov: ?Sized, M> InterpCx<'mir, 'tcx, M>
    |                            ++++++++
```

Seems like somewhere we are going on compiling too far, and then showing errors that have nothing to do with the root cause of the problem.

So far I have not managed to reproduce this with a smaller example.

Cc @oli-obk is this a consequence of your recent work to keep compiling in more cases?
Repository: PowerToys
Issue: Powertoys run opens app twice when running as administrator
Labels: Issue-Bug,Product-PowerToys Run,Area-Quality,Priority-2,Status-Reproducible

### Microsoft PowerToys version

0.81.0

### Installation method

PowerToys auto-update

### Running as admin

No

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

1) Launch Powertoys Run,
2) Type Terminal (the Windows Terminal App),
3) Run the Terminal App as administrator by pressing Ctrl + Shift + Enter.

### ✔️ Expected Behavior

One instance of the Terminal App in administrator mode.

### ❌ Actual Behavior

Two instances of the Terminal App, one in administrator mode and one in normal mode.

### Other Software

_No response_
Repository: pytorch
Issue: No way to config profiling scope in torch.autograd.profile
Labels: oncall: profiler

### 🚀 The feature, motivation and pitch

When we enable the torch profiler, it captures events from all scopes by default. However, if we want to record only USER_SCOPE events (e.g. events recorded by `torch.autograd.profiler.record_function`), it is currently impossible.

### Alternatives

Currently, `_enable_profiler` supports scope configuration on the cpp backend,  see:
https://github.com/pytorch/pytorch/blob/ff63e8bac8e8ef00c3f368acc18e2f1fd57c3aa8/torch/csrc/autograd/init.cpp#L271


but not used in py code:
https://github.com/pytorch/pytorch/blob/ff63e8bac8e8ef00c3f368acc18e2f1fd57c3aa8/torch/autograd/profiler.py#L326

### Additional context

_No response_

cc @robieta @chaekit @aaronenyeshi @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise
Repository: godot
Issue: Script editing history is not always correct
Labels: bug,topic:editor,usability

### Tested versions

4.3 dev6

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

While #63515 works reliably for the most time, there are some bugged cases that should be fixed. They are related to jumping to other script methods and autoloads.

### Steps to reproduce

0. Open the MRP.
1. Open Base.gd and Second.gd
2. In Second.gd Ctrl+Click on `test()`. You will be teleported to Base.gd
3. Go back in history. You won't land directly at `test()`, there is some extra step in the history
4. In Second.gd, Ctrl+Click on `global` (make sure Single.gd is *not* open)
5. You will be teleported to Single.gd
6. When you go back to history, the previous location is skipped and you'll end up in Base.gd
7. Going forward will skip again to Single.gd. The middle step is gone

### Minimal reproduction project (MRP)

[JumpBugs.zip](https://github.com/godotengine/godot/files/15453186/JumpBugs.zip)
Repository: PowerToys
Issue: Peek from file explorer on android device
Labels: Issue-Bug,Status-In progress,Needs-Triage,Product-Peek

### Microsoft PowerToys version

0.81.0

### Installation method

WinGet

### Running as admin

No

### Area(s) with issue?

File Explorer: Thumbnail preview, Peek

### Steps to reproduce

when I press the shortcut, the preview send me an error 
![image_2024-05-27 10_37_15](https://github.com/microsoft/PowerToys/assets/127388353/b9177b4c-ab92-4454-a6c5-5b6e9a9e0b1f)


### ✔️ Expected Behavior

the preview was open

### ❌ Actual Behavior

_No response_

### Other Software

_No response_
Repository: next.js
Issue: testProxy breaks next/font
Labels: bug,Font (next/font),Testing,linear: next

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/vibrant-cdn-82zfp4

### To Reproduce

1. Add a font like IBM Plex Mono from `next/font` to a component (this works)
2. Set experimental option `testProxy` to true in next.config.js

### Current vs. Expected behavior

The text is supposed to be rendered in IBM Plex Mono. Instead, next/font was unable to load the font from Google due to an "invalid header check".

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 14.3.0-canary.84 // Latest available version is detected (14.3.0-canary.84).
  eslint-config-next: N/A
  react: 19.0.0-beta-04b058868c-20240508
  react-dom: 19.0.0-beta-04b058868c-20240508
  typescript: 5.1.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Font (next/font), Testing

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

### Additional context

It seems to occur ever since the canary version appears where `testProxy` was released in `14.2.0-canary.36`. Before that, it was an command line flag `--experimental-test-proxy` where likely the issue also already occured.
Repository: ant-design
Issue: 5.17.0  DatePicker onBlur 在 onChange 之前后各执行一次  
Labels: 🐛 Bug,Inactive

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/antd-reproduction-template-forked-wgn4vm?file=%2Findex.js%3A15%2C29)

### Steps to reproduce

  <DatePicker
          onBlur={(e) => {
            console.log(`[LOG] 🚀 ~~ onBlur e:`, e);
          }}
          onChange={(e) => {
            console.log(`[LOG] 🚀 ~~ onChange e:`, e);
          }}
        />

### What is expected?

onBlur 只在 onChange 后执行一次 

### What is actually happening?

DatePicker onBlur 在 onChange 之前后各执行一次  

| Environment | Info |
| --- | --- |
| antd | 5.17.0 |
| React | 18.2.0 |
| System | windows11 |
| Browser | chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: next.js
Issue: [Next.js@RC] dynamic/static rendering depends on whether `no-store` is specified or is the default.
Labels: bug,Navigation

### Link to the code that reproduces this issue

https://github.com/AkifumiSato/nextjs-issue-demo-explicit-specification-no-store

### To Reproduce

1. `pnpm clean-start`.
2. access http://localhost:3000/default, todo content is fixed.
3. access http://localhost:3000/no-store or http://localhost:3000/force-dynamic, todo content is dynamic.

### Current vs. Expected behavior

I think it should be as documented, or the documentation should be corrected.

https://rc.nextjs.org/docs/app/api-reference/functions/fetch#optionscache

> Next.js fetches the resource from the remote server on every request without looking in the cache

ref: https://github.com/vercel/next.js/discussions/66209

### Provide environment information

```bash
$ pnpm next info

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000
  Available memory (MB): 65536
  Available CPU cores: 10
Binaries:
  Node: 20.12.2
  npm: 9.8.0
  Yarn: 1.22.22
  pnpm: 8.15.7
Relevant Packages:
  next: 15.0.0-rc.0 // Latest available version is detected (15.0.0-rc.0).
  eslint-config-next: N/A
  react: 19.0.0-rc-935180c7e0-20240524
  react-dom: 19.0.0-rc-935180c7e0-20240524
  typescript: 5.4.5
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Navigation

### Which stage(s) are affected? (Select all that apply)

next build (local), next start (local)

### Additional context

_No response_
Repository: pytorch
Issue: Migrate `CalculateSmallVectorDefaultInlinedElements` to constexpr Function for SmallVector
Labels: module: cpp,triaged,enhancement,better-engineering,actionable

### 🚀 The feature, motivation and pitch

Hello!

Currently, the `CalculateSmallVectorDefaultInlinedElements` functionality is implemented using a template struct. With PyTorch now supporting C++17, it is possible to migrate this code to a `constexpr` function.

By reducing template instantiation complexity, the `constexpr` function minimizes compilation time and the size of the generated binary, as it avoids generating multiple instances of the same logic for different template parameters.

The current implementation:

```cpp
// c10/util/SmallVector.h
/// Helper class for calculating the default number of inline elements for
/// `SmallVector<T>`.
///
/// This should be migrated to a constexpr function when our minimum
/// compiler support is enough for multi-statement constexpr functions.
template <typename T>
struct CalculateSmallVectorDefaultInlinedElements {
  static constexpr size_t kPreferredSmallVectorSizeof = 64;
  static_assert(
      sizeof(T) <= 256,
      "You are trying to use a default number of inlined elements for "
      "`SmallVector<T>` but `sizeof(T)` is really big! Please use an "
      "explicit number of inlined elements with `SmallVector<T, N>` to make "
      "sure you really want that much inline storage.");

  static constexpr size_t PreferredInlineBytes =
      kPreferredSmallVectorSizeof - sizeof(SmallVector<T, 0>);
  static constexpr size_t NumElementsThatFit = PreferredInlineBytes / sizeof(T);
  static constexpr size_t value =
      NumElementsThatFit == 0 ? 1 : NumElementsThatFit;
};
```



### Alternatives

Migrate the calculation logic to a `constexpr` function

```cpp
template <typename T>
constexpr size_t CalculateSmallVectorDefaultInlinedElements() {
  constexpr size_t kPreferredSmallVectorSizeof = 64;
  static_assert(
      sizeof(T) <= 256,
      "You are trying to use a default number of inlined elements for "
      "`SmallVector<T>` but `sizeof(T)` is really big! Please use an "
      "explicit number of inlined elements with `SmallVector<T, N>` to make "
      "sure you really want that much inline storage.");
  
  constexpr size_t PreferredInlineBytes =
      kPreferredSmallVectorSizeof - sizeof(SmallVector<T, 0>);
  constexpr size_t NumElementsThatFit = PreferredInlineBytes / sizeof(T);
  return NumElementsThatFit == 0 ? 1 : NumElementsThatFit;
}

// Implementation of SmallVector template class
template <typename T, unsigned N = CalculateSmallVectorDefaultInlinedElements<T>()>
class SmallVector {
public:
    // SmallVector implementation...
};
```

### Additional context

_No response_

cc @jbschlosser
Repository: rust
Issue: Tracking Issue for `optimize_for_size` standard library feature
Labels: C-tracking-issue,I-heavy,T-libs

https://github.com/rust-lang/rust/pull/125011 has added a `optimize_for_size` feature to the standard library, which is designed for special casing some algorithms in `core`/`alloc`/`std` to provide an implementation that tries to minimize its effect on binary size.

To use this feature, the standard library has to be compiled using [`-Zbuild-std`](https://doc.rust-lang.org/cargo/reference/unstable.html#build-std):
```bash
$ cargo +nightly build -Z build-std -Z build-std-features="optimize_for_size" ...
```

Optimizations that leverage this flag:
- [x] [https://github.com/rust-lang/rust/pull/125606](https://github.com/rust-lang/rust/pull/125606)
- [x] [https://github.com/rust-lang/rust/pull/125609](https://github.com/rust-lang/rust/pull/125609)
- [x] [https://github.com/rust-lang/rust/pull/125720](https://github.com/rust-lang/rust/pull/125720)
- [x] [https://github.com/rust-lang/rust/pull/126271](https://github.com/rust-lang/rust/pull/126271)
- [x] #129587
Repository: ollama
Issue: Request to add Smaug Llama3
Labels: model request

This fine tune model of Llama-3-70B-Instruct target to be a very high performant on quality
https://huggingface.co/abacusai/Smaug-Llama-3-70B-Instruct

Similar to Smaug-72b (but improved) that was built and finetune with DPO techniques https://arxiv.org/abs/2402.13228
Summarized: "DPO-Positive (DPOP), a new loss function and training procedure which avoids reduction of the DPO model’s intended picking one response over another."

Recently added to llama.cpp
https://github.com/ggerganov/llama.cpp/commit/c429b33beb35f13934a4dfbe0c138d30b45e5d54
Repository: PowerToys
Issue: memory leak from powertoys.run
Labels: Issue-Bug,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.81.0

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

Just search anything inside powertoys.run and memory will increase until it reached all memory capacity of the computer 

### ✔️ Expected Behavior

just search anything as before

### ❌ Actual Behavior

all available memory of my computer is eat by powertoys.run

### Other Software

Windows 11 Education Build 26120.670
Repository: godot
Issue: Export folder selection popup doesn't show some sub-folders, considering them like non-directory files
Labels: topic:editor,needs testing

### Tested versions

- Reproducible in v4.2.1.stable.official [b09f793], v4.2.2.stable.official [15073afe3]

### System information

Godot v4.2.1.stable - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 860M (nvidia; 535.161.07) - Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz (8 Threads)

### Issue description

A very weird bug I started having in 4.2.1: when doing Project > Export > select platform (e.g. Linux/X11) > either click Export Path folder icon or Export Project... button at the bottom, the folder selection popup will open.

There, I wanted to navigate to my Export sub-folder inside my project:

![image](https://github.com/godotengine/godot/assets/1067772/f766faef-5a5e-4601-b2c0-8e18f3589473)

but Godot didn't show it:

![image](https://github.com/godotengine/godot/assets/1067772/44d9cf03-2b12-49b8-8081-aee059a4961c)

Showing All Files (*) will show non-directory files, and also Export, revealing that it is, oddly, considered like a non-directory file:

![image](https://github.com/godotengine/godot/assets/1067772/24902424-ffd0-41e6-9014-fe50f5e28754)

Going one level up in the system tree, I can see that there are even more missing folders, which show as non-directory files too.

Unfortunately, showing them as non-directory file is not enough: double-clicking on Export, for instance, will fail to open it as a directory, and instead cause an error:

![image](https://github.com/godotengine/godot/assets/1067772/45dc3a71-fc5f-47b0-b4fb-3e60cd407c17)

> Failed to open ./Export
  editor/export/editor_export_platform.h:182 - Prepare Template: Failed to copy export template.

**Workaround**

Manually enter the path in the Export Path field.

### Steps to reproduce

0. I don't know the exact circumstances causing the issue. I suggest creating a bunch of folders in the parent folder containing your Godot project, as well as various sub-folders under your project root, containing different kinds of files or even be empty.
1. Project > Export > select platform (e.g. Linux/X11) > either click Export Path folder icon or Export Project... button at the bottom, the folder selection popup will open
2. Verify that all folders are present, spot missing ones
3. Switch to All Files (*) to reveal missing folders as files
4. Go up and down in the directory tree to spot other similar issues at different levels

### Minimal reproduction project (MRP)

N/A (it's not the project, rather the file hierarchy that seems problematic, but I can't tell where exactly)
Repository: neovim
Issue: Integrate tree-sitter parsers into the toplevel build system
Labels: enhancement,build

### Problem

During packaging for MacPorts (https://github.com/macports/macports-ports/pull/24120#discussion_r1613998031), the question came up why the cmake build system (under `cmake.deps/`) is strictly separate from the toplevel CMakeLists.txt, requiring either multiple manual steps or using the additional wrapper Makefile. This has become especially cumbersome since as of v0.10.0, neovim expects multiple builtin tree-sitter parsers to be available at `<prefix>/lib/nvim/parser` or otherwise will throw runtime errors on common tasks like opening `:help`.

Even worse is the fact that the toplevel cmake silently does or does not use the parsers in `.deps` depending on whether they were built manually before, so forgetting to build them can easily go through unnoticed, which is what initially happened in MacPorts. Using the wrapper Makefile is not a good option there.

CMake has extensive builtin functionality for embedding other cmake roots, from e.g. a simple `add_subdirectory` to ExternalProject/FetchContent. Having `cmake.deps/` as a standalone-buildable project makes sense because you can point multiple neovim builds to it. But I was not able to find reasons in the codebase or past issues why there had to be a wrapper-Makefile around the toplevel cmake for tasks that cmake itself should be able to handle just fine.
So my question is: Was this a deliberate design decision and what was the reasoning behind it?

### Expected behavior

I could imagine a build system like this:
* `cmake.deps/` stays mostly as-is: A standalone project for bundled dependencies
* The toplevel CMakeLists.txt can (using options) be manually pointed to a `.deps` folder, told to not use bundled dependencies at all, or it will embed `cmake.deps/` itself using something like ExternalProject and build and manage a specified subset of dependencies in its own build dir. It should fail the build if building any of the dependencies fails.
* Makefile can be removed, or at least stripped down a lot to only go through the toplevel cmake.
Repository: ollama
Issue: ollama doesn't create a model from modelfile and gives an error
Labels: bug,windows

### What is the issue?

Sorry in advance for any mistakes in text
when I trying to create a model in terminal, no matter what it based on, and even if the "modelfile" is a stock template of downloaded llm, after command "ollama create test" i got same output everytime
" Error: command must be one of "from", "license", "template", "system", "adapter", "parameter", or "message" "
i tried to change names of file, change command to e.g. "ollama create test -t modelfile" it's not working at all.
also i tried to edit commands in modelfile, so it doesn't get any reaction too. I've read the recent topic with similar error here, as it been suggested - converted modelfile in utf8, download file from topic - didn't helped. And also, i re-installed Ollama.

i tried to create modelfile thru Open WebUI from my models, and it works fine. And if i write in dialoge with llm in terminal: "/set system " you are something " and then " /save test " it saves and create new model without any trouble.

it is clear that the problem is not with modelfile itself, so what is it?

OS is WIN10pro. 16gb RAM, fx8320, gtx1650 with CUDA drivers installed. 

### OS

Windows

### GPU

Nvidia

### CPU

AMD

### Ollama version

0.1.38
Repository: angular
Issue: Potential code generation optimization
Labels: area: compiler,core: performance

### Which @angular/* package(s) are the source of the bug?

compiler

### Is this a regression?

No

### Description

Consider text interpolate in a template: `{{ {name: 'Angular'} | json }}`. Since we are declaring an object in a template, the generated code would be along the lines of: `textInterpolate1(" ", pipeBind1(1, 1, pureFunction0(3, _c0)), " ");` (where `_c0 = ()=>({ name: "Angular" });`.

Notice that we generate an arrow function wrapper around `_c0` _and_ the `pureFunction` call - even if `{name: 'Angular'}` is an object literal that will never change. We could optimize for such case and skip the `pureFunction0` instruction call (alongside with the arrow function for _c0).

### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-tej7hv?description=An%20angular-cli%20project%20based%20on%20@angular/animations,%20@angular/common,%20@angular/compiler,%20@angular/core,%20@angular/forms,%20@angular/platform-browser,%20@angular/platform-browser-dynamic,%20@angular/router,%20core-js,%20rxjs,%20tslib%20and%20zone.js&file=src%2Fmain.ts&template=node&title=Angular%20Starter

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

_No response_

### Anything else?

Not the most common scenario / major optimization but still nice to have!
Repository: tauri
Issue: [bug] FileDialogBuilder accepts non-existing files
Labels: type: bug,status: needs triage

### Describe the bug

When I open files with the FileDialogBuilder I can write anything in the file name field and the dialog accepts this as if it existed.


### Reproduction

```rust
dialog::blocking::FileDialogBuilder::new()
    .set_parent(&window)
    .set_title("Add files")
    .pick_files()
```

### Expected behavior

The expected behavior would be for the dialog to complain about the file not existing as it does in most applications.

![image](https://github.com/tauri-apps/tauri/assets/3355320/05ca0abb-375e-4ba8-aeba-965f7be803d6)
(from notepad.exe)

### Full `tauri info` output

```text
[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 125.0.2535.67
        - Visual Studio Build Tools 2019
        - Visual Studio Professional 2022
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 22.2.0
    - npm: 10.2.0

[-] Packages
    - tauri [RUST]: 1.6.5
    - tauri-build [RUST]: 1.5.2
    - wry [RUST]: 0.24.9
    - tao [RUST]: 0.16.9
    - @tauri-apps/api [NPM]: 1.5.6
    - @tauri-apps/cli [NPM]: 1.5.14

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:5173/
    - framework: React
    - bundler: Vite
```


### Stack trace

_No response_

### Additional context

_No response_