sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Stack overflows in tests under package:flutter/
Labels: c: crash,engine,platform-mac,dependency: dart,P2,team-engine,triaged-engine

## Steps to Reproduce

Add a stack overflow bug to  test/widgets/sliver_fill_viewport_test.dart

I would hope running the test with a stack overflow would return a stack trace providing some indication of where the stack overflow occurred but does not. Instead the vm appears to hard crash.
Output running test with -v:
 
```
  Shell subprocess terminated by ^C (SIGINT, -2) after tests finished.
  Test: /Users/jacobr/git/flutter/2/flutter/packages/flutter/test/widgets/sliver_fill_viewport_test.dart
  Shell: /Users/jacobr/git/flutter/2/flutter/bin/cache/artifacts/engine/darwin-x64/flutter_tester
  
  
  package:stream_channel                                    _GuaranteeSink.addError
  package:flutter_tools/src/test/flutter_platform.dart 216  _FlutterPlatform._startTest.<fn>
  ===== asynchronous gap ===========================
  dart:async                                                _asyncThenWrapperHelper
  package:flutter_tools/src/test/flutter_platform.dart 206  _FlutterPlatform._startTest.<fn>
  package:flutter_tools/src/test/flutter_platform.dart 371  _FlutterPlatform._startTest
  ===== asynchronous gap ===========================
  dart:async                                                _asyncThenWrapperHelper
  package:flutter_tools/src/test/flutter_platform.dart 143  _FlutterPlatform._startTest
  package:flutter_tools/src/test/flutter_platform.dart 136  _FlutterPlatform.loadChannel
  
```
## Flutter Doctor

```
[✓] Flutter (on Mac OS X 10.12.5 16F73, locale en-US, channel unknown)
    • Flutter at /Users/jacobr/git/flutter/2/flutter
    • Framework revision d522c8bdc7 (4 days ago), 2017-06-15 08:02:25 -0700
    • Engine revision 784e975672
    • Tools Dart version 1.24.0-dev.6.7

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
    • Android SDK at /Users/jacobr/Library/Android/sdk
    • Platform android-25, build-tools 25.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.3.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 8.3.2, Build version 8E2002
```
Repository: youtube-dl
Issue: .netrc file: add support for passwords containing spaces
Labels: external-bugs

- [X] I've **verified** and **I assure** that I'm running youtube-dl **2017.06.18**
```
$  youtube-dl --version
2017.06.18
```
- [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*?
- [ ] 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

---

### Description of your *issue*, suggested solution and other information

```
$ cat .netrc
machine facebook login "user_login" password "password with spaces"

$ cat .config/youtube-dl/config 
--netrc

$ youtube-dl https://www.facebook.com/XXXXXXX/videos/XXXXXXX/
WARNING: parsing .netrc: bad follower token '?????' (/home/user/.netrc, line 1)
```

Is should be possible to quote passwords containing spaces.
Repository: rust
Issue: Confusing lifetime error with closure
Labels: C-enhancement,A-lifetimes,A-closures

```rust
struct Foo<'a> { foo: &'a str }

fn main() {
    let foo = Foo { foo: "foo" };
    let closure = |foo: Foo| foo;
    closure(foo);
}
```

Intuitively I don't quite see why this shouldn't compile, but:

```
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
 --> <anon>:5:30
  |
5 |     let closure = |foo: Foo| foo;
  |                              ^^^
  |
note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 5:19...
 --> <anon>:5:19
  |
5 |     let closure = |foo: Foo| foo;
  |                   ^^^^^^^^^^^^^^
note: ...so that expression is assignable (expected Foo<'_>, found Foo<'_>)
 --> <anon>:5:30
  |
5 |     let closure = |foo: Foo| foo;
  |                              ^^^
note: but, the lifetime must be valid for the call at 6:5...
 --> <anon>:6:5
  |
6 |     closure(foo);
  |     ^^^^^^^^^^^^
note: ...so type `Foo<'_>` of expression is valid during the expression
 --> <anon>:6:5
  |
6 |     closure(foo);
  |     ^^^^^^^^^^^^
```

Especially bewildering is that `expected Foo<'_>, found Foo<'_>`.  Those look the same to me!
Repository: rust
Issue: Rust will memmov |self| when passed by value to inline function
Labels: A-LLVM,I-slow,C-enhancement,P-medium,T-compiler,C-optimization

See the assembly for https://is.gd/0Owhgw . Note that you'll need to explicitly specify Release, because I can't link to Release code for some reason.

Note this bit here:
>	movl $400, %edx
>	movq %rbx, %rsi
>	callq memcpy@PLT

That looks like a very unnecessary and large copy.

I ran into this working on rust-selectors for stylo. In the parser, we have a very large stack-allocated SmallVec, under the assumption that it is never moved. I added some inline functions that take the buffer as |self|, and parsing got several percent slower. I rewrote the code to pass things as &mut, and the overhead went away.

Interestingly, doing:

for x in some_small_vec.into_iter() {
...
}

Doesn't have any memcpy in the disassembly, despite the fact that into_iter() takes self. Presumably some iterator optimization going on.

CC @SimonSapin @mbrubeck @Manishearth @Gankro @jonathandturner
Repository: TypeScript
Issue: Bad automatic formatting when filling in type argument as object literal
Labels: Bug,Help Wanted,Domain: Formatter

**TypeScript Version:**  nightly (2.5.0-dev.20170619)

**Code**

Type:

```ts
declare function f<T>(): void;
f<{}>();
```

**Expected behavior:**

Get what you typed.

**Actual behavior:**

Get:
```ts
declare function f<T>(): void;
f < {}>();
```
Repository: TypeScript
Issue: Boolean() cannot be used to perform a null check
Labels: Suggestion,Awaiting More Feedback

**TypeScript Version:**  2.4.0

Apologies for today's issue raising binge.

**Code**

```ts
// Compiles
const nullCheckOne = (value?: number) => {
    if (!!value) {
        return value.toFixed(0);
    }

    return '';
}

const nullCheckTwo = (value?: number) => {
    if (Boolean(value)) {
        // Object is possibly 'undefined'
        return value.toFixed(0);
    }

    return '';
}

```
**Expected behavior:**
Both examples compile.

**Actual behavior:**
The latter example fails w/ `Object is possibly 'undefined'`.

**Explanation**
To my knowledge `!!value` and `Boolean(value)` are equivalent. I'm wondering what is the reason behind not supporting the second case. One reason I can think of would be an imported, non-typescript module, globally overriding it to something like: `Boolean = (value) => !value`.
Repository: TypeScript
Issue: suggestion: explicit "tuple" syntax
Labels: Suggestion,In Discussion

### Problem

I'm writing this after encountering (what I think is) #3369.  I'm a noob to TS, so I apologize for any misunderstandings on my part.  The behavior the lack of type inference here:

```typescript
interface Foo {
  bar: [number, number];
}

interface McBean {
  baz: Foo;
}

// error: McMonkey does not implement McBean
class McMonkey implements McBean {
  baz = {
    bar: [0, 1]
  };
}

// vs

// no error
class McMonkey implements McBean {
  baz: Foo = {
    bar: [0, 1]
  };
}
```

Because array literals are (correctly) inferred to be arrays, TS is limited in its ability to infer "tuple".  This means there's an added overhead to working with tuples, and discourages use.  

As I see it, the problem is that a tuple is defined using array literal notation.

### A Conservative Solution

Adding a type query (?) such as `tuple` (.e.g `tuple`) would be better than nothing:

```typescript
class McMonkey implements McBean {
  baz = {
    bar: <tuple [number,number]> [0, 1]
  };
}
```

...but this is still clunky, because you'd have to use  it just as much as you'd have to explicitly declare the type.

### A Radical Solution

There's a precedent (Python) for a tuple syntax of `(x, y)`.  Use it:

```typescript
interface Foo {
  bar: (number, number);
}

interface McBean {
  baz: Foo;
}

class McMonkey implements McBean {
  baz = {
    bar: (0, 1)
  };
}
```

#### Obvious Problem

The [comma operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comma_Operator) is a thing, so `const oops = 0, 1` is valid JavaScript.  `0` is just a noop, and the value of `oops` will be `1`.  Python does not have a comma operator (which is meaningful in itself).  

I've occasionally used the comma operator in a `for` loop, similar to the MDN article.  Declaring `var`'s at the top of a function is/was common:

```js
function () {
  var a, b, c;
}
```

Parens are of course used in the syntax of loops and conditionals, as well as a means of grouping expressions.

A nuance of Python's tuples are that they *must* contain at one or more commas, which *could* help: 

```python
foo = (0) # syntax error or just `0`; can't recall
foo = (0,) # valid tuple
```

...or it could actually make matters worse, because `(0, )` is an unterminated statement in JavaScript.

That all being said, using the suggested Python-like syntax, it seems *difficult* but *possible* for the compiler to understand when the code means "tuple" vs. when it doesn't.  

* * *

I'd be behind any other idea that'd achieve the same end.  I don't know how far TS is willing to diverge from JS, and I imagine significant diversions such as the above are not taken lightly.

(I apologize if something like this has been proposed before; I searched suggestions but didn't find what I was looking for)
Repository: go
Issue: go/format: hasUnsortedImports should also test grouped imports (TODO)
Labels: NeedsInvestigation

Reminder to resolve TODO in go/format/format.go:hasUnsortedImports: This function always returns true if there are grouped imports, which causes a lot of extra work even if those imports are sorted.
Repository: flutter
Issue: PageStorageKeys might benefit from a way to identify their primary client
Labels: c: crash,framework,f: scrolling,c: proposal,customer: leafy (g3),P2,team-framework,triaged-framework

Internal: b/292548528

Customer Leafy ran into a confusing problem: ExpansionTiles were asserting in initState():
```
Error: type 'double' is not a subtype of type 'bool' of 'value'
...

#0 _ExpansionTileState._isExpanded= (package:flutter/src/material/expansion_tile.dart:81)
#1 _ExpansionTileState.initState (package:flutter/src/material/expansion_tile.dart:95)
#2 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3502)
...
```
The problem was that the ExpansionTile's were looking up their expanded/collapsed boolean with PageStorage, but only the enclosing PageView specified a PageStorageKey.  PageView uses PageStorage to save its double scroll offset.

In this case it would have been preferable for the expansion tiles to not save their state. 

Some possible ways to improve things:

- ExpansionTiles don't save their state by default. The  dartdoc for a default false  keepExpansionState could cover the need for a PageStorageKey.

-  Scrollables include an inherited widget that only exists to stop  the page storage key tree traversal. If a key wasn't found by the time this widget was reached, the traversal would short-circuit.

The second approach seems like it would result in most apps quietly getting the behavior they'd expect. It would complicate explaining how PageStorageKeys work a little.
Repository: vscode
Issue: [folding] Allow to show amount of lines folded
Labels: feature-request,editor-folding

Hi people!

I would like to see vscode folding with info about lines folded like Netbeans.

Looks like this:

![screenshot_20170620_215124](https://user-images.githubusercontent.com/3067335/27364923-e9a04724-5602-11e7-8c29-4eb09044544a.png)

BTW: Thank you for this awesome code editor! :smile:
Repository: TypeScript
Issue: Imported const enum is not inlined in generated code
Labels: Bug

**TypeScript Version:**  2.4.0

**Code**

```ts
// a.ts
export const enum Foo {
  Bar = 'bar'
}

// b.ts
import { Foo } from './a'

Foo.Bar // TypeError or ReferenceError, depending on how it's compiled
```

**Expected behavior:**
`Foo.Bar` to be replaced with `'bar'`

**Actual behavior:**
The import is deleted and `Foo.Bar` is left as is
Repository: pytorch
Issue: Factorized Output Layer
Labels: todo,feature,triaged

Does PyTorch provide a [factorized output layer](https://arxiv.org/pdf/1412.7091.pdf) in `nn` module? It computes the gradient much faster in sparse output space. This will benefit a lot in NLP experiments.

I can propose such a layer if there isn't one.
Repository: go
Issue: x/net/html: readRawOrRCDATA() parsing issue when text ends with '<'
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?
`go version go1.8.3`
`golang.org/x/net/html: 057a25b06247e0c51ba15d8ae475feb2fcb72164`

### What operating system and processor architecture are you using (`go env`)?
`linux/amd64`

### What did you do?
Tried to parse HTML that contains a textarea that ends with `<`. Minimal example below:
```go
package main

import (
	"fmt"
	"strings"

	"golang.org/x/net/html"
)

func main() {
	example := `<textarea>ends with <</textarea>`
	z := html.NewTokenizer(strings.NewReader(example))

	for {
		tt := z.Next()
		switch tt {
		case html.ErrorToken:
			return

		case html.TextToken:
			txt := z.Text()
			fmt.Printf("$%s$ ", txt)

		case html.StartTagToken:
			tn, _ := z.TagName()
			fmt.Printf("<%s> ", tn)

		case html.EndTagToken:
			tn, _ := z.TagName()
			fmt.Printf("</%s> ", tn)
		}
	}
}
```

### What did you expect to see?
`<textarea> $ends with <$ </textarea>`

### What did you see instead?
`<textarea> $ends with <</textarea>$`

### Possible solution
This diff fixes the problem and passes all tests, but not sure it is correct in all cases and according to the HTML spec:
```diff
diff --git a/html/token.go b/html/token.go
index 893e272..41cb76f 100644
--- a/html/token.go
+++ b/html/token.go
@@ -347,6 +347,7 @@ loop:
                        break loop
                }
                if c != '/' {
+                       z.raw.end--
                        continue loop
                }
                if z.readRawEndTag() || z.err != nil {
diff --git a/html/token_test.go b/html/token_test.go
index 20221c3..f8e3fdf 100644
--- a/html/token_test.go
+++ b/html/token_test.go
@@ -254,6 +254,11 @@ var tokenTests = []tokenTest{
                "<textarea>$&lt;div&gt;$</textarea>",
        },
        {
+               "textarea ends with '<'",
+               "<textarea><</textarea>",
+               "<textarea>$&lt;$</textarea>",
+       },
+       {
                "title with tag and entity",
                "<title><b>K&amp;R C</b></title>",
                "<title>$&lt;b&gt;K&amp;R C&lt;/b&gt;$</title>",
```
Repository: go
Issue: x/image/tiff: package does not support image resolution
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
`go1.8 darwin/amd64`

### What operating system and processor architecture are you using (`go env`)?
`Darwin/amd64`

### What did you do?

Take a tiff image and attempt to decode it with the golang.org/x/image/tiff package.

### What did you expect to see?

I expected a method like this `DecodeResolution(r io.Reader) (Resolution, error)` where `Resolution` is structure like this `
type Resolution struct {
	X, Y int
}
`

P.S.
Now I have a local patch to solve this problem, but I'd like to have it in the library.
Repository: rust
Issue: debuginfo: Subroutine types are not ABI-adjusted
Labels: A-debuginfo,T-compiler,C-bug

Arguments of a type like `[u8; 4]` are actually passed as a single `u32` to a function. At the moment, the debuginfo code does not try to reflect this transformation in any way. This is not important for inspecting function arguments, since they are copied into a local alloca of the correct type, but it might be a problem for debuggers that want to call a function based on its type.
Repository: opencv
Issue: Ptr<DescriptorExtractor> unsupported by Java wrappers generator
Labels: feature,category: java bindings

##### System information (version)
- OpenCV => 3.2.0-813-g16368a2
- Operating System / Platform => Ubuntu 16.04, 64 bits
- Compiler => cmake, g++ 5.4.0


##### Detailed description

The type Ptr&lt;DescriptorExtractor&gt; is unrecognized by the Java wrappers generator. In particular, the class BOWImgDescriptorExtractor can not be used in Java because its constructor has no wrapper. From the generated Java file:

    // C++:   BOWImgDescriptorExtractor(Ptr_DescriptorExtractor dextractor, Ptr_DescriptorMatcher dmatcher)
    //

    // Unknown type 'Ptr_DescriptorExtractor' (I), skipping the function
Repository: kubernetes
Issue: Port-forward for UDP
Labels: area/kubectl,sig/node,kind/feature,sig/cli,priority/important-longterm,lifecycle/frozen,triage/accepted

Kubernetes currently supports port forwarding only for TCP ports. However, Pod/service might expose UDP port too.
Repository: go
Issue: go/ast: Free-floating comments are single-biggest issue when manipulating the AST
Labels: Refactoring

Reminder issue.

The original design of the go/ast makes it very difficult to update the AST and retain correct comment placement for printing. The culprit is that the comments are "free-floating" and printed based on their positions relative to the AST nodes. (The go/ast package is one of the earliest Go packages in existence, and this is clearly a major design flaw.)

Instead, a newer/updated ast should associate all comments (not just Doc and Comment comments) with nodes. That would make it much easier to manipulate a syntax tree and have comments correctly attached. The main complexity with that approach is the heuristic that decides which comments are attached to which nodes.
Repository: opencv
Issue: Need ability to control bitrate in VideoWriter with H264 codec
Labels: feature,category: videoio,RFC

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => 3.2
- Operating System / Platform => osx

##### Detailed description

There is no bitrate param in constructor of ```VideoWriter``` class in videoio module, however there is ```cv::VIDEOWRITER_PROP_QUALITY``` property in range ```[0...100]``` but it is used only for ```MotionJpegWriter```.  Atm bitrate inside ```CvVideoWriter_FFMPEG``` is hardcoded

https://github.com/opencv/opencv/blob/master/modules/videoio/src/cap_ffmpeg_impl.hpp#L1967

and later is actually reset to 0 for H264

https://github.com/opencv/opencv/blob/master/modules/videoio/src/cap_ffmpeg_impl.hpp#L1533

So the question is what is the best way to control quality of output video file - use ```VIDEOWRITER_PROP_QUALITY``` or pass bitrate directly in constructor? I need ability to control output video file size / quality.

@alalek I can implement this, but need your suggestions what is the best way to do it.

##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: rust
Issue: Doc block ignored for `pub extern crate`
Labels: T-rustdoc,E-mentor,C-bug

Looks like doc blocks for `pub extern crate` are ignored and don't show up anywhere in the generated documents.

So, this code
```
/// Unicode Character Database.
pub extern crate unic_ucd as ucd;

/// Unicode Bidirectional Algorithm (USA\#9).
pub extern crate unic_bidi as bidi;

/// Unicode Normalization Forms (USA\#15).
pub extern crate unic_normal as normal;

/// Unicode IDNA Compatibility Processing (UTS\#46).
pub extern crate unic_idna as idna;
```

Results in this output:
<img width="429" alt="screen shot 2017-06-21 at 2 18 10 pm" src="https://user-images.githubusercontent.com/37169/27404767-7a3c30c0-568c-11e7-9c4c-99562a27947f.png">

I believe it's not intentional and just a missing feature because of the (kind of) new `pub extern crate` syntax. Is that correct?
Repository: react
Issue: Feature request: Add a "module" entry in package.json to export ES2015 version of React
Labels: Component: Build Infrastructure,Type: Feature Request

**Do you want to request a *feature* or report a *bug*?**
Request a feature

**What is the current behavior?**
React ecosystem was promoting ES6 classes and modules since 2014 and many packages like react-router, redux and so on, have an "es" folder in the npm package with source code in ES2015 modules. Unless I am missing something, it is strange that React itself does not offer that option.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).**
Install react and try to import it in a browser with native modules enabled.

**What is the expected behavior?**
Have an "es" folder in the npm package with ES2015 modules source code, like most React ecosystem projects do. Allow to import react from ES2015 native modules to make developer workflow more simple.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
All versions
Repository: flutter
Issue: Document how to download an image in the dartdocs for Image.network
Labels: framework,d: api docs,has reproducible steps,P2,found in release: 3.3,found in release: 3.5,team-framework,triaged-framework

Today, to get an image from an image widget, you have to jump through a few steps:

```dart
    Image image = new Image.network('https://i.stack.imgur.com/lkd0a.png');
    Completer<ui.Image> completer = new Completer<ui.Image>();
    image.image
      .resolve(new ImageConfiguration())
      .addListener((ImageInfo info, bool _) => completer.complete(info.image));
```

It would be pretty nice if we had a convenience method like this:

```dart
    Image image = new Image.network('https://i.stack.imgur.com/lkd0a.png');
    ui.Image actualImage = await image.uiImage;
```

(strawman names, of course)