sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/vet: exit code should be 1 in case a problem is reported, not 2
Labels: NeedsInvestigation,Analysis

<!-- 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.3 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes.

### 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.3"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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-build541737785=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.16.3 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.16.3
uname -sr: Linux 5.11.11-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>

Currently `go vet` exit code is `2` both when it is invoked incorrectly (e.g. flags) and  a problem is reported.

I think that in the case a problem is reported, `go vet` exit code should be `1` instead of `2`, to differentiate the two cases.
Repository: pytorch
Issue: YoloV4 Pytorch model inference fails on NNAPI Android
Labels: oncall: mobile

## 🐛 Bug

Pytorch android version: 1.9.0-SNAPSHOT
Pytorch version 1.9.0.dev20210411-py3.8_cuda10.2_cudnn7.6.5_0

When running this model on NNAPI we get the following error message:

Process: org.pytorch.demo.objectdetection, PID: 19298
    java.lang.RuntimeException: The following operation failed in the TorchScript interpreter.
    Traceback of TorchScript, serialized code (most recent call last):
      File "code/__torch__/torch/backends/_nnapi/prepare.py", line 9, in forward
      def forward(self: __torch__.torch.backends._nnapi.prepare.NnapiInterfaceWrapper,
        arg_0: Tensor) -> Tensor:
        retvals = (self.mod).forward([arg_0], )
                   ~~~~~~~~~~~~~~~~~ <--- HERE
        return retvals[0]
    class NnapiModule(Module):
      File "code/__torch__/torch/backends/_nnapi/prepare.py", line 61, in forward
            else:
              ops.prim.RaiseException("Invalid mem_fmt")
        _12 = (comp0).run(fixed_args, outs, )
               ~~~~~~~~~~ <--- HERE
        _13 = torch.eq(torch.len(outs), torch.len(self.out_mem_fmts))
        if _13:
    
    Traceback of TorchScript, original code (most recent call last):
      File "/anaconda3/envs/mobile/lib/python3.8/site-packages/torch/backends/_nnapi/prepare.py", line 63, in forward
                else:
                    raise Exception("Invalid mem_fmt")
            comp.run(fixed_args, outs)
            ~~~~~~~~ <--- HERE
            assert len(outs) == len(self.out_mem_fmts)
            for idx in range(len(self.out_templates)):
    RuntimeError: [enforce fail at nnapi_wrapper.cpp:79] ret == ANEURALNETWORKS_NO_ERROR. 

## To Reproduce

Steps to reproduce the behavior:

1. Install Android Pytorch sample app
2. Replace existing sample model with YoloV4 Torchscript model
3. Run this code on NNAPI

## Expected behavior

App should not crash.
Repository: storybook
Issue: Preview intermittently disappears from Canvas
Labels: needs triage

**Describe the bug**
This may be similar to https://github.com/storybookjs/storybook/issues/9412. I've been getting previews fine, but this morning they stopped appearing in the Canvas tab and refused to come back for quite a while. (Actually, they were appearing and disappearing almost immediately when the page loaded.) I'm back to normal now, just wanted to log this in case it happens to anybody else.

- Checking in devtools, the elements for the preview didn't seem to be there. 
- When I viewed the page in a different FF session container, or in a different browser, I could see the preview fine.
- When I switched to Responsive Design Mode in FF dev tools and chose a different viewport size, the preview reappeared, and when I exited dev tools it remained visible.
- I tried disabling the Docs addon by commenting out `"@storybook/addon-docs"` in the `addons` array in `main.js`, restarting Storybook and reloading the page, but it didn't make a difference. 
- I also tried emptying `node_modules` and rerunning `npm install`.

**To Reproduce**
Steps to reproduce the behavior:

1. Load the Storybook local page at http://localhost:6006/.
2. Click on one of the stories in the sidebar.

**Expected behavior**
The component preview appears as normal in the Canvas tab.

**Screenshots**
![image](https://user-images.githubusercontent.com/1647564/114400385-cefe3580-9b99-11eb-986a-a9a01001db42.png)

**Code snippets**
`main.js`:

```js
const path = require( 'path' );

module.exports = {
	"stories": [
		'../themes/mytheme/components/**/stories/*.@(js|mdx)',
	],
	"addons": [
		"@storybook/addon-docs",
		"@storybook/addon-links",
		"@storybook/addon-essentials",
		"@storybook/addon-postcss"
	],
	webpackFinal: async ( config ) => {
		config.module.rules.push( {
			test: /\.scss$/,
			use: [ 'style-loader', 'css-loader', 'sass-loader' ],
			include: path.resolve( __dirname, '../' ),
		} );

		return config;
	},
	// Adds React import to built JS modules
	babel: async ( options ) => ( {
		...options,
		"plugins":
			[
				"react-require"
			],
	} ),
};
```

**System**

```
Environment Info:

  System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
  Browsers:
    Chrome: 89.0.4389.90
    Firefox: 87.0
    Safari: 14.0.3
  npmPackages:
    @storybook/addon-actions: ^6.2.7 => 6.2.7
    @storybook/addon-docs: ^6.2.7 => 6.2.7
    @storybook/addon-essentials: ^6.2.7 => 6.2.7
    @storybook/addon-links: ^6.2.7 => 6.2.7
    @storybook/addon-postcss: ^2.0.0 => 2.0.0
    @storybook/react: ^6.2.7 => 6.2.7
```

**Additional context**
Add any other context about the problem here.
Repository: rust
Issue: Wrong line numbers produces in rustc_span::SourceFile::lookup_file_pos*
Labels: T-compiler,A-docs

Function comments noted, that they returns 1-based line number, but can actually return 0-based, #77080 @richkadel
https://github.com/rust-lang/rust/blob/c18c0ad2bc5988ca7953459e5a35ece8e69e35e7/compiler/rustc_span/src/lib.rs#L1515-L1573

Perhaps this can be prevented via using different types for 0- and 1- based line numbers.
Repository: pytorch
Issue: pybind11 Tensor type caster forces reference count bump
Labels: triaged,module: pybind

Relevant logic:

```
template <>
struct type_caster<at::Tensor> {
 public:
  PYBIND11_TYPE_CASTER(at::Tensor, _("at::Tensor"));

  bool load(handle src, bool) {
    PyObject* obj = src.ptr();
    if (THPVariable_Check(obj)) {
      value = THPVariable_Unpack(obj);
      return true;
    }
    return false;
  }

```

The refcount bump here is completely unnecessary. I'm not sure if pybind11 actually gives us enough rope to do a type caster to non-owning type.
Repository: flutter
Issue: showTimePicker inconsistent header
Labels: c: new feature,framework,f: material design,f: date/time picker,team-design,triaged-design

Comparing showTimePicker to showDatePicker  (or to any other Material design dialog), the header on the time picker is inconsistently themed. Instead of White Text on a Color background, it's just black text on the dialog background:

![Screen Shot 2021-04-12 at 9 46 50 AM](https://user-images.githubusercontent.com/2914616/114411250-ffce7280-9b79-11eb-98fb-4cfe518c22ca.png)
![Screen Shot 2021-04-12 at 9 46 34 AM](https://user-images.githubusercontent.com/2914616/114411254-00670900-9b7a-11eb-978a-b291e4d4f179.png)
Repository: rust
Issue: Incomplete diagnostic notes when closure returns conflicting instantiations of generic type
Labels: C-enhancement,A-diagnostics,A-closures,T-compiler,A-inference,D-papercut

Given the following code ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4b5ee8e46d943d46602f8fe485e12598)):

```rust
struct Foo<T>(T);

fn main() {
    || {
        if false {
            return Foo(0);
        }

        Foo(())
    };
}
```

The current output is:

```
error[E0308]: mismatched types
 --> src/main.rs:9:13
  |
9 |         Foo(())
  |             ^^ expected integer, found `()`
```

Ideally the output should look like:

```
error[E0308]: mismatched types
 --> src/main.rs:9:13
  |
9 |         Foo(())
  |             ^^ expected integer, found `()`
  |
note: return type inferred to be `Foo<{integer}>` here
 --> src/main.rs:6:20
  |
6 |             return Foo(0);
  |                    ^^^^^^
```

Since #78235, notes have been provided when the returned types are entirely different—but they do not appear when they are the same base type with different generic type parameters.  cc @Aaron1011

@rustbot label: A-closures A-diagnostics A-inference C-enhancement D-papercut

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"compiler-errors"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: PowerToys
Issue: Allow another modification key + Drag to bring up a different layout for Fancy Zones
Labels: Idea-Enhancement,Product-FancyZones

## 📝 Provide a description of the new feature

I have a vertical monitor that I normally do three rows on. Outlook/Teams/Slack. I open a web browser there as well some of the time, and would like it to split the monitor in half instead of snapping to a third.

Allow me to define and alternate layout and map it to another modifier, say CTRL+Drag or something so that I can set my web browser to half of the vertical monitor (covering up the third spaced windows) and then when I close that half spaced window, it will just be back to normal.

Basically just allow me to layer a window on top in a different layout.

---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: pytorch
Issue: Update contributing.md docs review guidelines
Labels: module: docs,triaged

## 📚 Documentation

I noticed recently that circleci basically gives the docs build as an artifact if it succeeds (see [here for an example](https://app.circleci.com/pipelines/github/pytorch/pytorch/298742/workflows/c72e6b5b-dc64-4a3e-9120-03bc75219d36/jobs/12258611/artifacts)). We should update [our guidelines](https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md#submitting-changes-for-review) for submitting docs changes for review; previously we would ask users to build docs changes locally and send us screenshots but now we can inspect them directly before they go in


cc @brianjo @mruberry
Repository: go
Issue: x/playground: revise GeoIP blocking rules for China
Labels: NeedsInvestigation

Currently play.golang.org will check the origin of requests by header `X-Appengine-Country` ([related code](https://github.com/golang/playground/blob/9814fb9de2eefd6e560ebd3c2706f438f05b3c63/share.go)), which is set by GAE frontend, and is probably powered by GeoIP data used across Google. If `X-Appengine-Country` matches the code of China, the request will be denied and HTTP 451 Unavailable For Legal Reasons would be returned.

Such restriction was first introduced in golang/playground@64f7014affabd5446cabfe7b9e362502c77caa06, citing the reason that "[t]his will permit us to serve *.golang.org to Chinese users." The related code was later revised in golang/playground@bb2a4ed2d77c5ebb58ace5e1466acec69a729a68, citing similar need.

The reason was elaborated in https://github.com/golang/go/issues/31755#issuecomment-488188461 in May 2019 by @bradfitz:
> A requirement for Google getting Chinese approval for golang.google.cn was that we didn't serve any user-generated content (UGC). That's why the playground is disabled on the Chinese domain, as play.golang.org's "Share" functionality lets people share user-generated content (code).

However, the current restriction does not reflect the fact that *.golang.org has already been blocked by the Great Firewall for years, which was acknowledged in the aforementioned issue and golang/playground@bb2a4ed2d77c5ebb58ace5e1466acec69a729a68. That's why a separate golang.google.cn has to be set up for users in Mainland China. The original cause for this restriction no longer exists. Playground is simply not provided in golang.google.cn.

Meanwhile, the GeoIP false-positives has caused inconvenience to [multiple users](https://github.com/golang/go/search?q=playground+legal+reasons&type=issues), including a recent one #45378, and might pop up every time Google updates its GeoIP db.

I propose the restriction targeing CN users to be lifted, since GFW has already done its job to block unregulated user-generated content.
Repository: react-native
Issue: Text with a View child does not correctly re-render when its text child changes
Labels: Issue: Author Provided Repro,Component: Text

## Description
Consider a `Text` element with the following children:

1. `'some text'`
2. `<View>` // with certain dimensions
3. `'some text'`

When the first child changes content - triggering the render of `Text` component, the `View` is not repositioned accordingly.

## React Native version:
0.64.0, 0.63.2
`react` version: 17.0.1

## Steps To Reproduce

1. Have a `Text` with the children as specified above
2. Make the 1st element - text, change its content
3. Observe the `View` did not get repositioned accordingly
4. Repro on Android

## Expected Results
The child `View`s get repositioned accordingly, if necessary, when the `Text` re-renders.

## Screenshots
| Initial render | After the 1st child changes |
| ------------- | ------------ |
| ![image](https://user-images.githubusercontent.com/10930160/114429867-1dbdc680-9bbe-11eb-8c37-89e39a8ae41f.png) | ![image](https://user-images.githubusercontent.com/10930160/114429909-257d6b00-9bbe-11eb-91c1-6f347ab1b498.png) |

## Snack
https://snack.expo.io/D-ZJ4cWeC
Repository: transformers
Issue: [RFC] introduce `config.trained_precision`
Labels: WIP

# 🚀 Feature request

As we are discovering that `bf16`-pretrained models don't do well on `fp16` "regime" (and surely vice-versa), and some models are pre-trained in `fp32` and surely won't do well on either `bf16` or `fp16`, and the problem is going to grow as more `bf16`-supporting hardware comes out, I propose we start requiring that the model tells the user which mode it was pretrained under.

So I suggest we add `config.trained_precision` which currently would be one of `fp16`, `bf16`, `fp32`, `unknown`.

I haven't thought it through on how to derive this automatically during `save_pretrained`, but when porting checkpoints the porter can figure that out and manually set this in the conversion script.

For example, from what I understood gtp-neo if `bf16` for all but `2.7B` version, which is `fp32`.

@sgugger, @LysandreJik
Repository: flutter
Issue: Switch to //third_party/libcxx on all platforms.
Labels: engine,c: performance,perf: memory,perf: app size,P2,team-engine,triaged-engine

The Flutter Engine uses its own version of libcxx and libcxx-abi for all platforms except iOS and Fuchsia. This dependency is statically linked into the engine. Because of this, most platforms don't depend on having an appropriate version of libcxx already present in the system library path for dynamic linking. Also, the version of libcxx is fairly new and engine developers get to use the latest library features consistently.

On iOS, this approach is not used because statically linking increased the binary size by 80K (needs to be checked again today as this number is from a couple of years ago). libcxx on iOS is also fairly stable. However, over time, the engine has had to add shims for missing libcxx features specifically for iOS (like shared-exclusive locks missing on iOS 9.0 and below). Also, this choice is getting in the way of using [newer features that yield binary size savings](https://github.com/flutter/flutter/issues/80145).

Using a statically linked libcxx will lead to smaller engine binaries everywhere, allow engine developers to use the latest libcxx features consistently on all platforms, and, remove maintenance burden of iOS specific shims. It's time to switch to a statically linked libcxx on all platforms.
Repository: flutter
Issue: Flutter fails to launch iOS simulator when Simulator App is running but Device Window is closed
Labels: c: crash,tool,t: xcode,has reproducible steps,P2,found in release: 3.10,found in release: 3.11,team-tool,triaged-tool

_Originally created @ Dart-Code/Dart-Code/issues/3277 and moved her as per the suggestion below from @DanTup_

> Thanks for the report! This looks like it'll need fixing in Flutter (it reproduces using `flutter emulator --launch ios` - which is essentially what VS Code is falling) so should be raised at https://github.com/flutter/flutter/.
> 
> Thanks!



### Problem
Flutter fails to open the iOS Simulator when the device window is closed but the Simulator app is actually running (i.e. shown in the dock like in the image below:) 

<p align="center">
<img width="74" alt="Screen Shot 2021-04-12 at 7 26 07 PM" src="https://user-images.githubusercontent.com/46427323/114428484-f0284b80-9bc4-11eb-85e1-febdf70c9617.png"></p>

When the Simulator is in the above state, the following process will run for few minutes before it times out:
<p align="center">
<img width="484" alt="Screen Shot 2021-04-12 at 7 21 27 PM" src="https://user-images.githubusercontent.com/46427323/114428190-8f007800-9bc4-11eb-9a15-f65cc08f6b21.png"></p>

To reproduce:
- open a flutter project with VS Code in MacOS where the project is for both iOS and Web. 
- Open the iOS simulator 
- Close the iOS simulator without quitting it (cmd + w or the 'x' red button). 
- Wait few seconds until VS code switches to Chrome (web-javascript) at the bottom. 
- Try to change the device back to iOS 
- `waiting for iOS simulator to connect` will run for few minutes before it times out saying that it couldn't launch the device.


### Expected Behavior
The device should be shown again. 

If this is an issue with the Simulator App itself, please consider one of those alternatives:
- provide a way to terminate the process (ie `waiting for iOS simulator to connect`).  
- show a message that the simulator app needs to be quitted. 

### Additional Context
This usually happens when I switch between Web and iOS development and I close the simulator instead of quitting it. Even when I realize the situation, there is no way to terminate `waiting for iOS simulator to connect`. 

Versions:
- dart-code extension v3.21.1
- VS Code version v1.55.1
- Flutter Version: 
```
Flutter 2.0.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b1395592de (11 days ago) • 2021-04-01 14:25:01 -0700
Engine • revision 2dce47073a
Tools • Dart 2.12.2
```
Repository: electron
Issue: [Feature Request]: Preload scripts for Web Worker
Labels: enhancement :sparkles:

### Preflight Checklist

I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

Using the option `nodeIntegrationInWorker` to enable node integration in worker threads is not safe cause it makes a very powerful API accessible for any workers with no control over it.

### Proposed Solution

Adding a flag 'preloadInWorker' in webPreferences of BrowserWindow to specify a script to be loaded before any other scripts in Web Workers. The script will always have access to node APIs, and it's aimed to introduce the global symbols that will be visible in the worker scope and considered safe enough to use. That should work the same way as 'preload' option but be applicable for the web worker threads.

### Alternatives Considered

n/a

### Additional Information

n/a
Repository: flutter
Issue: [dartdoc] Constructor property setters should include documentation for those properties
Labels: framework,dependency: dart,from: study,d: api docs,a: first hour,P2,team-framework,triaged-framework

Consider the following constructor:

https://api.flutter.dev/flutter/material/MaterialApp/MaterialApp.html

It looks like this in the API docs:

<img width="578" alt="Screen Shot 2021-04-12 at 9 58 28 AM" src="https://user-images.githubusercontent.com/15253456/114432658-c98ef400-9b75-11eb-94cd-08c217626f08.png">

None of the parameters to the constructor are documented... despite every single one of the corresponding member variables being documented (e.g. https://api.flutter.dev/flutter/material/MaterialApp/localizationsDelegates.html).

Our dartdocs should make it clear that these constructor parameters are setting the corresponding member variables and either (a) provide a hyperlink to the documentation for the corresponding member variables, or (b) inline those docs in a way that would be easy for a human to parse.

Note that this is particularly bad for new developers, because they don't necessarily know that these constructor parameters even map to member variables that [might] have their own docs.
Repository: pytorch
Issue: Add torch.nn.Conv2D correctness test
Labels: module: nn,module: tests,triaged,enhancement

Looks like we do not have correctness test for Conv2D in the test, which lead to late detection of regressions like https://github.com/pytorch/pytorch/issues/54136 and https://github.com/pytorch/pytorch/issues/39506

I wonder if numpy or very slow algorithm can be used to validate the results.


cc @albanD @mruberry @jbschlosser @VitalyFedyunin @walterddr
Repository: create-react-app
Issue: Invalid json response body at https://registry.npmjs.org/loose-envify on Ubuntu
Labels: needs triage,issue: bug report


I've been trying to run create react app using npx for over 2 days switching to different Wifis + Ethernet but I get `Invalid json response body at https://registry.npmjs.org/loose-envify` all the time.

I thought it was an internet speed connection problem but it wasn't