sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: Extending component with hostDirectives causes them to be matched twice
Labels: area: core,core: host directives

### Which @angular/* package(s) are the source of the bug?

core

### Is this a regression?

Yes

### Description

When you have a component `A` that has `hostDirectives` and you have another component `B` that extends it and also needs the same `hostDirectives` — if you add them to the second component they are matched twice:

```ts
@Directive({
  standalone: true,
})
export class Dir {}

@Component({
  standalone: true,
  template: 'a',
  selector: 'app-a',
  hostDirectives: [Dir],
})
export class A {}

@Component({
  standalone: true,
  template: 'b',
  selector: 'app-b',
  hostDirectives: [Dir],
})
export class B extends A {}
```

### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-q3mj5v

### Please provide the exception or error you saw

```true
Error: NG0309: Directive _Dir matches multiple times on the same element. Directives can only match an element once.
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular 17 and 18
```


### Anything else?

This is a regression, it used to work in Angular 16. Seems like you do not need to add them to component `B` anymore, they get automatically transferred from `A` when you extend it. However this is not how it used to work in Angular 16, making them effectively incompatible — there doesn't seem to be a way to achieve this scenario in a library from Angular 16 that would work in apps with Angular 17+ which is a big deal. Here's a working example with Angular 16:
https://stackblitz.com/edit/stackblitz-starters-bwkp4z

EDIT: To clarify, in Angular 17 and 18 I can just remove `hostDirectives` from component `B`, but that would break in Angular 16, host directives are not inherited there.
Repository: pytorch
Issue: The time consumption gradually increases when activation checkpoint is iterated and run multiple times
Labels: module: checkpoint,triaged

### 🐛 Describe the bug

In debug mode, activation checkpoint runs iteratively multiple times, and the execution time gradually increases.

```python
import time
import torch
from torch.utils.checkpoint import checkpoint

def func():
    a = torch.tensor([2.], requires_grad=True)
    b = torch.tensor([3.], requires_grad=True)
    c = a + b
    d = c.sin()
    return d

for i in range(1000):
    s_time = time.time()
    d = checkpoint(func, use_reentrant=False, debug=True)
    e_time = time.time()
    print(f"step {i}, time: {e_time-s_time}s")
    
    time.sleep(0.1)
```

Time taken to start:
```
step 0, time: 0.5391733646392822s
step 1, time: 0.001972675323486328s
step 2, time: 0.0008885860443115234s
step 3, time: 0.000766754150390625s
step 4, time: 0.00067138671875s
step 5, time: 0.0007159709930419922s
step 6, time: 0.0011363029479980469s
step 7, time: 0.0006067752838134766s
step 8, time: 0.0009663105010986328s
step 9, time: 0.001596212387084961s
step 10, time: 0.0007123947143554688s
step 11, time: 0.001209259033203125s
step 12, time: 0.0011224746704101562s
step 13, time: 0.0007317066192626953s
step 14, time: 0.0007157325744628906s
step 15, time: 0.001130819320678711s
step 16, time: 0.0012242794036865234s
step 17, time: 0.0012981891632080078s
step 18, time: 0.001077413558959961s
step 19, time: 0.0007259845733642578s
step 20, time: 0.0007848739624023438s
```

Time taken to complete the run：
```
step 990, time: 0.007063388824462891s
step 991, time: 0.007038116455078125s
step 992, time: 0.007068157196044922s
step 993, time: 0.007077217102050781s
step 994, time: 0.007020711898803711s
step 995, time: 0.007513523101806641s
step 996, time: 0.007200479507446289s
step 997, time: 0.0072383880615234375s
step 998, time: 0.007203578948974609s
step 999, time: 0.007709503173828125s
```

### Versions

PyTorch version: 2.2.2+cu121

cc @soulitzer
Repository: storybook
Issue: Ensures the contrast between foreground and background colors meets wacg 2 AA minimum contrast ratio thresholds.[Bug]: 
Labels: bug,documentation,accessibility

### Describe the bug

Ensures the contrast between foreground and background colors meets wacg 2 AA minimum contrast ratio thresholds.

### Reproduction link

https://storybook.js.org/docs

### Reproduction steps

1. open the URL "[Storybook](https://storybook.js.org/docs)".
2. Navigate to the "docs" link and invoke it.
3. Run accessibility insights for web and observe the color contrast issue.

**Expected Result:** 
Ensures the contrast between foreground and background colors meets wacg 2 AA minimum contrast ratio thresholds.

**Actual Result:** 
The color contrast ratio between foreground and background colors meets wcag 2 AA minimum contrast ratio thresholds. The minimum color contrast ratio for the text is 4.5:1

![stor book CCA](https://github.com/storybookjs/storybook/assets/93735775/8275fca2-ca19-4bc3-bcbb-833e34d38a5b)


### System

```bash
OS: Windows 11
OS version: 23H2 ((OS Build 22631.3737)
Edge Version: Version 126.0.2592.87 (Official build) (64-bit)
```


### Additional context

_No response_
Repository: storybook
Issue:  Incorrect Name is defined for the close/dismiss button in the search edit filed.
Labels: bug,help wanted,accessibility,sev:S4

### Describe the bug

 Incorrect Name is defined for the close/dismiss button in the search edit filed.

### Reproduction link

https://storybook.js.org/addons

### Reproduction steps

1. open the URL "[Storybook](https://storybook.js.org/docs)".
2. Navigate to the "Addons" link and invoke it.
3. navigate to the "search edit filed" and enter any characters in the edit filed and navigate to the dismiss button.
4. Observe the narrator announcement.

**Expected result:**
Name should be defined for the close/dismiss button, narrator should announce as close/dismiss button.

 

https://github.com/storybookjs/storybook/assets/93735775/5952329d-f8c4-4f89-863e-b4215e1f76a3



### System

```bash
OS: Windows 11
OS version: 23H2 ((OS Build 22631.3737)
Edge Version: Version 126.0.2592.87 (Official build) (64-bit)
```


### Additional context

_No response_
Repository: tauri
Issue: [macos] [bug] left/right arrow keys printing invalid characters in input fields under `unstable` feature
Labels: type: bug,status: needs triage,scope: unstable flag

### Describe the bug

Left and right arrow keys printing invalid characters
Have seen #9257 and https://github.com/tauri-apps/wry/issues/1177 but idk is they related to my issue or not

https://github.com/tauri-apps/tauri/assets/60939712/bf991dae-1ef2-4da1-98d3-ac07ed2ab373

### Reproduction

Enable `unstable` feature-flag

### Expected behavior

_No response_

### Full `tauri info` output

```text
WARNING: no lock files found, defaulting to npm

[✔] Environment
    - OS: Mac OS 13.5.2 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 22.3.0
    - pnpm: 9.4.0
    - yarn: 1.22.22
    - npm: 10.8.1
    - bun: 1.1.16

[-] Packages
    - tauri [RUST]: 2.0.0-beta.23
    - tauri-build [RUST]: 2.0.0-beta.18
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 2.0.0-beta.21
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-beta.21

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ./
    - devUrl: http://localhost:5173/
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: opencv
Issue: `FastFeatureDetector` slight optimization possible
Labels: bug,optimization

Since `ptr` is defined this way (each element is unsigned):

https://github.com/opencv/opencv/blob/5510718381f8a35f2beb6c488b2ae1d8501cf0fc/modules/features2d/src/fast.cpp#L101

When `threshold > v`, then `vt < 0`, but `ptr[...] >= 0` always holds. 
https://github.com/opencv/opencv/blob/5510718381f8a35f2beb6c488b2ae1d8501cf0fc/modules/features2d/src/fast.cpp#L225-L230

Hence the entire loop can be skipped because `x < vt` never happens.
Repository: godot
Issue: The cursor moves without respecting the indentation
Labels: enhancement,discussion,topic:editor

### Tested versions

v3.6.beta5.official [2a347ab86]

### System information

w10 64

### Issue description

When you press enter after a commented code, the cursor moves to the beginning of the new line and you must move it to the correct place.

![shaderagua gif](https://github.com/godotengine/godot/assets/19652075/c53bd667-8081-43c2-a517-141f22fe7be3)


### Steps to reproduce

Watch the gif

### Minimal reproduction project (MRP)

...
Repository: neovim
Issue: The "other end" of a visual selection does not move when using `nvim_buf_set_text`
Labels: bug,api,complexity:low,marks,visual-mode

### Problem

When using `nvim_buf_set_text` to insert text in front of a visual selection, the "other end" does not move, it stays on the same column. The cursor, on the other hand, does move in a reasonable way.

This is causing problems in our [collaborative editing project](https://github.com/ethersync/ethersync). We could probably fix it on our end, but this seems like a Neovim bug.

### Steps to reproduce

- `nvim --clean`
- `i1234<Esc>`
- `:lua vim.defer_fn(function() vim.api.nvim_buf_set_text(0,0,0,0,0,{"0"}) end, 3000)` (This will insert a 0 in front of the line in 3 seconds.)
- While the timeout is running, `hhvl` to create a visual selection containing the "23".

Result: The cursor moves one column to the right (and stays on the 3), but the "other end" of the visual selection stays on the second column (and thus moves from the 2 to the 1).

### Expected behavior

The "other end" should also be pushed to the right, like the cursor.

### Neovim version (nvim -v)

0.10.0

### Vim (not Nvim) behaves the same?

Vim doesn't have nvim_buf_set_text

### Operating system/version

NixOS unstable

### Terminal name/version

kitty 0.35.1

### $TERM environment variable

xterm-kitty

### Installation

nixpkgs
Repository: pytorch
Issue: [ONNX]: Fail to export onnx when GroupNorm input shape rank=2
Labels: module: onnx,triaged

### 🐛 Describe the bug

### If the Group Normalization (GN) layer accepts two-dimensional inputs, export2ONNX will fail.

```
import torch
import torch.nn as nn

class GNModel(nn.Module):
    def __init__(self):
        super(SimpleGNModel, self).__init__()
        num_groups = 8
        num_channels = 32
        self.gn = nn.GroupNorm(num_groups=num_groups, num_channels=num_channels)
    def forward(self, x):
        x = self.gn(x)
        return x 

model = GNModel()
x = torch.randn(256, 32)

torch.onnx.export(
    model, x, 'gn_model.onnx',
    input_names=['input'],
    output_names=['output'],
)
```

----------------------------------------------
```
Traceback (most recent call last):
  File "/home/hjp/anaconda3/lib/python3.9/site-packages/torch/onnx/symbolic_opset9.py", line 6018, in group_norm
    mul(g, norm, symbolic_helper._unsqueeze_helper(g, weight, axes)),
  File "/home/hjp/anaconda3/lib/python3.9/site-packages/torch/onnx/symbolic_helper.py", line 844, in _unsqueeze_helper
    if _is_constant(axes_i[0]):
IndexError: list index out of range
```

_Maybe the group_norm unsqueeze error and how to fix it?_

### Versions

PyTorch version: 2.0.1+cu117
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A
Repository: godot
Issue: Code collapse leaves parts of code out
Labels: enhancement,discussion,topic:editor

### Tested versions

v3.6.beta5.official [2a347ab86]

### System information

w10 64

### Issue description

![shaderagua gif](https://github.com/godotengine/godot/assets/19652075/f3b26381-e871-43d8-9fe5-1b87fd5e8688)


### Steps to reproduce

...

### Minimal reproduction project (MRP)

...
Repository: kubernetes
Issue: Pod dnsConfig.searches should be allowed setting "search" to a dot.
Labels: kind/bug,sig/network,triage/accepted

### What happened?

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: test
  namespace: default
spec:
  containers:
  - image: alpine
    command:
      - sleep
      - "10000"
    imagePullPolicy: Always
    name: alpine
  dnsPolicy: None
  dnsConfig:
    nameservers:
    - "192.168.0.10"
    searches:
    - .
    - default.svc.cluster.local
    - svc.cluster.local
    - cluster.local
    options:
    - name: ndots
      value: "3"
```

Applying this pod YAML to Kubernetes will result in an error like this:

```shell
The Pod "test" is invalid: spec.dnsConfig.searches[0]: Invalid value: "": 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])?)*')
```


It seems unreasonable because the /etc/resolv.conf file allows a configuration with a dot, and it can be very meaningful in specific scenarios.



### What did you expect to happen?

no error

### How can we reproduce it (as minimally and precisely as possible)?

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: test
  namespace: default
spec:
  containers:
  - image: alpine
    command:
      - sleep
      - "10000"
    imagePullPolicy: Always
    name: alpine
  dnsPolicy: None
  dnsConfig:
    nameservers:
    - "192.168.0.10"
    searches:
    - .
    - default.svc.cluster.local
    - svc.cluster.local
    - cluster.local
    options:
    - name: ndots
      value: "3"
```
apply this yaml to kubernetes

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
# paste output here
```

</details>


### Cloud provider

<details>
any
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</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: PowerToys
Issue: Keyboard Manager - Key remapping - missing key and missing info
Labels: Issue-Docs,Needs-Triage

### Provide a description of requested docs changes

In the list of keys (drop down menu), 
1) the "+" (plus) key appears twice, but one don't know which belongs to the numpad.
2) the "*" (multiply) key appears once, the numpad "*" is missing.
3) can the "numpad" keys be grouped in the dropdown menu, this would be easier to find them
Repository: PowerToys
Issue: Crop and lock SAVE button
Labels: Needs-Triage,Product-CropAndLock

### Description of the new feature / enhancement

The crop an lock tool seem perfect, but it doesnt have a SAVE button somewhere.


### Scenario when this would be used?

When crop and locked a part of the screen I would like to save that as a image

### Supporting information

_No response_
Repository: ant-design
Issue: Tree树形控件的draggable中对象参数中的icon属性能否以接收参数的函数形式返回
Labels: help wanted,💡 Feature Request,Inactive

### What problem does this feature solve?

可以条件性的自定义icon组件 或者 有条件性的显示

### What does the proposed API look like?

icon?:  (node: DataNode) => React.ReactNode | false

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: PowerToys
Issue: Quick peek also in file dialogs and with more files compatible
Labels: Needs-Triage

### Description of the new feature / enhancement

I really like the quick peek feature that the powertoys supply. 
It would be great:
1. If it also works within a file dialog window
2. Compatibility can also be added for other files. Like for example the possibility to preview a document from libreoffice 

### Scenario when this would be used?

1. When attaching a file to a e-mail you get a 'file dialog'. In that scenario 'quick peek' doesnt work
2. When the file type is not generic, it cannot be previewed. maybe add the possible for developers to do that. for example make it possible for libreoffice documents 

### Supporting information

_No response_
Repository: PowerToys
Issue: MWB one sided timeout
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.82.0

### Installation method

PowerToys auto-update

### Running as admin

None

### Area(s) with issue?

Mouse Without Borders

### Steps to reproduce

my network consists of (left to right): 
- work laptop i'm trying to control
- Desktop PC that has the keyboard and mouse i wanna use
- personal laptop (turned off)

all devices run windows 10 22H2

problems: 
- occasional disconnects.
- sometimes while it is working, trying to switch back to the Desktop PC (source) loops my mouse cursor to the other side of the target machine.
- target machine is highlighted in pink (timeout) even when MWB works both ways (tooltips for the device status would be cool btw)

temporary fix: refreshing the connections via the button in powertoys under the device layout on the target machine (work laptop).

when it breaks: 
- random time intervals
- refreshing the connections on the source machine (Desktop PC)

target machine:
![grafik](https://github.com/microsoft/PowerToys/assets/59397795/0f7b72cb-0465-4b2f-8adb-679532e2620b)
source machine:
![grafik](https://github.com/microsoft/PowerToys/assets/59397795/c7bbec81-23fe-4e51-87ec-5cee507e257a)


### ✔️ Expected Behavior

a stable connection

### ❌ Actual Behavior

cursor position wrongfully wrapping (inconsistently) and random disconnects

### Other Software

some stuff that might be affecting it:
sophos connect VPN (tested with and without active connection, but always running in the background)
Repository: PowerToys
Issue: Add PowerToys in context menu
Labels: Idea-Enhancement,Area-User Interface,Area-Context Menu

### Description of the new feature / enhancement

In context menu it should have a POWERTOYS submenu and bring them all features (or context) under it. Also we should have the chance to put all context menu of POWERTOYS features under this submenu in order to shrink right click menu.

Somehow irrelevant (maybe its another request), you should create a new feature to remove or add context menu items from your right click menu.

### Scenario when this would be used?

Productivity and easy navigation

### Supporting information

Like filemenu tools, also like shell-x and of course this: https://github.com/microsoft/PowerToys/issues/31716
Repository: bitcoin
Issue: Fee Estimation via Fee rate Forecasters tracking issue
Labels: TX fees and policy

This is a tracking issue for an effort to add Fee Estimation with Forecasters (Mempool-Based Fee rate Forecaster) to Bitcoin Core.

For the conceptual motivation behind this work, see issue #27995 and the previous discussion on Delving Bitcoin: [Mempool-Based Fee Estimation on Bitcoin Core](https://delvingbitcoin.org/t/mempool-based-fee-estimation-on-bitcoin-core/703).

### What to Review

- #31664

### Roadmap

- [x] #30391
- [ ] #31664
- [ ] Create `estimatefee` RPC and Functional Test
- [ ] Add Fee Estimation Traces
- [ ] Add Feature to the Wallet

### Complete Feature

- #30157



### Future Plans for Fee Estimation with Forecasters after the [Cluster Mempool Project](https://github.com/bitcoin/bitcoin/issues/30289)

- Add sanity checks to ensure it is safe to use mempool-based fee estimation without falling back to `BlockPolicyEstimator`, using ideas from [#27995](https://github.com/bitcoin/bitcoin/issues/27995)
- Use heuristics from the mempool to target a higher/lower percentile in the mempool forecaster

<details>
<summary>
<em>Related Work on fee estimation</em>
</summary>


### Improving the current `BlockPolicyEstimator` in the Short Term

- #30079
- #30275:
- #30525
  - [Delving Bitcoin Analysis](https://delvingbitcoin.org/t/bitcoind-policy-estimator-modes-analysis/964/1)
 
### Improving the current `BlockPolicyEstimator` after the [Cluster Mempool Project](https://github.com/bitcoin/bitcoin/issues/30289)
- Make `BlockPolicyEstimator` package-aware: [Delving Bitcoin Post](https://delvingbitcoin.org/t/package-aware-fee-estimator-post-cluster-mempool/312/)

### Previous Refactors

- [x] #28368
- [x] #29013
</details>
Repository: ollama
Issue: Endpoints should return 405 Method Not Allowed rather than 404 for unsupported methods
Labels: bug,api

### What is the issue?

As mentioned on Discord, it's no big deal, but sometimes users make mistakes like opening `http://127.0.0.1:11434/api/chat` in a browser, which defaults to the GET method, and are served a `404` page.

As the resource presumably does exist and works with POST requests, returning a `405` *Method Not Allowed* would be a more accurate response to the user's error.

I have tested this on the `/api/chat` and `/api/generate` endpoints, as well as the `/api/ps` endpoint with a POST request, but I presume most, if not all, endpoints return a `404` page when queried with the wrong method.

Steps to reproduce:
```
curl -v http://127.0.0.1:11434/api/chat
*   Trying 127.0.0.1:11434...
* Connected to 127.0.0.1 (127.0.0.1) port 11434
> GET /api/chat HTTP/1.1
> Host: 127.0.0.1:11434
> 
< HTTP/1.1 404 Not Found
...

curl -v 127.0.0.1:11434/api/ps -d '{}'
*   Trying 127.0.0.1:11434...
> POST /api/ps HTTP/1.1
> Content-Length: 2
> Content-Type: application/x-www-form-urlencoded
> 
* upload completely sent off: 2 bytes
< HTTP/1.1 404 Not Found
```

Cheers, Pat

### OS

Linux

### GPU

AMD

### CPU

AMD

### Ollama version

0.1.46
Repository: deno
Issue: Bug: Bad resource ID
Labels: bug,node compat

```sh
Task test run-s lint-report tap

> json5@2.2.3 lint-report
> eslint .

ERROR: Bad resource ID
```

## Steps to reproduce

1. Clone https://github.com/json5/json5
2. Run `npm i`
3. Run `DENO_FUTURE=1 deno task test`

Version: Deno 1.44.4 (git 147411e64)
Repository: pytorch
Issue: [feature request] [discussion] Baseline ONNX interpreter / executor in python / PyTorch  
Labels: module: onnx,triaged,OSS contribution wanted

### 🚀 The feature, motivation and pitch

It is sometimes useful for basic perf testing to be able to execute a third-party given ONNX file in different backends. Currently there exist several such executors: ORT, TRT and maybe some others specific for some hardware.

With Inductor / autotuning becoming more powerful, the option of having Python / PyTorch at server-side inference side is becoming more relevant, especially because PyTorch evolves very fast and is more flexible.

It is quite easy to benchmark all these options when the original model is provided as PyTorch code. But when the model is provided as some third-party exported ONNX file (or if the source code is not available anymore or was produced by some legacy code which is hard to run), it is not as easy. And having some basic ONNX interpreter using PyTorch as a backend is quite useful (currently there exist trt/polygraphy project for benchmarking the same ONNX model with TRT vs ORT, so adding in there some baseline of torch.compile/Inductor-based ONNX executor would be nice). If I understand correctly, Caffe2 at some point was also such an ONNX interpreter.

Some different ways such an ONNX backend can be (and all of them are useful in some context):
1) eager interpreter, traversing and executing an ONNX graph
2) graph transformation from ONNX to FX graph
3) from a ONNX graph - generation of Python code using PyTorch

Option (3) would be easiest to debug, but also a code printout could possibly be generated from an FX graph?

A clear burden would be staying in sync with ONNX spec/opset, but as ONNX is more restrictive it probably should be bearable?

---

Original question: https://discuss.pytorch.org/t/onnx-interpreter-using-pytorch-as-a-backend/203825

### Alternatives

_No response_

### Additional context

_No response_