sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Modifying a single subpattern in match changes MIR dramatically
Labels: C-enhancement,T-compiler,A-MIR

This is originated from `~const Drop`, but is applicable to non-const functions as well. The problem is best seen as the MIR output for two implementations of `Result::ok` with a minor change: ([play](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=a208ee8b303c7a3cf2685ad9f259c8f8))

```rust
pub fn wildcard<T, E>(res: Result<T, E>) -> Option<T> {
    match res {
        Ok(x) => Some(x),
        Err(_) => None,
    }
}

pub fn bind_to_variable<T, E>(res: Result<T, E>) -> Option<T> {
    match res {
        Ok(x) => Some(x),
        Err(_x) => None,
    }
}
```

I won't post the whole MIR output here, but let me illustrate this issue with a handwritten control flow graph:

```
           wildcard
              |
switch on discriminant for `res` ------------ `Ok(x)`
              |                                 |
            `Err`             Move `x` into return value as `Some(x)`
              |                                 |
Set return value as `None`                      /
              |---------------------------------
              |
switch on discriminant for `res` ------------ `Ok`
              |                                 |
            `Err`                               |
              |                                 |
    `drop(res: Result<T, E>)`                   /
              |---------------------------------
              |
            return



       bind_to_variable
              |
switch on discriminant for `res` ------------- `Ok(x)`
              |                                  |
            `Err`             Move `x` into return value as `Some(x)`
              |                                  |
   Move value in `Err` to `_x`                   |
              |                                  |
        `drop(_x: E)`                            |
              |                                  |
    Set return value as `None`                   /
              |----------------------------------
              |
            return
```

`wildcard` is unexpectedly more complex and performs `switchInt` on `x` for two times instead of one. I think ideally we should always generate MIR as the second graph.

See https://github.com/rust-lang/rust/pull/92433#discussion_r782242057 and [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Exact.20semantics.20for.20match.20and.20drop.20glue.20emitted)
Repository: create-react-app
Issue: PIN YOUR DEPENDENCIES (Or how I broke CRA for everyone today)
Labels: dependencies

### Is your proposal related to a problem?

Sure is. I'm the maintainer of webpack-manifest-plugin and I bricked create-react-app for a few minutes this morning. Turns out that npm had one of those very rare `npm pack` hiccups and a version snuck out to the registry without any dist code.

### Describe the solution you'd like

Pin your dang dependencies, people! This project is big enough and used by enough people (especially the legions of newbies who don't know how to diagnose or triage dependency issues) that this project should not be using transitive dependencies for critical pieces of library architecture. This https://github.com/facebook/create-react-app/blob/221e511730ca51c036c6954a9d2ee7659ff860f9/packages/react-scripts/package.json#L76 should not be transitive, it should be pinned.

CRA won't start up if webpack-manifest-plugin is hosed. And it was. So it was effectively bricked. 

### Describe alternatives you've considered

Pray to the Flying Spaghetti Monster (didn't work)

### Additional context

Given the issues that we've seen recently, and most recently with `colors.js` bricking the world, this seems wise to resolve. I'd bet there are a bunch more critical deps that won't allow CRA to start up should something be awry as well.
Repository: terminal
Issue: Summon window and switch to profile
Labels: Product-Terminal,Issue-Task,Area-Windowing

This is in response to an internal mail thread. I'm trying to read between the lines here, but here's the gist:

These users want different taskbar entries that when clicked, either open the terminal to a specific profile or launch that profile if it's not already running.

Example:

![image](https://user-images.githubusercontent.com/18356694/148972899-4387df87-2d00-40f8-8535-2d97974fddd4.png)

(let's ignore the jumplist entries for now, and focus on the 1, 2, 3 for different profiles)

So, how would that work?

Something like `wt summon --profile foo`?
* `summon` is the `globalSummon` action
* `--profile foo` indicating "look for the nearest pane with the profile foo, and focus that"?
  * If the active pane is that profile, just focus the terminal window
  * If its not, is there a pane in this tab with that profile
  * if not, is there any pane in the window with that profile
  * if not, open a new tab for foo

Closely related to #10279
Repository: PowerToys
Issue: [PT Run][URI/Web Search] small enhancement - single word queries should not be considered URIs
Labels: Idea-Enhancement,Product-PowerToys Run,Run-Plugin

### Description of the new feature / enhancement

Single word queries should not be considered URIs.
currently they are, so the URI plugin's result is the top one:
![image](https://user-images.githubusercontent.com/67976161/148979275-4af2a548-a425-4e4d-a185-a0b584e380eb.png)

This is a small issue but still mildly annoying when you want to quickly search for something.

### Scenario when this would be used?

When quickly searching for a single word term, and there are no relevant results, the web search plugin would be the top one not the URI's.


### Supporting information

_No response_
Repository: rust
Issue: Horizontal overscroll on iOS
Labels: T-rustdoc,O-ios,A-rustdoc-ui

Steps to reproduce:

1. Visit e.g. https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html or https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html on an iPhone in Safari.
2. Press the screen and drag left or right.

Expected result:

No left-right scrolling happens.

Actual result:

Browser applies the "overscroll" effect horizontally, letting the scroll go past the edge of the screen, then bounce back.

This is unpleasant for scrolling long docs. It means that an up-down scroll that is not perfectly vertical can get turned into a horizontal scroll.

According to https://stackoverflow.com/questions/15879710/disabling-horizontal-scroll-on-an-iphone-website it sounds like this happens when some element has horizontal overflow. Worth noting that some shorter pages like https://doc.rust-lang.org/nightly/std/string/trait.ToString.html don't exhibit the same behavior. So presumably there is indeed some horizontal overflow on the really long pages like Vec and Iterator, and we need to figure out where it is.

Tested on an iPhone 7 running iOS 15.2.
Repository: create-react-app
Issue: react-error-overlay uses deprecated method findDOMNode() which shows an error in React.StrictMode
Labels: needs triage,issue: bug report

### Describe the bug

`findDOMNode()` is deprecated and should not be used - see [Official React Docs](https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage).

When using `<React.StrictMode>` the below error appears in the browser console:

![image](https://user-images.githubusercontent.com/38783/148995344-639df001-3660-4149-9c13-5407b56fb6eb.png)

Further investigation of the stack trace finds usage of `findDOMNode` in `node_modules/react-error-overlay/lib/index.js`
Repository: pytorch
Issue: traced module fails on second execution
Labels: oncall: jit

### 🐛 Describe the bug

I have a model that I save usint torch.jit.trace and torch.jit.save. When I load it, and execute it, the first execution works correctly, but the second one fails with the following error

```
RuntimeError                              Traceback (most recent call last)
<ipython-input-25-946d12987c4d> in <module>
----> 1 out = model(inputs)

~/.local/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1100         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1101                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1102             return forward_call(*input, **kwargs)
   1103         # Do not call functions when jit is used
   1104         full_backward_hooks, non_full_backward_hooks = [], []

RuntimeError: _Map_base::at
```

The model consists of a normalizing flow conditioned on a transformer. When tracing the transformer part alone it doesn't causes this error, but when tracing the full model, it does!

### Versions

Checked with torch 1.8.0 and torch 1.10.0. Happens both on CPU and GPU
Repository: PowerToys
Issue: [PT Run][WindowWalker] Window list outdated on reopening PT Run
Labels: Idea-Enhancement,Product-PowerToys Run,Priority-3,Run-Plugin

### Description of the new feature / enhancement

We should update result list for WindowWalker plugin if PT Run is reopened. At the moment the results may contain closed windows if PT Run is reopened and the search results are kept. This can be anoying.

### Scenario when this would be used?

When you reopening PT Run, the results are configured to not erease them and you have recently closed windows.

### Supporting information

We should implement an event message that is thrown on opening PT Run. This will allow us to reexecute the search query if we react to the event in a plugin.
Repository: TypeScript
Issue: Getter/setter support for property signature importing
Labels: Suggestion,Help Wanted,Domain: Completion Lists,Experience Enhancement

# Suggestion

There is the current feature to fill in signatures, I'd like this to explicitly support getters. Current the following:

<img width="824" alt="Screen Shot 2022-01-11 at 12 31 59 pm" src="https://user-images.githubusercontent.com/2193314/149017936-11d51c4d-f364-478e-b7a1-542166220e0d.png">

Will add:

<img width="370" alt="Screen Shot 2022-01-11 at 12 32 05 pm" src="https://user-images.githubusercontent.com/2193314/149017959-5433bbcf-d454-4ab0-916a-a6c3727caba5.png">

I expect it to add the following since I've already typed `get `:

```
get capabilities(): ITerminalCapability[] {
}
```

ie. added `()` and `{\n\n}` and no `;`

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

import, getter, signature

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: godot
Issue: GDScript: empty class definition leads to error somewhere else
Labels: bug,topic:gdscript,confirmed

### Godot version

3.4.2

### System information

Windows 10

### Issue description

**Implementing a script class including an inner class with "pass" as body in one line leads to error some place else.**

I created the inner class with a given name as a temporary placeholder - prior to full implementation - to use it as an argument in other functions.

The error message itself is just misleading as it refers to a place in code which has nothing to do with the error itself.
I know this is a minor thing. It cost me a bit to figure out what the real cause was.


### Steps to reproduce

Inner class definition in single line including pass as body.

class Whatever: pass

```gdscript
# bug_class_one_liner.gd
extends Node2D

# line 07 leads to
# 'error(16,1): The method "to_local" isn't declared in the current class.'
# (line 08 to 09 works - same code including line-break.)
class WorxNot: pass
#class Worx:
#	pass

var var1

var var2

func icon_at(pos: Vector2):
	pos = to_local(pos)
	# other statements
```

leads to error at line "pos = to_local(pos)" in function icon_at().

### Minimal reproduction project

[bug_class_one_liner.zip](https://github.com/godotengine/godot/files/7849833/bug_class_one_liner.zip)
Repository: neovim
Issue: Multiple selections alternative or option for `vim.ui.select()`
Labels: enhancement,lua

### Feature already in Vim?

_No response_

### Feature description

I was wondering if there were plans on either adding a multi-selection function similar to `vim.ui.select()` or an optional argument to `vim.ui.select()` to allow the user to select multiple options.

When used without extensions, the selections could maybe be comma-separated values or another type of delimiter like spaces, and it could return an iterable like a list for the `{on-choice}` function to go through. Hopefully extensions like the [telescope ui select extension](https://github.com/nvim-telescope/telescope-ui-select.nvim) could then pass the user's highlighted (typically through `<tab>`) selections as well. 

This would be handy for any plugin that may wish to iterate through multiple user selections rather than doing one each function call. For example, if a plugin that manages neovim sessions has an option to delete existing sessions from the session directory, and it wishes to use `vim.ui.select()` for the user to select which sessions to delete, the user would currently have to call the function multiple times to delete multiple selections. However, if there were a multi-selection option, the plugin developer could just have the user select all the sessions they wish to delete at once, then iterate through the list and repeatedly call the deletion function in the code.
Repository: go
Issue: runtime: Windows profilem may profile Ms after unminit
Labels: NeedsFix,compiler/runtime

[`profileLoop`](https://cs.opensource.google/go/go/+/master:src/runtime/os_windows.go;l=1265;drc=2580d0e08d5e9f979b943758d3c49877fb2324cb) partially synchronizes with `unminit` via `mp.threadLock`, but it drops `threadLock` prior to `_SuspendThread` and `profilem`.

Thus profiling may race with `dropm`, resulting in `profilem` running on an "extra" M which is no longer in use by Go and whose previous thread is running C code.

In theory, this should result in `gFromSP` returning nil (as logically there should not be a G at all since this isn't a Go thread), which may make `sigprof` crash, as it assumes `gp != nil`. However, in practice the SP likely still falls in the `mp.g0` stack range and things end up not crashing, though with a non-meaningful profile sample.

I've been able to easily detect this condition in practice with a C thread repeatedly calling a Go function and `profilem` checking if `mp.thread` is still set.

cc @cherrymui
Repository: terminal
Issue: Need a reasonable way to either cancel `ReadConsole` or poll for text input
Labels: Issue-Question,Product-Conhost,Area-Server

In my [library](https://github.com/alexrp/system-terminal) I expose a terminal input API that looks like this:

```csharp
public static class Terminal
{
    public static ValueTask<string?> ReadLineAsync(CancellationToken cancellationToken = default)
    {
        // ..
    }
}
```

On Unix, implementing cancellation support was quite easy:

* Create an anonymous pipe at startup.
* When the `CancellationToken` is triggered, write a dummy value to the write end of the pipe.
* In `ReadLineAsync`, poll for input on the read end of the pipe and `stdin`.
* If the poll returns indicating input on the pipe, drain the pipe and throw `OperationCanceledException`.
* If the poll returns indicating input on `stdin`, actually read the data and return it.

(For reference, the implementation of the above can be found [here](https://github.com/alexrp/system-terminal/blob/bb7a98aeca34afa7eb19c5c154b1193831190083/src/core/Terminals/Unix/UnixCancellationPipe.cs) and [here](https://github.com/alexrp/system-terminal/blob/bb7a98aeca34afa7eb19c5c154b1193831190083/src/core/Terminals/Unix/UnixTerminalReader.cs).)

I would now like to implement something similar for Windows. Unfortunately, as far as I can tell, this is bordering on impossible at the moment.

I naïvely tried to replicate the approach above on Windows, only to discover that `WaitForMultipleObjects` does not support polling on pipes. I replaced the pipe with an event since `WaitForMultipleObjects` supports those. I then ran into another problem: Polling on a console input handle will return when *any* `INPUT_RECORD` arrives, not just `KEY_EVENT_RECORD`s. I decided to try `CancelIo` and `CancelSynchronousIo` on the off chance that they'd work instead of polling, but they just don't work on console input, apparently. At that point, things got hairy; I went back to the polling approach and tried to inspect the input buffer looking for `KEY_EVENT_RECORD`s specifically, discarding other event records, and then resuming the wait if there are no `KEY_EVENT_RECORD`s. Besides being very gross and hacky, this fell apart quickly as it turns out there's no clean way to figure out if a given `KEY_EVENT_RECORD` (or a series of them) will actually result in text input being available on the next `ReadConsole` call. Worse yet, even when I did hack together some heuristics, the behavior turned out to be different between CMD and Windows Terminal. At that point, I gave up and ripped out Windows cancellation support.

So I suppose this issue boils down to me asking: Is there a way to achieve what I'm trying to do that I just haven't realized yet? If not, could one be implemented?
Repository: pytorch
Issue: DataLoader tests are quite flaky
Labels: high priority,module: dataloader,triaged

Our policy is to disable flaky tests if they are affecting trunk health. Dataloader tests have been quite serious offenders in terms of flakiness (see the long list of [disabled test issues](https://github.com/pytorch/pytorch/issues?q=is%3Aopen+is%3Aissue+label%3A%22module%3A+dataloader%22)). I thought it would be good to start a high level conversation about what we can do to improve the reliability of the dataloader tests.

@mruberry suggests that we split out dataloader tests into a separate config so it is more clear when they fail. I also think that module-level retries are appropriate.

@vitaly-fedyunin, @ejguan: as module owners, who is the right POC to do this stuff?

cc @ezyang @gchanan @zou3519 @bdhirsh @SsnL @VitalyFedyunin @ejguan @NivekT
Repository: TypeScript
Issue: Unable to use `@ts-ignore` in JSDoc comments.
Labels: Bug,Help Wanted

# Bug Report

### 🔎 Search Terms

ts-ignore jsdoc

### 🕗 Version & Regression Information

- This changed between versions `3.8.3` and `3.9.7`

### ⏯ Playground Link

-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=3.9.7&filetype=js#code/PQKhFgChmACABALgZwLQEsDmA7A9gJwFMpYQEAHAQ30oFtYBvbAV1oCND8BfWADxJDAoAM2bYAxonS5ssYblwAKAJSMoULlCA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
/**
// @ts-ignore
 * @param {number} x
 */
function foo() {

}
```

### 🙁 Actual behavior

The error is not ignored

### 🙂 Expected behavior

The error is ignored
Repository: pytorch
Issue: DISABLED test_send_recv_all_to_all (__main__.ProcessGroupGlooTest)
Labels: oncall: distributed,skipped

Platforms: mac

This test was disabled because it is failing on master ([recent examples](http://torch-ci.com/failure/test_send_recv_all_to_all%2C%20ProcessGroupGlooTest)).

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @kwen2501
Repository: pytorch
Issue: `torch.diag` unexpectedly fails
Labels: triaged,module: numpy,module: viewing and reshaping

### 🐛 Describe the bug

Based on the documentation, `torch.diag` and `torch.diagonal` should have the same behavior when the input is 2-d and `dim1` and `dim2` are default value.
```python
import torch
a = torch.tensor([[0, 1], [2, 3]])
for i in [0, 1, 2]:
    assert(torch.equal(torch.diag(a, i), torch.diagonal(a, i)))
torch.diagonal(a, 3)
torch.diag(a, 3)
# RuntimeError: [enforce fail at CPUAllocator.cpp:50] ((ptrdiff_t)nbytes) >= 0. alloc_cpu() seems to have been called with negative number: 18446744073709551608
```
For a 2-d tensor, when `diagonal<=2`, their output are the same. But when `diagonal>=3`, `torch.diagonal` still returns an empty tensor but `torch.diag` raise an error that it allocates negative memory. It seems strange because `diagonal=2` is the first value beyond the range but `torch.diag` just return an empty tensor. 

In my view, `torch.diag` should succeed when `diagonal >= 2`.

### Versions

pytorch: 1.10.1

cc @mruberry @rgommers
Repository: pytorch
Issue: Possible security issue of `torch.hub.load`
Labels: triaged,module: hub

### 🐛 Describe the bug

``` python
>>> import torch
>>> torch.hub.load("darcy-shen/attack_hub:v0.1", "resnet32")
Using cache found in /Users/da/.cache/torch/hub/darcy-shen_attack_hub_v0.1
attack torch hub
...
```

I created a project and upload a hubconf.py containing `print('attack torch hub')` to that project.
Using torch hub to load this dangerous dummy project. It works fine to print the `attack torch hub` message.

We are designing SQL syntaxes to load torch hub supported models:
https://github.com/eto-ai/rikai/pull/436

Hope the possible security issues of torch hub could be hardened by pytorch developers.

### Versions

reproduced on PyTorch 1.8.1

```
Collecting environment information...
PyTorch version: 1.8.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 10.15.7 (x86_64)
GCC version: Could not collect
Clang version: 12.0.0 (clang-1200.0.32.29)
CMake version: version 3.21.4
Libc version: N/A

Python version: 3.8.10 (default, May 19 2021, 11:01:55)  [Clang 10.0.0 ] (64-bit runtime)
Python platform: macOS-10.15.7-x86_64-i386-64bit
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

Versions of relevant libraries:
[pip3] numpy==1.20.2
[pip3] torch==1.8.1
[pip3] torchvision==0.9.1
[conda] Could not collect
```

cc @nairbv @NicolasHug @vmoens @jdsgomes