sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Git Diff Doesn't Show Changes in New Line Characters
Labels: feature-request,diff-editor

The diffeditor doesn't show new line ending changes (eg CRLF vs LF) even with "diffEditor.ignoreTrimWhitespace" set to false.
Repository: flutter
Issue: iOS transition from standard status bar to expanded status bar is janky
Labels: platform-ios,framework,engine,a: fidelity,a: quality,P3,team-ios,triaged-ios

In flutter/engine#3357, we corrected the top padding applied to account for double-height status bars on iOS. While this fix ensures the padding is correct, the transition between a standard height status bar and the expanded, double-height status bar is still janky.

To repro:
1. Start up a Flutter app (e.g., the gallery example) in the iOS simulator.
2. Enable Slow Animations (Cmd-T). This makes what's going on a bit more obvious.
3. Toggle the expanded status bar (Cmd-Y).

It looks like what's happening is:

1. We get the status bar resize event before the transition starts, and the engine sees the view as being 20px shorter.
2. With the view still the full display height, we re-layout the view with the new reduced height, which results in a momentary vertical *stretch* of the view contents.
3. iOS animates some kind of interpolation on the view which results in the view appearing to get *squished*.

Looking at individual widgets at the end of the transition, it looks to me like they might all have actually moved 20px down as desired. It would be nice if we could disable the default iOS transition animation and handle this smoothly.

The code in question is in [FlutterViewController::viewDidLayoutSubviews](https://github.com/flutter/engine/blob/master/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm#L344).
Repository: TypeScript
Issue: Object Spread should not invoke setter.
Labels: Bug,ES Next

Current stage-3 spec requires object spread should define new properties on rest object, not set value on rest object.

Spec:
http://sebmarkbage.github.io/ecmascript-rest-spread/#AbstractOperations-CopyDataProperties
More readable example:
https://github.com/sebmarkbage/ecmascript-rest-spread/blob/master/Issues.md#setters


**TypeScript Version:**  nightly

**Code**

```ts
let record = { x: 1 };
let obj = { set x(a) { throw new Error(); }, ...record }; // not error
obj.x; // 1
```

**Expected behavior:**
No runtime error.

**Actual behavior:**
Runtime error.

Note: Babel does not define properties by default either.
Repository: rust
Issue: link-dead-code limitations (bad for code coverage)
Labels: T-compiler,C-feature-request,link-dead-code

Consider a cargo project (`dead`) with this `src/lib.rs` file:

```rust
pub fn fun0() {}

pub fn fun1<T>() {}

pub trait Trait {
    fn fun2(&self);
    fn fun3(&self) {}
}

impl Trait for () {
    fn fun2(&self) {}
}
```

Running

```
cargo clean && RUSTFLAGS='-C link-dead-code' cargo test && cargo sym -C target/debug/dead* | grep dead::
```

outputs

```
0000000000015e60 dead::fun0::he72896c4e971b738
0000000000015e70 <() as dead::Trait>::fun2::h21fa8b5ef4270ce1
0000000000015e90 dead::__test::main::h824aaf01f68ecd0a
```

We can observe that that only `fun0` and `<() as Trait>::fun2` is included (also checked with `nm` and running `kcov`). Not including `fun1` and `Trait::fun2` makes code coverage inflates (using `kcov`).

I can see that `fun1` and `Trait::fun2` is not included because they need to be monomorphised. One partial solution would be to monomorphise the default methods implementations for every type that implements the trait, but I think this could blow the binary size and compilation time.

Would it be possible to add this symbols without monomorphisation? Or maybe creating a monomorphised version that just panics? (Could all generic paramaters be set to `!`?)
Repository: kubernetes
Issue: Deprecate and remove --record flag from kubectl
Labels: area/kubectl,kind/feature,sig/cli,lifecycle/frozen

Currently `--record` flag seems like a really bad decision made some time ago, and supporting it makes live harder when trying to modify any parts of code (see [this discussion](https://github.com/kubernetes/kubernetes/pull/40260#discussion_r97681489)). I'm proposing to deprecate that flag and drop it entirely in future version.

@liggitt fyi
@kubernetes/sig-cli-feature-requests opinions?
Repository: go
Issue: x/crypto/acme/autocert: assume default domain for non-SNI connections?
Labels: NeedsInvestigation

If you're running a one-domain site, autocert could potentially handle
non-SNI requests (`GetCertificate("")`) by picking a domain from its cached
cert set - most commonly used, most recently used, first used, shortest, some policy.
Today it returns an error, which probably turns into a TLS hangup.

This affects clients with non-SNI browsers, such as IE 8.

See discussion at end of #13523 for more.

/cc @bradfitz @agl @einthusan
Repository: go
Issue: proposal: reflect/v2: rename StructField.Anonymous to Embedded
Labels: v2,Proposal

in Go-1, we have:

```
$> go doc reflect StructField 
type StructField struct {
	// Name is the field name.
	Name string
	// PkgPath is the package path that qualifies a lower case (unexported)
	// field name. It is empty for upper case (exported) field names.
	// See https://golang.org/ref/spec#Uniqueness_of_identifiers
	PkgPath string

	Type      Type      // field type
	Tag       StructTag // field tag string
	Offset    uintptr   // offset within struct, in bytes
	Index     []int     // index sequence for Type.FieldByIndex
	Anonymous bool      // is an embedded field
}
    A StructField describes a single field in a struct.
```

The `Anonymous` field is a bit ambiguous or at least misleading.

For Go-2, rename it as `Embedded`.

(see: https://golang.org/cl/35732/ for context)
Repository: go
Issue: cmd/gofmt: weird indentation with block comments
Labels: NeedsFix

Please answer these questions before submitting your issue. Thanks!

#### What did you do?
Block comments are formatted weirdly.
```
			/*
			* - Remove package from manifest
			*	- if the package IS NOT being used, solving should do what we want
			*	- if the package IS being used:
			*		- Desired behavior: stop and tell the user, unless --force
			*		- Actual solver behavior: ?
			 */
```
#### What did you expect to see?

Comment beginner and ender is aligned correctly even though it requires adding indentation with spaces.

```
			/*
			 * - Remove package from manifest
			 *	- if the package IS NOT being used, solving should do what we want
			 *	- if the package IS being used:
			 *		- Desired behavior: stop and tell the user, unless --force
			 *		- Actual solver behavior: ?
			 */
```

#### System details

```
go version devel +6a3c6c0 Sat Jan 14 05:57:07 2017 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/jbd"
GORACE=""
GOROOT="/Users/jbd/go"
GOTOOLDIR="/Users/jbd/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/lq/qcn67khn4_1b41_g48x3zchh005d21/T/go-build547869116=/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"
GOROOT/bin/go version: go version devel +6a3c6c0 Sat Jan 14 05:57:07 2017 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +6a3c6c0 Sat Jan 14 05:57:07 2017 +0000 X:framepointer
uname -v: Darwin Kernel Version 15.6.0: Wed Nov  2 20:30:56 PDT 2016; root:xnu-3248.60.11.1.2~2/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.11.6
BuildVersion:	15G1212
lldb --version: lldb-360.1.70
```
Repository: go
Issue: x/arch/x86/x86asm: GNUSyntax rendors relative pc jump targets wrong
Labels: NeedsInvestigation

The GNUSyntax uses `.` to denote the address of the next instruction, but that doesn't match GNU as' definition. This makes it impossible to round trip the disassembly (GNU as will not be able to assemble `je .-0x80` into two-byte short jump.)

```
package main
import "golang.org/x/arch/x86/x86asm"
func main() {
	text := []byte{0x74, 0x80, 0xeb, 0x80, 0x0f, 0x87, 0x80, 0xff, 0xff, 0xff, 0xe9, 0x80, 0xff, 0xff, 0xff}
	for len(text) > 0 {
		inst, err := x86asm.Decode(text[:], 64)
		if err != nil {
			panic(err)
		}
		println("GNU:", x86asm.GNUSyntax(inst))
		println("Go :", x86asm.GoSyntax(inst, 0, nil))
		text = text[inst.Len:]
	}
}
```

Output:
```
GNU: je .-0x80
Go : JE .-128
GNU: jmp .-0x80
Go : JMP .-128
GNU: ja .-0x80
Go : JA .-128
GNU: jmpq .-0x80
Go : JMP .-128
```

However, in AT&T syntax, `.` means the address of the current instruction, whereas the encoding actually means (conditional) jumps to the address of next instruction - 0x80.

I think to better test the disassembler, we need to do round-trip test (disassemble -> use GNU assembler to assemble the instruction -> disassemble again and verify the two Insts are deep equal.)

I want to fix this issue, but the current behavior is locked down the the current testdata/decode.txt.
Should I change the data?

/cc @rsc
Repository: rust
Issue: Poor diagnostic: mutable diagnostic cannot be "immutablized" 
Labels: C-enhancement,A-diagnostics,T-compiler,D-papercut

A friend stumbled on this the other day and I couldn't reason about it for the life of me, even having spend over an year on the language. I asked on rust-beginners but since it's not logged I lost the response. I was told that this is not needed for correctness but it's unfixable due to interactions with Cell and friends.

If that's really the case we should try to spill a better error message.

Example code
```
struct CPU {
    pc: usize,
    memory: Vec<String>,
}

impl CPU {
    fn fetch(&mut self) -> &str {
        self.pc += 1;
        &self.memory[self.pc]
    }
    
    fn execute(&self, _: &str) {   
    }
    
    fn test(&mut self) {
        let instruction = self.fetch();
        self.execute(instruction);
    }
}

fn main() {}
```

Compiler output

```

rustc 1.14.0 (e8a012324 2016-12-16)
error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable
  --> <anon>:19:9
   |
18 |         let instruction = self.fetch();
   |                           ---- mutable borrow occurs here
19 |         self.execute(instruction);
   |         ^^^^ immutable borrow occurs here
20 |     }
   |     - mutable borrow ends here

error: aborting due to previous error
```
Repository: TypeScript
Issue: Intellisense does not work with [P in keyof T]
Labels: Suggestion,Experience Enhancement

<!-- BUGS: Please use this template. -->


**TypeScript Version:**  2.1.5

**Code**

```ts
//Operators available for the object fields
export type Operators<T> = {
    $elementMatch?: T | Operators<T>;
    $in?: T[];
}

//Filter declaration. 
export type Filter<T> = {
    //field, you can assign a value, or an operator.
    [P in keyof T]: Operators<T[P]> | T[P];
}

function query<T>(filter: Filter<T>) {  }

//Sample class
class Sample {
    foo: string;
    bar: number;
}

query<Sample>({
    //We want to put on the "foo" operator "$in"
    value: {
        //Intellisense then no output
    }
});



```

**Expected behavior:**
Intellisense should display all available options.
For example:
   $elementMatch
   $in

**Actual behavior:**
Intellisense does not offer anything.
If the "[P in key of T]" is replaced by "[key: string]", then the Intellisense for operators begins to work, but in this case we lose the test fields.
Repository: rust
Issue: Breakpoint set 2 locations when I set a breakpoint with LLDB
Labels: A-debuginfo,E-needs-test,T-compiler,C-bug

```
    use std::net::{TcpListener};

    fn main() {
        let listener = TcpListener::bind("127.0.0.1:16624").unwrap();
        println!("{:?}", listener);
    }
```

When I set a breakpoint at line 5 which has a println macro call.
LLDB set a breakpoint at 2 locations.

```
(lldb) target create "target/debug/lldbtest"
Current executable set to 'target/debug/lldbtest' (x86_64).
(lldb) b 5
Breakpoint 1: 2 locations.
(lldb) 
```

it makes a problem with step-over command.
I guess it problem occurs because of {:?} and LLDB.
How can I fix it?
Repository: bitcoin
Issue: [Feature] Allow gettxout to return information for spent outputs
Labels: Feature,UTXO Db and Indexes,RPC/REST/ZMQ

Related: https://github.com/bitcoin/bitcoin/issues/4007

I'm assuming this is non-trivial to do, but I wish that gettxout could return data for spent outputs. This would allow me to compute, for example, the height at which any transaction was mined. Currently, this is only possible if the transaction in question has one or more unspent outputs due to the current restriction on gettxout.
Repository: angular
Issue: Support arrow functions in template syntax
Labels: feature,hotlist: components team,area: core,core: binding & interpolation

It's not uncommon for a component to take as input a transformation function or predicate function. 

For example, [this PR for `@angular/forms`](https://github.com/angular/angular/pull/13349) adds an `@Input` for a predicate function for determining if two options in a `<select>` are equal. Right now, this looks something like:
```
<select [compareWith]="equals" [(ngModel)]="selectedCountries"> ...

equals = (a: Country, b: Country) => {
   return a.id === b.id;
};
```

With this feature, this could be written as
```html
<select [compareWith]="(a, b) => a.id == b.id" [(ngModel)]="selectedCountries"> ...
```

There are other places in Angular Material where we're looking to add similar API, e.g., datepicker with something like:
```html
<md-datepicker [allowedDateFilter]="d => isWeekend(d)">
```

Or autocomplete, where the component needs to take an arbitrary value and know what string to write into the text input:
```html
<md-autocomplete [displayWith]="value => value.getFullName()">
```

This would have to account for:
* Functions with multiple arguments (`(a, b) => a + b`)
* Functions with param names that already exist in the context (`<my-x #x [uniq]="x => x.id">`)
* Functions that return an object literal (`x => ({name: x})`)
* Invoking functions on the context (`x => isActive(x)`
* Passing functions through a pipe (`x => x.activate() | debounce`)

FYI @mhevery for planning
Repository: flutter
Issue: Xcode build should treat warnings as errors by default
Labels: platform-ios,tool,t: xcode,P3,team-ios,triaged-ios
Repository: flutter
Issue: driver tests would be easier to debug if the logs had timestamps
Labels: a: tests,c: new feature,team,tool,t: flutter driver,P2,team-tool,triaged-tool

cc @yjbanov
Repository: kubernetes
Issue: Consider exposing node labels via downward api
Labels: sig/scheduling,sig/node,kind/feature,needs-triage,wg/batch

**What keywords did you search in Kubernetes issues before filing this one?** (If you have found any duplicates, you should instead reply there.): downward api node labels

---

**Is this a BUG REPORT or FEATURE REQUEST?** (choose one): Feature request

<!--
If this is a BUG REPORT, please:
  - Fill in as much of the template below as you can.  If you leave out
    information, we can't help you as well.

If this is a FEATURE REQUEST, please:
  - Describe *in detail* the feature/behavior/change you'd like to see.

In both cases, be ready for followup questions, and please respond in a timely
manner.  If we can't reproduce a bug or think a feature already exists, we
might close your issue.  If we're wrong, PLEASE feel free to reopen it and
explain why.
-->

I think the downward API should support exposing the node labels on which the pod it is running. While I understand that the Pod should not be coupled too much with the node it is scheduled to. But I think there are certain scenarios that require the pod  to have more information about it's host.

- ***failure-zones*** like rack names on premise or availability zones in cloud
- ***instance-types*** for adapting thread settings per instance type
- other labels like local ssd storage available 

This helps applications that are cloud-native to understand where they are located. While this could be achieved using API calls to the node object, I think it should be supported by the downward API. A node object would expose way more information that should not be available to any pod. In OpenShift's default configuration there is access to the Node objects prevented by default.

@mattbates @smarterclayton @bprashanth
Repository: rust
Issue: Unhelpful error when providing a borrowed closure to a function expecting a closure taking borrowed arguments
Labels: C-enhancement,A-diagnostics,T-compiler

```rust
fn foo<F>(_compare: F) where F: Fn(&u8) {
}

fn main() {
    foo(&|_a| {});
}
```
yields this unhelpful series of errors:
```
error[E0271]: type mismatch resolving `for<'r> <&[closure@<anon>:5:10: 5:17] as std::ops::FnOnce<(&'r u8,)>>::Output == ()`
 --> <anon>:5:5
  |
5 |     foo(&|_a| {});
  |     ^^^ expected bound lifetime parameter , found concrete lifetime
  |
  = note: concrete lifetime that was found is lifetime '_#5r
  = note: required by `foo`

error[E0281]: type mismatch: the type `[closure@<anon>:5:10: 5:17]` implements the trait `std::ops::Fn<(_,)>`, but the trait `for<'r> std::ops::Fn<(&'r u8,)>` is required (expected concrete lifetime, found bound lifetime parameter )
 --> <anon>:5:5
  |
5 |     foo(&|_a| {});
  |     ^^^
  |
  = note: required because of the requirements on the impl of `for<'r> std::ops::Fn<(&'r u8,)>` for `&[closure@<anon>:5:10: 5:17]`
  = note: required by `foo`

error: aborting due to 2 previous errors
```
Repository: go
Issue: cmd/compile: optimize Write([]byte(stringVal)) to not copy the string
Labels: Performance,compiler/runtime

It would be nice to optimize `Write([]byte(stringVal))` to not copy the string value.  This is normally safe because most `Write` methods do not modify the byte slice passed in.  In fact, the documentation for `io.Writer` requires that the `Write` method not modify the byte slice, although this is not (and can not be) enforced.

Here is how we can do this.

For each function and method that takes a parameter of slice type, record whether the slice's underlying array is modified.  This will require generating annotations similar to the ones we generate for escape analysis.  Assembly functions will require an annotation similar to //go:noescape.  (Naturally, a slice that escapes must be treated as modified.)

For each call of the form `F([]byte(stringVal))`, where we know that `F` does not modify the slice, we can pass the string value directly.  This would do essentially the same thing as the existing optimization for map lookups in which a `[]byte` is converted to a `string`.  This fixes direct calls, but of course the interesting cases all involve calls to methods of values of type `io.Writer`.

For any type with a `Write` method that does modify the slice, generate at compile time an additional `Write·2` method that makes a copy of the slice and then calls the `Write` method.  The method is named `Write·2` to ensure that it does not conflict with any user written method.

When converting any type to `io.Writer` (or any interface type that inherits from `io.Writer`), check for the presence of a `Write·2` method.  If that method exists, add it to the interface as an additional entry in the itab.

For any call to an interface method `Write([]byte(stringVal))`, modify the call to call a special function `doWrite` in the io package, without copying the string.  `doWrite` will check for a `Write·2` method, and call it if it exists; that will cause the string to be copied as happens today.  If the `Write·2` method does not exist, which will be the normal case, `doWrite` will call the `Write` method as usual, knowing that the `Write` method does not modify the slice.

Generalizing this to other methods is left as an exercise for the reader.
Repository: vscode
Issue: Customizing the rendering of matching brackets
Labels: feature-request,editor-bracket-matching,editor-theming

<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode -->

- VSCode Version: 1.8.1
- OS Version: Windows 10

Hi there

Is it possible to customize the cursor for the matching brackets/parentheses ? e.g. change to `underline` instead of `block`

![](https://ibin.co/3AN3JBLUfybg.png)

![](https://ibin.co/3AN3XEQyHJX6.png)

> it looks unclear sometime

Thanks all
Repository: rust
Issue: Make sure all file extensions for wasm are correct
Labels: O-wasm,C-bug

Per [this comment](https://github.com/rust-lang/rust/issues/39171#issuecomment-275797843), we only emit .js for bin targets, it's not clear what we emit for dylib, cdylib, and staticlib, but it seems likely they are incorrect.

I think .a is probably right for staticlib that is going to be run through emcc, but maybe dylibs should be .js.
Repository: go
Issue: encoding/asn1: cannot marshal into a GeneralString
Labels: NeedsDecision

### What version of Go are you using (`go version`)?
go version go1.7.5 linux/amd64

### What operating system and processor architecture are you using (`go env`)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GORACE=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build372878858=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1

### The issue
Using "encoding/asn1" it is not possible to marshal into a an asn1 general string. It is possible to unmarshal from one but it is only possible to marshal into one of ia5, printable or utf8.
[https://play.golang.org/p/cwv9ZGV5K5](https://play.golang.org/p/cwv9ZGV5K5)

### Suggestion
There should be an struct tag such as "generalstring" that works in the same way as the "ia5" tag but sets the asn1 tag value of 27.
Repository: opencv
Issue: CascadeClassifier exception on JDK8, macOS Sierra
Labels: incomplete

##### System information (version)
- OpenCV => 3.1
- Operating System / Platform => macOS Sierra 10.12.3 (16D32)
- Compiler => JDK8, bindings from https://github.com/openpnp/opencv/issues/17

##### Detailed description

"Unrecognized or unsupported array type in function cvGetMat":
```
Caused by: CvException [org.opencv.core.CvException: cv::Exception: /Users/jason/Projects/openpnp/opencv/opencv/opencv-3.2.0/modules/core/src/array.cpp:2501: error: (-206) Unrecognized or unsupported array type in function cvGetMat
]
	at org.opencv.objdetect.CascadeClassifier.detectMultiScale_1(Native Method)
	at org.opencv.objdetect.CascadeClassifier.detectMultiScale(CascadeClassifier.java:159)
```
Source (Kotlin):
```
val faceGrayMat = gray.submat(faceRect)
var drects = MatOfRect()
eyeLeftCascade.detectMultiScale(faceGrayMat, drects)
```
What is strange is that that code has been called thousands of times for the images of the same format, but the exception occurs only from time to time.