sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: runtime/pprof: tests start failing since migration of AIX builder
Labels: Builders,NeedsInvestigation,compiler/runtime

We recently moved the AIX VM into a Power9 server, in order to allow P9 builds in a near future. 
For now, it's still using P8 instructions only, thus nothing should have change for now. 

However, `runtime/pprof` tests start failing: 
https://build.golang.org/log/aa79ac6509bea68e2e34cb50ac83b454544bdcd6
https://build.golang.org/log/9b24ed78ebd9a7e3bc3fcecb4e7504b6865b545b
...

I have to investigate them. 

@laboger Did you already add this kind of bug or it's AIX related ?
Repository: create-react-app
Issue: [`eslint-config-react-app`]: consider configuring `react/no-unstable-nested-components` rule?
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

<!--
  Provide a clear and concise description of what the problem is.
  For example, "I'm always frustrated when..."
-->

Components nested inside components without memoization leads to unstable components (the nested component and all its children are recreated during each re-render). `eslint-config-react-app` could warn or error upon seeing this pattern.

### Describe the solution you'd like

<!--
  Provide a clear and concise description of what you want to happen.
-->

`eslint-config-react-app` could configure the new `react/no-unstable-nested-components` rule that will be released in `eslint-plugin-react@7.23.0` (see [pull request](https://github.com/yannickcr/eslint-plugin-react/pull/2750) and [changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md))

### Describe alternatives you've considered

<!--
  Let us know about other solutions you've tried or researched.
-->

Do not lint for this problem

### Additional context

<!--
  Is there anything else you can add about the proposal?
  You might want to link to related issues here, if you haven't already.
-->

Related Pull Request: https://github.com/yannickcr/eslint-plugin-react/pull/2750
Repository: node
Issue: Wrapping existing net.Socket does not work
Labels: doc,net

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**: 14.16.0
* **Platform**: MacOS 
* **Subsystem**: macOS Catalina 10.15.7 

### What steps will reproduce the bug?

<!--
Enter details about your bug, preferably a simple code snippet that can be
run using `node` directly without installing third-party dependencies.
-->

```javascript
const net = require("net")

const srv = net.createServer()

srv.on("connection", c => {
    const sock = new net.Socket({
        fd: c._handle.fd
    })
})

srv.listen(4444)
```

### How often does it reproduce? Is there a required condition?

No required condition (as far as I can tell).

### What is the expected behavior?

That a new `net.Socket` instance is created which behaves exactly like the original instance (`c` in this case).

<!--
If possible please provide textual output instead of screenshots.
-->

### What do you see instead?

<!--
If possible please provide textual output instead of screenshots.
-->
An error is thrown (EEXISTS):

```
net.js:337
        throw errnoException(err, 'open');
        ^

Error: open EEXIST
    at new Socket (net.js:337:15)
    at Server.<anonymous> (test.js:6:15)
    at Server.emit (events.js:315:20)
    at TCP.onconnection (net.js:1560:8) {
  errno: -17,
  code: 'EEXIST',
  syscall: 'open'
}
```

### Additional information

<!--
Tell us anything else you think we should know.
-->
Repository: react
Issue: Bug: useState with class as initial state throws an error
Labels: Status: Unconfirmed,Type: Discussion

Using a JavaScript class as initial state in `useState` throws an error. This is because `mountState` check if the initial state is a function by `typeof initialState === 'function'` and classes are technically functions. However since ES6+, I feel like most developers don't consider classes functions because of the less prototype-inheritance feel since ES6 and the `class` keyword.


React version: 17.0.2


## Steps To Reproduce

1. Define an ES6 class
2. Use the class as `initialState` argument to `useState`

Code example:

```jsx
import { useState } from "react";
import ReactDOM from "react-dom";

class A {}

function App() {
  const [cls, setCls] = useState(A);
  return <h2>{cls.name}</h2>;
}

ReactDOM.render(<App />, document.body);
```

## The current behavior

```
TypeError: Cannot call a class as a function
    at _classCallCheck (eval at z (eval.js:42), <anonymous>:3:11)
    at A (VM302 index.js:19)
    at mountState (react-dom.development.js:10436)
    at Object.useState (react-dom.development.js:10919)
    at useState (react.development.js:954)
    at App (VM302 index.js:25)
```

Alternatively, the error can be `TypeError: Class constructor X cannot be invoked without 'new'`.


## The expected behavior

As mentioned in the description above, I would 

- either expect classes to work
- or mention this caveat in the docs.

I guess checking, if the initial state is actually a non-class function, could cause instances of subclasses of functions not to work (depending how the check is done).
Repository: terminal
Issue: the cli parameter -d is not shown in help
Labels: Issue-Docs,Product-Terminal,Issue-Task,Area-Commandline

We can use `wt -d d:\` to open terminal in specific [directory](https://docs.microsoft.com/de-de/windows/terminal/command-line-arguments?tabs=windows). This is not listed via `wt /?`
![image](https://user-images.githubusercontent.com/95811/112136021-b91ad780-8bce-11eb-8bcb-1d1ec7aac5d9.png)
Repository: flutter
Issue: [feature request] Add iOS Control Center Slider in Cupertino 
Labels: c: new feature,platform-ios,framework,f: cupertino,c: proposal,team-design,triaged-design

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->


## Proposal

![IMG_538ACDDFFC7F-1](https://user-images.githubusercontent.com/25743901/112141271-ff6f3700-8bcc-11eb-8683-8bddda8df600.jpeg)


<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: node
Issue: `fs.closeSync` and `fs.close` crash node process when `fd` is a random integer
Labels: fs,libuv

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**: v14.15.1
* **Platform**:  Linux 5.8.0-38-generic #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
* **Subsystem**: fs.closeSync

### What steps will reproduce the bug?
Setup a node instance,
```
» node
```
and run the following javascript code.
```
fs.closeSync(16)
```
Then an abort occurs.
<!--
Enter details about your bug, preferably a simple code snippet that can be
run using `node` directly without installing third-party dependencies.
-->

### How often does it reproduce? Is there a required condition?
This abort can always be triggered following the steps above.

### What is the expected behavior?
If any error occurs, an exception or other similar error-reporting stuff should be thrown. There is no reason to abort the whole node process.
<!--
If possible please provide textual output instead of screenshots.
-->

### What do you see instead?
```
 » node                                                                                                                                                                                                       134 ↵ zys@zys-X299-UD4-Pro
Welcome to Node.js v14.15.1.
Type ".help" for more information.
> fs.closeSync(16);
undefined
> [1]    125036 abort (core dumped)  node
```
<!--
If possible please provide textual output instead of screenshots.
-->

### Additional information

<!--
Tell us anything else you think we should know.
-->
Repository: pytorch
Issue: Caught an integer overflow or wraparound in torch.nn.MaxPool1d
Labels: triaged,module: pooling

## 🐛 Bug

The `MaxPool1d` takes an integer as its first argument. However, when I pass a big number to this function, I got an Runtime Errror. This error is quit normal but the log is interesting.
`RuntimeError: Given input size: (16x1x50). Calculated output size: (16x1x-272823246). Output size is too small`
the calculated out put size, has a negative number. I think it meets an integer overflow. But I can't figure out what function going wrong right now.

## To Reproduce

Steps to reproduce the behavior:
`import torch `
`m=torch.nn.MaxPool1d(545646544,stride=2)`
`input=input=torch.randn(20,16,50)`.
`m(input)`

then I got the runtime error.
`Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/nn/modules/module.py", line 651, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/nn/modules/pooling.py", line 76, in forward
    self.return_indices)
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/_jit_internal.py", line 209, in fn
    return if_false(*args, **kwargs)
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch/nn/functional.py", line 496, in _max_pool1d
    input, kernel_size, stride, padding, dilation, ceil_mode)
RuntimeError: Given input size: (16x1x50). Calculated output size: (16x1x-272823246). Output size is too small
`


## Expected behavior

the unexpected number should bu filtered out.

## Environment
PyTorch version: 1.5.0+ascend.post2
Is debug build: No
CUDA used to build PyTorch: None

OS: CentOS Linux 7 (Core)
GCC version: (GCC) 7.3.0
CMake version: version 3.20.0-rc3

Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] Could not collect
[conda] Could not collect


cc @heitorschueroff
Repository: flutter
Issue: Material Drawer : VoiceOver : Should be able to announce 'Dismiss' at the end of drawer contents and set accessibility focus on the drawer
Labels: c: new feature,framework,f: material design,a: accessibility,a: quality,c: proposal,team-design,triaged-design

## Use case

While using voice over, when the user opens a [material drawer](https://api.flutter.dev/flutter/material/Drawer-class.html), voice over announces 'Dismiss' button first without setting accessibility focus on any element, and then moves on to announce other actionable items from the drawer. This feature request is for requesting slight modifications in this behaviour and would be applicable to all use cases involving the drawer.

## Proposal

Would it be possible to support following features for the drawer -
1. After opening the drawer, the voice over should announce the first element of the drawer. The 'Dismiss' action should be announced at the end. This is also in accordance with [WAI-ARAI practices](https://www.w3.org/TR/wai-aria-practices/#menu) 
   `When a menu opens, or when a menubar receives focus, keyboard focus is placed on the first item. All items are focusable 
as described in § 6.6 Keyboard Navigation Inside Components.
`
2. While the voice over announces 'Dismiss' action, the focus should be set on the entire drawer.
Repository: rust
Issue: [ER] Uplift clippy::unnecessary_mut_passed
Labels: A-lints

I think it's worth moving the clippy::unnecessary_mut_passed lint into rustc because it's a very basic coding mistake:

```rust
#![allow(unused_variables)]
fn foo(x: &u32) {}
fn bar(a: &[u32]) {}
fn spam(a: &[u32; 10]) {}
fn main() {
    foo(&mut 10);
    let mut a = [0_u32; 10];
    bar(&mut a[..]);
    spam(&mut a);
}
```

See also, for further improvements:
https://github.com/rust-lang/rust-clippy/issues/5546
Repository: react-native
Issue: [Android] ScrollView clips children even with overflow: 'visible'
Labels: Needs: Triage :mag:

## Description
Child elements of ScrollView are clipped when positioned outside of the ScrollView bounds, even when the `style` and `contentContainerStyle` props have been given `overflow: 'visible'`.

## React Native version:
System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 538.14 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
    Yarn: Not Found
    npm: 6.14.4 - ~/.nvm/versions/node/v12.18.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /Users/rickard/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.2
      System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 12.2/12B45b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.7 - /Users/rickard/.jenv/shims/javac
    Python: 3.9.1 - /Users/rickard/.pyenv/shims/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.3 => 0.63.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

## Expected Results
Given that `overflow: visible` is set on both the `style` and `contentContainerStyle` props on the ScrollView the overflowing children of the ScrollView should be visible.

## Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/Xw1c66W8R
Repository: deno
Issue: Give access to raw command line arguments on Windows
Labels: windows,suggestion,needs investigation

For Windows, CLI applications need access to the original command line to supply basic services that the Windows shells (CMD/PowerShell) do not, such as wildcard/glob expansion. For example:

In *nix (bash-shell):

```shell
$ # POSIX with bash shell
$ ls -l *.mkd
-rwxrwxrwx 1 toor toor 1.2K Jul 28  2020 kb-ToDO.mkd*
-rwxrwxrwx 1 toor toor 1.1K Jul 19  2020 kb-info.mkd*

$ deno eval "console.log(Deno.args)" "*.mkd" *.mkd
[ "*.mkd", "kb-ToDO.mkd", "kb-info.mkd" ]
```

The Windows versions:

```shell
>:: CMD shell
>dir /b *.mkd
kb-info.mkd
kb-ToDO.mkd

>deno eval -T "console.log(Deno.args)" "*.mkd" *.mkd
[ "*.mkd", "*.mkd" ]

>:: PowerShell
>powershell
...

PS> deno eval "console.log(Deno.args)" "*.mkd" *.mkd
[ "*.mkd", "*.mkd" ]
```

You'll note that the information required to perform reasonable wildcard/glob expansion is removed in the `Deno.args` array. Specifically here, the quotes are removed, so there is no application-detectable difference between the two arguments. For *nix/bash, it doesn't matter as the shell does the expansion for the application and supplies those tailored arguments, but Windows applications are expected to do that work themselves. The only way to do that is to have access to the original, unparsed command line (such as via `GetCommandLineW`).
Repository: PowerToys
Issue: Modifier key doesn't work when pressing multiple keys at the same time
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Status-In progress

<!--
**Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**.
Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue.
-->

## ℹ Computer information

- PowerToys version: 0.33.1
- PowerToy Utility: Keyboard Manager
- Running PowerToys as Admin: Yes
- Windows build number: [run "winver"] 20H2

## 📝 Provide detailed reproduction steps (if any)

1. Make any key combinations with 'modifier + alpha keys'. (e.g. Alt + I/J/K/L → Cursor Up/Left/Down/Right)
2. Write sample text in an editor.
3. ~Press shortcuts quickly. In my case, I pressed I/J/K/L keys in short intervals while holding down Alt key.~ Press  ALT and two keys at the same time.

### ✔️ Expected result

Cursor moves up, down, left, or right.

### ❌ Actual result

Actual alphabet characters are entered so it makes unintended typo.

## 📷 Screenshots
![alt_arrows](https://user-images.githubusercontent.com/46282492/112143797-babebc80-8c1b-11eb-9d24-810b231ee081.gif)
Repository: go
Issue: all: tests that change the working directory should use defer to restore it
Labels: Testing,help wanted,NeedsFix

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16.2 linux/amd64
</pre>


I have noted that the tests that need to change the current working directory use the following pattern:
  1. call `os.Getwd` to get the current working directory
  2. some code
  3. call `os.Chdir` to change the current working directory
  4. some code
  5. call `os.Chdir` to restore the original working directory

An example is:
https://github.com/golang/go/blob/master/src/os/removeall_test.go#L159

The code should probably use `defer`, using a support function like:

```go
// chdir changes the current working directory to the named directory and
// returns a function that, when called, restores the original working
// directory.
func chdir(t *testing.T, dir string) func() {
	wd, err := os.Getwd()
	if err != nil {
		t.Fatalf("chdir %s: %v", dir, err)
	}
	if err := os.Chdir(dir); err != nil {
		t.Fatal(err)
	}

	return func() {
		if err := os.Chdir(wd); err != nil {
			t.Fatalf("restoring working directory: %v", err)
		}
	}
}
```

The new pattern is:

  1. call `defer chdir(dir)()`
  2. some code

This is more readable and ensures that the working directory is restored in case of test failures.
Repository: pytorch
Issue: torch.fx may have problem for annotations
Labels: triaged,module: fx

## 🐛 Bug
Hi all,
I test all the models in torch.hub for torch.fx, where I find that fx fails to symbolic trace googlenet.
After some debugging, I figure out that it is due to the incorrect handling of python annotation.

For googlenet definition, it will use GoogLeNetOutputs to annotate the output, which is defined in the googlenet.py.
see: https://github.com/pytorch/vision/blob/master/torchvision/models/googlenet.py#L206

So after symbolic tracing, the graph will get an annotation with "torchvision.models.googlenet.GoogLeNetOutputs"

However, torchvision.models.googlenet has been reset as the googlenet() function instead of the original googlenet.py in \_\_init\_\_.py
see: https://github.com/pytorch/vision/blob/master/torchvision/models/__init__.py#L7 and https://github.com/pytorch/vision/blob/master/torchvision/models/googlenet.py#L26

So, when executing the generated python code in the recompile process, it can not find the "torchvision.models.googlenet.GoogLeNetOutputs" and will raise an error saying "'function' object has no attribute 'GoogLeNetOutputs'"
see: https://github.com/pytorch/pytorch/blob/master/torch/fx/graph_module.py#L28

There are some potential solutions to walk around:
1. ignore the annotation in the fx tracing: remove type_expr in https://github.com/pytorch/pytorch/blob/master/torch/fx/symbolic_trace.py#L369
2. delete the annotation in googlenet.py
3. modify the name to avoid the duplicate problem of the function name and filename

However, all of the above seems not to be an elegant solution.
I wonder how the official developers think about this problem.

Looking forward to your reply and hope that we can have more discussions.

## To Reproduce

Steps to reproduce the behavior:
1. install torch == 1.8.0
```
import torch
import torch.fx as fx
model = torch.hub.load('pytorch/vision', 'googlenet', pretrained=True)
traced_model = fx.symbolic_trace(model)
```

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

Collecting environment information...
PyTorch version: 1.8.0
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 16.04.7 LTS (x86_64)
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Clang version: 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
CMake version: version 3.13.3

Python version: 3.6 (64-bit runtime)
Is CUDA available: False
CUDA runtime version: 10.0.130
GPU models and configuration: GPU 0: GeForce GTX 1060 6GB
Nvidia driver version: 440.31
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[conda] torch                     1.8.0                    pypi_0    pypi
[conda] torchvision               0.9.0                    pypi_0    pypi


## Additional context

None


cc @ezyang @SherlockNoMad