sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Compiling async/await to ES5 may fail to warn about missing Promise constructor
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 `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.3.4000, 3.4.4, 3.5.0-dev.20190420

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** async, ES5, promise, return value

**Code**

```ts
async function helper() {
  await fetch('https://www.example.com');
  return true;
}

export async function main() {
  await helper();
}
```

**Expected behavior:**

When targeting `es5`, I expect this example to fail to type check because there is no `Promise` constructor in scope.

**Actual behavior:**

This code type checks successfully, but will not work at runtime.

**Playground Link:** N/A; playground does not expose the full set of compiler options, and so I am not able to reproduce this issue there. See https://github.com/jwmerrill/ts-promise-repro for a full working example.

**Related Issues:** https://github.com/Microsoft/TypeScript/pull/30790 (possibly?)

**Additional notes:** See https://github.com/jwmerrill/ts-promise-repro for a working minimal example.

Note that if the return statement in `helper()` is omitted, I see the error that I expect to see, which is

```
error TS2468: Cannot find global value 'Promise'.

src/fails.ts:1:16 - error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.

1 async function helper() {
                 ~~~~~~
```

A related example that I expect to fail to type check when targeting ES5, but which does type check, is
```ts
export async function main() {
  await fetch('https://www.example.com');
}
```

The compiler configuration I'm using is
```json
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "strict": true,
    "esModuleInterop": true
  }
}
```
Repository: flutter
Issue: Support querying display refresh rate in engine for iOS and setup 120fps benchmarks on iPad Pro
Labels: c: new feature,platform-ios,engine,c: performance,customer: alibaba,P2,team-ios,triaged-ios

Related with https://github.com/flutter/flutter/issues/27259

The Android part is done in https://github.com/flutter/engine/pull/7002
Repository: go
Issue: cmd/vet: bombs out before reporting all errors
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 devel +68d4b1265e Sat Apr 20 19:34:03 2019 +0000 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

yes

### What did you do?

```
(~/devel/vet) % ls
go.mod          go.sum          tools.go
(~/devel/vet) % cat go.mod
module github.com/davecheney/vetbug

go 1.13

require mvdan.cc/unparam v0.0.0-20190310220240-1b9ccfa71afe
(~/devel/vet) % cat tools.go 
// +build tools
package main

import _ "mvdan.cc/unparam"
```

### What did you expect to see?

```
% go vet
# github.com/davecheney/vetbug
./tools.go:1:1: +build comment must appear before package clause and be followed by a blank line
tools.go:4:8: import "mvdan.cc/unparam" is a program, not an importable package
```

### What did you see instead?

```
(~/devel/vet) % go vet
tools.go:4:8: import "mvdan.cc/unparam" is a program, not an importable package
```

The failure to report the incorrect build tag on line 1 is masked by the complaint about the non importable package.
Repository: godot
Issue: Collider returns an Object. no access to .Name
Labels: enhancement,topic:core,topic:physics,topic:dotnet

**Godot version:**
3.1 Mono
Windows 10, i5, GTX1050

Trying to convert the following into C#:
`var collision = get_slide_collision(idx) 
if collision.collider.name == 'Danger':`

`KinematicCollision2D collision = GetSlideCollision(i);`

Doing `collison.Collider` doesn't expose the name property.
Repository: material-ui
Issue: [Modal] Better focus management
Labels: accessibility,component: modal,component: FocusTrap

Current(master) focus-management is broken for shift+tab, while _forward tapping_ is also working not as expected, as long as you may leave a modal, and got into browser address line, which is good, but should be impossible.

A new `TrapFocus` implementation also does not seems to be correct, especially due to the absence of `RootRef`, used to discover nested portals (like here - https://nk7zmp3900.codesandbox.io/)

- [x] This is not a v0.x issue. <!-- (v0.x is no longer maintained) -->
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Expected Behavior 🤔
- loop then tabbing forward 
- loop then tabbing backwards 

## Current Behavior 😯
- loop then tabbing forward, with focus on body and modal after leaving browser address bar - causing 1 or 2 _tabs_ without visible response.
- does not loop backwards. A new `TrapFocus` would probably fix it, but might introduce other issues.

## Steps to Reproduce 🕹

See an example with 3 buttons inside a modal - https://codesandbox.io/s/j1ll74o3v9

## Context 🔦

Sorry, I have a professional deformation :) I've invested too much time in focus management, and all focus-related problems are _visible_ to me.

## Proposed solution

Replace `TrapFocus` by  [react-focus-lock](https://github.com/theKashey/react-focus-lock), which would handle all edge cases including Portals. There is only one downside of it - +4kb.
Repository: pytorch
Issue: cudnn conv doesn't check batch_size > 0
Labels: module: cudnn,module: cuda,module: error checking,triaged

## 🐛 Bug
```py
In [1]: import torch                                                                                                                          

In [2]: c = torch.nn.Conv2d(3, 3, 3)                                                                                                          

In [5]: x = torch.randn(0, 3, 3, 3)                                                                                                           

In [6]: c(x)                                                                                                                                  
Out[6]: tensor([], size=(0, 3, 1, 1), grad_fn=<MkldnnConvolutionBackward>)

In [7]: c = c.cuda()                                                                                                                          
x
In [8]: c(x.cuda())                                                                                                                           
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-8-265f16c6653b> in <module>
----> 1 c(x.cuda())

/data/packages/pytorch/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
    491             result = self._slow_forward(*input, **kwargs)
    492         else:
--> 493             result = self.forward(*input, **kwargs)
    494         for hook in self._forward_hooks.values():
    495             hook_result = hook(self, input, result)

/data/packages/pytorch/torch/nn/modules/conv.py in forward(self, input)
    337                             _pair(0), self.dilation, self.groups)
    338         return F.conv2d(input, self.weight, self.bias, self.stride,
--> 339                         self.padding, self.dilation, self.groups)
    340 
    341 

RuntimeError: cuDNN error: CUDNN_STATUS_BAD_PARAM
```
Repository: flutter
Issue: Dismissible when used in conjunction with PageView is obstructing access to PageView
Labels: c: new feature,framework,f: material design,f: gestures,P3,team-design,triaged-design

When in a PageView, there's a ListView in first page whose items are dismissible from `DismissibleDirection,startToEnd` which is opposite of the swiping action required to reach the second page in the `PageView`, the swiping does nothing.

I can understand if the direction of dismissing is the same as that of transitioning from one page to another and can be argued that the design is weak, but when the direction is opposing, surely there must be a way to give priority to the gestures.

I think [**this**](https://stackoverflow.com/questions/55369200/dismissible-in-listview-picks-up-swipes-from-pageview) is a related question that has been unanswered. Now, I've read across issues of such nature that when two gesture related widgets are conflicting, then the child gets the preference.

But in this case, the direction is opposite and so I would think PageView's transition would take place. How to resolve this?

Code to reproduce the said issue:

```
import 'package:flutter/material.dart';

class Demo extends StatelessWidget {
  final List<int> nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

  Widget buildItem(int n) {
    if (n % 2 == 0) {
      return Dismissible(
        key: Key('$n'),
        child: ListTile(
          title: Text('$n'),
          subtitle: Text('Dismissible'),
        ),
        direction: DismissDirection.startToEnd,
        onDismissed: (_) {
          print('Dismissed!');
        },
      );
    }
    return ListTile(title: Text('$n'), subtitle: Text('Non Dismissible'));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: PageView(
      children: <Widget>[
        ListView.builder(
          itemBuilder: (context, n) {
            return buildItem(nums[n]);
          },
          itemCount: nums.length,
        ),
        Container(
          child: Center(
              child: Padding(
            padding: EdgeInsets.all(20.0),
            child: Text(
                'I am unreachable if you swipe on even number, but odd is okay.'),
          )),
        )
      ],
    ));
  }
}

```
Repository: kubernetes
Issue: proxy protocol support in kube-apiserver
Labels: priority/awaiting-more-evidence,sig/api-machinery,kind/feature,sig/auth,triage/accepted

**What would you like to be added**:
Proxy Protocol support for kube-apiserver

**Why is this needed**:
When inspecting audit logs I've noticed load balancer private address is passed to the API - this makes bit harder to inspect API usage. Currently when enabling audit logs and enabling proxy-protocol on AWS ELB results in:
```
➜  ~ k cluster-info                                                                                                                                                

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: remote error: tls: record overflow
```

I'd like to see real-user-IP address in audit logs.
Repository: create-react-app
Issue: [v3] PostCSS module imports use relative path instead of baseUrl
Labels: issue: needs investigation

### Is this a bug report?

Yes

### Did you try recovering your dependencies?

Yes

### Environment

```
Environment Info:

  System:
    OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
  Binaries:
    Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
    Yarn: 1.15.2 - ~/.yarn/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.15.3/bin/npm
  Browsers:
    Chrome: 73.0.3683.86
    Firefox: 66.0.3
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-dom: 16.8.6 => 16.8.6 
    react-scripts: 3.0.0 => 3.0.0 
  npmGlobalPackages:
    create-react-app: Not Found
```

### Steps to Reproduce

Given the project structure:

```
src/
- components/
---- YoutubePlaylist.tsx
---- YoutubePlaylist.module.css
- res/
---- breakpoints.css
tsconfig.json
```

1. Configure baseUrl in tsconfig.json (or jsconfig.json)

```json
{
  "compilerOptions": {
    "baseUrl": "src",
   }
}
```

2. Use the following code snippet anywhere in a CSS module


```
@value tablet from "res/breakpoints.css";
```

2. Run `npm start`


3. See the following error message:

```
Failed to compile.

./src/components/YoutubePlaylist.module.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/lib/loader.js??ref--6-oneOf-6-3!./src/components/YoutubePlaylist.module.scss)
Module not found: Can't resolve './res/breakpoints.css' in '/home/jamsch/Documents/test-site/client/src/components'
```

### Expected Behavior

Module resolution should be relative to the src directory. 

### Actual Behavior

Module resolution attempts to resolve relative to the directory the file is importing from.

### Additional info

I had this configured for v2 using aliases, react-app-rewired, & customize-cra

**./config-overrides.js**
```js
const path = require("path");
const { override, addWebpackAlias } = require("customize-cra");

module.exports = override(
  addWebpackAlias({
    "~": path.resolve(__dirname, "src")
  })
);
```

**./tsconfig.json** -- CRA was hard removing paths so I was forced to do this:
```json
{
  "extends": "./paths.json",
}
```

**./paths.json**
```json
{
  "compilerOptions": {
    "baseUrl": "src",
    "rootDir": ".",
    "paths": {
      "~/*": ["*"]
    }
  }
}

```

**./src/components/YoutubePlaylist.module.scss**
```
@value tablet from "~/res/breakpoints.css";
```


On v2 this works fine, but on v3 it seems to import from the root dir.

```Module not found: You attempted to import ../../../../../../../../../res/breakpoints.css which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.```
Repository: create-react-app
Issue: :global() css stopped working in CRA v3.
Labels: issue: needs investigation

<!--
  PLEASE READ THE FIRST SECTION :-)
-->

### Is this a bug report?

Yes

### Did you try recovering your dependencies?

Yes.
yarn 1.15.2

### Which terms did you search for in User Guide?
global css modules
global styles

### Environment

Environment:
  OS:  Windows 10
  Node:  8.11.1
  Yarn:  1.15.2
  npm:  6.4.1
  Watchman:  Not Found
  Xcode:  N/A
  Android Studio:  Version  3.3.0.0 AI-182.5107.16.33.5314842

Packages: (wanted => installed)
  react: ^16.8.6 => 16.8.6
  react-dom: ^16.8.6 => 16.8.6
  react-scripts: 3.0.0 => 3.0.0


### Expected Behavior

I expected the global styles to work like previously.

On (CRA v2) I was using `:global(a) { ... }` in my index.scss file to set global style for links. After upgrading to CRA v3 it stopped working.

### Actual Behavior

Global styles are ignored.


### Reproducible Demo

https://codesandbox.io/s/20w902rmk0

I tried to create another demo to show it working on the previous CRA version, but it didn't work. Strange. Perhaps I misunderstood global styles, but I have no clue why it's been working for me for over a year until now.
Repository: rust
Issue: `Cow<T>` does not implement `ToOwned`
Labels: T-libs-api,C-feature-request

I think it would be reasonable to implement `ToOwned<Target = <T as ToOwned>::Target>` for `Cow<T>`. The inherent `into_owned` method on `Cow` does exactly what I'd expect from `to_owned`, but `to_owned` does not exist on `Cow`.
Repository: rust
Issue: Compiler confused about lifetime when calling mutable method
Labels: C-enhancement,A-diagnostics,A-lifetimes,T-compiler

The compiler wants the function parameter to outlive the call block in this example, but it's not clear why.
It only happens if I call a method takes &mut self.

Example snippet https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fc4b17ad3403da39389481dfb43fac9d
```rust
struct Demo<T>(Option<T>);

struct Obj {
    a: Vec<u8>,
    b: Vec<u8>,
}

impl<T> Demo<T> {
    fn non_mut_self(&self, _: &T) {}
    fn mut_self(&mut self, _: &T) {}
    fn something(&mut self) {}
}

fn happy(s: impl Iterator<Item = Result<Obj, ()>>) {
    let mut demo = Demo(None);
    for obj in s {
        let obj = obj.unwrap();
        let pair = (&obj.a, &obj.b);
        demo.non_mut_self(&pair); // << happy borrow
    }
    demo.something();
}

fn sad(s: impl Iterator<Item = Result<Obj, ()>>) {
    let mut demo = Demo(None);
    for obj in s {
        let obj = obj.unwrap();
        let pair = (&obj.a, &obj.b);
        demo.mut_self(&pair); // << sad borrow
    }
    demo.something();
}

fn main() {
    happy(vec![Ok(Obj { a: vec![], b: vec![] })].into_iter());
    sad(vec![Ok(Obj { a: vec![], b: vec![] })].into_iter());
}
```

```
error[E0597]: `obj.a` does not live long enough
  --> src/main.rs:28:21
   |
28 |         let pair = (&obj.a, &obj.b);
   |                     ^^^^^^ borrowed value does not live long enough
29 |         demo.mut_self(&pair); // << sad borrow
30 |     }
   |     - `obj.a` dropped here while still borrowed
31 |     demo.something();
   |     ---- borrow later used here
```
Repository: godot
Issue: Input lag when working with big scenes
Labels: bug,platform:linuxbsd,topic:editor,confirmed

**Godot version:**
3.2 49b6423

**OS/device including version:**
Ubuntu 18.04 and also Windows 10

**Issue description:**
If I working with bigger scene and engine is under heavy load and then I click on the UP key for e.g. 10 seconds to change selection in scene tree, then engine stops operation a few seconds after releasing the key.

**Steps to reproduce:**
https://streamable.com/kmcuo
I stop pressing RIGHT button at 0:10 and Godot stops selecting nodes at 0:16

**Minimal reproduction project:**
TPS Demo
Repository: flutter
Issue: Improve fuzzy check for text selection handles
Labels: framework,a: typography,c: proposal,P2,team-framework,triaged-framework

iOS text selection handles were fixed in https://github.com/flutter/flutter/pull/31332, but a hacky approximation had to be used to account for rounding error.  It was suggested that the same effect could be achieved without the approximation and without all the breaking changes required to fix the rounding error: https://github.com/flutter/flutter/pull/31332#discussion_r277470613

We should remove the approximation as discussed to avoid relying on errors in the engine.
Repository: kubernetes
Issue: Allow probes to run on a more granular timer.
Labels: sig/node,kind/feature,lifecycle/frozen,needs-triage

<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:

For posterity:

```golang
type Probe struct {
	InitialDelaySeconds int32
	TimeoutSeconds int32
	PeriodSeconds int32
	...
}
```

Probes today take all their specified timeouts and delays in **seconds**. I feel like that arbitrarily sets a lower bound on pod readiness of at least 1 second. For usual operations of K8s workloads, that's all fine. When looking at serverless workloads, where a quick startup of new containers is key and directly reflected in the end user's latency.

Can these be `Duration` instead, so the user can define the granularity like she pleases?

**Why is this needed**:

To make workloads with very sensitive startup latency (like serverless workloads) easier to implement on Kubernetes.

---

Sorry if this is a duplicate, I haven't found a similar issue.
Repository: go
Issue: x/tools/go/packages: implement Load-ing package ids
Labels: NeedsInvestigation,Tools

`packages.Load` should be able to load packages based on their ids.

We've decided that ids **will** persist across calls to `Load`, so there's no reason for us to not allow this. It also enables use cases of Load where one call rounds up a set of packages and the second requests detailed info about them.
Repository: rust
Issue: Inconsistent whitespace definitions in string literals and language itself
Labels: A-frontend,A-parser,A-Unicode,T-compiler,C-bug

Lexer uses Pattern_White_Space unicode property when skipping over trivia. However, when we process string literals with escaped newlines, we only skip ASCII whitespace:

https://github.com/rust-lang/rust/blob/fe0a415b4ba3310c2263f07e0253e2434310299c/src/libsyntax/parse/mod.rs#L379

Here's an example program that shows that U+200F is ignored in program text, but not in the string literal 

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ec59778d31dde69f29f1095aff2c9b66


Here's the text of the program in Debug format, to make whitespace slightly more visible

```
"fn main() {\n\u{200f}\u{200f}\u{200f}\n    let s = \"\\\n\u{200f}\u{200f}\u{200f}hello\n\";\n    println!(\"{:?}\", s);\n}    \n"
```
Repository: rust
Issue: Tracking issue for future-incompatbility warning 'invalid literal suffix on tuple index' (not a lint)
Labels: A-frontend,A-parser,T-lang,C-future-incompatibility,C-tracking-issue

This is the **summary issue** for a bug fix related to tuple indexing. The goal of this page is describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our [breaking change policy guidelines][guidelines].

[guidelines]: https://forge.rust-lang.org/rustc-bug-fix-procedure.html

### What is the warning for?

As reported in https://github.com/rust-lang/rust/issues/59418, the compiler incorrectly accepts `foo.0_u32` (and other suffixes) when indexing into tuples. The expected syntax is simply `foo.0`. We are presently issuing **warnings** when this incorrect syntax is used but we expect to transition those warnings to **errors** in the future.

### How can you fix your code?

Most often this error manifests in procedural macros that employ the `syn` or `quote` crates. It can be avoided by using `syn::Index::from` or `proc_macro::Literal::*_unsuffixed`. For example, if before you were generating `foo.0` doing something like this:

```rust
let i = 0;
quote! { foo.$i }
```

you might now do instead:

```rust
let i = syn::Index::from(0);
quote! { foo.$i }
```

### When will this warning become a hard error?
                    
At the beginning of each 6-week release cycle, the Rust compiler team
will review the set of outstanding future compatibility warnings and
nominate some of them for **Final Comment Period**. Toward the end of
the cycle, we will review any comments and make a final determination
whether to convert the warning into a hard error or remove it
entirely.

### Related bugs

Here are some of the regressions found in the wild:

- https://github.com/rust-lang/rust/issues/59553
- https://github.com/rust-lang/rust/issues/60138
Repository: flutter
Issue: Marker Colors for Android and iOS are not equal 
Labels: a: quality,p: maps,package,team-ecosystem,has reproducible steps,P3,found in release: 2.3,triaged-ecosystem

First I would like to thanks the google map team for an excellent plugin. 
Works perfect for both Android and iOS. 

Minor snag (version 0.5.7): Marker Colors for Android and iOS are not equal. 
My app has a legend table that is correct for Android but not for iOS.
The URL below shows the miss match.

https://github.com/StephanCassel/Aviator-Tracker/blob/master/flutter_google_map_color2.png