sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: -bench should correct for GC
Labels: NeedsFix,compiler/runtime

Currently -bench output is very sensitive to GC effects. For example:
1. Changing allocations in phase A might cause a GC cycle to shift from phase B to phase C, which can look like an improvement to B and a regression for phase C.
2. Reducing long-lived memory pressure from earlier phases gets credited to later phases, as the later phases benefit from reduced GC costs.

This makes it hard to isolate performance improvements from frontend vs backend changes.

I'm considering a few possible improvements to -bench:
1. Record GC pause times, and subtract them from phase times.
2. Record allocation stats for each phase.
3. Explicit GC cycle between FE and BE so we can measure how much live memory the FE has left for the BE to work with.

Any other suggestions and/or implementation advice?

/cc @griesemer @rsc @aclements
Repository: rust
Issue: Large array literal causes slow compilation
Labels: C-enhancement,I-compiletime,T-compiler

I have a large array of the form

```
static mut ARRAY: [AtomicU64; LARGE_NUMBER] = [
    ATOMIC_U64_INIT, ATOMIC_U64_INIT, ...
];
```

where `LARGE_NUMBER = 512 * 1024`. `ATOMIC_U64_INIT` is not `Copy`, so it's not obvious how to express this differently. I don't even think I even legally can use a `[u64; LARGE_NUMBER]` and transmute on use because `u64` has aliasing guarantees that `AtomicU64` breaks.

This ends up adding more than 10s to my compile times. `time-passes`, filtering out passes that take <0.1s above their baseline, shows

```
time: 0.594; rss: 322MB parsing
time: 0.295; rss: 349MB expansion
time: 0.244; rss: 404MB name resolution
time: 0.126; rss: 549MB lowering ast -> hir
time: 0.104; rss: 358MB region resolution
time: 0.148; rss: 358MB static item recursion checking
time: 0.497; rss: 359MB compute_incremental_hashes_map
time: 1.643; rss: 437MB item-types checking
time: 0.562; rss: 436MB const checking
time: 0.115; rss: 436MB privacy checking
time: 0.568; rss: 492MB MIR dump
time: 0.136; rss: 475MB death checking
time: 0.164; rss: 475MB stability checking
time: 0.559; rss: 475MB lint checking
  time: 3.098; rss: 523MB   translation item collection
time: 5.724; rss: 447MB translation
```

[There's a full version available elsewhere](https://gist.github.com/Veedrac/d53a6c2795890f94fa66e0bafb0bf73b), but it's not really more interesting.
Repository: rust
Issue: Should `use super::{self, ...}` work?
Labels: A-resolve,T-lang,C-feature-request

Obviously `use super::self` would be a bit redundant, but what about if you're importing lots of items from `super`?

We can already do something like:

```
use foo::{self, a, b, c};
```

So why not something like this?

```
use super::{self, a, b, c};
```

For reference, the specific error message on nightly is:

```
error[E0432]: unresolved import `super`
 --> ...
  |
1 | use super::{self, a, b, c};
  |             ^^^^ no `super` in the root
```
Repository: angular
Issue: Feature: more robust module loader for router
Labels: feature,area: router,feature: under consideration

**I'm submitting a ...**  (check one with "x")

```
[ ] bug report
[x] feature request
[ ] support request 
```

**Current behavior**

The router's current default module loader tries once and crashes the app if it fails to retrieve the module.  That's not good in a mobile environment where **latency and connectivity may be intermittent or poor.**  We are always more robust when designing for data requests.

**We should ship a default loader that is more robust in the face of connectivity failures**

A counter argument is that _we should do what the browser does with scripts ... we should fail_. The argument continues: _loading data is different from loading a module_.

I disagree. If a script fails to load, the app never even starts. When lost connectivity is the cause, the HTML fails to load too and the user sees the familiar 404. The user cannot have accumulated unsaved work.

Lazy loading and even preloading of modules can occur after the app has been running for some time. The user may be deep into a work flow when connectivity drops.  If it were a data operation, the developer would have prepared for this possibility and found a way to keep the app alive and preserve unsaved work. The reasoning is the same for failed module loading.

One might argue that the developer who cares about this should create a custom loader. That's a fine response if we were talking about unusual circumstances. I think we are talking about an environment that is so common we should handle it ourselves out-of-the-box.

**Expected behavior**

We should ship a default loader that is more robust. Here are some of the things it MIGHT do:
- Distinguish among failures, perhaps giving special treatment to a connectivity failure
  and possibly to an authorization failure as both are potentially curable by the user. We can fail fast for a module 404.
- After connectivity failure could retry 'n' times with progressive delay
- Loader activity (loading/loaded/load failed) should be distinctive events that a Dev can handle
- App should not fail if loader fails. At least it should be an option to not fail. Of course it doesn't navigate. But it's up to the dev to detect and handle the failure.
- Dev should be able to handle event and establish a "try again when connectivity is restored" dialog
- Dev should be able to take some kind of corrective action after retries to run offline until the user re-establishes the connection.
- Dev should be able to hook into load/loaded events in order to show a spinner while the router is loading ... just as one would while loading data.

**Minimal reproduction of the problem with instructions**

Victor confirmed behavior and does not request a repro

**What is the motivation / use case for changing the behavior?**

A top Angular priority is running in mobile environments. Mobile environments are plagued by connectivity issues.
- **Angular version:** 2.1.0
- **Browser:** [all ]
- **Language:** [all ]
Repository: rust
Issue: Inference fails because it doesn't consider deref coercions
Labels: T-lang,A-inference,C-feature-request

Maybe this is intended, but it's not super-clear.

[Playground](https://is.gd/v2SFxF)

``` rust
use std::collections::HashMap;

fn check(_: &str) -> bool { false }

fn chain<'a>(some_key: &'a str) -> HashMap<&'a str, Vec<usize>> {
    let mut map = HashMap::new();
    map.get(&some_key);
    {
        // uncomment type annotation to fix
        let key_ref /*: &&str*/ = map.keys().next().unwrap();
        if check(key_ref) {} // due to autoderef `key_ref` could be `&&str` and
                             // this would work. but `key_ref` is inferred to be
                             // `&str` due to the `check` call, causing `map` to
                             // be `HashMap<str, _>`.
    }
    map
}

fn main() {}
```

fails with
<details>

```
error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
 --> min.rs:6:19
  |
6 |     let mut map = HashMap::new();
  |                   ^^^^^^^^^^^^
  |
  = note: `str` does not have a constant size known at compile-time
  = note: required by `<std::collections::HashMap<K, V>>::new`

error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
 --> min.rs:7:9
  |
7 |     map.get(&some_key);
  |         ^^^
  |
  = note: `str` does not have a constant size known at compile-time

error[E0277]: the trait bound `str: std::borrow::Borrow<&str>` is not satisfied
 --> min.rs:7:9
  |
7 |     map.get(&some_key);
  |         ^^^

error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
 --> min.rs:8:18
  |
8 |     if check(map.keys().next().unwrap()) {}
  |                  ^^^^
  |
  = note: `str` does not have a constant size known at compile-time

error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
 --> min.rs:8:25
  |
8 |     if check(map.keys().next().unwrap()) {}
  |                         ^^^^
  |
  = note: `str` does not have a constant size known at compile-time
  = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::collections::hash_map::Keys<'_, str, _>`

error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
 --> min.rs:8:14
  |
8 |     if check(map.keys().next().unwrap()) {}
  |              ^^^^^^^^^^^^^^^^^
  |
  = note: `str` does not have a constant size known at compile-time
  = note: required by `std::collections::hash_map::Keys`

error[E0308]: mismatched types
 --> min.rs:9:5
  |
9 |     map
  |     ^^^ expected reference, found str
  |
  = note: expected type `std::collections::HashMap<&'a str, std::vec::Vec<usize>>`
  = note:    found type `std::collections::HashMap<str, _>`

error: aborting due to 7 previous errors
```

</details>
Repository: TypeScript
Issue: Incorrect (potentially) indentation of function arguments spanning multiple lines
Labels: Suggestion,Domain: Formatter,Awaiting More Feedback,VS Code Tracked

_From @nomaed on October 14, 2016 10:40_
- VSCode Version: 1.6.1
- OS Version: macOS Sierra 10.12

Steps to Reproduce:
- Write a function (or a method) with several arguments (I did it with JavaScript and TypeScript files, but I believe any would work).

``` javascript
function myFunc(arg1, arg2, arg3, ...args) {
}
```
- Split arguments to several lines by hitting Enter before arguments

``` javascript
function myFunc(arg1,
arg2,
arg3,
...args) {
}
```

Auto-formatting produces this result:

``` javascript
function myFunc(arg1,
    arg2,
    arg3,
    ...args) {
}
```

I would expect to see this result instead though:

``` javascript
function myFunc(arg1,
                arg2,
                arg3,
                ...args) {
}
```

Also, when manually formatting the arguments to appear in the same column (note: this is also the default/recommended setting in `tslint` and maybe other linters), then further lines will start with wrong indentation:

``` javascript
function myFunc(arg1,
                arg2,
                arg3,
                ...args) {
                    console.log('huh...');
}
```

![vscode-multi-line-args-indent](https://cloud.githubusercontent.com/assets/9551921/19384766/a89ed4d8-9213-11e6-9890-ec41080e8843.gif)

_Copied from original issue: Microsoft/vscode#13748_
Repository: go
Issue: net: add Sys field to Interface for retrieving platform-specific information
Labels: NeedsDecision,FeatureRequest

### What version of Go are you using (`go version`)?

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

```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/vagrant/vicsmb"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build018341538=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
```
### What did you do?

```
package main

import (
    "fmt"
    "net"
    "os"
    "os/exec"
)

func main() {

    alias := "testalias"

    ipalias := exec.Command("/sbin/ip", "link", "set", "dev", "lo", "alias", alias)
    _, err := ipalias.CombinedOutput()
    if err != nil {
        fmt.Printf("failed to invoke /sbin/ip to set alias on loopback interface: %s", err)
        os.Exit(1)
    }

    intf, err := net.InterfaceByName(alias)
    if intf == nil {
        fmt.Printf("failed to locate interface by alias %s: %s\n", alias, err)
        os.Exit(1)
    }

    fmt.Println("success!!")
}
```
### What did you expect to see?

```
Aliasing link lo
success!!
```
### What did you see instead?

```
Aliasing link lo
failed to locate interface by alias testalias: route ip+net: no such network interface

#  ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    alias testalias

```

If `InterfaceByName` doens't check aliases on systems that support them then interface aliases become problematic. If you have to know that the name is an aliases it defeats the point.
Repository: rust
Issue: "cannot declare a new module at this location" should specify good locations
Labels: C-enhancement,A-diagnostics,T-compiler,A-suggestion-diagnostics

The error has two notes full of weasel words (2x "maybe", 1x "possibly") and it should probably say something straightforward like "modules are declared at the crate root, or mod.rs at the root of a source directory".
Repository: TypeScript
Issue: Give better error messages when reserved names are used for binding identifiers
Labels: Suggestion,Help Wanted,Effort: Moderate,Domain: Error Messages

``` typescript
const data = { in: 1 };
const { in } = data; // <-- [ts] ':' expected.
```
Repository: rust
Issue: Inferring type succeeds with too little information
Labels: C-enhancement,T-compiler,A-inference

The following code fails to compile:

``` rust
pub trait Bar {
    fn new() -> Self;
}

pub struct Foo {}

impl Bar for Foo {
    fn new() -> Self {
        Foo {}
    }
}

pub struct Qux<B=Foo> where B: Bar {
    foo: B,
}

impl<B> Qux<B> where B: Bar {
    fn new() -> Self {
        Qux { foo: B::new() }
    }
}

fn main() {
    let q = Qux::new();
}
```

The error is:

```
rustc 1.14.0-nightly (6e8f92f11 2016-10-07)
error[E0282]: unable to infer enough type information about `_`
  --> <anon>:24:13
   |
24 |     let q = Qux::new();
   |             ^^^^^^^^ cannot infer type for `_`
   |
   = note: type annotations or generic parameter binding required

error: aborting due to previous error
```

(from playpen ; same with stable)

Strangely, replacing that failing line with:

``` rust
    let q: Qux = Qux::new()
```

makes it compile.
Repository: rust
Issue: [testing infra] Pretty-printing tests fail when need to find an out-of-line module
Labels: A-pretty,A-testsuite,C-bug

Example, `run-pass\mod_file_with_path_attr.rs`:

```
#[path = "mod_file_aux.rs"] // <- can't find this file when compiling pretty-printing tests
mod m;

pub fn main() {
    assert_eq!(m::foo(), 10);
}
```

Test runner needs to somehow provide a source directory when compiling tests, so out-of-line modules could be successfully resolved.
Repository: kubernetes
Issue: Restart controller-manager (and apiserver/scheduler) during our e2e tests
Labels: sig/api-machinery,sig/testing,lifecycle/frozen

From time to time, we are hitting problems that restarting controller-manager is causing some serious issues. In the last few days we were e.g. forced to build 1.4 patch release because of bug in restarting node-controller (but IIRC this isn't the first case of such type of bugs).

I think that we should introduce a simple e2e test that will just restart controller manager. If we start running this as part of parallel suites, this will:
- enabling testing of controller-manager restarts
- should not affect any other e2e tests (if they are not poorly written).
- we will face controller-manager restarts during running other e2e tests, which will hopefully reduce risk of such situations in the future.

Thoughts?

@lavalamp @davidopp @gmarek @fabioy @ncdc @liggitt 
@kubernetes/sig-api-machinery @kubernetes/goog-control-plane
Repository: rust
Issue: Pretty-printer inserts an extra newline before the first match arm if it has a comment
Labels: A-pretty,C-bug

Example:

```
fn main() {
    match 0u8 {
        // Comment
        0 => {}
        _ => {}
    }
}
```

=>

```
fn main() {
    match 0u8 {

        // Comment
        0 => {
        }
        _ => { }
    }
}
```

Affected tests:
[pretty] pretty\borrowck\borrowck-pat-enum.rs
[pretty] pretty\issue-11709.rs
[pretty] pretty\issue-28839.rs
Repository: rust
Issue: --emit=obj for Windows msvc producing .o instead of .obj
Labels: O-windows,T-compiler,O-windows-msvc,C-bug

```
rustc 1.14.0-nightly (19ac57926 2016-10-08)
binary: rustc
commit-hash: 19ac57926abb749a93e2eb84502048d9c57f2d7b
commit-date: 2016-10-08
host: x86_64-pc-windows-msvc
release: 1.14.0-nightly
```

Doing `rustc --emit=obj foo.rs` results in `foo.o` instead of the expected `foo.obj`.

TODO:

* [ ] Investigate what automation or tools out there rely on `--emit=obj` using the `.o` extension **and** work with the `pc-windows-msvc` targets.
* [ ] Investigate the feasibility of adjusting such automation or tools to support the `.obj` extension instead for `pc-windows-msvc`.
* [ ] Add a `obj_suffix` to the target options and set it to `obj` only for `pc-windows-msvc` targets.
* [ ] Adjust the aforementioned automation and tools and post something in the release notes.


Note that because MSVC is such a *different* target than GNU targets, any sort of automation or tooling that specifically needs object files would already be quite conditional on MSVC being different to invoke the linker correctly and such. Therefore I am of the opinion that the fallout from this change should be minimal and very easy to fix. If anyone can find any examples that prove me wrong, please do so.

Places to search for potential automation or tools: https://github.com/search?utf8=%E2%9C%93&q=--emit+obj&type=Code&ref=searchresults
Repository: opencv
Issue: OpenCV VideoCapture API causes pi3 to freeze when graphic driver is enabled on pi3
Labels: bug,priority: low,category: videoio

<!--
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)
- OpenCV => 3.1
- Operating System / Platform => Rapberry pi3 pixel OS, 64 bit
- Compiler => gcc/g++
- Camera => raspicam
- Enable Graphics Driver => using raspi config
##### Detailed description

OpenCV Video Capture causes pi3 to hang after some time ( in couple of minutes only), I am pasting the sample code which I am using.

```
#include "opencv2/opencv.hpp"
using namespace cv;
int main(int, char**)
{
    VideoCapture cap(0); // open the default camera
    if(!cap.isOpened())  // check if we succeeded
        return -1;
    for(;;)
    {
        Mat frame;
        cap >> frame; // get a new frame from camera
       waitKey(10);

    }
    // the camera will be deinitialized automatically in VideoCapture destructor
    return 0;
}

```
##### Steps to reproduce

Run the above code on raspberry pi (Pixel OS) with Graphical driver enabled.
Note to enable graphical driver , you can enable it via raspi-config. After the graphical driver is enabled go to /boot/config.txt and edit the following line:
dtoverlay=vc4-kms-v3d  to dtoverlay=vc4-fkms-v3d 

Now run the sample code I pasted Above, I followed the following script to compile the code.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
g++ -std=c++0x `pkg-config --cflags opencv` -o `basename $1 .cpp` $1 `pkg-config --libs opencv` -I/usr/local/include/ -lrt -lm -pthread
Repository: youtube-dl
Issue: Download problem using youtube-dl at www.svtplay.se
Labels: geo-restricted

Possible youtube-dl bug or svtplay database problem
Problems retrieving videos (files) from svtplay (www.svtplay.se). After contacting the site and downloading initial info it only retrieves a couple of MB (should be around GB) for the following videos Millenium part 5 and 6 as well as 56orna part 2, 3, etc. Then the merge process fails.
Output from youtube-dl with --verbose, namely

> [debug] System config: []
> [debug] User config: []
> [debug] Command-line args: [u'--verbose', u'http://www.svtplay.se/video/2279502/millennium']
> [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
> [debug] youtube-dl version 2016.10.16
> [debug] Python version 2.7.12 - Linux-3.16.7-42-desktop-x86_64-with-SuSE-13.2-x86_64
> [debug] exe versions: ffmpeg 3.0.2, ffprobe 3.0.2
> [debug] Proxy map: {}
> [SVTPlay] 2279502: Downloading webpage
> [SVTPlay] 1122946-006A: Downloading JSON metadata
> [SVTPlay] 1122946-006A: Downloading m3u8 information
> [SVTPlay] 1122946-006A: Downloading m3u8 information
> [SVTPlay] 1122946-006A: Downloading MPD manifest
> [SVTPlay] 1122946-006A: Downloading f4m manifest
> [debug] Invoking downloader on u'http://svtplay3r-f.akamaihd.net/d/se/open/delivery/20161007/1122946-006A/dash-live/PG-1122946-006A-MILLENNIUMTVSERI-02-1a894f3d-e7aa-336d-472e-56993a27cd04-live.mpd?alt=http://switcher.cdn.svt.se/./'
> [dashsegments] Total fragments: 896
> [download] Destination: Avsnitt 6-1122946-006A.fdashhbbtv-PG-1122946-006A-MILLENNIUMTVSERI-02_2796_1.mp4
> [download] 100% of 2.66MiB in 00:06
> [debug] Invoking downloader on u'http://svtplay3r-f.akamaihd.net/d/se/open/delivery/20161007/1122946-006A/dash-live/PG-1122946-006A-MILLENNIUMTVSERI-02-1a894f3d-e7aa-336d-472e-56993a27cd04-live.mpd?alt=http://switcher.cdn.svt.se/./'
> [dashsegments] Total fragments: 894
> [download] Destination: Avsnitt 6-1122946-006A.fdashhbbtv-PG-1122946-006A-MILLENNIUMTVSERI-02_988_2.m4a
> [download] 100% of 2.65MiB in 00:07
> [ffmpeg] Merging formats into "Avsnitt 6-1122946-006A.mp4"
> [debug] ffmpeg command line: ffmpeg -y -i 'file:Avsnitt 6-1122946-006A.fdashhbbtv-PG-1122946-006A-MILLENNIUMTVSERI-02_2796_1.mp4' -i 'file:Avsnitt 6-1122946-006A.fdashhbbtv-PG-1122946-006A-MILLENNIUMTVSERI-02_988_2.m4a' -c copy -map 0:v:0 -map 1:a:0 'file:Avsnitt 6-1122946-006A.temp.mp4'
> ERROR: file:Avsnitt 6-1122946-006A.fdashhbbtv-PG-1122946-006A-MILLENNIUMTVSERI-02_2796_1.mp4: Invalid data found when processing input
> Traceback (most recent call last):
>   File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1837, in post_process
>     files_to_delete, info = pp.run(info)
>   File "/usr/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 444, in run
>     self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
>   File "/usr/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 192, in run_ffmpeg_multiple_files
>     raise FFmpegPostProcessorError(msg)
> FFmpegPostProcessorError
Repository: You-Dont-Know-JS
Issue: this & prototypes, chapter 5 #Setting & Shadowing Properties
Labels: for second edition

> If the `myObject` object already has a normal data accessor property called `foo` directly present on it, the assignment is as simple as changing the value of the existing property.

and

> 1. If a normal data accessor (see Chapter 3) property named `foo` is found anywhere higher on the `[[Prototype]]` chain, **and it's not marked as read-only (`writable:false`)** then a new property called `foo` is added directly to `myObject`, resulting in a **shadowed property**.

Is there really has data accessor property? I think threre are only have data properties and accessor properties. And in Chapter 3, I can't find any accurate definition about data accessor property.

Have you ever say 

> For accessor-descriptors, the `value` and `writable` characteristics of the descriptor are moot and ignored

Why not change "data accessor property" to "data property"?
Repository: rust
Issue: Make std::io::Take<R> an instance of std::io::Seek when R:std::io::Seek
Labels: T-libs-api,C-feature-accepted,A-io

This would be particularly useful for reading file formats containing other formats.
Examples include:
- OpenType font files, where CFF is an embedded format.
- GRIB (format used by weather forecast organisms), containing grayscale JPEG to describe values.

(and probably many others)
In such cases, it would also be cool to have a "drain" method on std::io::Take, that would move the read cursor at the end of the Take.