sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Apply dartfmt to shared_preferences_web generated_plugin_registrant.dart
Labels: c: new feature,tool,P3,team-tool,triaged-tool

A ci-script that checks that dartfmt isn't needed anywhere, chokes on a file generated by shared_preferences_web.

That is, I see a file `generated_plugin_registrant.dart` that doesn't seem to have `dartfmt` applied.

```dart
//
// Generated file. Do not edit.
//

// ignore: unused_import
import 'dart:ui';

import 'package:shared_preferences_web/shared_preferences_web.dart';

import 'package:flutter_web_plugins/flutter_web_plugins.dart';

void registerPlugins(PluginRegistry registry) {
  SharedPreferencesPlugin.registerWith(registry.registrarFor(SharedPreferencesPlugin));
  registry.registerMessageHandler();
}
```

In other words, the ci-script has

```
dartfmt --set-exit-if-changed . >/dev/null
```

```
$ flutter --version
Flutter 1.15.4-pre.267 • channel master • https://github.com/flutter/flutter.git
Framework • revision 0a84024b86 (2 days ago) • 2020-03-03 23:19:01 -0500
Engine • revision 90bd6f8148
Tools • Dart 2.8.0 (build 2.8.0-dev.11.0 5701c4fd3b)
```
Repository: flutter
Issue: More abstract switch widget implementation
Labels: framework,f: cupertino,c: proposal,team-design,triaged-design

## Use case

We want to use a custom built switch widget in our app, but `Switch`/`CupertinoSwitch` doesn't allow us to customize it as we want. The proposal here is to add a more abstract implementation of a `Switch` where it's possible to change shape, colors, shadows, thumb shape, track padding... while keeping the basic functionality (tap/drag thumb).

## Proposal

Provide a basic implementation of `Switch` widget which can be easily customized, with tap/drag gestures.
Repository: TypeScript
Issue: Type narrowing in loose equality fails for edge cases like empty string and zero
Labels: Bug

**TypeScript Version:**  3.8.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
type narrowing loose equality
type guard loose equality
loose comparison empty string zero
non-strict comparison empty string zero
type guard empty string zero
coercion double equals
type guard coercion fails

**Code**

TS misses edge cases when narrowing down types in loose equality comparisons.

Following the example from the new handbook on [Equality narrowing](https://microsoft.github.io/TypeScript-New-Handbook/chapters/narrowing/#equality-narrowing), if you replace the strict equality with a loose equality, you're rocket is ready to explode. If you pass in the empty string and zero the if condition passes and accessing `toUpperCase()` on a number fails.

```ts
function foo(x: string | number, y: string | boolean) {
    if (x == y) {
        // We can now call any 'string' method on 'x' or 'y'.
        x.toUpperCase();
        y.toLowerCase();
    }
    else {
        console.log(x);
        console.log(y);
    }
}

foo(0, "");
```

It might be worth mentioning, that this is only one out of many edge cases with the loose equality operator. Maybe you want to check more than just my example above. I bet Kyle Simpson (@getify) could give you some more examples.

**Expected behavior:**

After a loose equality comparison, TS should not narrow down `string | number` and `string | boolean`  to `string`, since a number can equal a string in the edge case `0 == ""`.

**Actual behavior:**

After a loose equality comparison, TS narrows down `string | number` and `string | boolean`  to `string`, even though this is incorrect, as seen for edge cases like `0 == ""`.

**Playground Link:** [Playground Link](https://www.typescriptlang.org/play/?ssl=13&ssc=12&pln=1&pc=1#code/GYVwdgxgLglg9mABMOcAUAPAXIgzlAJxjAHNEAfRMEAWwCMBTAgGkQE8d8jSLE7UANgwCGYAJSIA3gChEcxDGCJMiALyr2EmfJ2IA9HsQB1BogiiqcAO5nhAgYlFtEAci7ESLxDQZQAFnAAJogIrhhecASubC4AdLK6chixUHAAqgAOGUwAwsK4DGhiANwJiWwpcAAy1rn5hSVliAC+TQwCBVJNOhAIuHBCsQJwJJiNiXK9YP2Dw6Ns4-KtrdIo6AAMrABEWyVAA)

**Related Issues:**
Repository: flutter
Issue: Support configurable placements of SnackBars
Labels: c: new feature,framework,f: material design,P3,team-design,triaged-design

The Material Design guidelines support different [placements][MD placement] of `SnackBar`s.
Especially on larger screens (like desktop or tablet apps), it makes sense to not force `SnackBar`s to fill the whole width, but rather be left- or center-aligned:

[![left-aligned SnackBar][left-aligned]][MD placement]
[![center-aligned SnackNar][center-aligned]][MD placement]

Flutter should support multiple placements of `SnackBar`s.

[MD placement]: https://material.io/components/snackbars/#placement
[left-aligned]: https://storage.googleapis.com/spec-host-backup/mio-components%2Fassets%2F1g53jKUH6a5wejAcF2n542pviFHkZXxw_%2Fsnackbars-layout-desktop-do.png
[center-aligned]: https://storage.googleapis.com/spec-host-backup/mio-components%2Fassets%2F11iRJMqJLi_rL7QCbKYJbyeoxmkkOKZ3o%2Fsnackbars-container-landscape-do-2.png
Repository: flutter
Issue: Run tests for federated plugins that use path dependencies
Labels: team,package,team-ecosystem,P2,triaged-ecosystem

Right now our CI doesn’t have a check for changes to dependent packages of federated plugins that break tests in the app-facing plugin. Publishing updates that pass all the tests can still lead to a broken experience for users of the plugin.
 
We should run tests of the app-facing plugin using path dependencies.
Repository: flutter
Issue: Using RefreshIndicator without displaying RefreshProgressIndicator
Labels: framework,f: material design,c: proposal,team-design,triaged-design

Hello, 

## Use case

I'm writing a flutter application with redux. While loading data in a ListView with the redux workflow, I'm displaying my own RefreshProgressIndicator. I would like to be able to trigger a reload of the list while overScrolling at the top of the list. For that, the RefreshIndicator component is perfect but there is no way to disable the display of its own RefreshProgressIndicator then I have two spinners displayed at the same time.
I would like to have a possibility not to display the spinner inside the RefreshIndicator.

## Proposal

Add a boolean parameter "showProgress" in RefreshIndicator.

Thank you
Repository: TypeScript
Issue: Project References docs/example are missing rootDirs (?)
Labels: Needs Investigation

I'm working on a prototype to rebuild the Bazel TypeScript support on top of Project References, basically following the paragraph

https://www.typescriptlang.org/docs/handbook/project-references.html
> Some teams have set up msbuild-based workflows wherein tsconfig files have the same implicit graph ordering as the managed projects they are paired with. If your solution is like this, you can continue to use msbuild with tsc -p along with project references; these are fully interoperable.

where msbuild is replaced by Bazel. Seems very promising so far, however there's a snag.

---
Looking at Ryan's demo
https://github.com/RyanCavanaugh/project-references-demo
we see that each project uses an `outDir` setting to avoid sprinkling build outputs in the sources (yay)
https://github.com/RyanCavanaugh/project-references-demo/blob/master/core/tsconfig.json#L4

However in dependent projects there is no matching `rootDirs` option
https://github.com/RyanCavanaugh/project-references-demo/blob/master/animals/tsconfig.json

According to the README, the `empty-sleeves` branch deletes the code from the dependent project, so I would expect TS resolves from the `.d.ts` in the outDir. So I'm not understanding how the compiler could find `/lib/core/utilities.d.ts` to resolve imports like `import { makeRandomName } from '../core/utilities';` that appear in `/animals/dog.ts`.

Indeed checking out the `empty-sleeves` branch, it doesn't seem to compile, seems like it's just out-of-date prototype code

```
tsproject.json:11:5 - error TS5023: Unknown compiler option 'referenceTarget'.

11     "referenceTarget": true
```

Another way to observe my problem: In my minimal Proof-of-Concept I am forced to specify a `rootDirs` setting.
https://github.com/alexeagle/ts_composite/blob/master/tsconfig-base.json#L7-L8
and in this case since Bazel creates output directory with the platform name in it, I can't really check in this file and keep the project portable between mac/linux/windows.

---

So the question is, does TS have some way of resolving the outDir from project references that I'm missing? Or is the `rootDirs` setting required to make this work?
Repository: godot
Issue: Transparent background on Desktop but not android
Labels: enhancement,platform:android,topic:rendering,topic:porting

**Godot version:**
3.2.1
**OS/device including version:**
Win 10 and Android 9 on Galaxy Note9

**Issue description:**
In project settings under Display|Window I have selected the "Per Pixel Transparency" options and enabled them. 
When I run the project on the desktop, the background is transparent instead of solid gray.

However, when I run the project on Android, it always shows the gray background.
Repository: pytorch
Issue: .detach() behaves differently for dense tensors vs sparse tensors
Labels: module: sparse,triaged

## 🐛 Bug

When we call tensor.detach(), the operations supported on the detached tensor differ in case of sparse/dense.

## To Reproduce

```
import torch

t = torch.rand(3,3, requires_grad=True)
t1 = t.detach()
t1.zero_()

i = torch.LongTensor([[0, 1, 1],
                          [2, 0, 2]])
v = torch.FloatTensor([3, 4, 5])
sp = torch.sparse.FloatTensor(i, v, torch.Size([2,3]))
sp1 = sp.detach()
with torch.no_grad():
  sp1.zero_()
```

The last line `sp1.zero_()` throws the following exception:
```
RuntimeError                              Traceback (most recent call last)
<ipython-input-13-74456cf884fa> in <module>
     11 sp1 = sp.detach()
     12 with torch.no_grad():
---> 13     sp1.zero_()

RuntimeError: resize_and_clear_ is not allowed on a Tensor created from .data or .detach().
If your intent is to change the metadata of a Tensor (such as sizes / strides / storage / storage_offset)
without autograd tracking the change, remove the .data / .detach() call and wrap the change in a `with torch.no_grad():` block.
For example, change:
    x.data.set_(y)
to:
    with torch.no_grad():
        x.set_(y)

```
## Expected behavior

We should have consistent behavior across sparse and dense tensors after detaching.

## Additional context

This was discovered as part of https://github.com/pytorch/pytorch/pull/33427.

cc @vincentqb @ezyang @albanD
Repository: go
Issue: x/tools/gopls: filter useless completion candidates
Labels: NeedsDecision,gopls,Tools,gopls/completion

I think we are at a point where we can consider filtering out completion candidates that are probably useless. We still have to be careful because it is normal for users to sometimes compose Go code "out of order", or use completion on an empty line to explore what is available, or otherwise try to complete something that isn't "quite right" yet. Also keep in mind that gopls having no expected type doesn't necessarily mean there is no expected type - there could be a syntax error we don't work around yet. 

Here are some concrete situations to consider:

1. If we have an expected type, don't offer func candidates that return no values. This one seems pretty low risk. There are still edge case false negatives such as a user wanting to complete to a void function with the intention of then going and adding a return value.

1. If we have an expected type and it isn't bool, omit otherwise non-matching type name candidates that have no methods. This seems medium risk. For example:

```go
// do offer float64 to allow type conversions like "float64(something) > 1234"
var _ bool = f<>

// don't offer float64 
var _ int = f<> 

type someType struct{}
func (someType) someMethod() int { return 0 }

// do offer someType to allow things like "someType{}.someMethod()"
var _ int = s<>

type otherType struct{}

// don't offer otherType
var _ int = o<>
````

Please comment with other low risk opportunities to omit candidates.
Repository: vscode
Issue: Improve parameter hints UX
Labels: feature-request,ux,editor-parameter-hints

This is similar to https://github.com/microsoft/vscode/issues/14165, but focuses specifically on parameter hints. Here's the comparison of UI for IntelliJ and VS Code:

IDEA:
![good](https://user-images.githubusercontent.com/1711539/76109452-c1609e80-5fdc-11ea-85b1-26cd06e18b24.png)

VS Code:
![wtf](https://user-images.githubusercontent.com/1711539/76109454-c1f93500-5fdc-11ea-9378-b2cbd69897f1.png)

IDEA's version is massively more useful, because:

* it uses a single line (so no spacing wasted for wrapping, no weird breaks mid parameter)
* it is *centered* at the cursor position (as opposed to being to the right)

Although this is far from an extreme case, the VS Code version is nigh unusable :-( 

Note that many language servers for VS Code implements parameter snippet completion, where arguments of the function call are prefilled: 

![image](https://user-images.githubusercontent.com/1711539/76109788-7b580a80-5fdd-11ea-93d7-121f16487df8.png)

I think that this behavior is basically a work-around for VS Code parameter hints not being very useful.
Repository: rust
Issue: It is hard to see the return types of async functions
Labels: T-rustdoc,C-enhancement,P-medium,E-medium,A-async-await,AsyncAwait-Triaged

In the documentation it is hard to distinguish async functions from normal functions.

Take for example [warp::Server](https://docs.rs/warp/0.2.2/warp/struct.Server.html). Both `run` and `bind` returns futures. But when I was reading the docs I thought only `bind` was asynchronous. And I had a lot of problems getting my code to work due to wrong assumptions about the types...

My suggestion is that async functions are listed in a separate listing, have another color, use the correct return type (Future) or in some other way stand out.

ref: https://www.reddit.com/r/rust/comments/fef3zh/minor_rant_about_async_syntax_and_documentation/
Repository: go
Issue: cmd/gofmt: consider sorting imports in the same way as goimports (separating std lib from third party)
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?
1.14

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

MacOS

### What did you do?

ran `go fmt ./..` on my codebase


### What did you expect to see?

The builtin `go fmt` formats imports identically to `goimports`

### What did you see instead?

`go fmt` works differently than `goimports`

Downloading of `goimports` is necessary to work in certain repos and adhere to their style guide. One impetus of having `go fmt` built in is to not have these sorts of disagreements, and instead just rally around a single tool. The existence and continued support for `goimports` goes against this philosophy. In addition, there is poor visibility in the public eye of `goimports`. Its not discoverable via the command line, as it isn't built in like `vet` and `fmt`. The only way people learn of this other tool is via blog posts or poking around Github.


I propose that the builtin `go fmt` sorts imports in the same way as `goimports` starting with next Go versioned release, and development of `goimports` ceases.

If we want to maintain two different sets of rules, I think a good compromise would be to add a `-imports` flag to the builtin `go fmt` so that we aren't maintaining two tools for one job
Repository: vscode
Issue: API to collapse custom tree items
Labels: feature-request,api,tree-views,api-proposal

Refs: #55879

While the above request was closed (completed) the collapse part was never implemented.
Repository: vscode
Issue: API for reading current word-wrap state (and toggling it) on a TextDocument
Labels: feature-request,api

The are currently lots of issues with decorations and word-wrapping, especially with GitLens. Extension authors could at least mitigate some of these issues with the knowledge that word-wrapping is actually on. And then for more advanced usages -- like showing GitLens' blame, it would be great to turn off word-wrapping while the blame annotations are shown.
Repository: rust
Issue: When errors have been emitted, do not continue to codegen stage
Labels: I-slow,A-codegen,T-compiler

After https://github.com/rust-lang/rust/pull/60126 we now continue all the way to codegen even in the face of errors. We [should stop before codegen as it is a waste of time](https://github.com/rust-lang/rust/pull/69614#issuecomment-595893013).
Repository: flutter
Issue: Heisenbug on Flutter
Labels: framework,dependency: dart,a: debugging,a: error message,P2,team-framework,triaged-framework

I have a [Heisenbug](https://en.wikipedia.org/wiki/Heisenbug) on my Flutter App.

In a nutshell, I have two screens `A` and `B`, I navigate from `A` to `B` and on this new screen I generate a `Stream<T>.error()` for error handling testing in a `StreamBuilder`. The `StreamBuilder` handles things fine on the first time I navigate to this screen. Then I navigate back to `A`, the `B` screen is disposed, and when I navigate again to `B` I get an red error widget saying `Bad state: Stream has already been listened to.`.

So, the first time things work nice, the second, third etc, I get the `Bad state: Stream has already been listened to.`.

Now comes the weird part.... if I set a breakpoint to understand this, there are no errors, things works nicely as intended every time. I am debugging this on an Android emulator, now if I try to debug it on my Android phone, it NEVER works fine, I get the error every single time I open the new screen.

I know this error is thrown when a `Stream` is subscribed twice and I know `broadcast` should fix it, but it doesn't. If I use `broadcast` without breakpoints, the code behaves as if things are just fine. If I use breakpoints, the error handling dialog appears and things works as expected.

Clearly the debug breakpoints are interfering with the way my code executes and clearly the code isn't behaving the same way for each platform.

I can't reproduce this, I tried to isolate it, make it simpler on a new project, but it works fine on every new project I try to create.

If anyone from the Google team is willing to take a look at this, please let me know and I will give you supervised access to my machine so you can remotely access it and see it running, or I can share with you my code entirely. I just don't feel comfortable sharing it with people from outside the Google Flutter team for obvious reasons.
Repository: TypeScript
Issue: Type with overloaded method with a generic overload matches type with incompatible method
Labels: Needs Investigation

**TypeScript Version:**  3.9.0-dev.20200305

**Search Terms:**
generic type overload 

**Code**
```ts
interface I1 {
    f<V extends 'a'>(value: V): void;
    f(value: 'b'): void;
}

interface I2 {
    f(value: 'c'): void;
}

function test(x: I1) {
    function u(y: I2) { }

    u(x);
}
```

**Expected behavior:**
Compilation error, `u` cannot accept `x` as `I1` cannot handle `f('c')`

**Actual behavior:**
Compilation succeeds.
Note that all of the following fail, as expected:
```ts
interface I1 {
    // f<V extends 'a'>(value: V): void;
    f(value: 'b'): void;
}

interface I2 {
    f(value: 'c'): void;
}

function test(x: I1) {
    function u(y: I2) { }

    u(x);
}
```

```ts
interface I1 {
    f<V extends 'a'>(value: V): void;
    // f(value: 'b'): void;
}

interface I2 {
    f(value: 'c'): void;
}

function test(x: I1) {
    function u(y: I2) { }

    u(x);
}
```


```ts
interface I1 {
    f(value: 'a'): void;
    f(value: 'b'): void;
}

interface I2 {
    f(value: 'c'): void;
}

function test(x: I1) {
    function u(y: I2) { }

    u(x);
}
```

**Playground Link:**
https://www.typescriptlang.org/play/?ts=3.9.0-dev.20200305#code/JYOwLgpgTgZghgYwgAgJIEZkG8CwAoZQ5GAHgDVkIAPSEAEwGdkByOZgPgAoA3OAGwCuEAFzIyASlHcA9sDoBufEWI9+Q0cwBGzSchlzFeAL758oSLEQpUAJmxKiMVYJEsEOqbIX4TefDAEQBDBgaRBkSAYwTipRDHF7AkdA4NDwgU4ATzibBKxkXwdCDKpxQyMgA

**Related Issues:**
Not sure.
Repository: pytorch
Issue: TorchScript docs have broken links
Labels: oncall: jit,triaged

## 📚 Documentation

https://pytorch.org/docs/master/jit_language_reference.html "Builtin Functions" goes nowhere
![image](https://user-images.githubusercontent.com/5652049/76125225-58702b00-5fca-11ea-9831-191aabc4b9dd.png)



cc @suo
Repository: TypeScript
Issue: Module AMD and outFile causes declaration emit to use module that does not exist
Labels: Needs Investigation

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.5.1, 3.7.5, 3.8.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** module, amd, outFile, declaration emit

**Code**

```
git clone https://github.com/AnyhowStep/tsql.git
cd tsql
git checkout e5a0d16ac31d868f03386b4381e51eed5f6c731d
npm install
./node_modules/.bin/tsc -m amd --outFile test-amd.js
```

1. You should now see a `test-amd.d.ts` file.
1. Open `test-amd.d.ts` with VS code or something.
1. Set VS code to use the TypeScript version in `node_modules` (3.5.1)
1. Ctrl+F > `const concat:`

You will see this,
![image](https://user-images.githubusercontent.com/5655961/76132062-0259b280-5fdf-11ea-8b24-b770620d3054.png)

> Cannot find module 'expr-library/factory'.ts(2307)

That module, indeed, does not exist.

In fact, it is looking for `import("expr-library/factory/make-operator-1-to-n").Operator1ToN` but is looking at the wrong module.

There are many other places where it references `"expr-library/factory"`, which does not exist.

**Expected behavior:**

emitted .d.ts should either use `import("expr-library/factory/make-operator-1-to-n").Operator1ToN` or emit a `"expr-library/factory"` module

**Actual behavior:**

Emit uses `"expr-library/factory"`, it does not exist

**Playground Link:** None

**Related Issues:** None
Repository: flutter
Issue: Perform async texture uploads on a dedicated Metal command queue on the resource context.
Labels: engine,dependency: skia,P2,team-engine,triaged-engine

Due to restrictions in Skia pending the handling of multiple command queues in `GrMtlGpu::prepareTextureForCrossContextUsage`, the same command queue is being used by Flutter for rendering as well as async texture uploads. This restriction should be lifted for more performant command buffer management in Flutter using Metal.
Repository: pytorch
Issue: error in pytorch Docs: https://pytorch.org/docs/stable/distributions.html
Labels: module: docs,triaged

Categorical distribution is also called multinoulli distribution, instead of multinomial.
At the beginning of the page, under title "score function"