sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: flutter run's "o" switch-operating-system command needs a 'reset' to default option 
Labels: c: new feature,tool,P3,team-tool,triaged-tool

When using 

```bash
flutter run -d
```
to enable hot-reloading on an iOS & Android emulator at the same time... when a user then presses "o"

```bash 
To simulate different operating systems, (defaultTargetPlatform), press "o".
``` 

to switch operating systems, both change to iOS, then to Android, then back to 'iOS', and so on if you keep pressing "o".

Perhaps an option needs to be added (eg "O") to reset them to their original operating system?

Of course you can just do "R" to do a full restart but then you lose state.

(Tiny non important issue, but thought I'd log it anyway)
Repository: TypeScript
Issue: Proposal: better type narrowing in overloaded functions through overload set pruning
Labels: Suggestion,In Discussion

**TypeScript Version:**  2.7.2

**Search Terms:** type inference, type narrowing, overloads

**Code**

```ts
function bar(selector: "A", val: number): number;
function bar(selector: "B", val: string): string;
function bar(selector: "A" | "B", val: number | string): number | string
{
    if (selector === "A")
    {
        const the_selector = selector;  // "A"
        const the_val = val;            // number | string but should be just number
        return "foo";                   // should give error: when selector is "A" should return a number
    }
    else
    {
        const the_selector = selector;  // "B"
        const the_val = val;            // number | string but should be just string
        return 42;                      // should give error: when selector is "B" should return a string
    }
}
```

**Issue**

The snippet above shows a limitation of the current type inference implementation in TypeScript.
As can be clearly seen from the overloaded declarations, when `selector === "A"` we have `val: number` and we must return a `number`, while when `selector === "B"` we have `val: string` and we must return a `string`. But the type-checker, although able to understand that `the_selector` can only be `"A"` in the `if` block and only `"B"` in the `else` block, still types `the_val` as `number | string` in both blocks and allows us to return a `string` when `selector === "A"` and a `number` when `selector === "B"`.

**Possible Solution**

In the implementation of an overloaded function, when the type-checker decides to narrow the type of a parameter (as often happens in `if-else` blocks), it should also remove the overloads that don't match the narrowed parameter type from the overload set, and use the pruned overload set to narrow the types of the other parameters.

**Playground Link:** https://www.typescriptlang.org/play/#src=%0Afunction%20bar(selector%3A%20%22A%22%2C%20val%3A%20number)%3A%20number%3B%0Afunction%20bar(selector%3A%20%22B%22%2C%20val%3A%20string)%3A%20string%3B%0Afunction%20bar(selector%3A%20%22A%22%20%7C%20%22B%22%2C%20val%3A%20number%20%7C%20string)%3A%20number%20%7C%20string%0A%7B%0A%20%20%20%20if%20(selector%20%3D%3D%3D%20%22A%22)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20const%20the_selector%20%3D%20selector%3B%0A%20%20%20%20%20%20%20%20const%20the_val%20%3D%20val%3B%0A%20%20%20%20%20%20%20%20return%20%22foo%22%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20const%20the_selector%20%3D%20selector%3B%0A%20%20%20%20%20%20%20%20const%20the_val%20%3D%20val%3B%0A%20%20%20%20%20%20%20%20return%2042%3B%0A%20%20%20%20%7D%0A%7D
Repository: vue
Issue: keep-alive breaks initial transition
Labels: transition

### Version
2.5.16 (but I also checked to version 2.5.5)

### Reproduction link
[https://jsfiddle.net/bpkpz6v6/](https://jsfiddle.net/bpkpz6v6/)

### Steps to reproduce
- Add 3 items. You can see the animation on every item ✅
- Remove items in this order 3 -> 2 -> 1
- Add 3 item. This time animation for item 1 is not being applied ❌
- Remove items but in reverse order 1 -> 2 -> 3
- Again add items. Animation works correctly again ✅


### What is expected?
Transition to work every time

### What is actually happening?
When transition-group inside keep-alive is activated after being deactivated, it sometimes does't apply a transition on the first rendered element.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: godot
Issue: Light2D misbehaves if nodes use custom draw()
Labels: bug,topic:rendering,confirmed,topic:2d

Godot 3.02
Windows 7, 64bit

Nvidia Geforce GTX 960

**Issue description:**
Using custom draw() commands with nodes does not work properly with Light2D if drawn areas overlap.
Lighting seems to accumulate at the overlapping areas.
![light2d_custom_draw](https://user-images.githubusercontent.com/8040820/37487702-0b5950c0-289b-11e8-8671-3a7abf97d082.jpg)


**Steps to reproduce:**
Create any CanvasItem that uses custom draw commands that create overlapping graphics. Add a Light2D.

**Minimal reproduction project:**
[light2d_custom_draw.zip](https://github.com/godotengine/godot/files/1816889/light2d_custom_draw.zip)
Repository: go
Issue: cmd/compile: optimize large structs
Labels: Performance,NeedsFix,compiler/runtime

The compiler currently compiles large structs conservatively.  If a struct type has more than 4 fields (or a few other conditions), we treat that type as unSSAable.  All operations on variables of that type go to the stack, as if their address was taken.

This is suboptimal in various ways.  For example:
```
type T struct {
	a, b, c, d int
}

func f(x *T) {
	t := T{}
	*x = t
}

type U struct {
	a, b, c, d, e int
}

func g(x *U) {
	u := U{}
	*x = u
}
```

`f` is compiled optimally, to:
```
	XORPS	X0, X0
	MOVQ	"".x+8(SP), AX
	MOVUPS	X0, (AX)
	MOVUPS	X0, 16(AX)
	RET
```
`g` is quite a bit worse:
```	SUBQ	$48, SP
	MOVQ	BP, 40(SP)
	LEAQ	40(SP), BP
	MOVQ	$0, "".u(SP)
	XORPS	X0, X0
	MOVUPS	X0, "".u+8(SP)
	MOVUPS	X0, "".u+24(SP)
	MOVQ	"".u(SP), AX
	MOVQ	"".x+56(SP), CX
	MOVQ	AX, (CX)
	LEAQ	8(CX), DI
	LEAQ	"".u+8(SP), SI
	DUFFCOPY	$868
	MOVQ	40(SP), BP
	ADDQ	$48, SP
	RET
```
We zero a temporary variable on the stack, then copy it to the destination.

We should process large structs through SSA as well.  This will require a fair amount of work in the SSA backend to introduce struct builders, selectors of arbitrary width, stack allocation of large types, maybe heap allocation if they are really huge, etc.

Arrays of size > 1 are in a similar state, but they are somewhat harder because non-constant indexes add an additional complication.
Repository: go
Issue: x/build/cmd/gopherbot: comment patch series in order
Labels: Builders,NeedsFix

When I upload a patch series, it would be nice if those CLs were grouped together as a single gopherbot comment on the issue, or at least listed in CL order.

Here's an example where gopherbot listed CL 100846 before CL 100845: https://github.com/golang/go/issues/22075#issuecomment-373522789
Repository: rust
Issue: When running Emscripten tests, rustbuild should tell compilertest the version of the Emscripten LLVM, not the host LLVM
Labels: A-LLVM,A-testsuite,A-cross,T-bootstrap,C-bug,O-emscripten

Discovered in https://github.com/rust-lang/rust/pull/48983#issuecomment-373529195. It seems rustbuild will always passes information about the host LLVM config, even when running Emscripten tests. https://github.com/rust-lang/rust/blob/39264539448e7ec5e98067859db71685393a4464/src/bootstrap/test.rs#L911-L920

This makes `min-llvm-version` reports the wrong value and failed to ignore some tests.

cc #48757 (probably a regression introduced by this PR)
Repository: TypeScript
Issue: Infer type in conditional cannot unify generics
Labels: Suggestion,Needs Proposal

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 -->
<!--
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
-->

<!-- If you have a QUESTION:
   THIS IS NOT A FORUM FOR QUESTIONS.
   Ask questions at http://stackoverflow.com/questions/tagged/typescript
    or https://gitter.im/Microsoft/TypeScript
-->

<!-- If you have a SUGGESTION:
  Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.
  See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md
-->

<!-- If you have a BUG:
  Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  2.8.0-dev.20180315

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** 
infer conditional unify generic function 

**Code**

```ts
type Apply1<T, V> = T extends (item: V) => infer R ? R : never;
type A1 = Apply1< (item: string) => string[] , string>;
type B1 = Apply1< <U>(item: U) => U[], string>;

type Apply2<T, V> = T extends (item: V, obj: infer R) => any ? R : never;
type A2 = Apply2< (item: string, obj: string[]) => any , string>;
type B2 = Apply2< <U>(item: U, obj: U[]) => any , string>;

type Apply3<T, V> = T extends (item: V, obj: infer R) => infer R ? R : never;
type A3 = Apply3< (item: string, obj: string[]) => string[] , string>;
type B3 = Apply3< <U>(item: U, obj: U[]) => U[] , string>;
```

```json
{
	"compilerOptions": {
		"allowJs": true,
		"target": "es6",
		"module": "commonjs",
		"outDir": "dest",
		"strictNullChecks": true,
		"jsx": "preserve",
		"strictFunctionTypes": true
	}
}
```

**Expected behavior:**
All `A` and `B` types are inferred to `string[]`. For types `B`, the type parameter `U` should be unified with `string`.

**Actual behavior:**
All `B` types are inferred to `{}[]`.

**Related Issues:**
#22615 (different problem, but similar input)
Repository: TypeScript
Issue: In JS, aliasing property assignments to JS containers should work
Labels: Bug,Domain: JavaScript

```ts
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @strict: true
// @Filename: a.js

// from async
var a = {};
a.each = function () {
  console.log('hi')
}
a.forEach = a.each
```

**Expected behavior:**
No error, and `a.each()` and `a.forEach()` both have the type `() => void`.

**Actual behavior:**
a, a.each and a.forEach are all of type any.
With no implicitAny on, there are two errors:
Two errors:
1. 'a' implicitly has type any because it does not have a type annotation is referenced directly or indirectly in its own intializer.
1. 'forEach' implicitly has type any because it does not have a type annotation is referenced directly or indirectly in its own intializer.
Repository: opencv
Issue: Bug(s) in cv::fitEllipse()
Labels: bug,priority: normal,category: imgproc,affected: 3.4

##### System information (version)
- OpenCV => 3.4
- Operating System / Platform => Windows 10 64bit
- Compiler => Visual Studio 2015

##### Detailed description
#### This issue affects _**cv::fitEllipse**_ in _**shapedescr.cpp**_.

1. The angle of ellipses with a small difference in width and height (circle-like) are sometimes not assigned to the output-cv::RotatedRect.
2. Furthermore there is an incorrect approximation.
3. Some other lines appear odd to me.

##### Steps to reproduce
First of all: I am no professional and this is my first bug report. Sorry for poor formatting etc.
1. Jumping to the last lines of the function definition: The assignment of the angle value is hidden behind an if-statement which is sometimes not true. Due to this, the default value of 0 is returned with the cv::RotatedRect. The following code snippet shows a simple solution to that.


```
		box.angle = (float)(rp[4] * 180 / CV_PI);	// Assignment of angle moved out of if-bracket

		if (box.size.width > box.size.height)
		{
			float tmp;
			CV_SWAP(box.size.width, box.size.height, tmp);
			box.angle += 90.0;		//  In case w and h swap - 90° should be added
			//box.angle = (float)(90 + rp[4] * 180 / CV_PI);  
		}
```

2. The incorrect approximation is found in line 380.
`	if( fabs(gfp[2]) > min_eps )`
It is not sufficient to check only `gfp[2]`. Instead it should be the whole fraction of `gfp[2] / gfp[1] - gfp[0]`. 

![grafik](https://user-images.githubusercontent.com/37413545/37511606-bfe626ee-28ff-11e8-8a8c-6a4fdb2778f6.png)

Where `g0 = gfp[0], r4 = rp[4]` and so on. The corrected line should look something like this:
`if (fabs(gfp[2]) / fabs(gfp[1] - gfp[0]) > min_eps)`

3. I do not completely understand the applied algorithm in this method but there seem to be two other odd approximations in lines 384 to 389
```
		rp[2] = fabs(gfp[0] + gfp[1] - t);			
		if (rp[2] > min_eps)					// <-- weird approximation?
			rp[2] = std::sqrt(2.0 / rp[2]);
		rp[3] = fabs(gfp[0] + gfp[1] + t);
		if (rp[3] > min_eps)					// <-- weird approximation?
			rp[3] = std::sqrt(2.0 / rp[3]);
```
If you turn them around, it basically says: If width `(2*rp[2])` and height `(2*rp[3])` are small enough, they can be approximated by the square of their reciprocal value (times 4). In mathematical terms it's something like this:

![grafik](https://user-images.githubusercontent.com/37413545/37511151-0e32eeec-28fe-11e8-8516-459725afbe39.png)


Where `g0 := gfp[0]` and `g1 := gfp[1]`. With `min_eps = 1-e8` as it is hard coded in the function, this cannot be true for any value.

I created a short example project in VS2015 on Windows.

[main.txt](https://github.com/opencv/opencv/files/1818566/main.txt)
Repository: vscode
Issue: [icon themes] Expose API to provide a dynamic icon theme.
Labels: feature-request,themes

This is an API feature request.

We at `vscode-icons` extension support project detection which dynamically re-generates our icon manifest file including or not project specific icons. Additionally to that, we provide the ability to the user to provide its own custom icons and more.

All these features, in the end, require the editor to be reloaded, simply because the icon manifest gets loaded at the start of the editor and with no ability to trigger a reload upon icon manifest recreation.
This results in a poor UX.

If we could have an API to trigger an icon manifest reload, we can have a much smoother transition between changes.

Relating request: https://github.com/vscode-icons/vscode-icons/issues/1177

//cc @robertohuertasm @jens1o @PKief @EmmanuelBeziat @LaurentTreguier @file-icons @DavidBabel @be5invis
Repository: angular
Issue: Router should help manage focus for a11y
Labels: feature,area: router,Accessibility,feature: under consideration

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] 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>
Re-opening #6106 as suggested

## Current behavior
Only the first time you navigate to a page the autofocus attribute is respected, subsequent page navigations doesn't respect the autofocus attribute.


## Expected behavior
When navigating to a page the autofocus attribute should be respected


## Minimal reproduction of the problem with instructions
Here's a minimal reproduction. https://stackblitz.com/edit/angular-jvfn5g

Follow these steps (also available in the stackblitz)

1. First navigate to Foo
2. Observe that the textbox has focus
3. Then navigate to Bar
4. Then navigate back to Foo
5. Observe that the textbox no longer has focus

## What is the motivation / use case for changing the behavior?
It is the correct and expected behavior.


## Environment

<pre><code>
Angular version: 5.2.9

Browser:
- [x] Chrome (desktop) version 65.0.3325.146
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
</code></pre>
Repository: rust
Issue: macro rules shadowing error should emit where the macro being shadowed lives
Labels: A-diagnostics,A-macros,T-compiler,D-terse

The ``macro-expanded `macro_rules!`s may not shadow existing macros`` should mention where the macro being shadowed was defined.

For example compiling `stdsimd` I get the following error:

```
error: `is_x86_feature_detected` is already in scope
   --> crates/stdsimd/src/../../../stdsimd/arch/detect/arch/x86.rs:21:1
    |
21  | / macro_rules! is_x86_feature_detected {
22  | |     ("aes") => {
23  | |         cfg!(target_feature = "aes") || $crate::arch::detect::check_for(
24  | |             $crate::arch::detect::Feature::aes)  };
...   |
165 | |     };
166 | | }
    | |_^
    |
    = note: macro-expanded `macro_rules!`s may not shadow existing macros (see RFC 1560)

error: aborting due to previous error
```

which tells me that I am defining a macro that is already defined somewhere, but it is not telling me where. That would make this diagnostic much better.
Repository: godot
Issue: Sprite3D not casting a shadow
Labels: bug,topic:rendering,topic:3d

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->
**Godot version:**
<!-- Specify commit hash if non-official. -->
3.0 stable and 2.1.4 stable

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Phone: Oukitel K6000 Pro
Android 6.0
GPU: ARM Mali-T720 (MP3) 
Driver: Open GL ES 3.1 and Open CL 1.2

**Issue description:**
When using a Sprite3D with "alpha_cut" set to "Opaque Prepass" the drop shadow is missing on my Oukitel K6000 Pro.  This happens in all versions of Godot I tested and seems to be device specific. I tested with two other phones (Samsung Galaxy S3 and Galaxy J5 Duos) and the issue only occurs on the K6000 Pro.

I am using Godot 2 for my project, so it would be glad it could be fixed there, too. But I tested and uploaded a test project for godot 3 to help fixing the issue on the current version.


**Steps to reproduce:**
1. Set up a basic project
2. Add a directional Light, a Sprite3D and some object to cast a shadow on.
3. Set the "alpha_cut" of the sprite to "Opaque Prepass"

**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Godot2: [Sprite3DShadowTest_Godot2.zip](https://github.com/godotengine/godot/files/1819778/Sprite3DShadowTest_Godot2.zip)
Godot3: [Sprite3DShadowTest_Godot3.zip](https://github.com/godotengine/godot/files/1819850/Sprite3DShadowTest_Godot3.zip)

**Screenshots Godot2 Project**
Oukitel:
![godot2_oukitel](https://user-images.githubusercontent.com/25849067/37530398-b801e078-2939-11e8-82af-4e38b6e18aa7.png)

Other devices:
![godot2_workingdevices](https://user-images.githubusercontent.com/25849067/37530235-6499f100-2939-11e8-9a2b-0fb21dd12ffa.PNG)

**Screenshots Godot3 Project**
Oukitel:
![godot3_oukitel](https://user-images.githubusercontent.com/25849067/37530413-c10f5902-2939-11e8-9de6-b298e96b70d1.png)

Other devices:
![godot3_workingdevices](https://user-images.githubusercontent.com/25849067/37530501-00675b9a-293a-11e8-8b21-a6605b317cb7.PNG)
Repository: TypeScript
Issue: In JS, aliasing of C.prototype should cause property assignments to add to the instance
Labels: Suggestion,Needs Proposal,checkJs,Domain: JavaScript

```ts
// from acorn
function Parser() {
    /** @type {number} */
    this.x = 1
}
var pp = Parser.prototype
pp.m = function () {
    this.x = "should be an error"
    return this.x
}
new Parser().m
```

**Expected behavior:**
`pp.m = function() ...` should add a method to the `Parser` instance. This should result in:
1. Error: can't assign string to property x of type number
2. No error on `new Parser().m`

**Actual behavior:**
No error on `this.x = "should be an error"` and an error on `new Parser().m`
Repository: vue
Issue: Extending object syntax of v-on to support modifiers
Labels: feature request

### What problem does this feature solve?
The object syntax of the v-on directive is vital in achieving conditional binding of event listeners, as shown in the discussions at https://github.com/vuejs/vue/issues/7349.

    <div v-on="{ mouseover: condition ? handler : null }">

However, the current object syntax does not allow modifiers.

This feature request suggest that we extend the object syntax in the following way to allow modifiers.

    <div v-on="{ click: { left: { prevent: condition ? leftClickHandler : null } },  mouseover: { stop: mouseoverHandler } }">

The above example would conditionally install leftClickHandler on "click.left.prevent" and mouseoverHandler on "mouseover.stop".

The embedded object notation is also conceptually consistent with the dot-notation already adopted in both function and inline syntax.


### What does the proposed API look like?
The proposed v-on object syntax would like like this, which is an extension of the current syntax.

    <div v-on="{ click: { left: { prevent: condition ? leftClickHandler : null } },  mouseover: { stop: mouseoverHandler } }">

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: flutter
Issue: flutter doctor -  The resource loader cache does not have a loaded MUI entry . (HRESULT: 0x80073B01 Exception)
Labels: c: crash,tool,platform-windows,t: flutter doctor,a: first hour,P2,team-tool,triaged-tool

## Steps to Reproduce

Running `flutter doctor` in PowerShell

## Logs
```
C:\Users\Pedro>flutter doctor
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine ead227f118077d1f2b57842a32abaf105b573b8a...
Start-BitsTransfer : flutter doctor -  69/5000 The resource loader cache does not have a loaded MUI entry . (HRESULT: 0x80073B01 Exception)
En C:\Users\Pedro\flutter\bin\internal\update_dart_sdk.ps1: 47 Carácter: 1
+ Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Start-BitsTransfer], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.BackgroundIntelligentTransfer.Mana
   gement.NewBitsTransferCommand

Error: Unable to update Dart SDK. Retrying...

Esperando 2 segundos, presione CTRL+C para salir ...
```
## Flutter Doctor

--I can't see version due to this error
Repository: scrcpy
Issue: Thank you for this project :)
Labels: wontfix

I have waited so long for an opensource alternative to some paid options. This is a big help to the community. Big thanks :)