sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: os/exec: LookPath() doesn't consider chroot
Labels: help wanted,NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.14.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=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/scottclarke/.cache/go-build"
GOENV="/home/scottclarke/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/scottclarke/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build189733440=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
```
package main

import (
	"log"
	"os"
	"os/exec"
	"syscall"
)

func main() {
	cmd := exec.Command("hello")
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	cmd.Dir = "/"
	cmd.Env = []string{"PATH=/bin"}
	cmd.SysProcAttr = &syscall.SysProcAttr{Chroot: "/home/scottclarke/chroot"}
	if err := cmd.Start(); err != nil {
		log.Fatalf("%#v", err.Error())
	}
	cmd.Wait()
}
```
Where `/home/scottclarke/chroot` contains a chroot which has an executable file `/bin/hello`, and there is no executable `hello` in the PATH of the system prior to the chroot.

### What did you expect to see?
The `hello` executable being run, producing the output `hello world`.


### What did you see instead?
The following error:
`2020/06/01 11:36:32 "exec: \"hello\": executable file not found in $PATH"`

This happens because the [`exec.Command()`](https://golang.org/src/os/exec/exec.go?s=6278:6323#L159) function calls `LookPath()` and sets the `lookPathErr` if it fails, which is checked in `Start()` and causes a failure. However this doesn't take into account the fact that the command will be run in a chroot.
Repository: TypeScript
Issue: JSDoc missing syntax for `new Map<string, string>()`
Labels: Suggestion,In Discussion

**TypeScript Version:**  3.7.x-dev.201xxxxx

**Search Terms:** JSDoc Map generics assignment any unsafe

**Code**

```js
class MyServer {
  constructor () {
    // new Map is Map<any, any>; cannot call Map constructor with new Map<string, string[]>
    /** @type {Map<string, string[]>} */
    this.functions = new Map()
  }
}

const myServer = new MyServer()
myServer.functions.get('foo')
```

**Expected behavior:**

Expected to be able to say what the Map contains when creating a new map. In typescript you can do `new Map<string, string[]>()` but theres no explicit generic parameter function invocation syntax for JSDoc

**Actual behavior:**

The type `Map<any, any>` exists. This fails the eslint rule of `no-unsafe-assignment` and this fails the `no-any` rule of tslint etc.

Note that doing something similar for arrays works because there's a special case inference for `[]` and it also works for `Set` because the constructor is defined differently and it has generic inference in the initialization statement.

**Playground Link:** https://www.typescriptlang.org/play?useJavaScript=true#code/MYGwhgzhAECyCeBlApgJwG5ugbwFDWmAHsA7CAF1QFdhyjVoAKASh3wOgHoAqb6AAXLwADshywwwgDwVUASxIBzADTRZCxQG0AugD4AvtG6d2BcgAs5EAHQAzKiVpzSMALzQSyAO5xJLdvq4gbjEZOTQALZIaJgM7p4+CCgYaP5RybF2Dk4u1orI5IwA5LZEREXMuCHgUHDRKQx4BKGyNHQMLGwcXLwCQqI4AIKoqGDwMpQaBkYm3RZWWY7kzmTQ7joBQVUt4ekxWPHedRmplXsNizlkeQXFpeXMQA

**Related Issues:** Yes, in eslint https://github.com/typescript-eslint/typescript-eslint/issues/2109
Repository: PowerToys
Issue: [Image Resizer] Explorer shell context submenu
Labels: Idea-Enhancement,Product-Image Resizer

I have the idea to turn the "Resize with Image Resizer" _item_ (in the shell context menu) into a _menu_ of its own. Also, maybe it would be an extra idea to be able to individually show/hide the sizes. Thinking of a "Show in context menu" check box or a toggle switch in the Settings window.

If none of the presets are selected to be shown, then the menu item should be as it is now.

Here's an example of the context menu menu:
![Image Resizer context menu](https://user-images.githubusercontent.com/65828559/101530894-d23aa800-3992-11eb-85d7-11ac5ec028e7.png)

Notice the "[action] with [app]" and the ellipsis...?
Repository: PowerToys
Issue: Powertoys Menu Bar Idea
Labels: Idea-New PowerToy

Hi ,

I have an idea for a new powertoy / feature, something like a menu bar on top,

It will look something like this,

![image](https://user-images.githubusercontent.com/63150826/83403977-5c73e380-a427-11ea-9244-40da82b2a24f.png)

It can have themes like this image,

![image](https://user-images.githubusercontent.com/63150826/83403815-ff782d80-a426-11ea-9d03-07ac42a2afa2.png)

Please suggest what you think about this.
Repository: PowerToys
Issue: [Run] Support press the same key twice to open Run
Labels: Idea-Enhancement,Product-PowerToys Run
Repository: godot
Issue: Grabbing and moving Godot window is laggy on Linux (NVIDIA with Allow Flipping enabled)
Labels: bug,platform:linuxbsd,topic:rendering,confirmed,topic:thirdparty,performance

___

***Bugsquad note:** This issue has been confirmed several times already. No need to confirm it further.*

___

**Godot version:**
Godot mono 64 bit 3.x and higher.

**OS/device including version:**
Ubuntu Linux 18.04 with XFCE window manager.
GeForce GTX 750 Ti, NVIDIA driver 435.21, GLES3 and GLES2.

**Issue description:**
When you try to move a Godot window it's very hard to move it because it becomes laggy. Some of the CPU cores become maxed out while you're moving it. This also happens to any OS windows that are moving across the Godot window.

**Steps to reproduce:**
1) Install Ubuntu 18.04 with NVDIA drivers.
2) Get Godot stable Linux Mono 64 bit version.
3) Create any "hello world" project.
4) Run project.
5) Try to grab and drag the Godot window around or any other window across it.

**Video showing the problem**
https://www.dropbox.com/s/3n7vwjqp69274sa/2020-06-01%2015-56-06.mov?dl=0
Repository: create-react-app
Issue: Typescript template dependencies 
Labels: issue: proposal,needs triage

I saw that using cra with typescript template adds the dev dependencies to the `dependencies` property in `package.json` instead of `devdepdencies`
I see it here: [packages/cra-template-typescript/template.json](https://github.com/facebook/create-react-app/blob/master/packages/cra-template-typescript/template.json)

Any reason for that?
Is it possible to move it to `devdependencies` or will it break something?
Repository: node
Issue: stream: end(callback) does not propagate write after end to callback
Labels: confirmed-bug,http,stream

```js
w.end();
w.end('asd', (err) => {
  assert.strictEqual(err.code, 'ERR_STREAM_WRITE_AFTER_END'); // Fails
});
```
Repository: terminal
Issue: Offer information about the key commands for copy/paste the first time you press ctrl c/v
Labels: Issue-Feature,Help Wanted,Area-UserInterface,Product-Terminal

# Description of the new feature/enhancement

Have some kind of popup which lets you know that you can use ctrl + shift + c/v the first time a user presses either of those key commands. I'm a fresh convert from macOS and eventually found out you could right click to paste, but it too searching and finding https://github.com/microsoft/terminal/issues/968 till I found out the key commands. 

There's a case for when you ctrl + c to close a process, but I think showing it _once_ is an acceptable trade-off (you _might_ also know if there's a running process which it could close) and for ctrl + v that's a NOOP, so doing something there is an easy win

# Proposed technical implementation details (optional)

Probably not relevant
Repository: TypeScript
Issue: Contextual typing fails to throw error with function return type on left side of equals sign
Labels: Bug

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  I got the same behavior on 3.7.4 and 4.0.0-dev.20200601

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
left side
right side
contextual typing
type inference

**Code**

```ts
interface ReportState {
  reportDefinition: {
    [key: number]: ReportDetails;
  };
}

interface ReportDetails {
  requiredNumber: number;
  columnWidths?: number[];
}

export const Report: (state: ReportState, action: any) => ReportState = (
  state,
  action
) => { // See note below about this line
  switch (action.type) {
    case "TYPE0": {
      const { reportDef, sequenceId } = action.payload;
      return {
        ...state,
        reportDefinition: {
          ...state.reportDefinition,
          [sequenceId]: {
            ...reportDef,
            selectedElements: ["0x0"],
          },
        },
      };
    }

    case "TYPE1": {
      return {
        ...state,
        reportDefinition: {
          ...state.reportDefinition,
          [action.payload.sequenceId]: {
            // requiredNumber is missing here. This should be an error.
            columnWidths: action.payload.columnWidths,
          },
        },
      };
    }

    default:
      return state;
  }
};
```

**Expected behavior:**
There should be an error, because requiredNumber is missing from the second return statement.

**Actual behavior:**
Compilation succeeds without error.

_Curiosity 1:_
If you add the return type on the right side of the `=`, i.e. by changing
```) => {```
to
```): ReportState => {```
, it correctly finds the error. This should not be necessary, because the return type is already specified on the left side of the `=`.

_Curiosity 2:_
If you remove the first case block, it correctly finds the error (which is in the second case block).

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> [Click here](https://www.typescriptlang.org/play/?ssl=29&ssc=6&pln=17&pc=1#)

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
No
Repository: electron
Issue: showItemInFolder doesn't work on Windows if . is in the path
Labels: platform/windows,bug :beetle:,8-x-y,7-3-x,11-x-y

<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  * 8.3.0
  * 7.1.9
* **Operating System:**
  * Windows
* **Last Known Working Electron version:**
  * 7.1.8

### Expected Behavior
Use `shell.showItemInFolder` to show the contents of a folder:
```js
shell.showItemInFolder("C:\\repos\\.");
```

### Actual Behavior
The contents of the folder is show in file explorer.

### To Reproduce
```js
// show contents of some folder on your machine
shell.showItemInFolder("C:\\repos\\.");
```


### Additional Information
- I have a feeling that [this](https://github.com/electron/electron/pull/21749) is what broke this.
- Using `shell.openItem` still results in the expected behavior, even if there is a . in the path
- That said, this **does not** repro on macOS and Linux. So while I'd be fine with this not getting fixed and just being told "use `openItem`" because of the 2nd bullet, it'd be nice if the APIs were consistent across platforms. 🙃
Repository: flutter
Issue: Change Highlight Shape of the Tab component
Labels: framework,f: material design,a: quality,c: proposal,P3,team-design,triaged-design

Is there some property to modify the shape ?

![Screenshot from 2020-06-01 18-36-14](https://user-images.githubusercontent.com/19750893/83430976-dbbce380-a436-11ea-9ac2-560b4b2ed9b0.png)

Or maybe hide the default tab's highlight and add a new one.
I have tried using InkWell but it doesn't work.
Repository: flutter
Issue: RenderOpacity sometimes omits its layer during animations which breaks caching performance
Labels: framework,a: animation,P2,team-framework,triaged-framework

The RenderOpacity object will not emit a layer when the opacity is 0 or 255. If that is the static opacity then it might make sense, but when it is the value during an animation, this causes the layer tree to drastically change configuration on each frame.

While this could potentially result in a hit if the tree needs to be constantly reconstructed, an even bigger hit happens because the change of identity of its own layer as it moves from a partial value to either 0 or 255 and back again means that the cached information at the engine level needs to be discarded and then re-rendered.

The layer should absolutely be left intact even for opacity values of 0 or 255 during an animation.
Repository: flutter
Issue: Implement scene builder ops when an Android view is involved
Labels: platform-android,engine,a: platform-views,customer: product,customer: money (g3),P2,team-android,triaged-android

These are the operations that should be applied to the `android.view.View` corresponding to the `fluter::PlatformViewLayer` instance.

- [x] `pushTransform` P0
- [x] `pushClipRect` P0
- [x] `pushOpacity`
- [x] `pushClipPath` 
- [x] `pushClipRRect` p2
- [ ] `pushBackdropFilter`
- [ ] `pushColorFilter`
- [ ] `pushPhysicalShape`
- [ ] `pushShaderMask`

To do this, the [mutator stack](https://github.com/flutter/engine/blob/f5a4ea7d8321014269c83eea2f1b33224068f2da/flow/embedded_views.h#L127) must be passed to the Android embedding through the `FlutterViewOnDisplayPlatformView` JNI call. 


For more context, see the "Mapping a Flutter Layer Tree to an Android View" section in go/flutter-hybrid-composition.
Repository: TypeScript
Issue: JS global variable suggestion
Labels: Suggestion,Awaiting More Feedback

*TS Template added by @mjbvz*

**TypeScript Version**: 4.0.0-dev.20200601

**Search Terms**
- global
- javascript
- suggestions
- intellisense

---

Issue Type: <b>Feature Request</b>

In WebStorm, if I write 
```js 
global.abc = 123;
```
and then type `a` at anywhere I will get suggestion `abc`, but VSCode cannot do that. Screenshots as follow

VS Code version: Code 1.45.1 (5763d909d5f12fe19f215cbfdd29a91c0fa9208a, 2020-05-14T08:27:35.169Z)
OS version: Windows_NT x64 10.0.18363

![TIM图片20200531132737](https://user-images.githubusercontent.com/33141649/83345179-c8305080-a342-11ea-8835-c074b131ee68.png)
![TIM图片20200531132750](https://user-images.githubusercontent.com/33141649/83345180-c9fa1400-a342-11ea-915e-069f00d3d6a9.png)

<!-- generated by issue reporter -->
Repository: rust
Issue: Abort from malloc on arm-unknown-linux-gnueabihf
Labels: I-crash,A-LLVM,O-Arm,T-compiler,C-bug

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
joshua@arm:~/libc $ rustc build.rs --crate-type bin -C opt-level=1
malloc(): invalid size (unsorted)
Aborted (core dumped)
```

I expected to see this happen: The crate compiles successfully.

Instead, this happened: rustc aborts.

This is build.rs for the libc crate on master: https://github.com/rust-lang/libc/blob/f10ee11f7043cb38fff02d9085b26009f2fc66aa/build.rs. The error goes away if I don't pass `-C opt-level=1`. It happens on a few different crates, maybe rustc is trying to allocate too much memory?

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.43.1 (8d69840ab 2020-05-04)
binary: rustc
commit-hash: 8d69840ab92ea7f4d323420088dd8c9775f180cd
commit-date: 2020-05-04
host: arm-unknown-linux-gnueabihf
release: 1.43.1
LLVM version: 9.0
```

I can reproduce this issue at least as far back as 1.34.0.
Repository: tensorflow
Issue: tf.io.gfile / GCS fails to work on OpenSUSE
Labels: type:bug,comp:core,TF 2.11

**System information**
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux OpenSUSE Tumbleweed
- TensorFlow installed from (source or binary): Binary (conda)
- TensorFlow version (use command below): unknown 2.1.0
- Python version: 3.7.5
- CUDA/cuDNN version: N/A
- GPU model and memory: N/A

**Describe the current behavior**
```python
import tensorflow as tf
tf.io.gfile.listdir("gs://some-bucket") # replace w/ bucket of your choice
```

This code gives an error:
```
2020-06-01 15:43:56.684531: W tensorflow/core/platform/cloud/google_auth_provider.cc:178] All attempts to get a Google authentication bearer token failed, returning an empty token. Retrieving token from files failed with "Unavailable: Error executing an HTTP request: libcurl code 77 meaning 'Problem with the SSL CA cert (path? access rights?)', error details: error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none". Retrieving token from GCE failed with "Aborted: All 10 retry attempts failed. The last failure: Unavailable: Error executing an HTTP request: libcurl code 6 meaning 'Couldn't resolve host name', error details: Couldn't resolve host 'metadata'".
```

After that it hangs for a while, and then raises a `NotFoundError`.

I believe this is because the libcurl packaged with tensorflow doesn't know where to find the ca-certificates bundle file on OpenSUSE, which is at `/etc/ssl/ca-bundle.pem` rather than `/etc/ssl/certs/ca-certificates.crt`. Also, I installed through miniconda so there's another equivalent file at `$CONDA_PREFIX/ssl/cacert.pem`. Neither of these seems to be found by tensorflow.

[This code](https://github.com/tensorflow/tensorflow/blob/5597c17b6a677be5264ebda7cc31404f0ae8a434/tensorflow/core/platform/cloud/curl_http_request.cc#L129-L132) suggests that the bundle file's location can be customized with the `CURL_CA_BUNDLE` env variable. However, this doesn't change the behavior as far as i can tell; the error is still raised.

**Describe the expected behavior**
It should list the contents of the bucket.
Repository: TypeScript
Issue: [lib.dom.d.ts] Include well-known KeyboardEvent.key values
Labels: Suggestion,Experience Enhancement

## Search Terms

- `keyCode`
- `KeyboardEvent`
- `KeyboardEvent.key`
- `KeyboardEvent.keyCode`

## Suggestion

Include `KeyboardEvent.key` values in the `KeyboardEvent` interface.

The [current implementation](https://github.com/microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L9639) is:
```ts
interface KeyboardEvent extends UIEvent {
  ...
  readonly key: string;
  ...
```


See [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) for a list of some possible values.

Here is my suggestion for how this type can be usefully updated:

```ts
type ModifierKeys = "Alt" | "AltGraph" | "CapsLock" | "Control" | "Fn" | "FnLock" | "Hyper" | "Meta" | NumLock" | "ScrollLock" | "Shift" | "Super" | "Symbol" | "SymbolLock";
type WhitespaceKeys = "Enter" | "Tab" | " ";
type NavigationKeys = "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "End" | "Home" | "PageDown" | "PageUp";
type FunctionKeys = "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | "F13" | "F14" | "F15" | "F16" | "F17" | "F18" | "F19" | "F20" | "Soft1" | "Soft2" | "Soft3" | "Soft4";
type NumericKeypadKeys = "Decimal" | "Key11" | "Key12" | "Multiply" | "Add" | "Clear" | "Divide" | "Subtract" | "Separator" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";

interface KeyboardEvent extends UIEvent {
  ...
  readonly key: string | ModifierKeys | WhitespaceKeys | NavigationKeys | FunctionKeys | NumericKeypadKeys;
  ...
}
```

In the above I left out `EditingKeys`, `UIKeys`, `DeviceKeys`, `IMEKeys`, `PhoneKeys`, `MultimediaKeys`, `AudioControlKeys`, `TVControlKeys`, `MediaControllerKeys`, `SpeechRecognitionKeys`, `DocumentKeys`, `ApplicationSelectorKeys`, and `BrowserControlKeys`, but we could either include them all at the start or just as necessary.

## Use Cases

When a user is accessing the `KeyboardEvent.key` API, a sane set of the known defaults should be available for type checking.



## Examples

This will help prevent scenarios like:

```ts
if (event.key === "ArowDown") { // <- "ArrowDown" is misspelled here
```

Since users will get completion on common values when typing.

> note: I had [previously suggested](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/45062) implementing this in the React types, but @ferdaber suggested (and I agree) that the dom types themselves are the better place.


## Checklist

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, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: pytorch
Issue: Clean up RPC request callback implementation
Labels: high priority,triage review,oncall: distributed,triaged,better-engineering,module: rpc

`request_callback_impl.cpp` is gradually becoming a lengthy and overly complicated file with a lot of branches and ugly unwraps. #39216 #39267 and #38748 are adding more complexities into this file.  If we keep doing this, that file will be very hard to maintain and debug. We can decompose it by letting each message has its own `process` method, but it would require us to solve the tangled unwrapping part first.

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @jjlilley @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @xush6528