sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/crypto/chacha20poly1305: example documentation could be improved
Labels: Documentation,NeedsInvestigation

Concerning the documentation https://pkg.go.dev/golang.org/x/crypto/chacha20poly1305#example-NewX 
the exemple is very good but it lack a bit of explanation for newcomer
i have this in my code:
```go
/*
SELF-NOTE 🧐

The secret is not the nonce, it's the aead
generated from the NewX(key) with the key
so it's totally normal to add the nonce to
the ciphertext.
*/
```

because i'm kinda dumb and i don't directly understood the part:
```go
// Encrypt the message and append the ciphertext to the nonce.
encryptedMsg = aead.Seal(nonce, nonce, msg, nil)
```
and
```go
// Split nonce and ciphertext.
nonce, ciphertext := encryptedMsg[:aead.NonceSize()], encryptedMsg[aead.NonceSize():]
```

When I saw this, I was thinking that the nonce was the secret and don't understand why we add it to the ciphertext.
Maybe it's just me, but I think it can be useful to add a note somewhere in the documentation to avoid misunderstanding of the cipher and its implementation.
Repository: flutter
Issue: [web] app hosted on local server doesn't load on older iOS Simulators
Labels: tool,engine,platform-web,has reproducible steps,P2,found in release: 2.0,found in release: 2.1,browser: safari-ios,team-web,triaged-web

1、Flutter for web project , After the construction of the flitter build web instruction。
2、Load the address on the mobile phone with IOS 13 ~ IOS 13.4 in Apple mobile phone system。
3、Web pages can be displayed, but buttons and scrolls are not operational
4、The mobile phones of other systems operate normally


Flutter --version:
Flutter 2.0.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision c5a4b4029c (6 days ago) • 2021-03-04 09:47:48 -0800
Engine • revision 40441def69
Tools • Dart 2.12.0
Repository: PowerToys
Issue: [PT Run] Let all Shortcut keys be customizable
Labels: Idea-Enhancement,Product-PowerToys Run

It would be very nice if you could Change all Shortcuts, not just Open PowerToys Run, but also Run as admin, Open folder etc.
Repository: PowerToys
Issue: [ImageResizer] Consider unifying settings definition in one place
Labels: Product-Settings,Area-Quality,Product-Image Resizer,Planning-Consideration,Issue-Task

There are two ImageResizer settings helper classes, one in the `ImageResizer` project and one in the `Settings.UI.Library` project:

https://github.com/microsoft/PowerToys/blob/2e3473bbfd11c3517790ba36833602e8f32ba667/src/modules/imageresizer/ui/Properties/Settings.cs#L43

https://github.com/microsoft/PowerToys/blob/2e3473bbfd11c3517790ba36833602e8f32ba667/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ImageResizerProperties.cs#L14
Repository: flutter
Issue: Widget test: when widget is not found "on screen" but is in the widget tree, show a more specific error message
Labels: a: tests,framework,a: quality,c: proposal,a: error message,P2,team-framework,triaged-framework

## Use case

It's quite easy to forget to scroll a ListView in a widget test. 

However, when Flutter doesn't find the widget, it just tells us that no widget was found ("none were found but one was expected"). 

So, then, we have to add debugDumpApp(), run the test again, and then look at the log output to find if the widget is there. Then, we find it's there, and we have to remember that means we have to scroll the screen in our test. That is a stumbling block for new developers writing tests, and it can even be puzzling for more advanced developers.

## Proposal

If the widget isn't found on screen but is in the widget list (ie the same list we get via debugDumpApp()), would it be possible to have an error message that says something a bit more helpful, eg "The widget isn't visible but it is present in the tree. Try scrolling the view before checking for the widget".
Repository: go
Issue: cmd/go: possible incorrect lock usage in GetExitStatus and ExitIfErrors functions
Labels: 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 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

The code is incorrect in the current tip.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/home/manlio/.local/bin"
GOCACHE="/home/manlio/.cache/go-build"
GOENV="/home/manlio/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE="*.local"
GOMODCACHE="/home/manlio/.local/lib/go/pkg/mod"
GONOPROXY=""
GONOSUMDB="*.local"
GOOS="linux"
GOPATH="/home/manlio/.local/lib/go:/home/manlio/src/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/manlio/src/contrib/go/go.googlesource.com/go/src/cmd/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build924785553=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.16 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.16
uname -sr: Linux 5.11.2-arch1-1
/usr/lib/libc.so.6: GNU C Library (GNU libc) release release version 2.33.
gdb --version: GNU gdb (GDB) 10.1
</pre></details>

### What did you do?

In the `internal/base/base.go` file in the `cmd/go` package, there is a mutex that protects the access to the global `exitStatus` variable.  The mutex is locked in the `SetExitStatus` function, but `exitStatus` is not protected in the `ExitIfErrors` and `GetExitStatus` functions.

Looking at the code, `GetExitStatus` is only used in the test but `ExitIfErrors` is used in several sub packages.   It is possible that there are only concurrent write access and no read/write concurrent access.

`GetExitStatus` should lock the `exitStatus` variable and `ExitIfErrors` should be changed to call `GetExitStatus` internally.
Repository: vscode
Issue: Git - Apply encoding to all sides of diff
Labels: feature-request,git,file-encoding

<!-- ⚠️⚠️ 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. -->
- VS Code Version: 1.54.1
- OS Version: win 7/10

Steps to Reproduce:
file coding: `GB-2322`,`GB18030`

![image](https://user-images.githubusercontent.com/1876302/110626134-504d5b80-81db-11eb-81d5-06d151a9a0e1.png)

<!-- 🔧 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 direct to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
Repository: pytorch
Issue: torch.load with Exception
Labels: module: serialization,triaged

## 🐛 Bug

## To Reproduce

Steps to reproduce the behavior:

1. Save the data while the saving process might be killed during saving
2. Load this data with try and except

Code:

```
try:
    torch.load(data_path)
    print(f"{data_path} passes")
except Exception as e:
    print(f"{data_path}")
    print(e)
```

**Error:**

```
unexpected EOF, expected 19500 more bytes. The file might be corrupted.
terminate called after throwing an instance of 'c10::Error'
  what():  owning_ptr == NullType::singleton() || owning_ptr->refcount_.load() > 0 INTERNAL ASSERT FAILED at /pytorch/c10/util/intrusive_ptr.h:348, please report a bug to PyTorch. intrusive_ptr: Can only 
intrusive_ptr::reclaim() owning pointers that were created using intrusive_ptr::release(). (reclaim at /pytorch/c10/util/intrusive_ptr.h:348)
frame #0: std::function<std::string ()>::operator()() const + 0x11 (0x7feae563a7d1 in /mnt/lustre/share/spring/conda_envs/miniconda3/envs/r0.3.2/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x2a (0x7feae563995a in /mnt/lustre/share/spring/conda_envs/miniconda3/envs/r0.3.2/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #2: <unknown function> + 0x1b8d954 (0x7feae7612954 in /mnt/lustre/share/spring/conda_envs/miniconda3/envs/r0.3.2/lib/python3.6/site-packages/torch/lib/libtorch.so)
frame #3: THStorage_free + 0x14 (0x7feae7c4c774 in /mnt/lustre/share/spring/conda_envs/miniconda3/envs/r0.3.2/lib/python3.6/site-packages/torch/lib/libtorch.so)
frame #4: <unknown function> + 0x3f144d (0x7feb2310344d in /mnt/lustre/share/spring/conda_envs/miniconda3/envs/r0.3.2/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
<omitting python frames>
frame #23: __libc_start_main + 0xf5 (0x7feb38637445 in /usr/lib64/libc.so.6)
```

## Expected behavior

The error should be caught, as it did, but the the error still occurs at last after the steps in except lines.

## Environment

 - PyTorch Version (e.g., 1.0): 1.3.1
 - OS (e.g., Linux):Ubuntu
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source):
 - Python version:
 - CUDA/cuDNN version: 9.0, 7.6.3
 - GPU models and configuration: 
 - Any other relevant information:

## Additional context

I wanna load the data and when it is corrupted, it should be filtered by try and except, but the error still ocurrs. 


cc @mruberry @SsnL @VitalyFedyunin @ejguan
Repository: create-react-app
Issue: Npx Create-react-app demo - react-scripts.js path error
Labels: needs triage,issue: bug report

  
I decided to try and learn react and was following the instructions listed here https://reactjs.org/docs/create-a-new-react-app.html. So I made a folder opened it in vscode, went into my bash terminal and ran the below code as instructed. 

npx create-react-app demo
once completed then cd'ed into my demo folder

cd demo
and then typed npm start and this is where I get this bug

npm start

error: 

```
PersonalInfo@DESKTOP-C0M5IPI MINGW64 /f/1.Web Development/Tutorials&Courses/Devslopes/learn-react/demo-app (master)
$ npm start

> demo-app@0.1.0 start
> react-scripts start

'Courses\Devslopes\learn-react\demo-app\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'F:\1.Web Development\react-scripts\bin\react-scripts.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
```

I have **node.js and npm installed globally** and i'm sure the npx create-react-app installs node locally to the folder. I'm at a loss here, even went inside discord and asked for help in various channels and people also don't know whats going on here. 

**Upon further inspection it seems that inside the error its for some reason trying to locate the node module from this directory which is weird F:\1.Web Development\react-scripts\bin\react-scripts.js**

**because I ran npx create-react-app demo in this directory /f/1.Web Development/Tutorials&Courses/Devslopes/learn-react/ and then cd into demo. and ran npm start and this gives me the above error.**

It should be looking for the node module react-scripts.js inside this dir: _F:\1.Web Development\Tutorials&Courses/Devslopes/learn-react/demo/node_modules/react-scripts/bin/react-scripts.js_

React version: what ever version gets loaded with npx create-react-app demo command

## Steps To Reproduce

I just created a main folder inside my other folders called learn-react opened that in visual code and then followed the guide for npx create-react-app demo and then followed the next instructions once i got to the npm start or npm run start tried both commands and it results is said error. 

I tried switching terminal and used default powershell in vscode and still same error. I'm not sure what happened cause like i said above was using npm to install packages all day today and then when i wanted to learn react this is happening to me...


google drive video: https://drive.google.com/file/d/1bYmT--iQ49ymJ2co0S6YGxBksmVXvCbL/view?usp=sharing
Repository: pytorch
Issue: Ninja recompiles certain unchanged source files in cpp extension since torch 1.8.0
Labels: module: build,triaged

## 🐛 Bug

This is more a nuisance than a bug. Since torch 1.8.0 the cpp extension build process builds some objects who's source files have not changed since the last build. The compilation seams to be generally slower aswell, allthough I haven't explicitly tested this. 

The trigger seams to be if the source file includes certain torch backend headers (e.g. "#include <THC/THC.h>")
I'm unsure of any other header files trigger the behaviour, or what could be special about the included code that causes ninja to think something has changed.

Reverting to torch 1.7.1 restores the desired behaviour so I'm fairly sure this is a torch issue not a ninja issue as my ninja version (1.10.0.post2) hasn't changed. 

For sustained c++ extension development this is a real annoyance. Taking my test build times from a few seconds to a few minutes. 

## To Reproduce

1. clone the [extension_cpp example](https://github.com/pytorch/extension-cpp.git)
2. install torch, numpy and ninja
3. move into the cuda directory and run python setup.py install to build the lltm_cuda extension
4. repeat the build and note that ninja correctly skips the build of lltm_cuda_kernel.o
5. add the line "#include <THC/THC.h>" to the top of lltm_cuda_kernel.cu
6. repeat the build twice noting how ninja builds lltm_cuda_kernel.o for both builds despite no changes happening in between
7. downgrade to torch 1.7.1
8. repeat step 6 noting how ninja now correctly skips building lltm_cuda_kernel.o the second time

## Expected behavior

The ninja build process correctly determines which objects need to be rebuilt in torch 1.8.0.

## Environment

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 20.04.2 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Clang version: Could not collect
CMake version: Could not collect

Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.20.1
[pip3] torch==1.8.0
[conda] Could not collect

cc @malfet @seemethere @walterddr
Repository: node
Issue: investigate flaky test-fs-utimes in CI on Pi2
Labels: fs,arm,flaky-test


_Originally posted by @mhdawson in https://github.com/nodejs/node/issues/36591#issuecomment-754831735_

Failed in CI as well: https://ci.nodejs.org/job/node-test-binary-arm-12+/lastCompletedBuild/RUN_SUBSET=0,label=pi2-docker/testReport/(root)/test/parallel_test_fs_utimes/ although with different error:

```shell
ode:assert:399
    throw err;
    ^

AssertionError [ERR_ASSERTION]: FAILED: expect_errno [Arguments] {
  '0': 'futimesSync',
  '1': 22,
  '2': AssertionError [ERR_ASSERTION]: FAILED: expect_ok [Arguments] {
    '0': 'futimesSync',
    '1': 22,
    '2': undefined,
    '3': '123456',
    '4': -1
  }
       check_mtime: 2.3949999809265137
      at expect_ok (/home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-fs-utimes.js:64:3)
      at syncTests (/home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-fs-utimes.js:142:7)
      at /home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-fs-utimes.js:120:11
      at /home/iojs/build/workspace/node-test-binary-arm/test/common/index.js:377:15
      at FSReqCallback.oncomplete (node:fs:184:23) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: true,
    operator: '=='
  },
  '3': 'ENOSYS'
}
    at expect_errno (/home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-fs-utimes.js:56:3)
    at syncTests (/home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-fs-utimes.js:144:7)
    at /home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-fs-utimes.js:120:11
    at /home/iojs/build/workspace/node-test-binary-arm/test/common/index.js:377:15
    at FSReqCallback.oncomplete (node:fs:184:23) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}
```
Repository: pytorch
Issue: Poor support of `Optimizer.add_param_group`
Labels: module: optimizer,triaged

## 🐛 Bug

The use of `Optimizer.add_param_group` is not properly supported everywhere: in AdaGrad the internal state is not updated when additional parameter groups are added; schedulers also seem to suffer from this.

## To Reproduce

Steps to reproduce the behavior:

1. Use AdaGrad optimizer.
2. Use `add_param_group` to add additional parameter groups.
3. Run the optimizer, it will result in a `KeyError('sum')` on line https://github.com/pytorch/pytorch/blob/57bffc3a8e4fee0cce31e1ff1f662ccf7b16db57/torch/optim/adagrad.py#L51 or https://github.com/pytorch/pytorch/blob/57bffc3a8e4fee0cce31e1ff1f662ccf7b16db57/torch/optim/adagrad.py#L77 because the state was intialized in the constructor, before the parameter group was added.

Alternatively:
Use `ReduceLROnPlateau` scheduler, which maintains a `min_lrs` list that is only as long as the number of parameter_groups at initialization, resulting in a `IndexError: list index out of range` when the learning rate of a dynamically added parameter group is attempted to be reduced.

## Expected behavior

Presumably the AdaGrad optimizer should override `add_param_group` and update `self.state`.
The `ReduceLROnPlateau` should probably use a dict with a default or some kind of Observer pattern should be implemented so it is made aware of additional parameter groups.

## Environment

PyTorch version: 1.7.1
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Debian GNU/Linux 10 (buster) (x86_64)
GCC version: (GCC) 9.3.0
Clang version: Could not collect
CMake version: Could not collect

Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: 
GPU 0: GeForce GTX 1080 Ti
GPU 1: GeForce GTX 1080 Ti
GPU 2: GeForce GTX 1080 Ti
GPU 3: GeForce GTX 1080 Ti

Nvidia driver version: 460.32.03
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] botorch==0.3.3
[pip3] gpytorch==1.3.0
[pip3] numpy==1.19.4
[pip3] torch==1.7.1
[pip3] torchviz==0.0.1
[conda] Could not collect



cc @vincentqb
Repository: storybook
Issue: Typescript React event type references are not recognized as a function
Labels: bug,has workaround,typescript,args,addon: controls

**Describe the bug**

If a component event prop is defined with a typescript type reference like this:

```typescript
export interface NavBarProps {
  title: string;
  onMenuToggle?: IconButtonProps['onClick'];
}
```

This is not recognized as a function and show the related controls allow text modification:

![image](https://user-images.githubusercontent.com/1698357/110649443-e3759980-81b9-11eb-807c-793763c8e510.png)

If I switch back to a classic function declaration:

```typescript
export interface NavBarProps {
  title: string;
  onMenuToggle?: () => void;
}
```

Then it is recognized properly:

![image](https://user-images.githubusercontent.com/1698357/110649145-a0b3c180-81b9-11eb-82c2-118c467da83a.png)

**Additional context**

Related vendor type of `IconButtonProps['onClick']`: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/839b070955a9ae9d6e9d89870618af5a396231f5/types/react/index.d.ts#L1449
Repository: ant-design
Issue: Form validation error overlaps TextArea count
Labels: Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/antd-form-validation-overlaps-textarea-count-4f516?file=/index.js)

### Steps to reproduce
When creating a `<Form>` using antd, if I create a `<TextArea>` with `showCount` set to true within a `<Form.Item>` block, and I then add a validation help text to that `<Form.Item>` that is really long, it is possible for the help text to overlap the count.

```jsx
<Form>
  <Form.Item
    label="Error"
    hasFeedback
    validateStatus="error"
    help={
      "Should be combination of numbers & alphabets, but this message is "  
      "deliberately long so it overlaps the counter without custom styling. "  
      "And I mean, this needs to be really, really long on certain screen "  
      "sizes to do this overlapping thing like this."
    }
  >
    <Input.TextArea
      allowClear
      maxLength={100}
      placeholder="with input password and allowClear"
      showCount
    />
  </Form.Item>
</Form>
```

### What is expected?
I'd expect the error message to wrap around the counter.

![Help text wrapping around TextArea counter](https://user-images.githubusercontent.com/2118803/110651411-53345600-81b3-11eb-8686-8313ed66bee2.png)

### What is actually happening?
The error message ends up displaying underneath the counter.

![Help text underneath TextArea counter](https://user-images.githubusercontent.com/2118803/110651368-49125780-81b3-11eb-908d-37c8c90317d4.png)

| Environment | Info |
|---|---|
| antd | 4.12.3 |
| React | 16.13.1 |
| System | macOS Catalina 10.15.7 |
| Browser | Google Chrome v89.0.4389.82 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->