sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Slow code generated for _mm256_mulhi_epi16
Labels: A-LLVM,I-slow,P-medium,regression-untriaged,llvm-fixed-upstream,C-optimization

I suspect this is an issue in upstream LLVM. The sse2 version and the unsigned version (`_mm256_mulhi_epu16`) show the same problem. If a wider register is available (xmm -> ymm -> zmm) that will be used instead of splitting the values between 2 different ones.

### Code

https://godbolt.org/z/9Eqb45Keq

I tried this code:

```rust
pub unsafe fn bad(a: __m256i) -> __m256i {
    let a = _mm256_and_si256(a, _mm256_set1_epi16(0x7FFF));
    _mm256_mulhi_epi16(a, _mm256_set1_epi16(1000))
}
```

I expected to see this happen: more or less the same codegen as with a -1000 in multiplier

Instead, this happened: it looks like the vector is widened to i32 for no good reason.

### Version it worked on

It most recently worked on: Rust 1.74

### Version with regression

I checked on godbolt with 1.75-1.81 and whatever beta and nightly are today.

<!--
If you know when this regression occurred, please add a line like below, replacing `{channel}` with one of stable, beta, or nightly.

@rustbot modify labels: +regression-from-stable-to-{channel} -regression-untriaged
-->
Repository: rust
Issue: Bug using | more with Rust programs
Labels: C-bug,O-windows-7

https://github.com/01mf02/jaq/issues/183#issuecomment-2370359796

Hi, using Rust programs ([jaq](https://github.com/01mf02/jaq) is this case) with `|more` on Win 7 give a wrong output:

`curl -s https://theunitedstates.io/congress-legislators/legislators-current.json | jaq.exe --color=never .[] | more`

shows:
````
?┼?=>?┼┼????=>?????
┼????????:?┼┼????????┼???????????┼???????>???????┼??????>????┼???>?┼┼┼??????
┼┼??????
┼??┼┼????????┼?????=>?????????┼????????>???┼┼????????????????┼┼?????>???┼????>????┼????????????┼┼???
?????=>???????
??┼??=>?┼┼????????=?┼┼???>?????┼????????>????????┼?????>?┼┼?????>???????┼┼????>??┼?
????>?┼┼?┼┼┼??=>????┼┼????>???????┼┼┼???????????┼┼???=>?~?┼┼┼?????>??┼┼┼??????????┼┼?
┼?
┼┼????????┼┼┼????????????┼┼??=>???????┼┼┼???????
┼┼?????????┼┼????>??????┼??┼┼?┼┼┼??=>????┼┼????>???????┼┼┼???????????┼┼???=>?~?┼┼┼?????>??┼┼┼???????
???┼┼??┼??┼┼????????┼┼┼???????????
┼┼??=>???????┼┼┼????????┼┼?????????┼┼????>??????┼??┼┼?┼┼┼??=>???
┼┼????>???????┼┼┼???????????┼┼???=>?~?┼┼┼?????>??┼┼┼??????????┼┼?
┼?
┼┼????????┼┼┼????????????┼┼??=>???????┼┼┼???????
┼┼?????????┼┼????>??????┼┼┼??????????????????????┼??┼┼?┼┼┼??=>????┼┼????>???????┼┼┼???????????┼┼???=
>?~?┼┼┼?????>??┼┼┼??????????
┼┼???>??????????????????┼┼??┼??┼┼????????┼┼┼????????????┼┼??=>???????┼┼┼????????┼┼????>?
┼┼????>??????┼┼┼??????????????????┼┼?????>????????????????????????????┼┼???=>????????┼┼┼???????????
┼┼????????????????????????????
┼┼???????????????????????┼??┼┼?┼┼┼??=>???
┼┼????>???????┼┼┼???????????┼┼???=>?~?┼┼┼??????????
┼┼????>??┼┼???>????????????????┼┼┼?????????????????????????????????┼┼┼????????????
┼┼???>????????┼┼┼???????>????????????????????┼┼┼???=>????4?????????????┼┼????????????
-- Más  --
````

More details on https://github.com/01mf02/jaq/issues/183

Cheers.
Repository: ollama
Issue: qwen2.5coder /api/generate odd behavior when `suffix` is present but empty string.
Labels: bug

### What is the issue?

Please check the difference between
```
echo -e $(curl http://localhost:11434/api/generate -d '{
  "model": "qwen2.5-coder:1.5b",
  "prompt": "def fib(", "suffix": " "
}' | jq -s 'map(.response) | join("")')
```
and
```
echo -e $(curl http://localhost:11434/api/generate -d '{
  "model": "qwen2.5-coder:1.5b",
  "prompt": "def fib(", "suffix": ""
}' | jq -s 'map(.response) | join("")')
```

In the second case the model does not act as FIM as I would expect (ands the template suggests). In the first case it does.
Maybe this is intended but I would not have expected it.

### OS

_No response_

### GPU

_No response_

### CPU

_No response_

### Ollama version

0.3.11
Repository: neovim
Issue: snippet: parsing error if placeholder or choice node contains special text
Labels: bug,snippet

### Problem

Parsing of snippet which contains "tabstop like" text inside placeholder fails with error when it should not.

### Steps to reproduce

1. `:lua vim.snippet.expand('a(${1:x$2})')`
2. Observe the error: `E5108: Error executing lua .../usr/share/nvim/runtime/lua/vim/lsp/_snippet_grammar.lua:177: snippet parsing failed`

### Expected behavior

Expand into `a(x$2)`, i.e. parse `x$2` as regular text (as it says in [LSP spec grammar](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax)).

**Edit**: it is a bit more complicated than that and might depend on LSP specification version. See [this comment](https://github.com/neovim/neovim/issues/30495#issuecomment-2379408776).

### Nvim version (nvim -v)

NVIM v0.11.0-dev-771+g67d6b6f27

### Vim (not Nvim) behaves the same?

No (doesn't have this functionality)

### Operating system/version

EndeavourOS Linux x86_64 (6.10.10-arch1-1)

### Terminal name/version

ghostty

### $TERM environment variable

xterm-ghostty

### Installation

appimage
Repository: ollama
Issue: OpenAI client expects embeddings to be base64 encoded string, not json array of floats
Labels: bug,api

### What is the issue?

v1/embeddings support was added recently, but the C# OpenAPI client expects the API to return a base64 string, containing the embeddings as 4 byte floating point values.

The deserializer eventually calls [this function](https://github.com/openai/openai-dotnet/blob/main/src/Custom/Embeddings/Embedding.cs#L107)
```csharp
    private static ReadOnlyMemory<float> ConvertToVectorOfFloats(BinaryData binaryData)
    {
        ReadOnlySpan<byte> base64 = binaryData.ToMemory().Span;

        // Remove quotes around base64 string.
        if (base64.Length < 2 || base64[0] != (byte)'"' || base64[base64.Length - 1] != (byte)'"')
        {
            ThrowInvalidData();
        }
        base64 = base64.Slice(1, base64.Length - 2);

        // Decode base64 string to bytes.
        byte[] bytes = ArrayPool<byte>.Shared.Rent(Base64.GetMaxDecodedFromUtf8Length(base64.Length));
        OperationStatus status = Base64.DecodeFromUtf8(base64, bytes.AsSpan(), out int bytesConsumed, out int bytesWritten);
        if (status != OperationStatus.Done || bytesWritten % sizeof(float) != 0)
        {
            ThrowInvalidData();
        }
```

While I find this... goofy to say the least, this API is not currently compatible with OpenAI's embedding endpoint because of this difference.

Relates to: #5285

### OS

Linux

### GPU

AMD

### CPU

AMD

### Ollama version

0.3.11
Repository: angular
Issue: new function for signal/rxjs interop
Labels: area: core,cross-cutting: observables,core: reactivity,cross-cutting: signals,core: rxjs interop

### Which @angular/* package(s) are relevant/related to the feature request?

@angular/core

### Description

I propose some function to run some computation that returns an Observable, and convert it to a signal.

Typical workflow:
- inputs = signals
- when they change, run some computation (typically, http requests)
- convert to a signal

### Proposed solution

```typescript
export function computedFromObservable<T>(computation: () => Observable<T>, options?: CreateComputedOptions<Observable<T>>): Signal<T | undefined> {
  const computedSignal = computed(computation, options);
  const computedObservable = toObservable(computedSignal);
  const observable = computedObservable.pipe(
    switchAll()
  );
  return toSignal(observable);
}
```

which can be used this way:
```typescript
    this.productPage = computedFromObservable(() => this.productService.find$(this.productSearch(), this.pagination()));
```

... replacing this more complicated construct:
```typescript
    const productParams: Signal<[ProductSearch, Pagination]> = computed(() => [this.preparationSearch(), this.pagination()]);
    const productPageObservable = toObservable(productParams).pipe(
      switchMap(([productSearch, pagination]) => this.productService.find$(productSearch, pagination))
    );
    this.productPage = toSignal(productPageObservable);
```


### Alternatives considered

Originally, I something like this, but it lacked the power of `computed()` (single signal as input often requiring to create an additional computed() signal anyway, not as lazy, ...):
```typescript
export function pipeSignalWithDefault<T, U>(signal: Signal<T>, pipe: OperatorFunction<T, U>, initialValue: U): Signal<U> {
  const signalAsObservable = toObservable(signal);
  const signalPipe = signalAsObservable.pipe(pipe);

  return toSignal(signalPipe, {initialValue});
}
```
Repository: kubernetes
Issue: Events can not reference objects that use a different name validation
Labels: sig/instrumentation,triage/accepted

Seen in https://github.com/kubernetes/kubernetes/issues/127588

> E0924 12:16:50.003934       1 event_broadcaster.go:270] "Server rejected event (will not retry!)" err="Event \"fd00:10:233::103.17f82d400041d81f\" is invalid: metadata.name: Invalid value: \"fd00:10:233::103.17f82d400041d81f\":
a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])
?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')" event="&Event{ObjectMeta:{fd00:10:233::103.17f82d400041d81f  default    0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},EventTime:2024-09-24 12:16:50.002035963 +0000 UTC
m=+179.166665408,Series:nil,ReportingController:ipallocator-repair-controller,ReportingInstance:ipallocator-repair-controller-svc-control-plane,Action:IPAddressAllocation,Reason:IPAddressNotAllocated,Regarding:{IPAddress  fd00:1
0:233::103 86ced933-1da5-4fac-b2e3-ab849185e2d5 networking.k8s.io/v1beta1 7070 },Related:nil,Note:IPAddress: fd00:10:233::103 for Service default/v6-service appears to have leaked: cleaning up,Type:Warning,DeprecatedSource:{ },D
eprecatedFirstTimestamp:0001-01-01 00:00:00 +0000 UTC,DeprecatedLastTimestamp:0001-01-01 00:00:00 +0000 UTC,DeprecatedCount:0,}"

An IPAddress object can contain an IPv6 address `fd00:10:233::103` 
The event recorder creates a new Event object based on the referenced object

> 		r.recorder.Eventf(ipAddress, nil, v1.EventTypeWarning, "IPAddressNotAllocated", "IPAddressAllocation", "IPAddress %s appears to have been modified, not referencing a Service %v: cleaning up", ipAddress.Name, ipAddress.Spec.ParentRef)

https://github.com/kubernetes/kubernetes/blob/464a994a10b71c45583f3426fd970291f8a5b756/staging/src/k8s.io/client-go/tools/events/event_recorder.go#L67-L75

I can see two options:
1. adapt the controller code to normalize the IPv6 addresses to meet the Event name convention
2. modify `r.recorder.Eventf` to make valid names on the Events objects

The result will be the same with 1 or 2, the difference is that option 2. will be valid for all the objects that use names not valid for the existing Events validation

/sig instrumentation
Repository: neovim
Issue: diagnostics: vim.diagnostic.is_shown(), vim.diagnostic.is_hidden() or something similar to test if there are hidden diagnostics
Labels: enhancement,diagnostic

### Problem

Currently you can't check if there are diagnostics that were hidden via
`vim.diagnostic.hide()`, which makes it impossible to toggle between
diagnostics being hidden/shown.

### Expected behavior

I would expect there to be an API to check that, considering there is such an
API for `vim.diagnostic.enabled()` by using `vim.lsp.is_enabled()`.
Repository: rust
Issue: [QNX] `Backtrace::{capture,force_capture}` triggers OOM on ARM64 when called from a thread other than `main`
Labels: C-bug,T-libs,O-neutrino

The following program triggers an OOM condition when executed on a  `aarch64-unknown-nto-qnx710`  target. The `x86_64-pc-nto-qnx710` target is not affected by the issue. Other QNX targets have not been checked.

``` rust
use std::backtrace::Backtrace;

// does OOM
fn main() {
    let handle = std::thread::spawn(|| {
        let trace = Backtrace::force_capture();
    });
    handle.join().unwrap();
}
```

``` console
$ ./gh130784
memory allocation of 3758096384 bytes failed
```

Calling the `Backtrace::force_capture` function from the `main` function / thread does not result in an OOM condition.
``` rust
// no OOM
fn main() {
    let trace = Backtrace::force_capture();
    println!("{trace}");
}
```

``` console
$ ./gh130784-workaround
(..)
   2: std::backtrace::Backtrace::create
             at ./rustc/1.83.0/library/std/src/backtrace.rs:331:13
   3: error_with_backtrace_outputs_correctly::main
   4: std::sys::backtrace::__rust_begin_short_backtrace
   5: std::rt::lang_start::{{closure}}
(..)
```

The issue also affects the `Backtrace::capture` API when the `RUST_BACKTRACE` env var is set:

``` rust
use std::backtrace::Backtrace;

// does OOM
fn main() {
    std::env::set_var("RUST_BACKTRACE", "1");
    let handle = std::thread::spawn(|| {
        let trace = Backtrace::capture();
    });
    handle.join().unwrap();
}
```

It's also worth noting that the built-in backtrace support (`RUST_BACKTRACE=1`) works fine on `aarch64-unknown-nto-qnx710` since the `/tests/ui/backtrace` tests pass. Also, backtraces from panicking threads are printed as expected.

``` rust
// no OOM
fn main() {
    std::env::set_var("RUST_BACKTRACE", "1");
    let handle = std::thread::spawn(|| {
        foo();
    });
    assert!(handle.join().is_err());
}

#[inline(never)]
fn foo() {
    panic!("backtrace works: {:x}", foo as fn() as usize);
}
```

``` console
$ ./rust-backtrace-works
thread '<unnamed>' panicked at <some-path>.rs:28:5:
backtrace works: 20223d58a8
stack backtrace:
   0: rust_begin_unwind
             at ./rustc/1.83.0/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at ./rustc/1.83.0/library/core/src/panicking.rs:74:14
   2: <crate_name>::foo
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```

## Changelog

- (2024-09-24 19:50:38+02:00) note that `Backtrace::capture` is also affected. note that the built-in `RUST_BACKTRACE` functionality is not affected when other threads panics.
- (2024-09-24 19:27:45+02:00) minimized repro example to a single call to `Backtrace::force_capture`. before it was replicating the `std::error::tests::error_with_backtrace_outputs_correctly_with_one_source` function which uses unstable libstd API.

cc @flba-eb @gh-tr  @jonathanpallant  (QNX 7.1 maintainers)
FYI @nyurik this may be relevant to the `aarch64-unknown-nto-qnx700` target
Repository: vscode
Issue: Not possible to DnD an image into inline chat
Labels: feature-request,editor-drag-and-drop,inline-chat

Testing #229263

Linux: DnD an image into inline chat opens the image in the editor instead of adding it as an attachment.

Also same for quick chat

cc. @benibenj
Repository: rust
Issue: TypeId exposes placeholders type generics with `-Znext-solver`
Labels: C-bug,requires-nightly,F-generic_const_exprs

So, this isn't necessarily a bug, it's just interesting behavior and I'm not sure if it's intended:

```rust
#![feature(const_type_id, generic_const_exprs)]
const fn type_id<T: 'static>() -> u128 {
    unsafe { std::mem::transmute::<_, u128>(std::any::TypeId::of::<T>()) }
}

const fn c<X: 'static>() -> usize {
    // A: the evaluated program panicked at '63102938254854923095314763309601158984'
    const_panic::concat_panic!(type_id::<X>());
}

pub fn u<X: 'static>() {
    let _: [(); c::<X>()];
    println!("{}", type_id::<X>()); // B
}
```

This happens without even calling `u`. The values printed at A and B (by commenting out the call to `c` and adding a call to `u` with any arbitrary type) are different. I'm posting this issue because I'm not sure if there's ICE potential here, for values being different in a const vs runtime context.

I stumbled across this while looking for a way to make a "commutative type" i.e. where `Com<A, B>` and `Com<B, A>` are the same type. It only works in `-Znext-solver` and I believe that's due to `-Znext-solver` eagerly evaluating stuff using these placeholder types?

```rust
#![feature(const_type_id, core_intrinsics, generic_const_exprs)]
#![allow(warnings)]
struct Foo; struct Bar;

struct Bool<const B: bool>;

trait TrueOrFalse {
    type Ite<Then, Else>;
}

impl TrueOrFalse for Bool<true> {
    type Ite<Then, Else> = Then;
}

impl TrueOrFalse for Bool<false> {
    type Ite<Then, Else> = Else;
}

type Ite<const B: bool, T, E> = <Bool<B> as TrueOrFalse>::Ite<T, E>;

trait Map<T: 'static, U: 'static> where {
    type Output;
}

impl<T: 'static, U: 'static> Map<T, U> for (T, U) {
    type Output = Ite<{
        std::intrinsics::type_id::<T>() > std::intrinsics::type_id::<U>()
    }, (U, T), (T, U)>;
}

pub fn u<X: 'static, Y: 'static>() {
    let _x: <(X, Y) as Map<X, Y>>::Output = loop {};
    let mut _y: <(Y, X) as Map<Y, X>>::Output = loop {};
    _y = _x;
}

pub fn f() {
    u::<Foo, Bar>();
}
```

If this *does* happen to be fixed in a way which breaks the code above it would be nice to have a (perma-unstable) way to order types.

# Meta

```
rustc 1.79.0-nightly (aed2187d5 2024-04-27)
binary: rustc
commit-hash: aed2187d53b8789e3a37f50ae36f894a2a679077
commit-date: 2024-04-27
host: x86_64-pc-windows-msvc
release: 1.79.0-nightly
LLVM version: 18.1.4
```
Repository: vscode
Issue: Should opening "getting started with accessibility features" walkthrough start reading out the first block?
Labels: accessibility,under-discussion

Testing #228766

I found it strange that the first block isn't read to the user when the walkthrough is opened. I also don't get info about the buttons present within the step "block". Not very experienced with voiceover, maybe that's expected.

https://github.com/user-attachments/assets/bcef7b0c-76a1-4189-9c82-abdfb11ed869

Version: 1.94.0-insider
Commit: f35c3823e3b7ea4c52f7fee4659bcce39b42ce9e
Date: 2024-09-24T05:04:12.797Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0
Repository: ant-design
Issue: Typography component not longer inherits font in v5
Labels: Inactive,unconfirmed

### Reproduction link

[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/antd-reproduce-5x-fguhno?file=demo.tsx)

### Steps to reproduce

See reproduction link for v5 (https://stackblitz.com/edit/antd-reproduce-5x-fguhno?file=demo.tsx) and
v4 (https://codesandbox.io/p/sandbox/antd-reproduction-template-forked-vc2m69?file=%2Findex.js%3A10%2C46).

In v5 text in typography component has 14px, because this is what generated for typography component. In v4 though it has 20px, because of the parent.

### What is expected?

I would expect some switch in theme config for Typography component, that would allow to return back to this behavior.

### What is actually happening?

Font size is not inherited in Typography component.

| Environment | Info |
| --- | --- |
| antd | 5.19.3 |
| React | 18.3.1 |
| System | macOS Sonoma 14.5 |
| Browser | Google Chrome Version 126.0.6478.127 (Official Build) (arm64) |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: material-ui
Issue: [material-ui][Select] selecting using the spacebar does not work
Labels: bug 🐛,accessibility,component: select,package: material-ui

### Steps to reproduce

Link to live example: https://mui.com/material-ui/react-select/

Steps:
Try selecting an option in Mui select using spacebar. It only works with enter.

This is a bad experience for keyboard users. Most of them expect the spacebar to work here. Escpecially with multi select is unpleasant.

With Autocomplete it works fine.


### Current behavior

_No response_

### Expected behavior

_No response_

### Context

_No response_

### Your environment

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>


**Search keywords**: spacebar, select
Repository: ant-design
Issue: Not possible to specify one axis padding for theme
Labels: Inactive

### Reproduction link

[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/antd-reproduce-5x-eojitb?file=demo.tsx)

### Steps to reproduce

Inspect the dropdown of the select.

### What is expected?

It should be possible to specify padding in a form '0 20px', so that only one of the axis is affected.

### What is actually happening?

Since I can only specify a number, it is not possible to style only one axis.

| Environment | Info |
| --- | --- |
| antd | 5.19.3 |
| React | 18.3.1 |
| System | macOS Sonoma 14.5 |
| Browser | Google Chrome Version 126.0.6478.127 (Official Build) (arm64) |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: vscode
Issue: Image preview transparency shows triangles at certain zoom levels
Labels: bug,help wanted,image-preview

![Image](https://github.com/user-attachments/assets/4027fa25-5bbd-4999-b1ac-7a042596de28)

Zoomed:

![Image](https://github.com/user-attachments/assets/f4db74b5-5c2d-4798-a0a1-f548b97d6b70)
Repository: vscode
Issue: Brackets should not be colorized in comments
Labels: bug,tree-sitter

Testing #229392

Default:

![Image](https://github.com/user-attachments/assets/4be465a6-1b07-4779-ba2f-d834d83c38ab)


Tree sitter:
![Image](https://github.com/user-attachments/assets/389eeefd-53d1-45a9-a186-ea768c9fb78d)


Theme is Dark Modern
Repository: node
Issue: Slow performances when running tests with `--experimental-test-coverage`
Labels: coverage,test_runner

### Version

v22.9.0

### Platform

```text
Darwin N4V4PGFGPT 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:16:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8112 arm64
```


### Subsystem

_No response_

### What steps will reproduce the bug?

Run tests with `--experimental-test-coverage` option. Comparing it to other solutions (f.e. running Node tests and getting the coverage with `nyc`) this is way slower. For instance, on a repo with ~800 tests, collecting coverage with `nyc` takes 77s, while running with `--experimental-test-coverage` takes 148s.

### How often does it reproduce? Is there a required condition?

I can reproduce it every time I run the Node tests with the native test coverage option.

### What is the expected behavior? Why is that the expected behavior?

The performances should be at least equal (ideally better) than with 3rd party dependencies (like `nyc`).

### What do you see instead?

An average time spent per test of 185ms vs 96ms.

### Additional information

I tried running with/without additional options (f.e. `--test-coverage-exclude`, `--test-coverage-include`, `--test-coverage-branches`, `--test-coverage-functions`, `--test-coverage-lines`) but it didn't help. The performance issue seems only to be related to the algorithm that's triggered by the `--experimental-test-coverage` option.