sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Extra entries for JavaScript auto complete(intellisense) make no sense
Labels: Suggestion,Committed,Domain: Completion Lists,Domain: JavaScript

<!-- BUGS: Please use this template. -->
<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

**TypeScript Version:**  2.2.1 / nightly (2.2.0-dev.201xxxxx)

**Code**
The following code in javascript:
```js
/**
* @param {MessageActivity} activity
* @param {IConversationContext} context
*/
export function Prompt_beforeResponse(activity, context)
{
  // MessageActivity is defined in typescript definition provided to the editor as having 4 properties (attachements, text, speak, type). 
 // Typing activity. will show those for properties but also: 
 //     activity  - why should activity be under itself?
 //     context - why should the second parameter be under activity?
 //     IConversationContext - why would a type, that is not a property in any object be under activity?
 //     MessageActivity - same question as above
 //     onRun - why should a global function be under activity
 //     Prompt_when - same as above
 //     Prompt_beforeResponse - same question as above and this is the function itself


//  Here is another example. obj. should display only a and b, but it also shows activity, context, MessageActivity, IConversationContext, etc.
   /**
    * @type {{a: number, b: string }}
   */
   var obj = {};
   obj.
}
```

```ts
// A *self-contained* demonstration of the problem follows...

```

**Expected behavior:**
   When a javascript type is not "any", i.e. when it is definded in jsdoc or in the typescript definition helper (See https://github.com/Microsoft/TypeScript/wiki/JavaScript-Language-Service-in-Visual-Studio#unsupported-patterns) only those defined members should be part of intellisense. 
  Even if the type is any, throwing everything on intellisense like that defeats the purpose of finding out what reasonably could be under the object. 


**Actual behavior:**
A bunch of extra entries show up in intellisnese that make no sense for either typed or untyped scenarios, but it is specially bad for typed scenarios where some thought was put in place in what should appear in intellisense. Adding all those entries makes the intellisense feature less useful.
Repository: go
Issue: os/exec: Cmd produces misleading error when using Setpgid
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

```
$ go version
go version go1.8.1 darwin/amd64
```

### What operating system and processor architecture are you using (`go env`)?

```
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/aron/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/ts/s940qvdj5vj1czr9qh07fvtw0000gn/T/go-build901749947=/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?

```go
package main

import (
	"fmt"
	"os/exec"
	"syscall"
)

func main() {
	var cmd *exec.Cmd
	var err error

	cmd = exec.Command("/bin/ls")
	cmd.Dir = "/this/does/not/exist"
	cmd.SysProcAttr = &syscall.SysProcAttr{
		Setpgid: true,
	}
	err = cmd.Run()
	fmt.Printf("error was: %v\n", err)

	cmd = exec.Command("/bin/ls")
	cmd.Dir = "/this/does/not/exist"
	err = cmd.Run()
	fmt.Printf("error was: %v\n", err)
}
```

### What did you expect to see?

```
$ go run baddir.go
error was: chdir /this/does/not/exist: no such file or directory
error was: chdir /this/does/not/exist: no such file or directory
```
### What did you see instead?

```
$ go run baddir.go
error was: fork/exec /bin/ls: no such file or directory
error was: chdir /this/does/not/exist: no such file or directory
```

Note that the error string makes the reader believe that "/bin/ls" is the thing that may not exist. Compare when not using `Setpgid`; the working directory is properly reported as not existing.
Repository: rust
Issue: Non-optimal derived PartialEq for POD struct
Labels: A-LLVM,I-slow,C-enhancement,T-compiler,C-optimization

Given a struct like

```rust
pub struct Foo {
    a: bool,
    b: bool,
    c: bool,
    d: bool
}
```

I would expect generated asm to be doing a dword comparison to check for equality. However, that's not what is seen unless explicitly transmuting before the comparison (interactive: https://godbolt.org/g/kYPaOh).

The `PartialEq` implementation looks something like:

```rust
pub fn eq(a: &Foo, b: &Foo) -> bool {
  a.a == b.a &&
    a.b == b.b &&
    a.c == b.c &&
    a.d == b.d
}
```

which produces the assembly:

```asm
example::eq:
        push    rbp
        mov     rbp, rsp
        mov     al, byte ptr [rdi]
        cmp     al, byte ptr [rsi]
        jne     .LBB0_1
        mov     al, byte ptr [rdi + 1]
        cmp     al, byte ptr [rsi + 1]
        jne     .LBB0_1
        mov     al, byte ptr [rdi + 2]
        cmp     al, byte ptr [rsi + 2]
        jne     .LBB0_1
        mov     cl, byte ptr [rdi + 3]
        mov     al, 1
        cmp     cl, byte ptr [rsi + 3]
        je      .LBB0_3
.LBB0_1:
        xor     eax, eax
.LBB0_3:
        pop     rbp
        ret
```

An optimized version using transmute (Rust):

```rust
pub fn eq_transmute(a: &Foo, b: &Foo) -> bool {
    unsafe {
        transmute_copy::<_, u32>(a) == transmute_copy::<_, u32>(b)
    }
}
```

produces the assembly:

```asm
example::eq_transmute:
        push    rbp
        mov     rbp, rsp
        mov     eax, dword ptr [rdi]
        cmp     eax, dword ptr [rsi]
        sete    al
        pop     rbp
        ret
```


Is this an optimization we should expect to be handled automatically?
Repository: rust
Issue: Compiling to Webassembly quickly fills up available RAM and crashes computer
Labels: I-slow,C-enhancement,O-wasm

When compiling to wasm on a Dell XPS 13 running Ubuntu 16.10, rustc begins using more and more RAM until the computer begins thrashing and eventually becomes unusable.

rustc version: `rustc 1.19.0-nightly (f4209651e 2017-05-05)`

Judging by the `--verbose` output, cargo doesn't even get as far as calling `emcc` before compilation gets bogged down.

Happy to help debug further.
Repository: go
Issue: x/mobile: how to change screen to landscape 
Labels: NeedsInvestigation,FeatureRequest,mobile

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
go version 1.8
gomobile version +0f31740 Wed Apr 19 17:20:05 2017 +0000 (android,ios); androidSDK=
### What operating system and processor architecture are you using (`go env`)?
CGO_ENABLE=1  arm64 darwin

### What did you do?
the default example are all in portrait screen mode



### What did you expect to see?
screen change to landscape

### What did you see instead?
no api to change that
Repository: vscode
Issue: [json] use the schemastore catalog
Labels: feature-request,json

The JSON server should use http://schemastore.org/api/json/catalog.json for schema associations
Repository: kubernetes
Issue: Prevent status subresource from touching objectmeta
Labels: sig/api-machinery,priority/important-longterm,lifecycle/frozen

`/status` subresources are generally targeted updated for controllers set a logical whitelist of fields.  Given the direction around creating new fields instead of abusing annotations, we should prevent the `/status` subresource from touching `ObjectMeta` fields in new resources that we add.

To do this, we need to make it easy to add the restriction and add unit tests which can detect when new objectmeta fields have been added.  We may be able to tighten our existing `/status` subresources on a case-by-case basis.  I'd like to see new `/status` subresources start out this way.

@kubernetes/api-reviewers @kubernetes/api-approvers 
@kubernetes/sig-api-machinery-proposals 
@pwittrock Once we have a utility method for doing this, could your generator start making use of it?
Repository: go
Issue: log/syslog: defaults to LOG_KERN facility
Labels: Documentation,NeedsDecision

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
go1.8 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/bknox/go"
GORACE=""
GOROOT="/home/bknox/.go"
GOTOOLDIR="/home/bknox/.go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build317260052=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
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?
used log/syslog with defaults

From the log/syslog documentation:

"The Priority is a combination of the syslog facility and severity. For example, LOG_ALERT | LOG_FTP sends an alert severity message from the FTP facility. The default severity is LOG_EMERG; the default facility is LOG_KERN."

From RFC3164:

"The Facilities and Severities of the messages are numerically coded
with decimal values.  Some of the operating system daemons and
processes have been assigned Facility values.  Processes and daemons
that have not been explicitly assigned a Facility may use any of the
"local use" facilities or they may use the "user-level" Facility."

LOG_KERN is a poor default, as nothing should ever be using that facility other than the kernel. LOG_USER would be a more appropriate default facility.
Repository: kubernetes
Issue: Use meta.k8s.io/v1 for meta types like *Options and Status
Labels: sig/api-machinery,lifecycle/frozen

We have moved *Options and Status into a meta apigroup, but do not use `meta.k8s.io/v1` as the groupversion. Instead, we either use the apigroup of the request context or "/v1" as a fall-back (like in the dynamic client, compare VersionedParameterEncoderWithV1Fallback). We should change this.
Repository: angular
Issue: Style bindings with gradient functions containing color functions as their colors get stripped out by the style sanitizer
Labels: type: bug/fix,freq1: low,area: core,core: styling bindings,core: sanitization,P3

**I'm submitting a ...**  (check one with "x")
```
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
```

**Current behavior**
A style binding with a linear-gradient with the colors as rgb or rgba functions will get stripped out by the style sanitizer.

**Expected behavior**
They should not be stripped out.

**Minimal reproduction of the problem with instructions**
A style binding like this will get stripped out, 
```
<div [style.background]="'linear-gradient(90deg, rgba(155, 155, 155, .5) 50%, rgba(155, 100, 155, .5) 50%)'">
</div>
```

Plunker: https://plnkr.co/edit/QouPum88elkomsSrNEld?p=preview

If I get a chance, I can submit a PR myself, but if anyone picks up this issue I think just changing the RegEx pattern for [FN_ARGS in style_sanitizer.ts](https://github.com/angular/angular/blob/master/packages/platform-browser/src/security/style_sanitizer.ts#L35) to `const FN_ARGS = '\\([-0-9.%, #a-zA-Z, ' + COLOR_FNS + ']+\\)';` should work.

**Please tell us about your environment:**

* **Angular version:** 2.0.X
Latest angular

* **Browser:** 
Chrome, Edge, Firefox (havent tested others)
 
* **Language:** 
Typescript
Repository: TypeScript
Issue: strictNullChecks not recognizing evaluated key in object
Labels: Bug

**TypeScript Version:**  2.3.2

**Code**
This version errors with strictNullChecks
```ts
export interface Opts {
    params?: { [s: string]: string };
}

let token;
let options: Opts = { params: {} };

if (token) {
    options.params["access_token"] = token;
}
```

This version does not error with strictNullChecks
```ts
export interface Opts {
    params?: { [s: string]: string };
}

let token;
let options: Opts = {};

options.params = {};

if (token) {
    options.params["access_token"] = token;
}
```

**Expected behavior:**
TS should recognize that `params` has been set in the object like it already does using a differently formatted method of initializing the variable.

**Actual behavior:**
TS fails to recognize that params has been set.
Repository: flutter
Issue: Add a cached-ness dimension to the run timing measurements
Labels: c: new feature,team,tool,P3,team-tool,triaged-tool

All runs of same success-ness, same platform, same build mode, same residence-ness are clumped together. Though we would want a cache-ness dimension to the speed measurement to differentiate fresh first builds vs subsequent builds. 

Either split the dimensions into phases such as getting plugins, running native toolchain etc or annotate the presence of certain phases in the measurements.

@jakobr-google sounds like you were referring to something specific when you said 

> Re: Gradle build times, we intentionally made the very first build of a project slower, in order to make subsequent builds faster. 2nd build now takes 1-2 seconds w/o changes. The vast majority of the time is spent building the Dart snapshot (on my machine, at least).

Is it something I can annotate in the measurements?
Repository: vscode
Issue: [html] Javascript intellisense in inline scripts from external references
Labels: feature-request,javascript,html

This request is to provide intellisense capabilities for referenced script tags on inline javascript, for example:

```
<script src="myJs.js">  
<script>
   myJs.IntellisenseGoesHere
</script>
```

Ideally typings files are also supported for an even better experience

I could not find an open issue on this so per @aeschli 's comment on the last ticket related to this #15377 , I am creating a new feature request here
Repository: go
Issue: runtime/pprof: extend mutex profiling to select case blocking
Labels: NeedsFix,compiler/runtime

Inspired by #20302, it'd be helpful if mutex profiling showed cases where select cases are blocked waiting to lock the various cases. Right now we have no easy way to get visibility into that.
Repository: go
Issue: runtime: GC turning on/off disruptive to scheduler and locality
Labels: Performance,ToolSpeed,NeedsInvestigation,compiler/runtime

I generated a trace of the concurrent compiler backend, and see some unfortunate things in it.

```bash
$ go tool compile -traceprofile=t.p -c=8 fmt/{doc,format,print,scan}.go
$ go tool trace t.p
```

Screenshot:

<img width="1559" alt="compile_fmt_trace_zoomed" src="https://cloud.githubusercontent.com/assets/67496/25877886/6c32b3be-34db-11e7-837a-8f9643054360.png">

On the left hand side of this screenshot is the beginning of concurrent backend compilation. It continues off-screen to the right. The disconcerting things I see are:

* Large chunks of idle time. For example, 5 ms of idle time in proc 7 with plenty of work available to be scheduled, right when GC turns off, around 73ms.
* goroutines being shuffled around between procs when GC flips on/off (the clear visual vertical lines), which is bad for data locality and caches. Should the STW phase note where Gs are and attempt to put them back there when it is done? Or some such?

For reference, the concurrency (fan-out, etc.) is all contained in a single function, compileFunctions, in pgen.go: https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/pgen.go#L255

Apologies if this is a duplicate. I can split this into two issues if that would be helpful.

cc @aclements @RLH
Repository: TypeScript
Issue: Support JSDoc `@property`
Labels: Suggestion,Committed,Domain: JSDoc,Domain: JavaScript

_From @BrunnerLivio on May 8, 2017 9:1_

- VSCode Version: 1.12.1
- OS Version: Ubuntu 16.04.1 LTS (Xenial Xerus)

Example code:
MyController.js
```JavaScript
// @ts-check
class MyController {
    getWorld() {
        return this.world; // <--- Marked as error
    }
}
angular
    .module('myApp')
    .component('myComponent', {
        bindings: {
            'world': '<'
        },
        controller: MyController,
        template: `<div>Hello {{$ctrl.getWorld()}}</div>`
    });


```
The `this.world` is marked as error, as supposed to be. But it is actually pretty annoying, because in angular you need to use quite often those component bindings. I know there's the option `// @ts-ignore`, but that really pollutes the code and makes it less readable. 

An extensions for this would be really useful.

I use this workaround at the moment
```JavaScript
// @ts-check
class MyController {
    constructor() {
        this.world = this.world;
    }
    getWorld() {
        return this.world;
    }
}

[...]
```

I don't like this at all, but better than writing `// @ts-ignore`.

Is there any other option / workaround?

_Copied from original issue: Microsoft/vscode#26192_
Repository: flutter
Issue: Pan gesture recognizer should yield to the scale gesture recognizer
Labels: framework,d: api docs,f: gestures,c: proposal,P2,team-framework,triaged-framework

In his [reply to my question](http://stackoverflow.com/questions/43869027/gesturedetector-within-tabbarview-nested-scrolling/43876032#43876032) regarding zooming a picture inside a `TabBarView` @collinjackson suggested that: "[...] Flutter's pan gesture recognizer should probably yield to the scale gesture recognizer if it detects that a second pointer is down and a scale gesture recognizer is active."

This makes sense to me, as touching the screen with two fingers probably never is intended to pan/swipe/scroll and always to pinch/zoom.
Repository: vscode
Issue: Git - Support file stat mode changes
Labels: feature-request,git

<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode -->

- VSCode Version:
1.12.1
- OS Version:
win7(with cygwin), and linux ubuntu 
Steps to Reproduce:
If I change filestat modes on files aka "chmod ugo-x dsfmocklist.py" vsc indicated diff, but it does not say
anywhere that this is the case. Discard changes do nothing either

Enclosed is a screenshot the M flag is set, but I cant see any changes, not any description execution bit having changed.

![vsc-diff-on identical-file](https://cloud.githubusercontent.com/assets/11349883/25888050/dec46df8-3564-11e7-97a1-ad8dab310c5b.jpg)

plain git diff shows this (in cygwin on same dir)
mobj@BPOLMOBJ1:tools> git diff dsfmocklist.py
diff --git a/tools/dsfmocklist.py b/tools/dsfmocklist.py
old mode 100755
new mode 100644

git --version
git version 2.8.3

Bitbucket after commit and push shows this:
![vsc_changes-exec](https://cloud.githubusercontent.com/assets/11349883/25888339/0e0e20a8-3566-11e7-808e-92552007d5b7.jpg)
Repository: angular
Issue: ng-if on root elements of projected content fails to render on initialisation
Labels: type: bug/fix,effort1: hours,freq1: low,area: upgrade,state: confirmed,P4

**I'm submitting a ...**  (check one with "x")
```
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
```

**Current behavior**
When developing a hybrid app with ngUpgrade, If you have an AngularJS component that contains a downgraded Angular Component in the template and this one implements content projection and wraps the `ng-content` element in an element that contains the `*ngIf` directive. Any root element of the AngularJS content that has the `ng-if` directive attribute will not be rendered until you re-toggle the property or expression bound to the attribute.

**Expected behavior**
The content is correctly projected and all directives properly evaluated without having to add extra wrapping elements.

**Minimal reproduction of the problem with instructions**
[Plunker with examples](https://plnkr.co/edit/ogPxZ11S82FsTdFdRwuf?p=preview)

_Example 1_
When using an Angular component that contains content projection within an AngularJS component, any root elements of the projected content that contain `ng-if` will fail to render on initialisation but by toggling the `ng-if` value they will then render correctly as per the evaluated value of the `ng-if`.

_Example 2_
When using an Angular component that contains content projection within an AngularJS component, any root elements of the projected content that contain `ng-if` will fail to render on initialisation, but by adding an element at the root of the projected content without `ng-if`, they will then render correctly.

_Example 3_
When using an Angular component that contains content projection within an AngularJS component, any root elements of the projected content that contain `ng-if` will fail to render on initialisation, but by removing the `*ngIf` on any parent elements of the Angular component will make it then render correctly.


**What is the motivation / use case for changing the behavior?**
So that AngularJS content that contain `ng-if` on root elements of the content to be projected can be be correctly projected into Angular components that contain `*ngIf` on any parents of the `ng-content`.

**Please tell us about your environment:**
OS: Windows 10

* **Angular version:** 4.1.0
* **AngularJS version:** 1.6.1

* **Browser:** All
 
* **Language:** TypeScript 2.2.0
Repository: TypeScript
Issue: noImplicitReturnType [Suggestion]
Labels: Suggestion,In Discussion

We have `noImplicitReturns` which is great and helps tick up silly mistakes but it woud great to have `noImplicitReturnType` as well.

**So what would `noImplicitReturnType` do?**
Currently we can write a function like so:
```ts
function life () {
    return 42;
}
let x = life(); // Number
```
So all is great, TypeScript works out the return type nicely for us.
```ts
function life (x: boolean) {
    if (x) {
        return 'hi';
    } else {
        return 42;
    }
}
let y = life(true); // Number / String
```
This is where things start to go a little crazy. TypeScript records y as of type `number  | string` which is of course acurate. But what if i wanted this function to only return strings?

We already have support for that with limited modifications
```ts
function life (x: boolean): string {
    if (x) {
        return 'hi';
    } else {
        return 42; // Type '42' is not assignable to type 'string'.
    }
}
let y = life(true);
```
And as a result TypeScript nicly throws an error.

So my suggestion is that in much the same way as with `noImplicitAny` and `let` enforcing strict typeing an argument is added in the form of `noImplicitReturnType` which for my first example (only a single return) wouldn't have any effect but for the second would throw an error instead of typing the function as `number | string`