sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: cmd+click behavior for Goto Definition and a Document Link
Labels: bug,editor-symbols,workbench-link

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->

Hi 👋 

While implementing two features for the [vscode-terraform](https://github.com/hashicorp/vscode-terraform/) extension, we've encountered some unexpected behavior when using cmd+click on a range of text.

Our language server based implementation returns a link via [`textDocument/documentLink`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentLink) and a valid [`textDocument/definition`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition) for the same text range. 

### Link

In our case, we link to the documentation for a module fetched from a remote source. This works as expected and opens a browser when clicking on the link.

![2022-04-14 13 12 54](https://user-images.githubusercontent.com/45985/163384306-0bda0e36-721e-4765-8238-a777e373d44f.gif)

### Goto Definition

We implemented goto definition for a module source, which takes a user to the local implementation of a module. This works as expected and opens the local file in a new editor tab.

![2022-04-14 13 11 50](https://user-images.githubusercontent.com/45985/163381255-5c902585-ceaf-405a-9463-ed8597d12134.gif)

### Combination of both features

Each feature works as expected on its own, either using the context menu / hover or cmd+link on the text range.

When both features are available for a text range, cmd+click will execute goto definition **and** open the link. This results in a browser window opening the link while VS Code opens the local file in a new editor tab in the background.

![2022-04-14 13 13 51](https://user-images.githubusercontent.com/45985/163384651-b5f7bc71-0ad2-4e7b-a70c-dea4753bb865.gif)

Is this the intended behavior? It _feels_ off, and I would expect that one of the features "wins" when using cmd+click while both are still usable via the context menu / hover.
Repository: vscode
Issue: filename of numbers without extension is classified as JavaScript depending on content
Labels: bug,languages-guessing

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: Version: 1.67.0-insider (user setup)  
  Commit: a7a7f209ade96c516ce3cd9b330aa8c3db816223  
  Date: 2022-04-14T05:15:18.304Z
- OS Version: Windows 8.1

Steps to Reproduce:

1. Create a file named `007` with the content
```
foobar: ['foobar']
```
2. All file icons are the text icon and status bar is `Plain Text`
3. Add `,''` so the file now looks like
```
foobar: ['foobar','']
```
4. Now all file icons are replaced with `JS` icon except the `OPEN EDITORS` view (still text icon) and status bar is `JavaScript`. Also now the bracket pair colorization is enabled.
5. Remove `,''`
6. It stays JavaScript
7. Save and Close the file
8. Open the file
9. Now the explorer icon changes back to text icon and all is the same as in step 2

The languageID is determined by the file extension and should be PlainText if no file extension given.

But the languageID can change after opening depending on the content.

It does not happen for any other filename but `numbers only`.

I tried to recreate with other file names but it works as should be (stay PlainText) for filenames `008`, `4321`.

It also happens for filenames `006`, `1234`.
Repository: kubernetes
Issue: Need benchmarks for iptables proxy golang performance hacks
Labels: sig/network,help wanted,priority/important-longterm

A long time ago @wojtek-t did some optimizations to `pkg/proxy/iptables/proxier.go` around memory allocations (#46033, #46350).

Some of our refactorings since then have probably regressed this somewhat. OTOH, there have probably also been golang improvements since then that make some of the fiddly manual bits less necessary...

There are changes I would like to make that I have no idea of the performance impact of. eg:

```
@@ -1113,7 +1113,7 @@ func (proxier *Proxier) syncProxyRules() {
                                // in case we cross nodes.
                                proxier.natRules.Write(
                                        "-A", string(externalTrafficChain),
-                                       "-m", "comment", "--comment", fmt.Sprintf(`"masquerade traffic for %s external destinations"`, svcNameString),
+                                       utilproxy.Comment("masquerade traffic for %s external destinations", svcNameString)),
                                        "-j", string(KubeMarkMasqChain))
                        } else {
                                // If we are only using same-node endpoints, we can retain the
```

It would be good to have some sort of benchmark we could use to test changes against...

/sig network
/priority important-longterm
Repository: material-ui
Issue: [Select] Overlapping label border with the InputLabel
Labels: bug 🐛,component: select,package: material-ui

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Select label overlapping border when the InputLabel has shrink property and the current value of select is ""

### Expected behavior 🤔

The select label must not overlap border when the InputLabel has shrink property and the current value of select is ""

### Steps to reproduce 🕹

[https://codesandbox.io/s/basicselect-material-demo-forked-z9ugvp?file=/demo.tsx](https://codesandbox.io/s/basicselect-material-demo-forked-z9ugvp?file=/demo.tsx)

### Context 🔦

_No response_

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
  System:
    OS: macOS 12.3.1
  Binaries:
    Node: 16.13.1 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.1.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 100.0.4896.88
    Edge: Not Found
    Firefox: Not Found
    Safari: 15.4
  npmPackages:
    @emotion/react: ^11.8.1 => 11.8.1 
    @emotion/styled: ^11.8.1 => 11.8.1 
    @mui/base:  5.0.0-alpha.69 
    @mui/icons-material: ^5.4.2 => 5.4.2 
    @mui/lab: ^5.0.0-alpha.69 => 5.0.0-alpha.69 
    @mui/material: ^5.4.2 => 5.4.2 
    @mui/private-theming:  5.4.2 
    @mui/styled-engine:  5.4.2 
    @mui/system:  5.4.2 
    @mui/types:  7.1.2 
    @mui/utils:  5.4.2 
    @types/react: ^17.0.39 => 17.0.39 
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 
    typescript: ^4.5.5 => 4.5.5 
```
</details>
Repository: godot
Issue: GIProbe does not function properly when used on Gridmaps.
Labels: bug,topic:rendering,topic:3d

### Godot version

v3.5.beta3.official

### System information

GLES3 - All supported operating systems/GPU's.

### Issue description

This is a compilation of my findings from some other issue's discussing problems with GridMaps and GIProbe lighting.
I thought it'd be a good idea to make a separate issue detailing this information, for clarity, as its scattered in the 2 different issues.

Sources: #18056, #18836

[As explained here, ](https://github.com/godotengine/godot/issues/18056#issuecomment-439538543) there is a very clear difference to how GIProbe looks on regular MeshInstances and on GridMaps.

My hunch is that for whatever reason, perhaps because of a bug or an oversight, GIProbe is not applying the proper Bias value on GridMaps, [which I explain further here](https://github.com/godotengine/godot/issues/18836#issuecomment-1097964363).

The GIProbe lighting in the scene with just MeshInstances starts to look exactly the same as the one with GridMaps, when you turn the Bias in GIProbe down to 0.
It's as if the Bias on GridMaps is always 0, regardless of what is actually set in the GIProbe.

I hope this can be fixed because its quite a bummer GIProbe currently does not work with GridMaps.



### Steps to reproduce

1. Download the MRP and compare the 2 different scenes provided.
2. In the scene that demonstrates only MeshInstances, select the GIProbe node and turn down the Bias value to 0.

### Minimal reproduction project

[Minimal Reproduction Project](https://github.com/godotengine/godot/files/2591712/gridmap_gi_issue.zip)
Repository: pytorch
Issue: Different result with JIT
Labels: oncall: jit

### 🐛 Describe the bug

```python
import torch
# Outputs 1,1,1 if the following line is commented-out, and 1,1,2 if it is not
#@torch.jit.script
def test():
    a = torch.zeros(1)
    b = torch.zeros(1)
    c = torch.zeros(1)
    n = 3
    x = torch.ones(n)
    
    for i in range(n):
        a, b, c = c, a, b
        a[0] += x[i]
        print(a[0].item())

test()
```

### Versions

I ran with PyTorch 1.11.0 on a CPU.

```
PyTorch version: 1.11.0+cpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: 10.0.0-4ubuntu1 
CMake version: version 3.16.3
Libc version: glibc-2.10

Python version: 3.7.3 (default, Mar 27 2019, 22:11:17)  [GCC 7.3.0] (64-bit runtime)
Python platform: Linux-5.13.0-39-generic-x86_64-with-debian-bullseye-sid
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] botorch==0.1.0
[pip3] gpytorch==0.3.2
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.20.3
[pip3] numpydoc==0.9.2
[pip3] pytorch-lightning==0.9.0rc6
[pip3] torch==1.11.0+cpu
[pip3] torchaudio==0.11.0+cpu
[pip3] torchvision==0.12.0+cpu
[conda] blas                      1.0                         mkl  
[conda] botorch                   0.1.0                    pypi_0    pypi
[conda] cpuonly                   2.0                           0    pytorch
[conda] gpytorch                  0.3.2                    pypi_0    pypi
[conda] mkl                       2020.1                      217  
[conda] mkl-include               2019.3                      199    anaconda
[conda] mkl-service               2.3.0            py37he904b0f_0  
[conda] mkl_fft                   1.0.15           py37ha843d7b_0  
[conda] mkl_random                1.1.1            py37h0573a6f_0  
[conda] mypy-extensions           0.4.3                    pypi_0    pypi
[conda] numpy                     1.20.3                   pypi_0    pypiz
[conda] numpy-base                1.18.1           py37hde5b4d6_1  
[conda] numpydoc                  0.9.2                      py_0  
[conda] pytorch-lightning         0.9.0rc6                 pypi_0    pypi
[conda] pytorch-mutex             1.0                         cpu    pytorch
[conda] torch                     1.10.0+cpu               pypi_0    pypi
[conda] torchaudio                0.11.0+cpu               pypi_0    pypi
[conda] torchvision               0.12.0+cpu               pypi_0    pypi
```
Repository: deno
Issue: `deno test --coverage` only includes files for which tests exist
Labels: bug,testing

**Description**
When running `deno test --coverage` some files are not included in the resulting JSON files.
As a developer I also want to see completely uncovered files in my codecov report.

**Reproduction**
```bash
git clone https://github.com/dhardtke/prandium.git
cd prandium
deno test --coverage=./cov --unstable --allow-all
grep -r "index.controller.ts" cov
```

`index.controller.ts` is not tested (yet) and does not appear in the JSON files and the resulting lcov report.

**Possible Workaround**
A workaround might be to explicitly provide the list of all files to `deno test`, regardless of whether they include tests or not.

**Side Note**
What's odd is that I had a couple of executions of `deno test --coverage` where it did generate JSON files for the `index.controller.ts` but I am no longer able to reproduce this behavior.
Repository: flutter
Issue: Verify exported symbols on engine PR presubmit
Labels: engine,P3,team-engine,triaged-engine

This would prevent errors like: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20iOS%20Engine%20Release/12929/overview propagating post-merge.
Repository: pytorch
Issue: Fix workaround `__module__` used to appease public binding checks
Labels: triaged

This issues number is used to easily track quick fix for `__module__` for submodules that needs a broader fix.
You should reference to it via `TODO: Fix via https://github.com/pytorch/pytorch/issues/75798` next to the workaround to make sure they remain easily searchable.
Repository: node
Issue: Investigate flaky test-http-server-request-timeout-keepalive
Labels: flaky-test

### Test

`test-http-server-request-timeout-keepalive`

### Platform

FreeBSD, macOS

### Console output

```console
17:13:37 not ok 1424 parallel/test-http-server-request-timeout-keepalive
17:13:37   ---
17:13:37   duration_ms: 3.487
17:13:37   severity: fail
17:13:37   exitcode: 1
17:13:37   stack: |-
17:13:37     node:assert:123
17:13:37       throw new AssertionError(obj);
17:13:37       ^
17:13:37     
17:13:37     AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
17:13:37     + actual - expected
17:13:37     
17:13:37     + 'HTTP/1.1 200 OK\r\n' +
17:13:37     +   'Content-Type: text/plain\r\n' +
17:13:38     +   'Date: Thu, 14 Apr 2022 16:13:37 GMT\r\n' +
17:13:38     +   'Connection: close\r\n' +
17:13:38     +   'Transfer-Encoding: chunked\r\n' +
17:13:38     +   '\r\n' +
17:13:38     +   '0\r\n' +
17:13:38     +   '\r\n'
17:13:38     - ''
17:13:38         at Socket.<anonymous> (/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd12-x64/test/parallel/test-http-server-request-timeout-keepalive.js:82:12)
17:13:38         at Socket.<anonymous> (/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd12-x64/test/common/index.js:438:15)
17:13:38         at Socket.emit (node:events:539:35)
17:13:38         at endReadableNT (node:internal/streams/readable:1344:12)
17:13:38         at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
17:13:38       generatedMessage: true,
17:13:38       code: 'ERR_ASSERTION',
17:13:38       actual: 'HTTP/1.1 200 OK\r\n' +
17:13:38         'Content-Type: text/plain\r\n' +
17:13:38         'Date: Thu, 14 Apr 2022 16:13:37 GMT\r\n' +
17:13:38         'Connection: close\r\n' +
17:13:38         'Transfer-Encoding: chunked\r\n' +
17:13:38         '\r\n' +
17:13:38         '0\r\n' +
17:13:38         '\r\n',
17:13:38       expected: '',
17:13:38       operator: 'strictEqual'
17:13:38     }
17:13:38     
17:13:38     Node.js v18.0.0-pre
17:13:38   ...
```


### Build links

- https://ci.nodejs.org/job/node-test-commit-freebsd/43657/
- https://ci.nodejs.org/job/node-test-commit-osx/44529/


### Additional information

Test was recently updated by https://github.com/nodejs/node/pull/41263.

cc @ShogunPanda
Repository: go
Issue: sync: add more randomization to Pool with race detector
Labels: RaceDetector,NeedsInvestigation,FeatureRequest,compiler/runtime

`sync.Pool` is an easy data structure to use incorrectly.

Currently the `Pool` randomly drops items in `race` mode.
We should add additional non-determinism such as:
* For the per-processor cache, randomly select an element (rather always taking the head).
* Randomly steal from a different processor's cache.

This will slow down the implementation, but the point of `race` is to detect bugs, not have the best performance.
Repository: electron
Issue: [Bug]: 2nd call to showMessageBox() fails if it's immediately after 1st call
Labels: platform/windows,bug :beetle:,status/confirmed,has-repro-gist,25-x-y,27-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

18.0.4

### What operating system are you using?

Windows

### Operating System Version

Windows 10 version 21H2

### What arch are you using?

x64

### Last Known Working Electron version

Unknown

### Expected Behavior

Calling `showMessageBox()` twice should generate 2 dialog boxes.

### Actual Behavior

If you call `showMessageBox()` twice (essentially at the same time; I think the calls have to be in the same moment of the main process event loop) the 2nd call fails to work.

Note this only happens the first time you do it. Subsequent calls work correctly.

### Testcase Gist URL

https://github.com/rooklift/electron_dialog_test

### Additional Information

_No response_
Repository: rust
Issue: `fn std::mem::drop()` not accepted as argument of type `fn(&Arg)` 
Labels: T-compiler,A-inference,C-bug

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
struct Arg(i8);

fn takes_cb(cb: fn(&Arg)) {}


fn takes_arg(a: &Arg) {}

fn main() {
    takes_cb(takes_arg); // this is ok
    takes_cb(|_|( )); // this is ok
    takes_cb(drop); // this is an error
}
```

I expected to see this happen:
I expect the code to compile. It looks like this should work, because drop should be more or less equivalent to toilet closure, it just has generic argument, but without any bounds, so it seems like it should be accepted here.

Instead, this happened: 

Code doesn't compile with:
```
error[E0308]: mismatched types
   --> crates/legacy-zebra/src/game.rs:315:14
    |
315 |     takes_cb(drop);
    |              ^^^^ one type is more general than the other
    |
    = note: expected fn pointer `for<'r> fn(&'r Arg)`
               found fn pointer `fn(&Arg)`
```


### Meta
`rustc --version --verbose`:
```
rustc 1.60.0-nightly (75d9a0ae2 2022-02-16)
binary: rustc
commit-hash: 75d9a0ae210dcd078b3985e3550b59064e6603bc
commit-date: 2022-02-16
host: x86_64-unknown-linux-gnu
release: 1.60.0-nightly
LLVM version: 13.0.0
```
Repository: storybook
Issue: How to navigate to different tabs within a story
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**
Within my story, I want to provide a link that navigates to either the Canvas Tab or the Docs Tab, without having to use the toolbar. I currently cannot find any documentation on how to do this or any discussions, and using an anchor causes the window to refresh. Is this possible at all to do? Thanks.

**To Reproduce**
* Clone [this repo](https://github.com/jimmy-e/storybook-debug-v2)
* Checkout the branch `navigation_debug`
* Run `yarn install && yarn run storybook`
* Test the 'CANVAS' and the 'DOCS' links in the Title storybook component.

**Components**
Title.tsx:
```js
import React from 'react';

export interface TitleProps {
  /** Title contents */
  label: string;
}

/** Primary UI component for user interaction */
export const Title = ({ label }: TitleProps) => <h1>{label}</h1>;
```

Title.stories.tsx:
```js
import React from 'react';
import { Meta, Story } from '@storybook/react/types-6-0';
import { Title as TitleComponent, TitleProps } from './Title';

export default {
  component: TitleComponent,
} as Meta;

export const Title: Story<TitleProps> = (args) => {
  return (
    <>
      <div style={{ display: 'flex', flexDirection: 'column'}}>
        <a href="/?path=/story/title--title">CANVAS</a>
        <a href="/?path=/docs/title--title">DOCS</a>
      </div>
      <TitleComponent label="sample title" {...args} />
    </>
  );
}
```
Repository: node
Issue: performance.timerify(fn) behave inconsistently for sync/async functions
Labels: confirmed-bug,perf_hooks

### Version

master branch

### Platform

All

### Subsystem

perf_hooks

### What steps will reproduce the bug?

```js
function f1() { throw new Error() }
async function f2() { throw new Error() }
let h1 = perf_hooks.createHistogram()
let h2 = perf_hooks.createHistogram()
let g1 = perf_hooks.performance.timerify(f1, {histogram: h1})
let g2 = perf_hooks.performance.timerify(f2, {histogram: h2})
g1()
await g2()
h1.count === h2.count // expect true, actual false
```

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

Always

### What is the expected behavior?

Timerified functions should behave consistently for whether trigger `histogram.record`.

### What do you see instead?

Currently, normal function would not trigger `histogram.record` if throw; but async function (or any function which return promise) would.

### Additional information

Currently, the code is like `if (typeof result?.finally === 'function') return result.finally(...)`. It should use `result.then` instead, so the behavior will consistent with non-thenable result. Even we want to always trigger `histogram.record`, we should not use `finally` because thenable is only require to have `then` method, not `finally` method.