sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: should recognize binary package and intrinsify it where possible
Labels: Performance,compiler/runtime

The compiler should recognize calls to binary.Reader and binary.Writer where the byte order and type of `data interface{}` are compile-time constants, and based on that "do the right thing".

One candidate for "the right thing" is, for target/source types that contain no padding and for the native byte order, alias a byte slice to the storage, and pass that to the read or write method.  Further enhancements could deal with padding and mismatched native/requested byte order.
Repository: TypeScript
Issue: Warn/error when testing a non-nullable type for null
Labels: Suggestion,Awaiting More Feedback

**TypeScript Version:**  2.0.0

**TL;DR:**

If a project is configured for strict null checks, checking a variable which is typed as non-null is nonsense and could indicate a type mismatch.

**Code:**

Here's a motivating example I experienced:

``` ts
async function someFunc1(): Promise<string | null> {
  // do some stuff and return the appropriately typed promise
}

async function someFunc2(): Promise<boolean> {
  // Negating a non-null Promise is crazy talk, but here I go!
  return !!someFunc1()
}
```

Of course what I _really_ meant was:

``` ts
async function someFunc2(): Promise<boolean> {
  return !!(await someFunc1())
}
```

**Expected behavior:**

TypeScript warns that I'm effectively testing my non-null `Promise` for null, and points out that that's nonsense.

**Actual behavior:** 

TypeScript happily accepted the code, which led to a bug.
Repository: rust
Issue: incr. comp.: Increase partition granularity via special-casing non-inlined functions
Labels: C-enhancement,T-compiler,A-incr-comp

If we put every function into its own codegen unit, we would minimize the amount of functions being re-translated even though they have not changed. The main reason we don't do this, is because it would completely prevent inlining, which in turn has too detrimental an effect on runtime performance.

However, for many functions we could probably predict very well that they would never get inlined by LLVM anyway, because they are marked with `#[inline(never)]` or they are just too big. This category of functions could be put into their own codegen unit without negative effects on runtime performance.
Repository: go
Issue: runtime: simplify brk_ usage on plan9
Labels: OS-Plan9,compiler/runtime

Brad pointed out in [CL 27491](https://go-review.googlesource.com/#/c/27491) that the addr argument to func brk_ is unused. We should remove it, update the assembly argument size on arm, and simplify the calling code. Leaving for someone with a plan9 installation to do and test.
Repository: javascript
Issue: Error in 16.1
Labels: pull request wanted,semver-breaking: guide change,editorial

Hello,

In 16.1, it says:

> Use braces with all multi-line blocks.

But in the examples, there's a contradiction:

```
// good
if (test) return false;
```

And

```
// bad
function foo() { return false; }
```

The second one shouldn't say 'bad' since it's not multi-line block like the rule says.
Repository: rust
Issue: Adding type annotation equivalent to existing type changes code semantics
Labels: A-type-system,C-enhancement,E-mentor,T-compiler,T-types

This piece of code can't compile:

```
fn main()
{
    let y = &mut 2i32;
    {
        let x = y;
        *x = 3;
    }
    println!("{}", y);
}
```

But, if we add the type annotation, it compiles:

```
fn main()
{
    let y = &mut 2i32;
    {
        let x: &mut i32 = y;
        *x = 3;
    }
    println!("{}", y);
}
```

I guess the later form triggers "auto-deref" mechanism, which equals to:

```
let x = &mut *y;
```

But this behaviour is still very confusing. Type annotation or not doesn't change the type of `x` at all. Type of  `x` is always `&mut i32`. But they lead to  different compile result. I have no idea whether should we fix it.
Repository: TypeScript
Issue: Template string downlevel to ES5 escapes more Unicode characters than necessary
Labels: Suggestion,Help Wanted,Experience Enhancement

<!-- BUGS: Please use this template. -->

<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->

<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

**TypeScript Version:**  1.8.10 

Typescript compiles template strings with Unicode characters incorrectly.

**Code**

``` ts
var test1: string = 'test'; // Normal string (only English)
var test2: string = `test`; // Template string (only English)
var test3: string = 'тест'; // Normal string (Cyrillic)
var test4: string = `тест`; // Template string (Cyrillic)
```

**Expected behavior:**

There should be no significant difference in string representation, no matter language they are using. Since this is Unicode anyway. You can see expected behavior on standard, singleline strings. This behavior I would consider normal, expected.

``` js
var test1 = 'test'; // Normal string (only English)
var test2 = "test"; // Template string (only English)
var test3 = 'тест'; // Normal string (Cyrillic)
var test4 = "тест"; // Template string (Cyrillic)
```

**Actual behavior:** 

Multiline (template) strings with none-English characters becomes encoded.

``` js
var test1 = 'test'; // Normal string (only English)
var test2 = "test"; // Template string (only English)
var test3 = 'тест'; // Normal string (Cyrillic)
var test4 = "\u0442\u0435\u0441\u0442"; // Template string (Cyrillic)
```

Link to official [playground](http://www.typescriptlang.org/play/#src=var%20test1%3A%20string%20%3D%20%27test%27%3B%20%2F%2F%20Normal%20string%20%28only%20English%29%0D%0Avar%20test2%3A%20string%20%3D%20%60test%60%3B%20%2F%2F%20Template%20string%20%28only%20English%29%0D%0Avar%20test3%3A%20string%20%3D%20%27%D1%82%D0%B5%D1%81%D1%82%27%3B%20%2F%2F%20Normal%20string%20%28Cyrillic%29%0D%0Avar%20test4%3A%20string%20%3D%20%60%D1%82%D0%B5%D1%81%D1%82%60%3B%20%2F%2F%20Template%20string%20%28Cyrillic%29)
Repository: kubernetes
Issue: Hung volumes can wedge the kubelet
Labels: kind/bug,priority/important-soon,area/kubelet,sig/storage,lifecycle/frozen

If you have pods that use something like NFS storage, if the system is unable to read the mounted directory, or unmount it, it is possible to completely wedge the kubelet such that it can't successfully run any new pods that use volumes (which is basically all, if they use secret tokens) until either the storage issue is resolved, or you restart the kubelet.

To reproduce:
1. Create a pod that uses an NFS volume
2. Stop the NFS server
3. Try to delete the pod
4. Wait a couple of minutes - you'll see the pod stuck Terminating
5. Try to create a new pod (`kubectl run --rm --attach --restart Never --image busybox bbox date`)

The busybox pod will be stuck ContainerCreating with events such as these:

```
Events:
  FirstSeen     LastSeen        Count   From                    SubobjectPath   Type            Reason          Message
  ---------     --------        -----   ----                    -------------   --------        ------          -------
  8m            8m              1       {default-scheduler }                    Normal          Scheduled       Successfully assigned bbox to 127.0.0.1
  6m            6s              4       {kubelet 127.0.0.1}                     Warning         FailedMount     Unable to mount volumes for pod "bbox_default(12a20cdb-694f-11e6-baa4-001c42e13e5d)": timeout expired waiting for volumes to attach/mount for pod "bbox"/"default". list of unattached/unmounted volumes=[default-token-joiwi]
  6m            6s              4       {kubelet 127.0.0.1}                     Warning         FailedSync      Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "bbox"/"default". list of unattached/unmounted volumes=[default-token-joiwi]
```

In this [stack trace](https://gist.github.com/ncdc/d6411b82cd6169991dc3b98c203f59e1#file-stack-deleting-pod-txt-L53-L67) I gathered after I deleted the pod, it shows that the volume reconciler is still trying to get the volumes for the pod I just deleted. You'll also see a goroutine trying to stop the Docker container, but it is stuck.

In this [stack trace](https://gist.github.com/ncdc/d6411b82cd6169991dc3b98c203f59e1#file-stack-run-pod-txt-L32-L41) I gathered after I tried to create the bbox pod, it shows that the new pod (bbox) is waiting for its volumes to attach/mount (in this case, secrets).

We've seen this in 1.2.x and I just reproduced it in master (commit f297ea966e0916c18dc008af566975bd26dfb29c).

cc @kubernetes/sig-storage @kubernetes/sig-node @kubernetes/rh-cluster-infra @pmorie @derekwaynecarr @timothysc @saad-ali
Repository: youtube-dl
Issue: [LeEco] Download 'Album' related to a video
Labels: request

### Make sure you are using the _latest_ version: run `youtube-dl --version` and ensure your version is _2016.08.24.1_. 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 **2016.06.25**
### Before submitting an _issue_ make sure you have:
- [ ] 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

---
### 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 _site support request_ please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- http://www.le.com/ptv/vplay/22246607.html

---
### Description of your _issue_, suggested solution and other information

It would be helpful to be able to download video playlist in the "Album" that a video belong to. The album playlist was displayed at the right sidebar of a video if available.
- http://www.le.com/ptv/vplay/22282706.html
- http://www.le.com/ptv/vplay/22246607.html
Repository: go
Issue: x/text/search: WholeWord and Exact options are nil
Labels: NeedsInvestigation

1. What version of Go are you using (`go version`)?
   go1.7
2. What operating system and processor architecture are you using (`go env`)?
   linux/amd64
3. What did you do?
   https://play.golang.org/p/GNfQa_7pq3
4. What did you expect to see?
   -1, -1
5. What did you see instead?

```
panic: runtime error: invalid memory address or nil pointer dereference
[snip]
    $GOPATH/src/golang.org/x/text/search/search.go:82
[snip]
```

This is perhaps a case of "I didn't read the var definition carefully enough", but having exported symbols that crash is unfortunate.
Repository: flutter
Issue: pop() improvements
Labels: c: new feature,framework,customer: fast (g3),f: routes,P3,team-framework,triaged-framework

A route should have a way to override NavigatorState.pop()'s concept of whether this is the home route, such that popping it quits the app even though there's other routes on the history behind it. For example, so that you can have a login screen, then once you've logged in, you see the main page of the app, and "back" sends you out of the app not back to the login screen.

popUntil() (and thus pop()) probably need a way to override that, so that you can manually pop past such routes. For example, so that you can "log out" of an app as described above, and return to the "login" page.
Repository: flutter
Issue: Give authors more control over initialRoute handling
Labels: framework,customer: fast (g3),f: routes,P3,team-framework,triaged-framework

Imagine you had an app that required visiting a login page before interacting with it. Right now, a user could cheat by launching the app with an intent that sets the defaultRoute.
Repository: go
Issue: cmd/compile: inline reflect.TypeOf (or make it intrinsic)
Labels: Performance,compiler/runtime

@randall77 was mentioning the compiler maybe inlining reflect.TypeOf calls the other day. Or somebody was.

Today I ran across the github.com/vmware/govmomi/vim25/types package which has 5769 calls to reflect.TypeOf, populating a map:

```
types.go:       t["WillLoseHAProtection"] = reflect.TypeOf((*WillLoseHAProtection)(nil)).Elem()
types.go:       t["WillLoseHAProtectionFault"] = reflect.TypeOf((*WillLoseHAProtectionFault)(nil)).Elem()
types.go:       t["WillModifyConfigCpuRequirements"] = reflect.TypeOf((*WillModifyConfigCpuRequirements)(nil)).Elem()
types.go:       t["WillModifyConfigCpuRequirementsFault"] = reflect.TypeOf((*WillModifyConfigCpuRequirementsFault)(nil)).Elem()
types.go:       t["WillResetSnapshotDirectory"] = reflect.TypeOf((*WillResetSnapshotDirectory)(nil)).Elem()
types.go:       t["WillResetSnapshotDirectoryFault"] = reflect.TypeOf((*WillResetSnapshotDirectoryFault)(nil)).Elem()
types.go:       t["WinNetBIOSConfigInfo"] = reflect.TypeOf((*WinNetBIOSConfigInfo)(nil)).Elem()
types.go:       t["WipeDiskFault"] = reflect.TypeOf((*WipeDiskFault)(nil)).Elem()
types.go:       t["WipeDiskFaultFault"] = reflect.TypeOf((*WipeDiskFaultFault)(nil)).Elem()
types.go:       t["XmlToCustomizationSpecItem"] = reflect.TypeOf((*XmlToCustomizationSpecItem)(nil)).Elem()
types.go:       t["XmlToCustomizationSpecItemRequestType"] = reflect.TypeOf((*XmlToCustomizationSpecItemRequestType)(nil)).Elem()
types.go:       t["ZeroFillVirtualDiskRequestType"] = reflect.TypeOf((*ZeroFillVirtualDiskRequestType)(nil)).Elem()
types.go:       t["ZeroFillVirtualDisk_Task"] = reflect.TypeOf((*ZeroFillVirtualDisk_Task)(nil)).Elem()
```

If the compiler could inline the `reflect.TypeOf` calls then they could stop autogenerating the Elem part too, and it's all just static data and their init load could drop a bunch.

reflect.TypeOf is just:

``` go
// TypeOf returns the reflection Type that represents the dynamic type of i.                                                                                            
// If i is a nil interface value, TypeOf returns nil.                                                                                                                   
func TypeOf(i interface{}) Type {
        eface := *(*emptyInterface)(unsafe.Pointer(&i))
        return toType(eface.typ)
}

func toType(t *rtype) Type {
        if t == nil {
                return nil
        }
        return t
}
```

Low priority.
Repository: rust
Issue: cyclic type "of infinite size" may not be
Labels: A-type-system,A-diagnostics,T-compiler,C-bug,T-types

rustc's error message "cyclic type of infinite size" is produced whenever a type parameter is inferred to refer to the type it's a parameter of, but this does not need to actually result in an infinitely sized type.  I think such cyclic types should be allowed, but at minimum the error message should be improved.

For example:

``` rust
use std::cell::Cell;
struct Foo<'a, T: 'a>(Cell<Option<&'a T>>);
fn main() {
    let foo = Foo(Cell::new(None));
    foo.0.set(Some(&foo));
}
```

produces:

```
error[E0308]: mismatched types
 --> test.rs:5:20
  |
5 |     foo.0.set(Some(&foo));
  |                    ^^^^ cyclic type of infinite size
  |
  = note: expected type `&_`
  = note:    found type `&Foo<'_, _>`

error: aborting due to previous error
```
Repository: angular
Issue: HttpParameterCodec improperly encodes special characters like '+' and '='
Labels: breaking changes,freq2: medium,area: common/http,state: has PR,risk: high,state: confirmed,design complexity: low-hanging,P3,risky

**I'm submitting a ...**

```
[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
```

**Current behavior**
Code exemple

```
let body = new URLSearchParams();

for (let i in values) {
    body.set(i, values[i]);
}

let options = RequestOptions();
options.headers.append('Content-Type', 'application/x-www-form-urlencoded')
return this.http.post(uri, body, options).then();
[...]
```

If `values[i]` has a '+' character in it, then it is replaced by spaces. 

**Expected/desired behavior**
'+' should be sent as any other character.

**Please tell us about your environment:**
- **Angular version:** 2.0.0-rc.5
- **Browser:** [all | Chrome XX | Firefox XX | IE XX ] 
- **Language:** [Typescript]
Repository: vscode
Issue: Auto hide panel
Labels: feature-request,layout

Similar to behavior in Visual Studio, is there a way we could get the terminal to show/hide automatically? Leaving some sort of tab at the bottom of the screen?

It opens when:
1. User mouses over the tab 
2. Something is written to the terminal

It hides when:
1. User clicks outside of the open terminal window.
2. The terminal has not been written to within a set period of ~10 seconds.

Ex: I'm working on an Angular 2 application using the angular-cli build tool. When I'm writing code or clicking through the UI I don't particularly care about what's displaying in the terminal. But as soon as I save my changes and the build process starts, I DO want to quickly see what the current state of the build is. So after saving a file, when the CLI tool starts writing to the terminal, it would pop-up from the bottom, and as long as my mouse isn't hovering over it, it will hide again after several seconds of inactivity.
Repository: youtube-dl
Issue: Facebook F8 and/or Facebook Videos Needed
Labels: request

Hello,
I need to download: 
1. Facebook F8 videos from url: https://developers.facebook.com/videos
2. Facebook videos from url: https://web.facebook.com/FacebookforDevelopers/videos
3. All videos-only(no pics) from url: https://twitter.com/FacebookDevRel/media

Please tell me how can I download them.
Repository: rust
Issue: Constant let binding slower than const
Labels: I-slow,C-enhancement,A-codegen,T-compiler,C-optimization

Hello.
I am currently optimizing my [`des`](https://crates.io/crates/des) crate and I found out that using a `let` statement can be significantly slower than using a `const` statement.

For instance, when I run `cargo bench` with the `const` declaration [here](https://github.com/antoyo/des-rs/blob/97031b96ebb2534a8b0bb9cf3cc675048fb0d742/src/lib.rs#L258), I get:

```
running 1 test
test bench_decrypt ... bench:       1,621 ns/iter (+/- 15)
```

If I replace this `const` by a `let`, the performance is not as good:

```
running 1 test
test bench_decrypt ... bench:      18,203 ns/iter (+/- 99)
```

On another benchmark, I think it was 4 times slower with `let`.

I expected to have the same performance with a constant `let` and a `const`.

Instead, the `let` declaration is slower than a `const`.
## Meta

`rustc --version --verbose`:

```
rustc 1.13.0-nightly (aef6971ca 2016-08-17)
binary: rustc
commit-hash: aef6971ca96be5f04291420cc773b8bfacb8b36d
commit-date: 2016-08-17
host: x86_64-unknown-linux-gnu
release: 1.13.0-nightly
```

Thanks to fix this issue.
Repository: go
Issue: x/tools/cmd/goimports: permission denied causes imports to stop
Labels: help wanted,Tools

Please answer these questions before submitting your issue. Thanks!
1. What version of Go are you using (`go version`)?

```
go version go1.7 darwin/amd64
```
1. What operating system and processor architecture are you using (`go env`)?

```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/jeffwilliams/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jc/ctl0fvhs34v21m_hg1z3w0zh0000gp/T/go-build379181819=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
```
1. What did you do?
   If possible, provide a recipe for reproducing the error.
   A complete runnable program is good.
   A link on play.golang.org is best.

One unreadable dir in GOPATH will cause the walk to fail and ignore all directories after that point, with a confusing message like:

```
2016/08/26 15:39:24 goimports: scanning directory /Users/jeffwilliams/go/src: permission denied
```

In this case, it was a test dir with permissions 0000:

```
/Users/jeffwilliams/go/src/github.com/wherethebitsroam/cloudcp/test/fred/dave
```

Admittedly, moving this test content into testdata where it should have been fixed the problem. But this is not very obvious given the error.

The relevant code was golang.org/x/tools/imports/fastwalk_unix.go:

```
fd, err := syscall.Open(dirName, 0, 0)
```
1. What did you expect to see?

goimports to skip the directory with permission denied. Or at least give an error with the directory which was the problem.
1. What did you see instead?

goimports failed to insert the imports for known packages in the file being processed.
Repository: flutter
Issue: AppBar shadow does not extend to the edge of the screen (particularly noticeable during back gesture)
Labels: framework,f: material design,a: fidelity,a: quality,has reproducible steps,P3,team-design,triaged-design,found in release: 3.19,found in release: 3.20

On iOS, when swiping back, you can see a small portion that is missing its shadow. It's especially visible during the back gesture action, because of the contrast. Notice how in the upper left of the shadow, right under the blue app bar that is moving off the page, you see an area that is lighter than the rest. The effect is more pronounced on your phone itself, as you're moving the view off the screen.

![cbbf0129-bcec-4d83-a2d2-ba4dff83b30a_png](https://cloud.githubusercontent.com/assets/5479/18012594/18965304-6b6f-11e6-99c7-ff71c7973f87.png)
Repository: TypeScript
Issue: Strange boolean-discriminant narrowing with strictNullChecks off
Labels: Bug,Help Wanted,Effort: Moderate

<!-- BUGS: Please use this template. -->

<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->

<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

**TypeScript Version:**  nightly (2.1.0-dev.20160826)

**Code**

``` ts
type Result = { success: true }
            | { success: false, error: string }

function handleError(res: Result) {
    if (res.success === true) {
        return;
    }

    res.error; // OK
}

function handleError2(res: Result) {
    if (res.success !== false) {
        return;
    }

    res.error; // OK
}

function handleError3(res: Result) {
    if (res.success) {
        return;
    }

    res.error; // Property 'error' does not exist on type 'Result'
               // but should be OK
}
```

**Expected behavior:**
All three cases should behave the same.