sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: net: default dialer should accept list of IPs with fallback included
Labels: FeatureRequest

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
master

### What did you do?

1. In case you want to implement/extend your own dialer you might want to use the original dialer to handle all the TCP/UDP connection, but to still resolve the DNS.. in this scenario you can't wrap it and just send list of IPs because it won't use fallbacks
2. In case you want to dial IP with fallbacks you can't do that.


### What did you expect to see?

```func (d *Dialer) DialContext(ctx context.Context, network string, addresses []string) (Conn, error)``` will accept list of `addresses`

Or at least

`func (d *Dialer) DialContextWithFallbacks(ctx context.Context, network string, addresses []string) (Conn, error)`
Repository: rust
Issue: Field pattern shorthand can be interpreted as an item reference
Labels: A-lints,T-lang,C-feature-request

`B { X }` is a shorthand for `B { X: X }` and `X` here can be intepreted as an item reference, rather than a binding. I don't know if this is actually a bug or not. Possible fixes are:

- Leave it as is.
- Leave it as is with some warning.
- Force `X` be interpreted as a binding and let it fail to compile (due to local-global shadowing).

```rust
const X : i32 = 10;
struct B {
    X: i32,
}
fn main() {
    match (B { X: 9 }) {
        B { X } => println!("Foo!"),
        B { .. } => println!("Bar!"),
    }
}
```

- Current behavior: `Bar!` is printed.
- Possible expected behaviors: as-is or some warning/error emitted.
- Meta: `rustc 1.20.0-nightly (ab5bec255 2017-06-22)`
Repository: rust
Issue: Tracking issue for unsized tuple coercion
Labels: T-lang,B-unstable,C-tracking-issue,S-tracking-design-concerns,S-tracking-needs-summary

This is a part of #18469. This is currently feature-gated behind `#![feature(unsized_tuple_coercion)]` to avoid insta-stability.

Related issues/PRs: #18469, #32702, #34451, #37685, #42527 

This is needed for unsizing the last field in a tuple:
```rust
#![feature(unsized_tuple_coercion)]
fn main() {
    let _: &(i32, [i32]) = &(3, [3, 3]) as _;
}
```
<https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=5f93d1d7c6ee0e969df53c13e1aa941a>
Repository: angular
Issue: Feature: @Directive should support styles and styleUrls properties
Labels: feature,area: core,core: stylesheets,feature: under consideration

## I'm submitting a ...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (behavior that used to work and stopped working in a new release)
[ ] Bug report <!-- Please search github for a similar issue or PR before submitting -->
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre>

## Current behavior

Currently, if you have a `@Directive` that requires some custom styles you have to deal with the inclusion of styles, the `@Directive` does not accept `styles` and `styleUrls` (and maybe `encapsulation: None|Emulated`).

## Expected behavior

The `DirectiveResolver` should accept  `styles`, `styleUrls` (and `encapsulation: None|Emulated`) for the `@Directive` decorator.


## What is the motivation / use case for changing the behavior?


```
/**
 * Removes the spacing around an `md-list` component when it is a child of `md-card`.
 */
@Directive({
  selector: 'md-list[my-md-list-in-card]',
  styles: [`
    md-list[my-md-list-in-card] {
      .mat-list-item-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
      }
    }
  `]
})
export class MyMdListInCardStylerDirective { }
```
Repository: go
Issue: time: time.Local is always UTC on iOS
Labels: NeedsFix,mobile

Local timezone is hardcoded to UTC on iOS.

https://github.com/golang/go/blob/master/src/time/zoneinfo_ios.go#L39-L42
```go
func initLocal() {
	// TODO(crawshaw): [NSTimeZone localTimeZone]
	localLoc = *UTC
}
```
As mentioned in the code it should use [NSTimeZone localTimeZone](https://developer.apple.com/documentation/foundation/nstimezone/1387209-localtimezone) to get the current timezone.

cc @eliasnaur @crawshaw 

(Same issue on android #20455)
Repository: kubernetes
Issue: Environment variables are not re-interpolated when re-applying deployment
Labels: kind/bug,sig/apps,lifecycle/frozen,needs-triage

/kind bug



**What happened**:
The environment variables were not interpolated 
**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

create environment variable like this
```
            - name: REDIS_URL
              value: redis://:$(REDIS_PASSWORD)@redis-master-service.default.svc.cluster.local:$(REDIS_MASTER_SERVICE_SERVICE_PORT)/0
```

do "kubectl apply -f ."

add another variable:

```
            - name: REDIS_PASSWORD
              valueFrom:
                configMapKeyRef:
                  name: global-config
                  key: redis.password
```

and if you bash'in in the container, the command "env" will print value for REDIS_URL with not interpolated $(REDIS_PASSWORD) even though it should have been replaced.

The current workaround is to add REDIS_PASSWORD first and remove REDIS_URL, apply changes, then add REDIS_URL, and then apply changes again.

**Anything else we need to know?**:

**Environment**:
- Kubernetes version (use `kubectl version`):
```
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.0", GitCommit:"58b7c16a52c03e4a849874602be42ee71afdcab1", GitTreeState:"clean", BuildDate:"2016-12-12T23:35:54Z", GoVersion:"go1.7.4", Compiler
:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.3", GitCommit:"029c3a408176b55c30846f0faedf56aae5992e9b", GitTreeState:"clean", BuildDate:"2017-02-15T06:34:56Z", GoVersion:"go1.7.4", Compiler
:"gc", Platform:"linux/amd64"}
```
- Cloud provider or hardware configuration**: AZURE
- OS (e.g. from /etc/os-release): 
```
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
```
- Kernel (e.g. `uname -a`): Linux k8s-master-FD89DE52-0 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Repository: opencv
Issue: locale dependencies
Labels: bug,category: core,category: ocl,incomplete

<!--
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.2.0
- Operating System / Platform => Ubuntu 16.04 x86_64
- Compiler => gcc

##### Detailed description

https://github.com/opencv/opencv/blob/master/modules/features2d/src/orb.cpp

line:73 in unlucky locale you'll get an error:

OpenCL program build log: -D ORB_RESPONSES -D blockSize=7 -D scale_sq_sq=3,847753306719e-16f -D HARRIS_K=0,039999999106f
<kernel>:35:49: error: invalid digit '9' in octal constant
responses[idx] = ((float)a * b - (float)c * c - HARRIS_K * (float)(a + b) * (a + b))*scale_sq_sq;

"scale_sq_sq" certainly has not valid value too.

Setting up "LANG" environment variable to "en_US.UTF-8" could help, but it's not a good solution, I think..

##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: rust
Issue: Add lint for u8 as *mut cast
Labels: A-lints,C-feature-request

This is an easy error to make: #42901 #42827

A cast from u8 to a pointer is probably always an error. In the rare case that you're creating a pointer into the first 256 bytes of address space, `u8 as usize as *mut` is more clear, or you can be troubled to `#[allow(u8_to_ptr)]`.
Repository: go
Issue: proposal: spec: consider more strict "declared and not used" check (go/vet or even spec)
Labels: LanguageChange,Proposal,LanguageChangeReview

The following code
```
func f(i interface{}) *T {
	x, ok := i.(*T)
	if !ok {
		x := new(T)
		x.f = 0
	}
	return x
}
```
compiles without errors even though it is obviously incorrect: Inside the block of the `if` statement, the `:=` operator should have been `=` instead. The compiler doesn't complain because the assignment to `x.f` counts as _use_ of `x`.

Arguably, assignments to fields/elements of composite type variables shouldn't be counted as _uses_. Their effect is lost if the variable itself is never used and they may hide the fact that the variable is not used.

(This was the underlying cause for #20789.)
Repository: flutter
Issue: Factor out deep linking logic
Labels: framework,customer: posse (eap),f: routes,P3,team-framework,triaged-framework

The deep linking functionality that landed last week has a few side effects. (Videos sent in an email).

Starting from a position where the app is closed (nothing to restore) I get the following:

1. If the route passed has the format `/blah/this/thing` then the `Navigator` (as designed) will attempt to push to the stack the matching Route and parents in the hierarchy. This all appears to work fine, other than a momentary "black screen" while starting up.

2. If the route passed has the format `some:route:togoto` then the `Navigator` (as designed) will NOT attempt to push the hierarchy. What will happen though is that because you are pushing a route where there is no parent, `Navigator.pop` doesn't know how to correctly dispose of the pushed widget but the back button does. If you use `Navigator.pop` then you will be left with a black screen. 

Starting from a position where the app has an existing state but is backgrounded I get the following:

3. If you pass a route that starts with a slash then flutter will push an additional root route. I'm not sure if that is the expectation, but you will definitely have situations where you go from ScreenB -> ScreenA -> ScreenA. I know on Android this will more likely be an issue, but wouldn't it still create a possible scenario where there is an "active" screen that can never be reached. i.e: if you have a "Home" screen (no back button on it) and then a second one pops on top of it.

Feel free to reach out because its hard to describe and I'm sure stuff didn't make sense.
Repository: TypeScript
Issue: TypeScript complains about overwriting .d.ts files that are potentially known outputs
Labels: Suggestion,Awaiting More Feedback

<!-- BUGS: Please use this template. -->

Using tsc at the command line, I got
```
error TS5055: Cannot write file '/Users/alexamil/WebstormProjects/oresoftware/ldap-pool/index.d.ts' because it would overwrite input file.
```
why? :)

my tsconfig.json file is as follows

```json
{
  "compilerOptions": {
    "declaration": true,
    "baseUrl": ".",
    "types": [
      "node"
    ],
    "typeRoots": [
      "node_modules/@types"
    ],
    "target": "es5",
    "module": "commonjs",
    "noImplicitAny": true,
    "removeComments": true,
    "allowUnreachableCode": true,
    "lib": [
      "es2015",
      "es2016",
      "es2017"
    ]
  },
  "compileOnSave": false,
  "exclude": [
    "node_modules"
  ]
}

```
Repository: go
Issue: image/gif: decoding gif returns `unknown block type: 0x01` error
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
```
go version go1.8.3 darwin/amd64
```

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/montanaflynn/Development/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/w7/gd1mgc9n05q_9hrtt2sd75dw0000gn/T/go-build873139005=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
```

### What did you do?

Tried to decode [this gif](http://i.imgur.com/cjbY0nE.gif):

```go
package main

import (
    "flag"
    "fmt"
    "image/gif"
    "net/http"
    "os"
)

func exitIfError(err error) {
    if err == nil {
        return
    }

    fmt.Fprintf(os.Stderr, "%v\n", err)
    os.Exit(1)
}

func main() {
    gifURL := flag.String("url", "http://i.imgur.com/cjbY0nE.gif", "the URL of the GIF")
    flag.Parse()
    res, err := http.Get(*gifURL)
    exitIfError(err)
    _, err = gif.DecodeAll(res.Body)
    _ = res.Body.Close()
    exitIfError(err)
}

```

### What did you expect to see?

The gif decode not to error

### What did you see instead?

```
gif: unknown block type: 0x01
```
Repository: go
Issue: x/build/cmd/coordinator: use maintner to start trybots, not polling gerrit API
Labels: Builders,NeedsInvestigation

Currently Trybots start by a goroutine loop in the coordinator (findTryWorkLoop) running a Gerrit query every 60 seconds:

```go
func findTryWorkLoop() {
        if errTryDeps != nil {
                return
        }       
        ticker := time.NewTicker(60 * time.Second)
        for {
                if err := findTryWork(); err != nil {
                        log.Printf("failed to find trybot work: %v", err)
                }
                <-ticker.C
        }
}

func findTryWork() error {
        query := "label:Run-TryBot=1 label:TryBot-Result=0 status:open"
...
        cis, err := gerritClient.QueryChanges(context.Background(), query, gerrit.QueryChangesOpt{
                Fields: []string{"CURRENT_REVISION", "CURRENT_COMMIT", "CURRENT_FILES"},
        })
...
```

This sucks for two reasons:

1) It runs every 60 seconds, wasting on average 30 seconds and at worst 60 seconds of our overall 5 minute goal for Trybots.
2) If a new CL is uploaded in the meantime, Gerrit removes +1 votes and the CL is treated as if it's no longer desired to be a trybot job. (see confusion in @shurcooL's https://golang.org/cl/46715).

We should fix both at the same time by watching maintner instead and using the live Gerrit data and knowing the history of the vote.

/cc @andybons @shurcooL
Repository: vscode
Issue: Selection of problem matcher is not very intuitive when running a task
Labels: feature-request,tasks

Testing the following in #29442:
> Task > Run Build Task: shows the list again with the task run last listed under recently used tasks. This time select a problem matcher: Enusre that problems are detected (2) and that the tasks.json file opens with a configuration like this...

I was presented with a list that contains several items that look similar but do not work the same way
![image](https://user-images.githubusercontent.com/2239563/27582143-38bdde48-5b30-11e7-9856-f44f8264b241.png)

To me `Gulp TSC Problems [$gulp-tsc]` and `TypeScript problems [$tsc]` problem matchers seemed semantically identical, so I picked up the first one just because I am using gulp task, and I needed to match TSC problems. It did not work, and only then I tried the second one, which worked and matched the problem.

If I wouldn't know what problem matchers do, I would not experience any difference whether I selected anything from the list or not.

Hence, two points:
1. If I select a problem matcher that does not find anything because it is wrong, I should have indication of this. 
Maybe 'Problems' tab can have a hint, pointing to problem matchers if a task was executed and no problems were detected? Other option is to echo information to the terminal that problem matcher did not find any problems. Otherwise it is very difficult to understand what was the impact of the selected problem matcher. 
Also having a badge with count of 'Problems found' on Problems tab in workbench pane would be beneficial, in order to see the result of problem matcher straight after running a task. Currently you have to move to 'Problems' tab to see problem count.
2. There should be a better way of semantic separation between those two tasks (and maybe any others). This is a difficult thing to do, and I cannot suggest anything at this time but we should be aware of it.
Repository: vscode
Issue: Auto indent on pasting does not satisfy indentation for braces in JS/TS
Labels: typescript,javascript,editor-autoindent,under-discussion,on-unit-test

Testing #29494 

Copy the following code into into an editor file of type JavaScript, indented with tabs (4):
```
function makeSub(a,b) {
subsent = sent.substring(a,b);
return subsent;
}
```

**Result**: 
![image](https://user-images.githubusercontent.com/2239563/27587148-7f5d2e86-5b43-11e7-997c-37c6fb4e2519.png)

**Expectation**:
Closing curly brace not to be indented.
Repository: angular
Issue: Disabling form controls leads to changed-after-checked errors
Labels: type: bug/fix,hotlist: components team,freq2: medium,area: forms,state: confirmed,forms: disabling controls,P4

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MIGHT BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a ...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (behavior that used to work and stopped working in a new release)
[x] Bug report <!-- Please search github for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre>

## Current behavior
<!-- Describe how the issue manifests. -->
MyComponent has a `disabled` Input property and a `valueChange` Output property. Users sometimes want to disable the component after the `valueChange` event was handled. Setting the component's `[disabled]` property to `true` rightfully causes its child input element to emit a `blur` event. The `onTouched` is then called, which changes the `ng-touched` binding causing ExpressionChangedAfterItHasBeenCheckedError. This happens only if `ngModel` binding is used.

## Expected behavior
<!-- Describe what the desired behavior would be. -->
ExpressionChangedAfterItHasBeenCheckedError should not be thrown.

## Minimal reproduction of the problem with instructions
<!--
For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
-->


Steps to reproduce:
1. Focus the input element
2. Change the text
3. Press Enter

[DEMO HERE](http://plnkr.co/edit/4E4eDogGVuhKGkLD8WaR?p=preview)

## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->
Ideally, using `ngModel` binding should not break a scenario that is otherwise working with `[value]` and `(valueChange)` bindings. Using timeouts or manual change detection is plausible, but those are workarounds to an outstanding issue.

## Please tell us about your environment

<pre><code>
Angular version: 4.2.3
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [x] Chrome (desktop) version 58.0.3029.110
- [?] Chrome (Android) version XX
- [?] Chrome (iOS) version XX
- [ ] Firefox version 53.0.2 
- [?] Safari (desktop) version XX
- [?] Safari (iOS) version XX
- [x] IE version 11.962 **PRESSING ENTER DOES NOT TRIGGER CHANGE**
- [ ] Edge version 25.1 / 13.10
 
</code></pre>
Repository: go
Issue: x/tools/cmd/goimports: support repairing import grouping/ordering
Labels: Proposal,Proposal-Accepted,NeedsFix,Tools

I'm working on a tool to fix up non-conventional or incorrect imports grouping/ordering, but I'd much rather have this be part of goimports. Would it be welcome?

### What goimports does now

When goimports adds or removes an import, it heuristically attempts to find a good place for it. So if I add an `os.Open()` call, and my imports already look like this:

```go
import (
	"context"
	"testing"

	"github.com/Sirupsen/logrus"
)
```

Then goimports will put "os" in the proper spot, beween "context" and "testing". That's great!

### What goimports does not do

If my imports are not grouped and sorted in the conventional way, goimports will not usually fix the problem. For example, if I was using the old context package, my imports might look like this:

```go
import (
	"testing"

	"github.com/Sirupsen/logrus"
	"golang.org/x/net/context"
)
```

When I edit the context import to the new package, "context", I have this:

```go
import (
	"testing"

	"github.com/Sirupsen/logrus"
	"context"
)
```

Running goimports will notice that logrus and context don't make a proper group, so it will separate them:

```go
import (
	"testing"

	"context"

	"github.com/Sirupsen/logrus"
)
```

But this isn't what we really want. Ideally, it would just re-group and re-order all the imports, to yield:

```go
import (
	"context"
	"testing"

	"github.com/Sirupsen/logrus"
)
```

### Work so far

I have a tool that will globally reorder imports according to the grouping rules, including the associated doc-comments; see below. I could also develop similar funcitonality inside goimports.

My tool is not nearly perfect: It doesn't handle multiple import declarations; it doesn't know about `import "C"`. It's not even clear what *should* happen to random non-doc-comments inside the import block, eg:

```go
import (
	"github.com/Sirupsen/logrus"

	// When we re-order, what happens to this comment?

	"testing"
)
```

Automatically grouping and ordering would also be a behavioral change for goimports, so it would have to be behind a flag for now.