sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: `meta_variable_misuse` trips on `${count($foo)}` outside of a repetition
Labels: A-diagnostics,A-macros,T-compiler,D-papercut,F-macro_metavar_expr

### Code

([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8df817d7ff91b47356b31cca3fe93a10), updated 2024-01-25 to account for a change to the syntax of macro metavariable expressions)
```Rust
#![feature(macro_metavar_expr)]
#![warn(meta_variable_misuse)]

macro_rules! foo {
    ($($id:ident),* $(,)?) => {
        ${count($id)}
    };
}

fn main() {
    assert_eq!(foo!(a, b, c), 3);
}
```


### Current output

```
warning: variable 'id' is still repeating at this depth
 --> src/main.rs:6:10
  |
5 |     ($($id:ident),* $(,)?) => {
  |                   - expected repetition
6 |         ${count($id)}
  |          ^^^^^^^^^^^^
  |
note: the lint level is defined here
 --> src/main.rs:2:9
  |
2 | #![warn(meta_variable_misuse)]
  |         ^^^^^^^^^^^^^^^^^^^^
```


### Desired output

No diagnostics should be emitted.

### Rationale and extra context

This code builds and runs just fine; `${count($foo)}` doesn't have to be in a repetition of `$foo`.


### Anything else?

@rustbot modify labels +A-macros +D-papercut +F-macro-metavar-expr
Repository: deno
Issue: `stdin.read` (and `stdin.readSync`) corrupt non-ASCII input on Windows
Labels: bug,windows

`stdin.read` (and `stdin.readSync`) corrupt non-ASCII input on Windows.

To reproduce:

```js
const c = new Uint8Array(6);
Deno.stdin.read(c).then(() => console.log(c));
```

Then, enter a non-ASCII character. The resulting bytes will be corrupted on Windows.

Examples, with trailing LF/CRLF/null bytes truncated:

Input | Expected | Actual | Decoded as UTF-8
-|-|-|-
ÿ | `[195, 191]` | `[152]` | "�" (Invalid char)
Ā | `[196, 128]` | `[65]` | "A"
ā | `[196, 129]` | `[97]` | "a"
啊 | `[229, 149, 138]` | `[63]` | "?"
🦄 | `[240, 159, 166, 132]` | `[63, 63]` | "??"

Expected results are the UTF-8 bytes. Results on Linux are as expected.
Repository: kubernetes
Issue: The program panics with "channel full" when I frequently change resources using fake client
Labels: sig/api-machinery,kind/feature,triage/accepted

### What would you like to be added?

I use fake client to create and modify simulated resources.When the amount of data is large and changes frequently, it will cause the program to panic.

<img width="1307" alt="image" src="https://user-images.githubusercontent.com/50443671/225799808-7fe7356a-94ad-4263-a14a-d815cf42b330.png">

When I use the fake client to create, modify, or delete resources, the fake client sends events to the tracker. By default, the RaceFreeFakeWatcher struct is used.

<img width="703" alt="image" src="https://user-images.githubusercontent.com/50443671/225799906-8d3259e7-2f28-46ec-8c36-b7c830c93ffd.png">

When the channel is full, it will panic directly.


### Why is this needed?

panic may not be the best solution, sometimes we don't want the program to panic when it have fake client. But currently fake client does not support custom tracker, it is not an interface, it is a default struct. By default, the implementation of ObjectTracker is tracker, and the watchers in the tracker are also default. The default value of wachers is RaceFreeFakeWatcher, and the default value of the channel of RaceFreeFakeWatcher is 100. When it exceeds 100, the program will panic. I want to provide custom watcher capabilities
Repository: stable-diffusion-webui
Issue: [Bug]: can't open gradio link,due to missing index.js
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

use colab(https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) to deploy webui,when launch a gradio link;this link lead a white screen on browser.



### Steps to reproduce the problem

1. use https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb  
2. run all code
3. click gradio lin, get a white screen.
![image](https://user-images.githubusercontent.com/5958865/225802728-e1d481fb-1110-4b80-8055-d6d0aa466bf6.png)

missing index.js

![image](https://user-images.githubusercontent.com/5958865/225802840-c92dad02-69b0-425c-a1fa-84e5d7abc8b4.png)

![image](https://user-images.githubusercontent.com/5958865/225802917-d8cea2f8-fcf8-4c32-be3a-2b9037ceafce.png)



### What should have happened?

open stable-diffusion-webui

### Commit where the problem happens

nope

### What platforms do you use to access the UI ?

MacOS

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
no
```


### List of extensions

no

### Console logs

```Shell
no
```


### Additional information

_No response_
Repository: opencv
Issue: VideoCapture reads incomplete video on Apple arm64
Labels: bug,platform: ios/osx,needs investigation

### System Information

OpenCV version: 4.7.0
Operating System / Platform: Mac mini M2 latest
Compiler & compiler version: GCC 9.3.0

### Detailed description

On mac arm64, the full frame is not available after the video is read, and the dozens of frames at the end are not there

### Steps to reproduce

```c++
cv::VideoCapture cap("demo.mp4");
if (!cap.isOpened())
{
    std::cout << "faild to open video" << std::endl;
    return 0;
}
int total_frame = cap.get(cv::CAP_PROP_FRAME_COUNT);
int real_count =0;
while (true)
{
      cap >> frame;
      if (frame.empty())
      {
          break;
      }
      real_count ++;   
}
// On my test video
// total_frame = 154;
// real_count = 93;
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [x] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: pytorch
Issue: Small learning rate with `capturable=True` causes Adam optimizer to blow up model parameters.
Labels: module: optimizer,triaged

### 🐛 Describe the bug

When setting the `capturable` argument of Adam optimizer to `True`, the call of `optimizer.step` will use the following routine (line 267~ 290 in `torch/optim/adam.py`):
```
        if capturable:
            ......
            step_size = lr / bias_correction1
            step_size_neg = step_size.neg()
            ......
            else:
                denom = (exp_avg_sq.sqrt() / (bias_correction2_sqrt * step_size_neg)).add_(eps / step_size_neg)

            param.addcdiv_(exp_avg, denom)

```
This will cause overflow when `lr` is very small.



### Versions

Below are some relevant version information.
```
PyTorch version: 1.12.0
Python version: 3.8.13 (default, Mar 28 2022, 11:38:47)  [GCC 7.5.0] (64-bit runtime)

Versions of relevant libraries:
[pip3] torch==1.12.0
[conda] pytorch                   1.12.0          py3.8_cuda11.3_cudnn8.3.2_0    pytorch
```

cc @vincentqb @jbschlosser @albanD @janeyx99
Repository: transformers
Issue: Positinal Encoding for T5 family of models
Labels: Feature request

### Feature request

Please create a hook to allow users to modify the T5 family of models and change the default positional embeddings to custom positional embeddings.

### Motivation

I am trying to build a T5 version that takes non-text input, and the traditional positional encodings are getting in the way, and there is no way to switch it off, or to make them learnable parameters, etc.
BART gives limited access to positional encodings, but T5 family gives nearly 0 access.

### Your contribution

If i knew where the positional encoding were calculated and added in to the input_ids, I could create this hook myself
Repository: transformers
Issue: export clip to text encoder and image encoder two onnxs
Labels: New model

### Model description

i want to export clip to text encoder and image encoder two onnx, but it seems can only convert the whole model, how can i seperate clip to two onnx models? 

### Open source status

- [X] The model implementation is available
- [X] The model weights are available

### Provide useful links for the implementation

_No response_
Repository: go
Issue: cmd/compile: mod operator is very slow on intel hardware with int64
Labels: Performance,help wanted,NeedsInvestigation,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go1.20.2 windows/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->

Mod operator is very slow on intel hardware when used on int type.

### What did you expect to see?

Mod operator optimized to handle int types on intel hardwares

### What did you see instead?

The mod operator is very slow when used on int types on intel hardware.
Repository: pytorch
Issue: [Feature Request] Compile compatible Neighborhood Algorithms for large Tensors
Labels: feature,triaged,oncall: pt2

### 🚀 The feature, motivation and pitch

For large tensors, neighborhood algorithms are limited by large memory requirements, for example the squared-distance matrix of KNN.

Speaking from my field of 3D analysis, a pointcloud scan can easily have >100.000 coordinates. A reconstructed scene of 500m can have up to 1 Billion data points. Applying neighborhood algorithms on such data is only possible with specialized frameworks such as PyKeOps or FAISS. To my knowledge, this also affects graph convolutional networks

This request was denied in the past due to compatible frameworks. Now with the introduction of .compile() this has changed.

This request is for .compile() PyTorch native neighborhood algorithms, optimized for very large tensors.

### Alternatives

(Not .compile() compatible)
PyKeOps
Faiss

### Additional context

_No response_

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519 @soumith @ngimel
Repository: stable-diffusion-webui
Issue: Preprocess images. How to put a separator between the description and tags?
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

We get:
a frog with big eyes and a crown on its head, sitting on the ground with a white background, black_eyes, full_body, no_humans, open_mouth, simple_background, white_background

Need like this:
a frog with big eyes and a crown on its head, sitting on the ground with a white background | black_eyes, full_body, no_humans, open_mouth, simple_background, white_background

with separator |

### Proposed workflow

I don't know

### Additional information

_No response_
Repository: tauri
Issue: [bug] macos m1 , using webauthn through native navigator.credentials.create() is not allowed
Labels: type: bug,status: needs triage

### Describe the bug

I am trying to use the webauthn function in my Tauri app, but the native browser function `navigator.credentials.create()` is not working. The integrated console log shows `Unhandled Promise Rejection: NotAllowedError: Operation failed`. However, it works perfectly on Safari (16.3 (18614.4.6.1.6)) and Chrome.

### Reproduction

I followed https://webkit.org/blog/11312/meet-face-id-and-touch-id-for-the-web/ ,and the `test` function will be triggered by clicking a button like this `<div className="row"><button onClick={test}>test</button></div>`.

### Expected behavior

_No response_

### Platform and versions

```text
Environment
  › OS: Mac OS 13.2.1 X64
  › Node.js: 19.7.0
  › npm: 9.5.0
  › pnpm: Not installed!
  › yarn: 1.22.19
  › rustup: Not installed!
  › rustc: 1.67.1
  › cargo: 1.67.0
  › Rust toolchain:
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: go
Issue: x/website: cache-control
Labels: NeedsInvestigation,website

The static assets at go.dev are served without a `cache-control` response header, and are loaded from the server on every page view.

For example,
- https://go.dev/ is 65 requests, 241kB of compressed resources, every time I visit the page,
- https://go.dev/learn/ is 41 requests, 433kB of compressed resources, every time I visit the page.

I suggest we implement an [HTTP caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching) strategy.
Repository: ant-design
Issue: table表格首行支持过滤
Labels: 💄 Design,help wanted,💡 Feature Request,Inactive

### What problem does this feature solve?

参照 
https://blazor.radzen.com/datagrid-simple-filter-menu?theme=standard  
https://www.ag-grid.com/example/
国内常见的列表页由两部分组成
1. 搜索条件区
2. 表格展示区
但是在国外，见过非常好的交互方式，把搜索条件直接放置在表格第一行，这样用户可以像excel一样直接过滤这一列，非常高效方便


### What does the proposed API look like?

allowHeadRowFilter={true}

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: PowerToys
Issue: Exclude certain apps from paste as plain text
Labels: Idea-Enhancement,Needs-Triage,Product-Advanced Paste

### Description of the new feature / enhancement

Certain apps will use their native shortcuts rather than the global shortcut to paste as plain text

### Scenario when this would be used?

Some software such as password managers may already map to the shortcut for paste text. These programs don't have any use for paste unformatted text, so disabling it selectively would prevent functionality from being lost.

### Supporting information

I mapped my shortcut to Ctrl+Shift+V and am using KeepassXC
Repository: excalidraw
Issue: multi-selection allows resizing below min-width of text element
Labels: bug

If you have a box with text (separate elements) and you resize them down, the box is allowed to resize below the min width/height of the selected text. It shouldn't allow to resize below the common minimum size.

First regressed in https://github.com/excalidraw/excalidraw/pull/5560, although current production behaves slightly differently, so a further change to that must have been made elsewhere.

correct behavior: 

https://excalidraw-b1eq7f2dr-excalidraw.vercel.app/#json=E0lK4QZIuinaw3lgwh8H5,wuU0R3AZ6HswfT0NQd3nBw

![excal-min-common-resize-correct](https://user-images.githubusercontent.com/5153846/225873397-8db69f73-ac28-4139-9fc2-8be385354af3.gif)

incorrect behavior:

https://excalidraw-dd7jar5f4-excalidraw.vercel.app/#json=BL0Qqn6r13YoV81-F9EUD,hQIaQIJ0RPoMAH-iip1lfg

![excal-min-common-resize-incorrect](https://user-images.githubusercontent.com/5153846/225873628-731a7916-8618-49aa-95fe-8b46a74456d4.gif)
Repository: excalidraw
Issue: Feature Request: "Scroll/panning border" API option
Labels: enhancement

### Usecase

- with read-only links you can embed scenes into docs, notion etc., we still allow panning on that scene but users may get lost if it pans too far. I would like to create some kind of "Border" which will not allow panning any further so users would not get lost.

### Implementation consideration
- it needs to be in dynamic nature due zooming and "edges" (be able to get into edges)
- still allow panning when you have completely zoomed out but the threshold for blocking it
- maybe some kind of feedback animation instead of "flat" block (?)
- when a user tries to repeatedly "go beyond" display some tooltip/msg (?) 

Behavior like: https://jsoncrack.com/editor
Repository: pytorch
Issue: deprecate integral and boolean dtype support torch.logit and torch.special.logit
Labels: triaged,module: deprecation,module: special

### 🐛 Describe the bug

Valid domain for these functions is (0, 1). So it doesn't make sense to support integral or boolean inputs for them as there are only two valid values (which produce -inf and inf respectively).

Thanks @pmeier for finding this.

More context: https://github.com/pytorch/pytorch/pull/96124#issuecomment-1471973352

### Versions

master

cc @mruberry
Repository: node
Issue: aborting stream using the signal does not close the stream when the from generator never finish
Labels: stream

### Version

v20.0.0-pre (master)

### Platform

Darwin MBP 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64

### Subsystem

_No response_

### What steps will reproduce the bug?

This fails as the `catch` is not called

```js
{
  let reached = false;

  const ac = new AbortController();
  let resolve;
  const promise = new Promise((res) => resolve = res);

  const stream = from((async function *() {
    yield 1;
    await promise;
    reached = true;
  })());

  setTimeout(() => ac.abort(), 1000);
  addAbortSignal(ac.signal, stream);
  stream
    .toArray({ signal: ac.signal })
    .then(common.mustNotCall())
    .catch(common.mustCall((e) => {
      strictEqual(e.name, 'AbortError')
      strictEqual(reached, false);
    }));
}
```

### How often does it reproduce? Is there a required condition?

always

### What is the expected behavior? Why is that the expected behavior?

to close the stream

### What do you see instead?

error:
```
Mismatched <anonymous> function calls. Expected exactly 1, actual 0.
    at Proxy.mustCall (/open-source/node/node-fork/test/common/index.js:407:10)
    at Object.<anonymous> (/open-source/node/node-fork/test/parallel/test-stream-drop-take.js:30:19)
    at Module._compile (node:internal/modules/cjs/loader:1287:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1341:10)
    at Module.load (node:internal/modules/cjs/loader:1145:32)
    at Module._load (node:internal/modules/cjs/loader:984:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

```

### Additional information

If I omit the ``addAbortSignal(ac.signal, stream);`, the `stream.destroy` function is not even called

But when I add the abort signal (`addAbortSignal(ac.signal, stream);`) to the original stream it does get called but still, the test fails.

this is because we get to this line:
https://github.com/nodejs/node/blob/3a648af0f0e5315086c6b5d2bfa90c3804656ca0/lib/internal/streams/from.js#L69

but not to this:
https://github.com/nodejs/node/blob/3a648af0f0e5315086c6b5d2bfa90c3804656ca0/lib/internal/streams/from.js#L70
Repository: rust
Issue: `unused_imports` lints on an import from a crate with a lang item
Labels: A-lints,C-bug,A-suggestion-diagnostics,D-invalid-suggestion,L-unused_imports

When importing an item from a crate, which has a language item defined, `unused_imports` can lint, which makes sense if the item is actually unused, but if you remove this import (run `cargo fix` for example), the code stops working, because if you don't import anything from the crate, the lang item doesn't get defined.

Seems like this issue can also happen with panic handlers and other project-wide items (don't know the proper term here).

Interestingly enough, it seems like importing just the crate `use lib as _` (without `::inner`) doesn't lint, which made me feel like there was a similar issue already, but I wasn't able to find it.

I tried this code:

lib.rs:
```rust
#![feature(lang_items)]
#![no_std]

#[lang = "eh_personality"]
extern "C" fn eh_personality() {}

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! { loop {} }

pub mod inner {}
```

main.rs:
```rust
#![no_std]
#![no_main]

use lib::inner as _;

#[link(name = "c", kind = "dylib")]
extern {}

#[no_mangle]
extern "C" fn main() {}
```

I expected to see this happen: `unused_imports` doesn't fire

Instead, this happened:
```
warning: unused import: `lib::inner as _`
 --> main.rs:4:5
  |
4 | use lib::inner as _;
  |     ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default
```

After running `cargo fix`:
```
The following errors were reported:
error: `#[panic_handler]` function required, but not found

error: language item required, but not found: `eh_personality`
  |
  = note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library
  = help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config`

error: aborting due to 2 previous errors
```

### Meta

`rustc --version --verbose`:
```
rustc 1.68.0-nightly (333ee6c46 2023-01-18)
binary: rustc
commit-hash: 333ee6c466972185973d5097f8b5fb0f9fb13fa5
commit-date: 2023-01-18
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6
```
Repository: storybook
Issue: [Bug]: "Invalid regular expression" in process.env causes build-storybook to crash
Labels: bug,windows

### Describe the bug

It is possible to have values in `process.env` that cause the `build-storybook` command to crash because `template.ts` assumes that the value will be a valid regex.

This code in `node_modules\@storybook\manager-webpack5\dist\cjs\presets\manager-preset.js` has this code:

```javascript
case 9:
  template = _context.sent;
  _context.next = 12;
  return presets.apply('managerHead', (0, _coreCommon.getManagerHeadTemplate)(configDir, process.env));
```

which directly passes `process.env` to `getManagerHeadTemplate`, which in turn passes those values directly to `interpolate`.


### To Reproduce

We had some markdown content similar to `[link](https://github.com/?_a)` which was in an environment variable which somehow led to the error:

> SyntaxError: InvalidRegularExpression: /%[here](https://github.com?_a%/: Unterminated group

I don't know how the trailing `)` was lost but either way, even if we have something that appears to be an invalid regex in our environment variables, we don't expect `build_storybook` to fail.

### System

Windows

### Additional context

_No response_
Repository: terminal
Issue: Finish the SSH profile generator
Labels: Help Wanted,Area-Settings,Product-Terminal,Issue-Task

_maintainer note: hijacking OP to put tasks in here_


Originally tracked in #9031
Added in #14042

```[tasklist]
### Tasks
- [ ] https://github.com/MicrosoftDocs/terminal/issues/641
- [ ] Fix issues that @DHowett found in the parser
- [ ] Something about making the SUI UX easier to use, disable?
```



<hr>

### Windows Terminal version

1.17.1023

### Windows build number

10.0.22621.1413

### Other Software

OpenSSH_for_Windows_8.6p1
LibreSSL 3.4.3

### Steps to reproduce

1. Install Windows Terminal (Preview) through the Microsoft Store
2. Install the OpenSSH client from Windows Optional Features
3. Create a user OpenSSH config file under %userprofile%\.ssh\config:
```
Host myhost  
    HostName something.domain.com  
    User myuser  
    IdentityFile "C:\Users\myuser\myfolder\id_rsa"
```
5. (Optional) Add "disabledProfileSources" : [ ], to settings.json
6. Open Windows Terminal (Preview)

Note: It appears adding "disabledProfileSources" : [ "Windows.Terminal.SSH" ], produces a Value not accepted warning in VsCode as it's not listed in the profiles schema ![DynamicProfileSource](https://github.com/microsoft/terminal/blob/main/doc/cascadia/profiles.schema.json) enum.
![bug](https://user-images.githubusercontent.com/32342099/225904232-c1d4db80-0b7e-45f1-b88b-e6c75e1cf2bf.png)


### Expected Behavior

Docs says that "Windows Terminal version 1.XX+ can dynamically generate profiles to connect to the SSH hosts within your OpenSSH config file"

### Actual Behavior

Nothing happens