sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Can't extend mixin constructor that constructs a generic type
Labels: Suggestion,In Discussion

This applies regardless of whether or not I intersect it with some bogus type, or have a reasonable constraint. So none of the following works.

**Returning a plain `T`**

```ts
export type Constructor<T> = new (...args: any[]) => T

export interface Timestamp {
    timestamp: Date;
}

// plain old T
export function Timestamp<T, CT extends Constructor<T>>(Base: CT): Constructor<Timestamp> & Constructor<T> {
    return class extends Base {
        timestamp = new Date();
    }
}
```

**Constructor of `T` with a bogus object type (`{}`)**

```ts
export type Constructor<T> = new (...args: any[]) => T

export interface Timestamp {
    timestamp: Date;
}

// Constructor of T with a bogus object type
export function Timestamp<T, CT extends Constructor<T & {}>>(Base: CT): Constructor<Timestamp> & Constructor<T> {
    return class extends Base {
        timestamp = new Date();
    }
}
```

**Constructor of `T` where `T` is constrained to `{}`**

```ts
export type Constructor<T> = new (...args: any[]) => T

export interface Timestamp {
    timestamp: Date;
}

export function Timestamp<T extends {}, CT extends Constructor<T>>(Base: CT): Constructor<Timestamp> & Constructor<T> {
    return class extends Base {
        timestamp = new Date();
    }
}
```


**Constructor of `T` where `T` is constrained to `object`** (see also #13805)

```ts
export type Constructor<T> = new (...args: any[]) => T

export interface Timestamp {
    timestamp: Date;
}

export function Timestamp<T extends object, CT extends Constructor<T>>(Base: CT): Constructor<Timestamp> & Constructor<T> {
    return class extends Base {
        timestamp = new Date();
    }
}
```
Repository: go
Issue: os: `Process` finalizer should wait for process on Unix systems
Labels: NeedsDecision

The os package sets a finalizer on all `Process` values.  Currently, on Unix, that finalizer does nothing useful.  It should probably call `wait` on the process if that has not already been done, to remove the otherwise zombie process.
Repository: TypeScript
Issue: Compiler should complain about implicit return value of child class constructor, if it does not satisfy child class type
Labels: Suggestion,Awaiting More Feedback

**TypeScript Version:**  2.1.5

Since TypeScript 2.1 (due to #7574) the return value of a constructor call is the return value of the super constructor. So that
```typescript
class Child extends Base {}
```
is compiled to
```javascript
function Child() {
     return _super !== null && _super.apply(this, arguments) || this;
}
```
**Actual behavior:**
The actual problem is, that the implementation of `Child`(see example below) will be compiled without errors, despite of the fact that the instance (`child`) does not satisfy its type `Child`, because `someMethod` does not exist on `child`. 

```typescript
class Base {
    hello = 'base';
    constructor() {
        return {
            hello: 'world'
        };
    }
}

class Child extends Base {  // <-- compiler does not complain
    someMethod() {}
}

const child = new Child();
child.someMethod();  // <-- compiler does NOT complain, despite of "someMethod" does not exist on {hello: 'world'}
```
**Expected behavior:**
The compiler should complain about the implicit return value of the child class constructor, if this value is not a type of the child class. So that either an explicitly defined return value for the child class constructor should be forced like...
```typescript
class Child extends Base { 

   constructor() {
     super();
     return { 
       someMethod() {},
       /* ... inherited members */
     }
   }
   someMethod() {}
}
```
or the return value has to be extended (`const base = super()`) to fulfill the type `Child` or all members of the child class have to be optional.
Repository: TypeScript
Issue: [typings installer] ensure that installed @types packages are supported by the current version of the TypeScript
Labels: Bug

If user have installed `@types` package using i.e. TypeScript 2.2 and then moved back to TypeScript 2.1 (via `tsdk` setting) it is possible that installed packages has some syntactic features that are now supported in the older versions of the compiler. Typings installer should detect such cases and updated installed packages to the latest supported version.
Repository: vscode
Issue: [folding] show folding lines
Labels: feature-request,editor-folding

I would like to see more options with code folding and with bracket matching.
It seems the user base is quite split on how they want the collapsed region to display, so I think this should be a user configuration setting along with the other features listed.

### Feature Requests
1. Collapse fold to a single line [Related#2 Alternative Designs#1](https://github.com/Microsoft/vscode/issues/2948#issuecomment-183540068)
1. Bracket anchors/leads/lines seen in `pictures #2 and #3` + [Related#2 Alternative Designs#2](https://github.com/Microsoft/vscode/issues/2948#issuecomment-183540068)
1. Peek at top bracket when hovering the bottom bracket `pictures #3` This should only happen when the top matching bracket isn't visible on the current viewport.
1. Highlight current region. In `pictures #1 and #2` it highlights the current block you're on
1. Collapse block from bottom bracket. In `pictures #1 and #3` you can collapse a block region from the lower bracket which can be really nice, it can be a quick way to see what the bracket belongs to w/o feature `request #3`

### Picture examples
1. Single line collapse
![image](https://cloud.githubusercontent.com/assets/12663081/22518992/9aacab42-e863-11e6-8c41-068ed3e629f8.png)
1. Anchor / leads / lines
![image](https://cloud.githubusercontent.com/assets/12663081/22526296/87ce5d88-e87f-11e6-9065-5cf626a7441c.png)
1. Peek at top bracket
![image](https://cloud.githubusercontent.com/assets/12663081/22526602/b7da2380-e880-11e6-99fd-6f22296eccb1.png)

### Related
1. Collapse to same line #3352 
1. Icons for folding #2948

#### Labels
- editor 
- editor-folding 
- feature-request
Repository: flutter
Issue: Proposal: find.widgetWithText should return one widget instead of two if the widget has two children with the text given
Labels: a: tests,framework,c: proposal,P2,team-framework,triaged-framework

I'm describing the situation like this,
```dart
new Row(children: [new Text('foo'), new Text('foo')]);
```
If I call `find.widgetWithText('foo')`, I expect `findsOneWidget`. But currently it finds two. Because two text widgets are found first and then trace the ancestors of they two. For both text widgets, the same Row is found twice.
Repository: go
Issue: x/net/http2: make Transport check whether a GET Request.Body has any bytes before sending stream?
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?
go version go1.7.5 darwin/amd64 (also tested on linux)

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/kalbasit/code"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7.5/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7.5/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ty/mr64q0m92n98g9lkdrthg2qc0000gn/T/go-build293044907=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
```

### What did you do?
https://play.golang.org/p/uwnSRGt27v
```
package main

import (
	"bytes"
	"crypto/tls"
	"io"
	"io/ioutil"
	"log"
	"net/http"
)

func main() {
	c := http.Client{}

	// According to the CloudFront documentation for a request behavior, if the
	// request is GET and includes a body, it returns a 403 Forbidden. See the
	// documentation here:
	// https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#RequestCustom-get-body
	var body bytes.Buffer
	r, err := http.NewRequest("GET", "https://d1ytf8d9p4nfnz.cloudfront.net/optivpaid/optivpaid.js?cb=847742584", ioutil.NopCloser(&body))
	if err != nil {
		log.Fatalf("error creating the request: %s", err)
	}

	res, err := c.Do(r)
	if err != nil {
		log.Fatalf("error doing the request: %s", err)
	}
	io.Copy(ioutil.Discard, res.Body)
	res.Body.Close()

	log.Printf("response status for an HTTP/2 request: %s", res.Status)

	// doing the same request without HTTP/2 does work
	c.Transport = &http.Transport{
		TLSNextProto: map[string]func(string, *tls.Conn) http.RoundTripper{},
	}
	r, err = http.NewRequest("GET", "https://d1ytf8d9p4nfnz.cloudfront.net/optivpaid/optivpaid.js?cb=847742584", ioutil.NopCloser(&body))
	if err != nil {
		log.Fatalf("error creating the request: %s", err)
	}

	res, err = c.Do(r)
	if err != nil {
		log.Fatalf("error doing the request: %s", err)
	}
	io.Copy(ioutil.Discard, res.Body)
	res.Body.Close()

	log.Printf("response status for an HTTP/1 request: %s", res.Status)
}
```

### What did you expect to see?
```
% go run main.go
2017/02/01 17:27:31 response status for an HTTP/2 request: 200 OK
2017/02/01 17:27:32 response status for an HTTP/1 request: 200 OK
```


### What did you see instead?
```
% go run main.go
2017/02/01 17:27:31 response status for an HTTP/2 request: 403 Forbidden
2017/02/01 17:27:32 response status for an HTTP/1 request: 200 OK
```
Repository: three.js
Issue: AudioLoader and LoadingManager onLoad Race
Labels: Bug,Loaders

##### Description of the problem 

`AudioLoader` calls `scope.manager.itemEnd` (through the file loader) after loading the buffer, but its own `onLoad` after decoding it. Since decoding the buffer is asynchronous (or at least, has a callback) you can get into a race condition if the audio loader is the last loader in the loading manager's queue, where the manager thinks all of it's items are finished but the individual loaders haven't finished parsing. We noticed this in our preloading situation and had to implement our own loading queue that used the per-item `onLoad` to tick off complete items.

Unfortunately, looking at FileLoader/AudioLoader source, I'm not sure how to fix this or if it's even a concern; maybe the easiest solution to just clarify in the docs that `LoadingManager#onLoad` only indicates the network request is finished, and doesn't indicate that the data has been parsed.

##### Three.js version

- [x] r84

##### Browser

- [x] All of them

##### OS

- [x] All of them
Repository: vscode
Issue: Add action to show inline all diagnostics in file.
Labels: feature-request,editor-contrib,languages-diagnostics

`F8` and `Shift + F8` navigation between diagnostic is really nice but sometimes it would be useful to have nice view of all diagnostics in current file. 

Looks like it would be fairly simple to implement, just one additional editor action in https://github.com/Microsoft/vscode/blob/2a40036dbb34aac4f5aefbe999c21f2eaf76c59b/src/vs/editor/contrib/gotoError/browser/gotoError.ts, I could try implementing it if this feature idea is accepted.
Repository: TypeScript
Issue: Doc comment applied to all components of dotted namespace declaration
Labels: Bug,Help Wanted

**TypeScript Version:** 2.1.5, 2.2-rc

**Code**

```ts
/** Performance measurements for the compiler. */
namespace ts.performance {}
```

**Expected behavior:**
The doc comment should show up in quickinfo/completion for references to the innermost declared namespace `performance`, but not for `ts`.

**Actual behavior:**
The doc comment appears in quickinfo/completion for references to both `performance` and `ts`, even though for the outer namespace `ts` it's most likely irrelevant:
![jsdoc](https://cloud.githubusercontent.com/assets/1071296/22572961/800dd146-e95b-11e6-82d7-f43153b69536.png)
Repository: three.js
Issue: Inconsistent return value type from FileLoader.load()
Labels: Suggestion,Loaders

##### Description of the problem 

`FileLoader.load()` returns three types of return value.
1. `XMLHttpRequest` instance when cache doesn't hit and url is not data: URI
2. cached data when cache hits
3. `undefined` when url is data: URI

As for me it'd be kinda confusing to users because the return value type
depends on the cache state and url type.
Another confusing thing is it returns cached(loaded) data synchronously
before it calls `manager.itemEnd()` when cache hits.

I like consistent design,
I want loaded/cached data only to be asynchronously passed to user via `onLoad` callback.

So how about returning `null` when 2. and 3.?
Or any other ideas?

##### Three.js version

- [x] Dev

##### Browser

- [x] All of them
- [ ] Chrome
- [ ] Firefox
- [ ] Internet Explorer

##### OS

- [x] All of them
- [ ] Windows
- [ ] Linux
- [ ] Android
- [ ] IOS

##### Hardware Requirements (graphics card, VR Device, ...)
Repository: vscode
Issue: Explore using formatters for indentation adjustment when formatters are available
Labels: editor-autoindent,under-discussion

VSCode 1.9 introduced initial support for line indenting as [per the release notes](https://code.visualstudio.com/updates/v1_9#_indentation-rules-improvements), I think it's this commit: https://github.com/Microsoft/vscode/commit/be1b5f75161a30dd63316b832067b41d2caec0b3. I'm very interested in this feature, big 👍 for bringing it into VSCode.

Here is some initial feedback:

- I tried for a couple of file formats, it only worked for TypeScript and not e.g., for JSON or PHP.
- Formatting (`Alt+Shift+F`) can already do indentation better than the new implementation, maybe it could be used as a fallback if the language doesn't have proper indentation rules.
- If I read the code correctly, it re-indents the whole file. It should respect my selection. For example, if I have only 10 lines selected, it should re-indent those. If I don't have any selection, it should do the whole file.
- The command is currently `editor.action.reindentlines`, proper casing would be `editor.action.reindentLines`.
Repository: neovim
Issue: syntax: "indent" grouping
Labels: enhancement,api,syntax

There are several popular languages (Haskell, Python) and file formats (YAML, cabal) out there that are indentation sensitive and as far as I know `Vim` is not very good in supporting that when it comes to things like syntax highlighting.
The only approach that I'm aware of is doing backtracking with Vimscript which is tedious and error prone.
I'm the main author of `haskell-vim` and I get quite a lot of feature requests that would need a way to figure out in which kind of block I am.

A very handy thing would be something like `syn indent` that works like so:

Let's say we want to define how `do` blocks in Haskell are being highlighted. They start with the keyword `do`.

```viml
syn indent {group-name} start="\<do\>" contains=…
```
If that rule finds a match all the following lines indented relative to the match belong to that group.

Example:

```haskell
fun x = do -- match
  foo -- indented by 2 relative to the matched line, therefore part of the group
  bar -- ditto

-- not indented anymore, therefore not part of the group. 
bar x d = …
```

A way to tell that the group should ignore empty lines would also be handy so something like this could work:

```haskell
fun x = do --match
   foo -- part of the group

   bar -- also part of the group
```
Maybe there already is a way to do this with Neovim but if there isn't this would make writing plugins  for languages with significant whitespace a lot easier.
Repository: rust
Issue: Escaping `char` in libcore adds 2k of static data for no_std cases
Labels: A-Unicode,T-libs-api,E-help-wanted,C-feature-accepted,WG-embedded,I-heavy

The PR to [improve char escaping](https://github.com/rust-lang/rust/pull/34485) unfortunately added 2k of static data to libcore, which impacts the `no_std` use case on small devices. Even if in some cases this data could be eliminated automatically, if you ever format a character, you'll definitely bring these tables in.

We should see whether there's a way to get this functionality while moving the bloat to `libstd`, perhaps using specialization.
Repository: rust
Issue: Incorrect type mismatch resolving when using return in closure
Labels: A-inference,C-bug

The following code is failing to compile in stable and nightly

```rust
fn main() {
    let a = |hello| { return hello + 1; };
    let _ = a(2);
}
```

with the following message:
```
rustc 1.15.0 (10893a9a3 2017-01-19)
error[E0271]: type mismatch resolving `<i32 as std::ops::Add>::Output == ()`
 --> <anon>:2:30
  |
2 |     let a = |hello| { return hello + 1; };
  |                              ^^^^^^^^^ expected i32, found ()
  |
  = note: expected type `i32`
  = note:    found type `()`

error: aborting due to previous error
```

If I remove the return and the semicolon, it works as expected.

Adding the type `i32` to `_` or adding a type to the parameter (e.g.: `2u32`) fixes the problem.
Repository: opencv
Issue: iOS: Build only device archs, without simulator
Labels: feature,priority: low,category: build/install,platform: ios/osx

It seems like there is no way currently to build opencv framework only for devices archs, without the ones for simulator. 

Is there any specific reasons for that? I think it may help to reduce framework size.
Repository: rust
Issue: Suggestion: make string/slice more efficient with match
Labels: I-slow,C-enhancement,T-compiler

The `match` clause is already flexible to generate a `switch` IR for enum and integers.

It would be good to see a good implementation for str, [T] too. https://github.com/sfackler/rust-phf is a good candiate, since it's translated to a switch+equality comparison, and the code generation doesn't take much time (.4s for 100000 entries).
Repository: rust
Issue: dead_code warnings for functions/types used in a unused function
Labels: A-lints,I-needs-decision,C-bug

Hi everybody.
[Playground](https://is.gd/jMqXK2)
Code:
```rust
fn foo() {}
fn bar() {
    foo();
}
fn main() {}
```
Output:
```
warning: function is never used: `foo`, #[warn(dead_code)] on by default
 --> <anon>:1:1
  |
1 |   fn foo() {
  |  _^ starting here...
2 | |     
3 | | }
  | |_^ ...ending here

warning: function is never used: `bar`, #[warn(dead_code)] on by default
 --> <anon>:5:1
  |
5 |   fn bar() {
  |  _^ starting here...
6 | |     foo();
7 | | }
  | |_^ ...ending here
```

I don't like it because it confuses what exactly isn't used.
Repository: youtube-dl
Issue: A model, well-commented extractor
Labels: request

Since I'm not intimately familiar with the youtube-dl codebase, when I make a change to an extractor I often want to review other extractors to see how things have been handled previously. But oftentimes, it's really not clear which of several choices is better, what is favored, and what is more elegant.

If I had time to read through every single extractor I could make those determinations, but with 600+ of them, that's kind of daunting. Oftentimes I'll grep for a function and start looking at how abc.py and abcnews.py do it, since they are first alphabetically. But that's perhaps not a great plan.

It would be nice if there were a few well-written sample or "model" extractors that were highlighted as Best Practices that we could look at and review. And if those were clearly identified somehow, so I know where to look (maybe such model extractors exist already, I'm just not sure what to be looking at?). All things being equal, it'd be great if they were at the head of the alphabet, too :)

Thanks.

Also, the youtube-dl coding style seems to discourage comments. Maybe when you're very familiar with the code and the functions in common.py they don't seem so important, but for someone new to the codebase, they can help a lot. So it would be nice if any such model extractors could also be well-commented, or at least more verbosely commented than is typical in the codebase.
Repository: youtube-dl
Issue: site request
Labels: site-support-request

please add support for http://www.infowars.com/watch-alex-jones-show/

thanks
Repository: go
Issue: x/net/html/charset: htmlEncoding incompatibility with x/text/encoding/htmlindex.Name
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

```
$ go version
go version go1.7.3 darwin/amd64
```

### What operating system and processor architecture are you using (`go env`)?

```go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/gautiertanguy/work"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/w3/f2rhtgc56jv010vxvkdpvk4m0000gn/T/go-build762276495=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
```

### What did you do?

Run :

```
package main

import (
	"fmt"

	"golang.org/x/net/html/charset"
	"golang.org/x/text/encoding/htmlindex"
)

func main() {
	enc, _ := charset.Lookup("UTF-8")
	name, err := htmlindex.Name(enc)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(name)
}
```


### What did you expect to see?

```
utf-8
```

### What did you see instead?

```
htmlindex: unknown Encoding
```

The type assertion in `htmlindex.Name(enc)` to check if `enc` is a `golang.org/x/text/encoding/internal/identifier.Interface`will always fail in the above code because here `enc` is a `golang.org/x/net/html/charset.htmlEncoding` which wraps the actual encoding (except its eventual internal part).
Repository: TypeScript
Issue: Proposal: JSX.ElementType
Labels: Suggestion,In Discussion,Domain: JSX/TSX

Hello,
There are many GUI frameworks (ExtJs, SmartClient, OpenUI5) which do not works in React way and they could be easily be integrated with JSX/TSX if their JSX expressions would return correct "element type" e.g.
`const listGrid = <ListGrid/> ; // should be type of ListGrid or isc.IListgrid, not JSX.Element`

My proposal would be to add new special type into global `JSX` namespace - `ElementTypeProperty`.

JSX.ElementTypeProperty
-------------------------------

Given an element instance type, we need to produce a type that will be return type of that JSX element. We call this the element type.

The interface JSX.ElementTypeProperty defines this process.
It may have 0 properties, in which case element instance type will be element type.
Or 1 property, in which case the element type will be the type of that property type of element instance type.

Note: Intrinsic lookup is not affected by ElementTypeProperty.

----------------------



Related: https://github.com/Microsoft/TypeScript/issues/13746