sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: javascript
Issue: Clarification for Inline Comments
Labels: pull request wanted,editorial

Thanks for the excellent style guide!

One thing that is not explicitly defined by the guide is inline comments. Can a section on this topic be added to the "Comments" section block, please?

For example,
```
let foo = 145; // This is modified below in the "baz()" function
```

Is this a legal line in the airbnb style?

And the follow-up question: if it is not legal, then I assume that the correct fix to have it be moved above, like this?

```
// This is modified below in the "baz()" function
let foo = 145;
```

Yet another follow-up question: if inline comments are legal, then what is the correct fix for in-line comments that make the line extend past 100 character? Like the following:

```
// This is a comment describing the following block of variable initializations
let foo = 123; // used in various contexts, but mostly for soccer games, basketball, and football games
let bar = 456; // used only for horse races; it is explicitly reset at the beginning of the "endRace()" function
let baz = 789; // used only for car races; it will be overwritten once we reach the "oilChange()" function
```

If it were moved above, it would overlap with the block comment header. So then does it make the most sense to move them down to the next line, like this?

```
// This is a comment describing the following block of variable initializations
let foo = 123;
// used in various contexts, but mostly for soccer games, basketball, and football games
let bar = 456;
// used only for horse races; it is explicitly reset at the beginning of the "endRace()" function
let baz = 789;
// used only for car races; it will be overwritten once we reach the "oilChange()" function
```
Repository: You-Dont-Know-JS
Issue: ES6 & Beyond - Chapter 7: Meta Programming - Reflect API
Labels: for second edition

Hi,

**URL:** https://github.com/getify/You-Dont-Know-JS/blob/master/es6%20%26%20beyond/ch7.md#reflect-api

About **Reflect.enumerate** (url: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/enumerate)

> The static **Reflect.enumerate**() method used to return an iterator with the enumerable own and inherited properties of the target object, **but has been removed in ECMAScript 2016 and is deprecated in browsers**.
Repository: flutter
Issue: Messages dropped if sent to a detached platform view
Labels: engine,P2,a: plugins,team-engine,triaged-engine

See https://github.com/flutter/engine/pull/3927
Repository: vscode
Issue: Change all occurrences in a single 100MB line leads to a crash when autosave on
Labels: feature-request,editor-core

Testing #30243.

32-bit Windows

0. Enable autosave. 
1. Open 100MB file generated by Dummy File Creator (non-random content). I got single line generated.
2. Type 'sd' in several places on the same line.
3. Do an edit via 'Change all occurrences' from the context menu.
Observe crash.

Should we disable triggering autosave for large files?
Repository: go
Issue: runtime: label runtime functions based on their roles
Labels: help wanted,NeedsFix,FeatureRequest,compiler/runtime

As runtime provides more features, we often observe a program's profile is dominated by runtime functions. For example, this is a cpu profile of a program from blog.google.com/profiling-go-programs article (but compiled with go1.9). I highlighted the runtime function frames with purple color. Even for more complex program, we expect at least a quarter of the profiled CPU time to be associated with runtime.
 
![pprof](https://user-images.githubusercontent.com/4999471/28676358-777e9376-72b8-11e7-9a07-e0f718f667de.png)

This is useful to analyze performance issues related to runtime. However, often times, it distracts users from focusing on the application logic. On the other hand, Go runtime provides various functionalities (scheduling, GC, map, synchronization, etc), it's still difficult to answer questions like e.g.,
 - what's the CPU time spent by GC?
 - what's the CPU time spent by map operation?

without knowledge on runtime implementation.

Go 1.9 introduced profiler labels that allows users to label profile samples.
(http://tip.golang.org/doc/go1.9#pprof-labels)
Users can do aggregation or filtering of samples based on the labels (e.g. rpc methods, users, operation mode, etc). 

Similarly, I propose to add labels for runtime functions based on the roles of functions to help  aggregating and analyzing the cost involving runtime more conveniently.  Labels are grouping of runtime functions curated by runtime developers. Implementation-wise, it doesn't necessarily have to use the similar mechanism like the profiler label. Instead, when pprof proto is constructed, it can check the existence of the runtime functions and label based on them.  

note 1: Alternative approach discussed was to name the runtime functions based on feature it offers, (e.g. all GC related functions should be prefixed with GC or gc, etc) and users use them to filter or hide using pprof options. That is not as nice as labels, and requires more efforts from users to use it right. Another approach mentioned was to filter out uninteresting frames when publishing or visualizing profiles. That is not ideal because sometimes we want the details and also the list of 'uninteresting' functions may change over time.

note 2: We can envision that pprof recognizes runtime labels and presents the aggregated boxes for each group instead of the detailed runtime call graphs unless asked to display the detailed runtime call graph.

@rakyll @randall77 @aclements
Repository: go
Issue: x/build/maintner: poll Gerrit more often than 5 minutes
Labels: Builders

If Gerrit emails are delayed (there's no SLA?), maintner (our Gerrit+GitHub mirror) doesn't get updated until the next Gerrit poll every 15 minutes.

We should probably do a cheap poll more often than 15 minutes.

I just saw an email delay of 3-5 minutes.

@andybons, what's a cheap (for Gerrit, and for our quota) way to ask Gerrit what's changed recently, including comments & votes?

A full git ls-remote on each project is pretty expensive, both in network & since we need to do it for each project.
 
A query over all changes/projects with a Limit of 1 seems cheap network-wise, but not sure what the quota is for that. Can we do it every minute?
Repository: flutter
Issue: TextSelectionControls.handlePaste is racy
Labels: a: text input,c: crash,framework,engine,P2,team-engine,triaged-engine,fyi-text-input

handlePaste doesn't lock the text field while it's waiting for a response from the clipboard. The user could tap "paste" multiple times in a row, or paste then edit text, or paste then leave the page entirely. Results could vary from the appearance of inoperative UI (only one paste when you tap twice), to data corruption or data loss (paste overwriting what the user has since written), to crashes (if we try to interact with the delegate after it's been disposed).
Repository: youtube-dl
Issue: Support decoding Coub videos (was: Downloaded Coub video file broken)
Labels: request,bug

## Please follow the guide below

- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x])
- Use *Preview* tab to see how your issue will actually look like

---

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.07.23*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [X] I've **verified** and **I assure** that I'm running youtube-dl **2017.07.23**

### Before submitting an *issue* make sure you have:
- [X] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [X] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones

### What is the purpose of your *issue*?
- [X] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

casval@casval-X6815 /tmp % youtube-dl http://coub.com/view/eq9pa -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'http://coub.com/view/eq9pa', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.07.23
[debug] Python version 2.7.13 - Linux-4.10.0-28-generic-x86_64-with-Ubuntu-17.04-zesty
[debug] exe versions: avconv 3.2.4-1build2, avprobe 3.2.4-1build2, ffmpeg 3.2.4-1build2, ffprobe 3.2.4-1build2, rtmpdump 2.4
[debug] Proxy map: {}
[Coub] eq9pa: Downloading JSON metadata
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'http://s3.storage.akamai.coub.com/get/b130/p/coub/simple/cw_file/30cf7df5d5e/aa6e6b21fbdf78b11538d/muted_mp4_big_size_1473445250_muted_big.mp4'
[download] Destination: Spergberb-eq9pa.mp4
[download] 100% of 1.77MiB in 00:00
casval@casval-X6815 /tmp % mpv Spergberb-eq9pa.mp4 
Playing: Spergberb-eq9pa.mp4
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found
[lavf] avformat_open_input() failed
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found
[lavf] avformat_open_input() failed
Failed to recognize file format.


Exiting... (Errors when loading file)

---

When I try to download a Coub video, the resulting video file is unplayable (I tried VLC, as well) and judging by the URL is also tried to download the muted version of the video.
Repository: godot
Issue: Gizmos aren't Z-sorted properly with transparent surfaces
Labels: bug,topic:rendering,topic:editor,topic:3d

Godot 3.0 alpha1 official
Windows 10 64 bits
nVidia geforce 940M

It depends on the viewing angle, gizmos get randomly drawn behind or in front of transparent surfaces. In the screenshot, the blue plane is slightly transparent:

![image](https://user-images.githubusercontent.com/1311555/28696480-17c1c18c-7336-11e7-986c-f0f9b7ae971c.png)
Repository: TypeScript
Issue: Allow calls to overloaded functions when all possible combinations of union type parameters resolve to valid overloads
Labels: Suggestion,In Discussion

**TypeScript Version:**  2.4.1

**Code**

Case 1
```ts
// overloaded functions
declare function f(a: number): number;
declare function f(a: string): string;

function g<T extends number | string>(a: T) {
    return f(a); // either of arguments is acceptable
//           ~
// Argument of type 'T' is not assignable to parameter of type 'string'.
//  Type 'string | number' is not assignable to type 'string'.
//    Type 'number' is not assignable to type 'string'.
}
```

Case 2
```ts
declare function f2<T>(a: Promise<T>): number;
declare function f2<T>(a: T): string;

function g2<T>(a: T) {
    const result: string = f2(a); // first overload is ignored, but the argument can be a Promise
    return result;
}
```

**Expected behavior:**

Case 1: compiles with no errors
Case 2: error that type `string | number` is not assignable to type `string`

**Actual behavior:**

Case 1: error

```
Argument of type 'T' is not assignable to parameter of type 'string'.
  Type 'string | number' is not assignable to type 'string'.
    Type 'number' is not assignable to type 'string'
```
Case 2: compiles without errors

**Note**

I remember here were some discussions about that, so that verifying all possible paths may result in N*M complexity (N overloads, M constituent types in unions). I could not find it.

The second case seems unsafe at all, because skips a possibly valid overload which may effect on return type. I expect that `f2(a)` would be of type `number | string` because either of these two overloads can play. It actually has the same result with `a: any`.
Repository: TypeScript
Issue: Infer constrained generic parameters after instanceof check
Labels: Suggestion,In Discussion,Fix Available

<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

**TypeScript Version:**  2.4.0

When a variable passes an `instanceof` check generic type with constraints on the type parameter, apply to constraints to the variable.  There is currently no clean way to handle the following without an explicit cast:

**Code**

```ts
interface Foo {
    foo: string;
}

class Bar<T extends Foo> {
    constructor(readonly bar: T) {}
}

let a: any;
if (a instanceof Bar) {
    a.bar; // <-- a.bar should be 'Foo' instead of 'any'
}
```

**Expected behavior:**

`a.bar` is inferred as an instance of `Foo`.

**Actual behavior:**

`a.bar` is `any`

This change would only impact type checking, and will not affect compilation output.
Repository: thefuck
Issue: Hitting enter does not execute the previous command in Windows Git Bash
Labels: help wanted,hacktoberfest

```
$ echo "foo'
> ^C
$ fuck
echo "foo" [enter/↑/↓/ctrl+c]
(hangs here...)
```

---

This is on Windows Git Bash (bash 4.4). `thefuck --version` and `type fuck` are below.

```
$ thefuck --version
The Fuck 3.18 using Python 2.7.13

$ type fuck
fuck is a function
fuck ()
{
    TF_PREVIOUS=$(fc -ln -1);
    TF_PYTHONIOENCODING=$PYTHONIOENCODING;
    export TF_ALIAS=fuck;
    export TF_SHELL_ALIASES=$(alias);
    export PYTHONIOENCODING=utf-8;
    TF_CMD=$( thefuck $TF_PREVIOUS THEFUCK_ARGUMENT_PLACEHOLDER $@ ) && eval $TF_CMD;
    export PYTHONIOENCODING=$TF_PYTHONIOENCODING;
    history -s $TF_CMD
}
```
Repository: vscode
Issue: [Feature] Color Picker: Keyboard accessibility
Labels: help wanted,feature-request,accessibility,editor-color-picker

Refs: #31457

It is good that the color picker can be triggered via our "Show Hover" command, however after that you can not do any changes to it using the keyboard.
It should be possible to use the keyboard to navigate inside the color picker and choose colors appropriatly.
Repository: rust
Issue: reached the recursion limit while instantiating `function_name::<[closure]>`
Labels: A-closures,T-compiler,C-bug

Here is a shortened version of the code I hit this with:
https://play.rust-lang.org/?gist=01e76f65024cbf57bb018547932aaef2&version=stable

The error message is everything but enlightening as to what is going wrong, and from a programmer perspective, there is nothing in there that should hit a recursion limit.

@bluss had this to say on irc:

> So the first call is `Arguments::from` with `F` = `U1` (some unique closure type for the initial closure) which recursively calls from with `F` = `U2` (new type for `|| None`) which calls from with `F` = `U3` (new type for `|| None`)   And `U2` and `U3` are different because they are compiled in functions with different type parameters? `U2` is compiled with `F`=`U1` and `U3` is compiled with `F` = `U2`
> I think we can test if that's true
> with this we have a closure with an anonymous type still, but that doesn't depend on any type parameter. It's `Self::nop()` in this code. https://play.rust-lang.org/?gist=c82188fa9cf9c592b1956f6a5b5babe4&version=nightly
> so yeah, rustc could be a lot smarter in this case

Note that I worked around it by just manually inlining the recursion, which is also shorter.
Repository: godot
Issue: Module Question: How to write a module that replaces a core piece of the engine?
Labels: topic:core,topic:buildsystem,documentation

I am currently working on a project, and due to the nature of the project, and the target I need to write a few modules to replace some core components of the engine.

Specifically the Renderer, and the Physics system.

The documentation states that you can use a module to replace the current renderer, and the physics system. But it is only a hint. There's no information about how to do this correctly.

Can someone point me in the right direction?
Repository: youtube-dl
Issue: Support Youtube/Google one-touch authentication with Android
Labels: request

When using 2FA to login to Youtube, there is either `HTTP Error 500: Internal Server Error` or `HTTP Error 402`. 

I suspect it is because Google accounts with an active Android device allow the Android device to authorize sign in request, and 2FA is not required. This is what appears on my Android device:

![google_signin](https://user-images.githubusercontent.com/760008/28722576-ce31204c-73e6-11e7-8fac-61b0a951233b.jpg)

Could youtube-dl support this one-click sign on for Android when available, and fall back to TOTP/2FA only when it is not available?

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is 
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.07.23**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones

### What is the purpose of your *issue*?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [x] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue*

---

### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:

Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):
```
$ youtube-dl -v 'https://www.youtube.com/watch?v=TAgVVc5hAiE'
[debug] System config: []
[debug] User config: ['--proxy', 'localhost:8888', '-uxxxxxxxx@gmail.com', '--mark-watched']
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=TAgVVc5hAiE']
Type account password and press [Return]: 
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.07.23
[debug] Python version 3.6.1 - Darwin-14.5.0-x86_64-i386-64bit
[debug] exe versions: avconv 12, avprobe 12, ffmpeg 3.3.2, ffprobe 3.3.2, rtmpdump 2.4
[debug] Proxy map: {'http': 'localhost:8888', 'https': 'localhost:8888'}
[youtube] Downloading login page
[youtube] Looking up account info
[youtube] Logging in
Type 2-step verification code and press [Return]: 
[youtube] Submitting TFA code
WARNING: Unable to submit TFA code: HTTP Error 500: Internal Server Error
WARNING: Unable to extract CheckCookie URL
[youtube] TAgVVc5hAiE: Downloading webpage
Repository: kubernetes
Issue: Cache mounts on the host
Labels: sig/storage,kind/feature,lifecycle/frozen

<!-- This form is for bug reports and feature requests ONLY! 

If you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).
-->

**Is this a BUG REPORT or FEATURE REQUEST?**:
/kind feature
/sig storage

**What happened**:
 In #48402 a new mount check was added to handle the case of bind mounts on directories (and not actual mount points).  The new check has to iterate through all the mounts on the system, which could be time-consuming if there are many mounts.  It may be worth looking into caching the mounts to optimize this check.
Repository: kubernetes
Issue: Add garbage collector tests to cover aggregated API servers
Labels: area/test,sig/api-machinery,kind/feature,lifecycle/frozen

With the introduction of [CRD support in the garbage collector](https://github.com/kubernetes/kubernetes/pull/47665), we decided to open this followup issue to introduce expanded test coverage to verify GC works with custom resources backed by aggregated API servers. 

/kind feature
@kubernetes/sig-api-machinery-feature-requests
Repository: rust
Issue: No explanation for source of static lifetime requirement in E0597
Labels: C-enhancement,A-diagnostics,T-compiler

The compiler can do better at indicating the source of the `'static` requirement from various sources, including closures passed to functions (e.g., `thread::spawn`) and `Box<Error>` having an implicit `Error + 'static` bound.

-----------------

## Thread::spawn case

This minimized code:

```rust
use std::thread;

struct Thing<'a> {
    blut: &'a str
}

fn main() {
    let dest = String::from("/etc");
    let dest = &dest[..];
    let thing = Thing { blut: dest };
    let t = thread::spawn(|| { thing; });
}
```

gives the error

```
error[E0597]: `dest` does not live long enough
  --> <source>:9:17
   |
9  |     let dest = &dest[..];
   |                 ^^^^ does not live long enough
...
12 | }
   | - borrowed value only lives until here
   |
   = note: borrowed value must be valid for the static lifetime...
```

which is as intended, I think (ending with a ellipsis is a little weird, but it historically was followed by a second note about a "block suffix" which was removed because nobody knows what that means). But it would be great if the error could tell me the two critical pieces of information leading to the error:

1. The `'static` requirement comes from `F` in `thread::spawn::<F>`
2. `dest` is used in the closure because it's in the struct `thing`

Especially number 2 is not obvious at all.

## Box<Error> case

(code partially stolen from https://github.com/rust-lang/rust/issues/35580)

```rust
use std::error::Error;

struct SomeStruct;

#[derive(Debug)]
enum SomeError<'a> {
    Something(&'a str),
    Other,
}

fn do_stuff(doc: &usize) -> Result<SomeStruct, SomeError> {
    Ok(SomeStruct)
}

fn get_things() -> Result<SomeStruct, Box<Error>> {
    let res = try!(Err(SomeError::Other));
    Ok(try!(do_stuff(&res)))
}


impl<'a> std::fmt::Display for SomeError<'a> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
        write!(f, "blah")
    }
}

impl<'a> Error for SomeError<'a> {
    fn description(&self) -> &str { "blah" }
}
```

```
error: `res` does not live long enough
  --> ./test.rs:17:23
   |
17 |     Ok(try!(do_stuff(&res)))
   |                       ^^^ does not live long enough
18 | }
   | - borrowed value only lives until here
   |
   = note: borrowed value must be valid for the static lifetime...
```