sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: "this expression will panic at run-time" warnings can't be suppressed 
Labels: A-lints,T-compiler,C-feature-request

Here's a reduced test-case:

```rust
let a = [0u8; 2usize];
println!("{}", a[0]);
println!("{}", a[1]);

if a.len() == 3 {
    println!("{}", a[2]);
}
```

Now some background.

In Servo we generate large amounts of rust code using different systems. Today @upsuper was trying to generate shared code for two different structs that have different fields, let's simplify it as:

```rust
struct Foo {
    bar: [u8; 2],
}

struct Bar {
    bar: [u8; 3],
}
```

To generate shared code for both, he wanted to do something like:

```rust
let instance = ${var}; // Instance is either `Foo` or `Bar`, we'll expand this twice.
do_something_with(instance.bar[0]);
do_something_with(instance.bar[1]);
if instance.bar.len() == 3 {
    do_something_with(instance.bar[2]);
}
```

However, that generates an unsuppresable warning like:

```
^^^^ index out of bounds: the len is 2 but the index is 2
```

So it seems that Rust doesn't account for that code being unreachable in the `Foo` case.

In any case, being able to suppress that warning would've made this code straight-forward. Instead of that we probably need to work around it with something like:

```rust
#[inline(always)]
fn doit(a: &[u8]) {
    do_something_with(a[0]);
    do_something_with(a[1]);
    if a.len() == 3 {
        do_something_with(a[2]);
    }
}

doit(&instance.bar)
```

Which is not great.
Repository: go
Issue: x/build/devapp: support R=N in Gerrit Reviews
Labels: Builders

Previously, when a Change contained a comment with the contents “R=<release>”, it was displayed on dev.golang.org/release. Since moving to maintner this functionality is no longer supported.

Support it again.

@TocarIP @ianlancetaylor @bradfitz
Repository: rust
Issue: armv7 exhausts memory on stage0 librustc w/ debuginfo
Labels: A-debuginfo,O-Arm,T-compiler,E-help-wanted,I-compilemem,C-bug

I'm having trouble natively compiling rustc armv7-unknown-linux-gnueabihf with `--enable-debuginfo`, on both the beta and master branches.  I haven't seen this on any stable release before.  To reproduce the issue, I'm running on Fedora 26 armv7hl, using all default options apart from enabling debuginfo.

```
Building stage0 compiler artifacts (armv7-unknown-linux-gnueabihf -> armv7-unknown-linux-gnueabihf)
[...]
   Compiling rustc v0.0.0 (file:///home/jistone/rust-beta/src/librustc)
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
error: Could not compile `rustc`.

Caused by:
  process didn't exit successfully: `/home/jistone/rust-beta/build/bootstrap/debug/rustc --crate-name rustc src/librustc/lib.rs [...]` (signal: 6, SIGABRT: process abort signal)
```

I guess that C++ exception is probably LLVM running out of memory.  This excerpt is from beta sources -- on master it also errors, but without the exception info, instead a SIGSEGV.  I doubt that difference is very significant, just bad luck for who failed to allocate memory.

In either case, when I watch progress in htop, the process grows right up to 3GB virt size and then dies.  That's the limit of the 32-bit user address space, of course.  The resident size was just a little over 2GB at that time, so something is holding wasted memory here.  It could be jemalloc, or could be extra capacity in vec/map/etc. -- I'm not sure how to tell.

My workaround for now is to use `--enable-debuginfo-only-std`.

(And FWIW, 32-bit i686 is not having this problem for me.)
Repository: kubernetes
Issue: DefaultTolerationSeconds admission plugin flags pollute all commands
Labels: kind/bug,priority/backlog,sig/scheduling,lifecycle/frozen

The DefaultTolerationSeconds admission plugin configures itself via globally registered flags, rather than via plugin config, as expected.

This has several negative effects:
* The global flags are visible in completely unrelated commands, like kubectl:
    ```
    $ kubectl options
    The following options can be passed to any command:
    ...
    --default-not-ready-toleration-seconds=300: Indicates the tolerationSeconds of the toleration for notReady:NoExecute that is added by default to every pod that does not already have such a toleration.
    --default-unreachable-toleration-seconds=300: Indicates the tolerationSeconds of the toleration for unreachable:NoExecute that is added by default to every pod that does not already have such a toleration.
    ```
* The admission plugin is not positioned to receive config as apiserver config is updated to be able to be consumed from files, and then dynamically

The global flags should be deprecated, and a config type created to hold the config for this admission plugin (like other configurable admission plugins)

cc @kubernetes/sig-scheduling-bugs
Repository: rust
Issue: Provide a way to get feedback on compiler error rates
Labels: C-enhancement,A-diagnostics,metabug,T-compiler

As per https://github.com/rust-lang/rust/pull/45452#issuecomment-339329308, and [other conversations](https://internals.rust-lang.org/search?q=telemetry) that have been had over time, there's a feeling that we should have ways of identifying what `rustc` features are being used/encountered. This can range from full featured telemetry support in `rustc`/`cargo`, to a simple webapp accepting people to post compiler output. Right now the only ways we receive feedback for confusing output are:

 - IRC/gitter
 - this issue tracker
 - stackoverflow
 - /r/rust

If we added telemetry support on rustc, it would also _have_ to be opt-in, and it could start with being a simple flag passed to `rustc` to send a post request with the text output of the compiler. These reports could then be aggregated by type.
Repository: flutter
Issue: Autocorrect tooltips don't appear on iOS
Labels: a: text input,c: new feature,platform-ios,framework,f: material design,a: fidelity,f: cupertino,customer: crowd,P2,team-ios,triaged-ios,fyi-text-input

## Steps to Reproduce

When using a native iOS app without text prediction enabled, there is a pop-up that indicates when autocorrections are going to occur, and when backspacing on a correction a pop-up appears that gives alternative choices for the word.

In flutter, the autocorrections happen silently and require backspacing into the word to make the correction.  See the gif below for a comparison of the behavior.

Flutter should either integrate with the iOS autocorrection system to provide the popups or emulate them.  This is a pretty big usability concern which makes it more difficult to enter text because the corrections are harder to notice and harder to fix.

![text_correction](https://user-images.githubusercontent.com/103489/32534122-0182048a-c409-11e7-8879-606857aff89e.gif)

## Logs

N/A, this is a design issue.

## Flutter Doctor

```
$ flutter doctor
Building flutter tool...
[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-US, channel master)
    • Flutter at /Users/jwm/Projects/flutter
    • Framework revision 337150308c (2 days ago), 2017-11-05 19:39:49 -0800
    • Engine revision e059cc0258
    • Tools Dart version 1.25.0-dev.11.0

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.io/setup/#android-setup for detailed instructions).
      If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.0.1, Build version 9A1004
    • ios-deploy 1.9.2
    • CocoaPods version 1.3.1

[✗] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.io/setup/#android-setup for detailed instructions).

[✓] IntelliJ IDEA Community Edition (version 2017.2.5)
    • Flutter plugin version 18.2
    • Dart plugin version 172.4343.25

[✓] Connected devices
    • iPhone 7 Plus • DF665BBF-F7D6-4B75-8FCA-E092AD4AD6DC • ios • iOS 11.0 (simulator)
```
Repository: storybook
Issue: How to expand to the full height of the story
Labels: feature request,ui

I'm having problems trying to accomplish something that should be quite simple, I wanna have a container in my story that expands to the full height of the story "canvas" I'm trying setting the style of this container component like `flex:1` but it doesn't work,  I'm using [storybook-addon-scissors](https://github.com/PeterPanen/storybook-addon-scissors) to set the size of my story and I would like the content of my story to adapt as I change its container size. This container component  Instead of expanding like expected with `flex: 1` it just expands according to the content inside it.

Thanks in advance to anyone that can shed some light here.
Repository: TypeScript
Issue: Identifier suggestion algorithm could be improved
Labels: Suggestion,Needs Proposal

**TypeScript Version:**  2.7.0-dev.20171108

**Code**

```ts
const getListLength = 0;
const getListLengths = 1;
createListLength;
```

**Expected behavior:**

Suggests `getListLength`.

**Actual behavior:**

Suggests `getListLengths`.
Repository: go
Issue: cmd/gofmt: a comment at the end of a line clings onto/prevents insertion of a newline before the next line
Labels: help wanted,NeedsFix

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?

go version go1.9.2 darwin/amd64

### Does this issue reproduce with the latest release?

yes

### What operating system and processor architecture are you using (`go env`)?

```
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
```

### What did you do?

1) Created a file named `a.go` with the following contents:

```
package foo // import "example.org/foo"
import "fmt"
var ErrWhatever = fmt.Errorf("whatever")
```

2) Ran `gofmt a.go`. The output was:

```
package foo // import "example.org/foo"
import "fmt"

var ErrWhatever = fmt.Errorf("whatever")
```

### What did you expect to see?

Expected the `gofmt` output to have a newline between the package and the import lines; i.e. like so:

```
package foo // import "example.org/foo"

import "fmt"

var ErrWhatever = fmt.Errorf("whatever")
```

### What did you see instead?

The `gofmt` output did not have a newline between the package and the import lines.

If the import comment `// import "example.org/foo"` isn't present in the file, then the newline is produced. It looks like `gofmt`'s behavior is different when an import comment exists, but that shouldn't be the case.
Repository: go
Issue: x/build/maintner: Gerrit CL and GitHub issue deletions are not reflected in model
Labels: Builders

on https://dev.golang.org/release, search for Copybaraimportfromhttps. It shows CLs that have been deleted:

```
Copybaraimportfromhttps
  CL 72110 Copybara import from https://github.com/golang/scratch/pull/2 .
  CL 72131 Copybara import from https://github.com/golang/scratch/pull/2.
PRESUBMITforCopybarahttps
  CL 72090 PRESUBMIT for Copybara https://github.com/golang/scratch/pull/2 .
  CL 72091 PRESUBMIT for Copybara https://github.com/golang/scratch/pull/2 .
```

These are pulled in via `ForeachOpenCL`.

/cc @kevinburke @bradfitz
Repository: rust
Issue: Invalid casts for C-style enums should trigger the "overflowing_literals" lint
Labels: A-lints,A-diagnostics,T-compiler,C-feature-request

Is there any reason why the "integer out of range" lint doesn't trigger when you cast a C-style enum to an integer type which isn't big enough?

For example say I have the following program:

```rust
enum Foo {
    A = 1,
    C = 1234,
}

fn main() {
    let a = Foo::A as u32;
    let c = Foo::C as u8;
    let normal = 1234 as u8;
    println!("{}, {}, {}", a, c, normal);
}
```

When you compile it, you get a warning on the integer cast, but not the `Foo::C as u8` line.

```
   Compiling playground v0.0.1 (file:///playground)
warning: literal out of range for u8
 --> src/main.rs:9:18
  |
9 |     let normal = 1234 as u8;
  |                  ^^^^
  |
  = note: #[warn(overflowing_literals)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 0.46 secs
     Running `target/debug/playground`

1, 210, 210
```

I would have thought the compiler knows what integer size a C-style enum can fit into and then be able to lint accordingly. So for this case a `Foo`'s largest variant has a value of `1234` meaning it can fit into a `u16` (or `i16`), but not a `u8`.

[(playground)](https://play.rust-lang.org/?gist=76a4606a72b21ea88adf7cd0858d16e8&version=nightly)
Repository: nvm
Issue: .bashrc edge case (nvm source commented out)
Labels: bugs,installing nvm: profile detection

When updating nvm using the `curl` command rec'd in the readme (https://github.com/creationix/nvm/blame/9953a52afb275617fe5d108cefcd1354cf47bfc0/README.md#L44), this is part of the output:
```
=> nvm source string already in /Users/shoshanaberleant/.bashrc
=> bash_completion source string already in /Users/shoshanaberleant/.bashrc
```

Technically, this is true, but, in fact, the nvm source string was commented out, so the `nvm` command doesn't work.

Here is the check:
https://github.com/creationix/nvm/blob/9953a52afb275617fe5d108cefcd1354cf47bfc0/install.sh#L346
Repository: TypeScript
Issue: Long (infinite?) compile times intersecting with large union
Labels: Bug

**TypeScript Version:**  2.7.0-dev.20171108

**Code**

At the bottom of `src/compiler/utilities.ts` replace the return type of `hasJSDocNodes` with:
```ts
export function hasJSDocNodes(node: Node): node is HasJSDoc & { jsdoc: JSDoc[] } {
```
(Since `hasJSDocNodes` ensures that `jsdoc` will be defined.)

**Expected behavior:**

Eventually compiles.

**Actual behavior:**

Very long compile time. Probably has to do with `HasJSDoc` being a large union.
Repository: angular
Issue: Please let HttpParams.set and .append accept one object-like arg with nested data
Labels: feature,area: common/http,P4,feature: under consideration

## I'm submitting a...
[ x ] Feature request
</code></pre>

## Current behavior

You can only set or append to HttpParams one by one.

## Expected behavior

With Http.get, .post, etc, you could pass any object with nested object-like data as options.params. First level keys would be mapped to query params, and values JSON encoded if they're object-like. I'd like to achieve the same without adding complexity by doing something like:

> new HttpParams.set( { where: { id: [ 1,2,3 ] } } )

## What is the motivation / use case for changing the behavior?

In migrating to HttpClient from Http, I had to add a helper method:
```
private anyToHttpParams(obj: any) { // requires lodash
    return Object.entries(obj)
    .reduce(
        (params, [key, value]) => params.set(
            key, _.isObjectLike(value) ? JSON.stringify(value) : value
            ), 
        new HttpParams()
    );
}

//  this.http.get(url, { params: this.anyToHttpParams({ where: { id: [ 1,2,3 ] } }) } );
```

For me, this was sort of a breaking change as well, as I didn't get a compiler error when I just replaced Http with HttpClient and passed objects with nested data to params like I used to with Http, but in network console my xhr URLs changed to something like `/action?[object object]`.

## Environment

Angular version: 5.0.1
Repository: axios
Issue: HTTP/2 support
Labels: state::triage

Is there any plan to add HTTP/2 support for node.js? Since it is now officially supported in node.js 9, I think it's highly desirable to have this library support it as well.
Repository: kubernetes
Issue: Support liveness and readiness probe with HTTP check that checks response text
Labels: priority/backlog,sig/network,sig/node,kind/feature,lifecycle/frozen,triage/accepted

<!-- This form is for bug reports and feature requests ONLY! 

If you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).
-->

**Is this a BUG REPORT or FEATURE REQUEST?**:

/kind feature
/sig node

*Problem:*
This is equivalent to the HAProxy `http-check expect string READY` (https://www.haproxy.com/documentation/aloha/7-0/haproxy/healthchecks/)
Based http://kubernetes.io/docs/user-guide/liveness/ it appears that the healthz checks only check the HTTP response code.
I'm working with a health check that is a company standard and that returns status strings.

*Proposed Solution:*
Some capability to check the text of the response to see if it contains a particular string.
This check would probably need to only check the first n characters to prevent issues with memory.
HAProxy also supports an `rstring` that is a regex but my use case does not require it.

*Page to Update:*
http://kubernetes.io/docs/user-guide/liveness/
Repository: pytorch
Issue: making .cuda() falls back to an identity function when gpu is not available
Labels: module: cuda,triaged

it would be really convenient, if .cuda() could automatically fall back to doing nothing when there's no gpu available on the machine. it was suggested by @khanhptnk 

cc @ngimel
Repository: go
Issue: math/big: mulAddVWW too slow
Labels: Performance,NeedsInvestigation

### What version of Go are you using?
go1.9.2 darwin/amd64

### Does this issue reproduce with the latest release?
yes

### What operating system and processor architecture are you using?
darwin/amd64

### What did you do?

The following Go program multiplies big.Int with one Word constant:

    package main
    
    import (
    	"fmt"
    	"math/big"
    )
    
    func main() {
    	a := big.NewInt(1)
    	b := big.NewInt(1)
    	a.Lsh(a, 8096)
    	for i := uint64(1); i <= 10000000; i++ {
    		a.Mul(a, b)
    	}
    	fmt.Println(a.BitLen())
    }


### What did you expect to see?

The following C program uses [GMP](https://gmplib.org/) 6.1.2:

    #include <stdio.h>
    #include <stdint.h>
    #include "gmp.h"
     
    int main(int argc, char *argv[]) {
        mpz_t a, b;
        mpz_init_set_ui(a, 1);
        mpz_init_set_ui(b, 1);
        mpz_mul_2exp(a, a, 8096);
        for (uint64_t i = 1; i <= 10000000ULL; i++) {
            mpz_mul(a, a, b);
        }
        printf("%lu\n", mpz_sizeinbase(a, 2));
        return 0;
    }

and terminates under around 1s.

### What did you see instead?

The Go program completes on my machine in 1.87s, i.e. almost twice as slow.

`mulAddVWW` is building block for multiplication (by one word, or more) so a better performance would benefit many applications.
Repository: react
Issue: Formalize top-level ES exports
Labels: Component: Build Infrastructure,Type: Discussion,Type: Breaking Change,React Core Team

Currently we only ship CommonJS versions of all packages. However we might want to ship them as ESM in the future (https://github.com/facebook/react/issues/10021).

We can't quite easily do this because we haven't really decided on what top-level ES exports would look like from each package. For example, does `react` have a bunch of named exports, but also a default export called `React`? Should we encourage people to `import *` for better tree shaking? What about `react-test-renderer/shallow` that currently exports a class (and thus would start failing in Node were it converted to be a default export)?
Repository: tensorflow
Issue: Support Windows builds through clang
Labels: stat:contribution welcome,type:build/install

Right now, the tested configurations for Linux, Mac and Windows use gcc, clang and MSVC, as seen at 
https://www.tensorflow.org/install/install_sources#tested_source_configurations

Linux can be made to compile with clang, too, if you use the right magic trick (`--config=cuda_clang`). All that's left is Windows, which is probably the trickiest of the three.

Bonus points for allowing to cross-build for Windows under Linux. The main problem there might be with CUDA and getting its SDK installed on a Linux system (just a wild guess).

(Forked from an existing discussion under https://github.com/tensorflow/tensorflow/issues/12052)
Repository: pytorch
Issue: Multiprocessing with torch.solve hangs
Labels: module: multiprocessing,triaged,module: linear algebra

Applying torch.gesv with multiprocessing, after a call to torch.potrf, causes hanging. Reported from the forums: https://discuss.pytorch.org/t/multiprocessing-subprocess-is-not-running-at-blas-or-lapack-command/9727/8

Repro below. Increase `n_data` until it happens (for me it happened at 1001).
```
import torch
from torch.autograd import Variable
import torch.optim

def reproduce():
	n_data = 100
	ndim = 100

	x_input = Variable(torch.rand(n_data, ndim) * 2 - 1)
	x_input.data[0, :] = 0
	output = Variable(torch.randn(n_data, 1))

	n_init = 1
	b = Variable(torch.randn(ndim, n_data))
	A = Variable(torch.randn(ndim, ndim))

	chol = torch.potrf(A.mm(A.t()) + Variable(torch.eye(ndim)))

	pool = torch.multiprocessing.Pool(n_init)
	res = pool.apply_async(torch.gesv, args=(b, A))
	return res.get()


if __name__ == '__main__':
	print(reproduce())
```

cc @jianyuh @nikitaved @pearu @mruberry @heitorschueroff @walterddr @IvanYashchuk
Repository: go
Issue: net/url: username in authority is not strictly in RFC3986
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

go version devel +5a5223297a Wed Nov 1 11:43:41 2017 -0700 windows/amd64

### Does this issue reproduce with the latest release?

yes

### What operating system and processor architecture are you using (`go env`)?

Windows 7 64bit

### What did you do?

```go
package main

import (
	"fmt"
	"log"
	"net/url"
)

func main() {
	u, err := url.Parse("http://foo@evil.com:80@google.com/")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%#v\n", u)
	fmt.Printf("%#v\n", u.User)
}
```
https://play.golang.org/p/HFm27EmRPU

### What did you expect to see?

error should be returned

### What did you see instead?

no errors.

https://www.blackhat.com/docs/us-17/thursday/us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-Languages.pdf

In this slide, some URL parsers are mentioned. And seems to be different from cURL. RFC3986 says username is filled with `unreserved / pct-encoded / sub-delims`.

```
userinfo      = *( unreserved / pct-encoded / sub-delims / ":" )

pct-encoded   = "%" HEXDIG HEXDIG

sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
                 / "*" / "+" / "," / ";" / "="
```
https://tools.ietf.org/html/rfc3986

And whatwg-url says 

>If the @ flag is set, prepend "%40" to buffer.

https://url.spec.whatwg.org/#authority-state

Go's implementation find `@` in authority with using `strings.LastIndex`.

https://github.com/golang/go/blob/5d0cab036712539d50435904ded466bf6b7b0884/src/net/url/url.go#L535

If implementation should be strictly in RFC3986 and whatwg-url, multiple @ should be treated as error, I think.

related issue https://github.com/golang/go/issues/3439