sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Takes a while with high memory to calculate highly recursive types with intersections
Labels: Bug

<!-- 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 -->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  2.6.2

**Code**

Apologies for the length - I can't really make the repro any smaller than this without it taking a fraction of the time and about half the memory. Also, note: this does not require a config.

```ts
interface Context<P, O> {
    createV(this: this & Context<P, O & {raw: true}>, attrs: P): Context<P, O>;
    createRC(this: this & Context<P, O & {raw: true}>, attrs: P, ref: (elem: P) => any): Context<P, O>;

    simpleV(this: this & Context<P, O & {raw: true}>, attrs: P): void;
    simpleRC(this: this & Context<P, O & {raw: true}>, attrs: P, ref: (elem: P) => any): void;

    add(this: this & Context<P, O & {text: true}>): void;
    raw(this: this & Context<P, O & {raw: true}>, elem: P): void;

    invokeC<C>(
        tag: Component<object, P, O>,
        children: (r: Context<P, O>, context: C) => void,
        context: C
    ): void;
    invokeAC<A extends object, C>(
        tag: Component<A, P, O>, attrs: A,
        children: (r: Context<P, O>, context: C) => void,
        context: C
    ): void;
}

interface TopContext<P, O> extends Context<P, O> {
    hasOption<K extends keyof O>(key: K): this is (this & TopContext<P, {[P in K]: O[P]}>);
}

type Component<A extends object, P, O> = <C>(
    attrs: A, r: TopContext<P, O>,
    children: (r: Context<P, O>, context: C) => void,
    context: C
) => void

interface ContextWrap<P, O> {
    instance: Context<P, O>;
}

interface TopContextWrap<P, O> extends ContextWrap<P, O> {
    instance: TopContext<P, O>;
}
```

**Expected behavior:** It to take maybe a few seconds. Remove any one function or property out of that, and that's the compilation time I would normally expect.

**Actual behavior:** It takes ~15-20 seconds to check, and requires ~180-200 MB of memory in the process.
Repository: go
Issue: x/build: unify gomote push and gomote ssh users
Labels: Builders,NeedsFix

When I "gomote push" to a gomote host, it writes all of the files and directories it copies over as user "root".
When I "gomote ssh", it logs me in as "gopher".  At that point, I don't have permissions to modify any of the files or directories, so things like all.bash don't work when it tries to write anything.
```
$ ./all.bash
Building Go cmd/dist using /tmp/workdir/go1.4.
go install _/tmp/workdir/go/src/cmd/dist: open cmd/dist/dist: permission denied
```

At least, this is true on openbsd-amd64.

It would also be nice to set GOROOT_BOOTSTRAP to /tmp/workdir/go1.4 when ssh-ing in.
But only if it was already gomote pushed?

@bradfitz
Repository: TypeScript
Issue: Completions are low-quality for UMD modules without typings
Labels: Suggestion,Needs Proposal,Domain: JavaScript

For example, reference `oidc-client.js` from the corresponding [npm package](https://www.npmjs.com/package/oidc-client), instantiate an `Oidc.UserManager`, and dot into the resulting object.

Expected: properties of `Oidc.UserManager` are offered
Actual: identifiers appearing in file are offered (i.e. min-bar experience).
Repository: rust
Issue: Spurious confusing errors on trait impl on type name collision
Labels: C-enhancement,A-diagnostics,T-compiler

```rust
type Type = ();

#[derive(Debug)]
struct Type;

impl Iterator for Type {}
```

Gives:

```
   Compiling playground v0.0.1 (file:///playground)
error[E0428]: the name `Type` is defined multiple times
 --> src/main.rs:4:1
  |
1 | type Type = ();
  | --------------- previous definition of the type `Type` here
...
4 | struct Type;
  | ^^^^^^^^^^^^ `Type` redefined here
  |
  = note: `Type` must be defined only once in the type namespace of this module

error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `()`:
 --> src/main.rs:3:10
  |
3 | #[derive(Debug)]
  |          ^^^^^
  |
  = note: conflicting implementation in crate `core`

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
 --> src/main.rs:6:1
  |
6 | impl Iterator for Type {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
  |
  = note: the impl does not reference any types defined in this crate
  = note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
 --> src/main.rs:3:10
  |
3 | #[derive(Debug)]
  |          ^^^^^ impl doesn't use types inside crate
  |
  = note: the impl does not reference any types defined in this crate
  = note: define and implement a trait or new type instead

error: aborting due to 4 previous errors

error: Could not compile `playground`.

To learn more, run the command again with --verbose.
```

The first error is true. The rest are spurious. There are probably other spurious errors that can be generated via name collision.
Repository: godot
Issue: Messed up animation when importing 3D scene DAE
Labels: bug,topic:import,topic:animation,topic:3d

**Operating system or device, Godot version, GPU Model and driver (if graphics related):**
godot 3 (tip), ubuntu

**Issue description:**
When importing a DAE that contains a rigged mesh and animation exported from blender using the better collada exporter, the resulting animation flips around and generally misbehaves.

Here's an example video, blender is running on the right (slowly) and the equivalent import for godot is on the left.
https://www.youtube.com/watch?v=fBVpZ2v6Nt4

EDIT: updated link
Repository: youtube-dl
Issue: [youku] 1080P formats missing
Labels: broken-IE

C:\Users\lin>youtube-dl -F http://v.youku.com/v_show/id_XMzIwMzg4NTkyOA==.html?spm=a2hww.20027244.m_250379.5~1~3~A
[youku] XMzIwMzg4NTkyOA: Retrieving cna info
[youku] XMzIwMzg4NTkyOA: Downloading JSON metadata
ERROR: Youku server reported error -6004: 客户端无权播放,201; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

C:\Users\lin>youtube-dl -U
youtube-dl is up-to-date (2017.12.02)
Repository: pytorch
Issue: GridSampler behaviours
Labels: module: cudnn,triaged

This is in continuity with #2625

Here are some observations with grid sample, that I think could be worth discussing : 

### Normalized input
I figure that [-1, 1] bounding was enforced by original cuDNN API, but I cannot help noticing that most of the time, when not using grid generator, I have a pixel unit grid `[0, H-1]x[0, W-1]` which I have to normalize, and which is inverted back to pixel unit (see [here](https://github.com/pytorch/pytorch/blob/master/aten/src/THCUNN/SpatialGridSamplerBilinear.cu#L54) and [here](https://github.com/pytorch/pytorch/blob/master/aten/src/THNN/generic/SpatialGridSamplerBilinear.c#L71) ). Isn't it some kind of waste of computation ? maybe we can add an option to specify whether the input is normalized [-1, 1] or not [0, {H or W} -1]


### Optical Flow Sample
As discussed here NVIDIA/flownet2-pytorch#3 , resampling from an optical flow map is subotpimal. Assuming flow is normalized to fit nicely in a [-1, 1] normalized grid, You have to convert flow to grid. This can be done with affine grid generator, but you then have to generate an identity `theta` matrix, i.e. generate a `Bx3x2` zeros `theta` volatile Variable, fill  `theta[:,0,0]` and `theta[:,1,1]` with ones, devolatilize the grid and add it to your normalized flow.
Along with dramatically simplyfying the workflow, would adding a `residual` option (or whatever its name could be) to implicitely add identity to the grid be a good solution ? (or maybe add a new `flow_sample` function ? )
 
### Border behaviour
This suggestion is admittedly only cosmetic as the resulting gradient would be the same as when 'same' padding is applied (from #3599), so obviously not essential. It could be nice to have zero padding, but no interpolation between 0s and actual values. See an example [here](https://discuss.pytorch.org/t/spatial-transformer-networks-boundary-grid-interpolation-behaviour/8891/2) . As soon as grid value is outside [-1,1], output 0 as if point was far outside the input (and thus no interpolation between void and the border)
This also could be beneficial for classifier associated with a pixel-wise loss for this particular resampled feature map. Classifier like 0 values for irrelevant data points, Pixel-wise loss likes non-zero gradients for valid values only
This is semantically different from 'same' padding so I assume it would not be easy just to add another mode to `padding_mode` option.

cc @csarofeen @ptrblck
Repository: flutter
Issue: a11y: overlapping widgets don't block pointer events on iOS
Labels: platform-ios,engine,a: accessibility,P3,team-ios,triaged-ios

Create an overlay over a dismissible barrier. The overlay should have same whitespace that doesn't allow user interaction between elements that do allow user interaction. During touch exploration, when the user now moves the finger into one of those whitespace areas, the a11y focus will move to the underlaying dismissible barrier. This can be very confusing and makes it hard to find the elements in the overlay that the user can interact with.
Repository: TypeScript
Issue: Narrow the parent type of a singleton type to never in the false branch
Labels: Suggestion,In Discussion

If the type of the member checked is not falsy (and so is `never` in the false branch).

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  2.7.0-dev.201xxxxx

**Code**

```ts
const x: {a: 1, b: 2} = { a: 1, b: 2 };
if (x.a) {

}
else {
    x.a;
}
```

**Expected behavior:**
type of `x` in the `else` branch is `never`.

**Actual behavior:**
type of `x` is `{a: 1. b: 2}`, and `x.a` is (counterintuitively) `never`.

This would bring the behavior of truthiness guards in line with our new behavior for `in` type guards.
Repository: go
Issue: x/build: run DragonflyBSD VMs on GCE?
Labels: help wanted,Builders,NeedsFix,new-builder,umbrella

Looks like Dragonfly now supports virtio:

https://leaf.dragonflybsd.org/cgi/web-man?command=virtio&section=4

So it should run on GCE?

If somebody could prepare make.bash scripts to script the install to prepare bootable images, we could run it on GCE.

See the netbsd, openbsd, and freebsd directories as examples: https://github.com/golang/build/tree/master/env

(The script must run on Linux and use qemu to do the image creation.)

/cc @tdfbsd
Repository: flutter
Issue: When the build fails during flutter run, it says try --stacktrace or --info which don't work
Labels: tool,t: gradle,a: first hour,a: quality,P2,team-tool,triaged-tool

```
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Gradle build failed: 1
$ flutter run --stacktrace
Could not find an option named "stacktrace".
```
also --info doesn't work
Repository: go
Issue: x/net/html: incorrect handling nodes in the <head> section
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`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"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"


### What did you do?
```
package main

import (
	"bytes"
	"fmt"
	"golang.org/x/net/html"
	"strings"
)

func main() {
	s := "<html><head><meta/><a/><style></style></head><body></body></html>"
	doc, _ := html.Parse(strings.NewReader(s))

	var buf bytes.Buffer
	if err := html.Render(&buf, doc); err == nil {
		fmt.Println(buf.String())
	}
}
```

### What did you expect to see?
Same structure as the input 
```html
 <html><head><meta/><a/><style></style></head><body></body></html> 
```

### What did you see instead?
Nodes from <head> are moved into the <body> part
```html
 <html><head><meta/></head><body><a><style></style></a></body></html> 
```
Repository: flutter
Issue: TextSelection.isDirectional is not respected, make it do something useful eg: for Mac
Labels: a: text input,framework,c: proposal,P2,team-text-input,triaged-text-input

It seems like it's not wired up anywhere. We should make it do something useful and test it or remove it.

It's current presence is confusing.
Repository: go
Issue: cmd/compile: more helpful "is not a type" error when variable shadows type
Labels: help wanted,NeedsFix

### What version of Go are you using (`go version`)?
Current playground version.

### Does this issue reproduce with the latest release?
Yes.

### What operating system and processor architecture are you using (`go env`)?
Unknown (plaground).

### What did you do?

The following code compiles with `fancyMap is not a type` errors in both `foo` and `foo2` ([playground](https://play.golang.org/p/Ms021WVI3f)):

```go
package main

type fancyMap = map[string]string

func foo(fancyMap fancyMap) {
	var _ fancyMap
}

func foo2(fancyMap fancyMap) {
	_ = make(fancyMap)
}

func main() {
}
```

### What did you expect to see?

Successful compilation or a more informative error message.

### What did you see instead?

Poor/incorrect error message. Simply renaming the `fancyMap` variable fixes the problem, but the error message is incorrect: `fancyMap` is a type.

Apologies if there's an existing issue for this.
Repository: angular
Issue: Router • Allow to have a PreloadingStrategy in lazy loaded modules
Labels: feature,freq2: medium,area: router,router: lazy loading,feature: under consideration,feature: votes required

<pre><code>
[ ] Regression
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support reques
</code></pre>

## Current behavior
Currently, we can only set a `PreloadingStrategy` from `forRoot` by using `config` like in `RouterModule.forRoot(routes: Routes, config?: ExtraOptions)`.

Why can't this be done in `forChild` `RouterModule.forChild(routes: Routes)`?

https://angular.io/api/router/RouterModule

## Expected behavior
Being able to preload a module from another lazy loaded module.

## What is the motivation / use case for changing the behavior?
My `registration` page is lazy loaded since only members subscribing need to load it.
The page right after could be lazy loaded.
Repository: kubernetes
Issue: client-go: keep API versions longer in the client library than in the apiserver
Labels: priority/backlog,area/api,area/client-libraries,sig/api-machinery,kind/api-change,kind/feature,lifecycle/frozen

One pretty uniform feedback from client-go users @ KubeCon was that they struggle with supporting old and new Kubernetes clusters from one code-base of their operators. Keeping old API versions around longer than we serve them in kube-apiserver might help them. So they can move on to the new client-go, but have an abstraction logic in their operator to fall-back to the old API group versions.

Keeping API group versions around is cheap: we only have to keep them in k8s.io/api, but can remove the internal types and conversions.
Repository: TypeScript
Issue: Specifying lib: DOM and WebWorker should not be mutually exclusive
Labels: Suggestion,In Discussion

I got myself into a situation similar to #11093.

My project is designed to work either in the "main thread", with access to DOM, or as a WebWorker, where a different behavior kicks in. This was done for compatibility reasons and to have only one distributable js file and it's been working fine for the last two years.

In all this time I never specified the lib compiler option, only target ES5.

Today, as I'm experimenting some ES2015 stuff, I see that if I specify targets DOM,ES5,WebWorker,ES2015.Promise all hell breaks loose with errors. - Duplicate identifier, Subsequent variable declarations must have the same type.

Shouldn't this kind of mix be allowed in a project?
Repository: godot
Issue: Groups icons are visible in an instanciated scene
Labels: bug,topic:editor

**Operating system or device, Godot version, GPU Model and driver (if graphics related):**
Windows 10, Godot beta1

**Issue description:**
I have a scene that is a CanvasLayer node with a few panels that have locked children nodes, this scene is within a player scene (KinematicBody2D) and that player scene is within a level scene (Node2D). the locations of the locked children nodes
![untitled](https://user-images.githubusercontent.com/6185415/33798282-ac710db2-dce3-11e7-9c0e-178ecd96d7fc.png) (this thing) move based on where they were in the inherited scene and not where they actually are on the canvas layer.


**Steps to reproduce:**
Make a CanvasLayer node, add some panels
Make a new scene on a kinematicbody2D, instance the canvaslayer
make a new scene, instance the kinematicbody2D, move it around on the editor, congrats.

**Link to minimal example project:**
CanvasLayer Scene
![unknown](https://user-images.githubusercontent.com/6185415/33798307-0ac11a74-dce4-11e7-9e2e-1c63794d2ab2.png)
Player Scene
![unknown2](https://user-images.githubusercontent.com/6185415/33798308-0aca80a0-dce4-11e7-986e-2b599b758038.png)
Level Scene
![unknown3](https://user-images.githubusercontent.com/6185415/33798306-0ab769f2-dce4-11e7-9ebd-62e0673d2b60.png)


happy bug catching day.
Repository: opencv
Issue: OpenCV 3.1.0 - Performance issue while focusing camera in Android.
Labels: platform: android

OpenCV => 3.1.0
Operating System / Platform => Android

I installed apk for tutorial-1-camerapreview. It opens a camera, but it is taking more time to focus. And sometimes, it don't focus.

Whereas, when you open Camera using `new Intent(MediaStore.ACTION_IMAGE_CAPTURE)`, it focuses almost instantly.

Ofcourse, OpenCV performs some task in processing camera frame and that is causing lag in camera focusing, but it can be improved.

##### Steps to reproduce

1) Install APK for tutorial-1-camerapreview and observe time taken by camera to focus.
2) Open built-in camera App in you device and observe time taken by camera to focus.

Expected: The focusing of camera should be faster.
Repository: godot
Issue: Vertex Colored objects break ShaderMaterials
Labels: bug,platform:windows,topic:rendering

**Operating system or device, Godot version, GPU Model and driver (if graphics related):**

Tried on two different Windows 10 x64 PCs

**Issue description:**

In 3D, objects with Vertex Colors applied do not behave as expected with a shader applied. Objects appear to have no material.

**Steps to reproduce:**

Apply vertex color to object then export.  Import into Godot.
Apply a shader material to the object.  It will render correctly in the viewport.  Upon running the game, the object will take the color of ambient light applied to it (Similar behavior to objects with no material)

**Link to minimal example project:**
Attached
[MaterialsTest.zip](https://github.com/godotengine/godot/files/1545030/MaterialsTest.zip)
Repository: rust
Issue: Backwards propagation of types leads to unhelpful errors [futures]
Labels: C-enhancement,A-diagnostics,T-compiler

In general, and I genuinely wish I had a citation for this, developers likely tend to write their software going from input to output, even if the output is the eventual, fixed "goal" they would like to reach.

For example, the code here (git checkout available): https://git.neosmart.net/mqudsi/futuretest/src/rust-46606

```rust
    let f = future::result(Ok(()))
        .map_err(|()| "&'static str error")
        .map(|_| future::result(Err("another &'static str error")))
        .and_then(|_|
             future::result(Ok(())
                .map_err(|()| "String error".to_owned())
            )
        )
    ;
```

Two conflicting error types are mapped, the first is to `&'static str` and the second is to `String`, the [compiler output](https://git.neosmart.net/mqudsi/futuretest/src/rust-46606/cargo.out) indicates an error with the `&'static str` type instead of the `String` type usage:

```rust
   Compiling futuretest v0.1.0 (file:///mnt/c/Users/Mahmoud/git/futuretest)
error[E0271]: type mismatch resolving `<futures::FutureResult<(), std::string::String> as futures::IntoFuture>::Error == &str`
  --> src/main.rs:13:10
   |
13 |         .and_then(|_|
   |          ^^^^^^^^ expected struct `std::string::String`, found &str
   |
   = note: expected type `std::string::String`
              found type `&str`

error[E0271]: type mismatch resolving `<futures::FutureResult<(), std::string::String> as futures::IntoFuture>::Error == &str`
  --> src/main.rs:20:10
   |
20 |     core.run(f).unwrap();
   |          ^^^ expected struct `std::string::String`, found &str
   |
   = note: expected type `std::string::String`
              found type `&str`
   = note: required because of the requirements on the impl of `futures::Future` for `futures::AndThen<futures::Map<futures::MapErr<futures::FutureResult<(), ()>, [closure@src/main.rs:11:18: 11:43]>, [closure@src/main.rs:12:14: 12:67]>, futures::FutureResult<(), std::string::String>, [closure@src/main.rs:13:19: 16:14]>`

error: aborting due to 2 previous errors

error: Could not compile `futuretest`.

To learn more, run the command again with --verbose.
```

In an ideal situation, all types would match up and it wouldn't matter which line the type inference began with. But in the event of a type mismatch, such as here, the reported errors are based off the backwards type propagation, which doesn't seem right (opinion) and leads to an unhelpful error message (fact).

(To make the case a bit clearer, I included several uses of the correct type followed by a final usage of the incorrect type).
Repository: rust
Issue: Move oom test out of line with -C panic=abort
Labels: I-slow,C-enhancement,A-allocators,T-compiler

The following code:
```rust
#[inline(never)]
pub fn foo() -> Vec<u8> {
  vec![0; 900]
}
```
compiles to 
```assembly
example::foo:
        push    rbp
        mov     rbp, rsp
        push    rbx
        sub     rsp, 40
        mov     rbx, rdi
        lea     rdx, [rbp - 32]
        mov     edi, 900
        mov     esi, 1
        call    __rust_alloc_zeroed@PLT
        test    rax, rax
        je      .LBB0_1
        mov     qword ptr [rbx], rax
        mov     qword ptr [rbx + 8], 900
        mov     qword ptr [rbx + 16], 900
        mov     rax, rbx
        add     rsp, 40
        pop     rbx
        pop     rbp
        ret
.LBB0_1:
        mov     rax, qword ptr [rbp - 32]
        movups  xmm0, xmmword ptr [rbp - 24]
        movaps  xmmword ptr [rbp - 48], xmm0
        mov     qword ptr [rbp - 32], rax
        movaps  xmm0, xmmword ptr [rbp - 48]
        movups  xmmword ptr [rbp - 24], xmm0
        lea     rdi, [rbp - 32]
        call    __rust_oom@PLT
        ud2
```

It would be a good code size improvement for the oom handling to be moved into __rust_alloc_zeroed when compiling with panic=abort. This will also make the branch on null better predicted because it's not duplicated all around the code base, but in just one spot.