sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: @HostBinding('attr.id') with dynamic attribute during testing conflicting Karma logic
Labels: type: bug/fix,area: testing,freq1: low,P3

# 🐞 bug report

### Affected Package
The issue is caused by package @angular/core, @angular/core/testing

### Is this a regression?

No


### Description
Creating elements that bind to the id attribute of their host from an input causes Karma to display all previously tested elements instead of clearing after each spec.

It seems the issue occurs when the property that is bound is set programmatically during the tests.

## 🔬 Minimal Reproduction

https://github.com/hodossy/ng-hostbinding-id-test-issue

<pre><code>
npm install
ng test
</code></pre>

## 🔥 Exception or Error
![image](https://user-images.githubusercontent.com/19623656/74012071-ae30c380-4989-11ea-8cc8-238ad1f71cbf.png)

As it can be seen, multiple test elements are left behind, probably because Karma clears the elements by ID.

My expactation would be that Karma removes the previous tested element and only the last one is visible after the test suite is run.

## 🌍  Your Environment

**Angular Version:**
<pre><code>
Angular CLI: 8.3.25
Node: 10.16.0
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.25
@angular-devkit/build-angular     0.803.25
@angular-devkit/build-optimizer   0.803.25
@angular-devkit/build-webpack     0.803.25
@angular-devkit/core              8.3.25
@angular-devkit/schematics        8.3.25
@angular/cli                      8.3.25
@ngtools/webpack                  8.3.25
@schematics/angular               8.3.25
@schematics/update                0.803.25
rxjs                              6.4.0
typescript                        3.5.3
webpack                           4.39.2

</code></pre>

**Anything else relevant?**
I had no time to test with other browsers than Chrome, but I think it should not be specific to Chrome
Repository: three.js
Issue: Too dark edges due to new IBL multi-scattering approach
Labels: Needs Investigation

To continue the discussion of #16409, it still seems to me that three.js's new IBL multi-scattering code is yielding too strong dark edges on light fully glossy material.
Maybe this is now something that is acted as acceptable or even an improvement (as the author of the [new approach's paper](http://www.jcgt.org/published/0008/01/03/) states), but I thought I'd report examples and then have an official decision or start an improvement process if need here.

Here is a demo using the [current latest (r113)](https://s3.amazonaws.com/static.sayduck.com/2020.02.06.rendering_tests/three_r113_test.html)
![](https://i.imgur.com/HQdxHm0.png)

Here is the [same scene before the IBL multi-scattering update (r104)](https://s3.amazonaws.com/static.sayduck.com/2020.02.06.rendering_tests/three_r104_test.html)
![](https://i.imgur.com/S0n2NmA.png)

And as a reference, here is the [same scene (using the same environment map converted to DDS) in BabylonJS](https://www.babylonjs-playground.com/#MITBWZ#1)
![](https://i.imgur.com/Ah0foCP.png)
Repository: pytorch
Issue: not able to import *  from fastai.vision  in Google collab
Labels: triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

run in Google collab
from fastai.vision import *

Error:
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-c0e76450f370> in <module>()
----> 1 from fastai.vision import *

5 frames
/usr/local/lib/python3.6/dist-packages/torchvision/models/inception.py in <module>()
      6 import torch.nn as nn
      7 import torch.nn.functional as F
----> 8 from torch.jit.annotations import Optional
      9 from torch import Tensor
     10 from .utils import load_state_dict_from_url

ImportError: cannot import name 'Optional'
Repository: TypeScript
Issue: Optional chaining should always include `undefined` in its resolved type
Labels: Suggestion,In Discussion

**TypeScript Version:**  3.7.5

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** optional chaining return type 

**Code**

I have a formatting function, where the input should always be a string, but in certain cases, from the backend, it's `undefined` for some reason. So to make sure the front-end at least doesn't crash when that happens, I added optional chaining, which fixed the issue.

But the types are kind of off now, and I didn't realize until now because Typescript didn't complain about anything.

```ts
export const formatAccountNumber = (account: string): string =>
  account?.replace(/^(\d{4})(\d{2})(\d{5})/, '$1 $2 $3');
```

**Expected behavior:** Should get an error/warning about _something_ here. Preferably, I guess optional chaining should always expand the type to include `undefined` to whatever it is added to? Then, in this example, Typescript could say that the return type is `string`, but I'm trying to return `string | undefined`? Either that, or maybe it shouldn't be possible to use optional chaining on a value that does not include either the type `undefined` and/or `null`?

**Actual behavior:** No warnings or errors.

**Related Issues:** no
Repository: youtube-dl
Issue: zen.yandex.ru/media
Labels: site-support-request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.01.24. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2020.01.24**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://zen.yandex.ru/media/id/5beae6995521b800ab4e3e50/5e1c33f0aad43600ae4164d6


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->
Repository: godot
Issue: Borderless Windows Crash Desktop Environment
Labels: bug,platform:linuxbsd,topic:porting

**Godot version: 3.2**

**OS/device including version:** Linux Mint 19.3 Tricia x86_64

**Issue description:** Project > Project Settings... > Display > Window > Size: Borderless when set to True will cause Cinnamon Desktop to crash upon launching the game. When Cinnamon is restarted, game seems to work fine and not crash again.

**Steps to reproduce:** After setting Borderless "True", Play the project and click on anything inside the window.

**Minimal reproduction project:** it was tried with a scene composed of just a top Control node with a Panel child
Repository: rust
Issue: Coroutines should be able to implement `for<'a> Coroutine<&'a mut T>`
Labels: C-enhancement,T-compiler,A-coroutines,F-coroutines

With https://github.com/rust-lang/rust/pull/68524, the `Coroutine` trait has gained a type parameter for the resume argument. Currently, this parameter will not be inferred to a type with late-bound regions. In some cases, this is required for soundness. For example, this coroutine stores the resume argument across a `yield`, which means that it can not accept arbitrary lifetimes in it:

```rust
let coro = |arg: &mut bool| {
    yield ();
    *arg = true;
};
```

This coroutine ends up implementing `Coroutine<&'x mut bool>` with a specific `'x`, not `for<'x> Generator<&'x mut bool>`.

However, if the resume argument *doesn't* get stored inside the generator state, it should be fine for the coroutine to implement `for<'x> Coroutine<&'x mut bool>` instead.

This is already how closures behave, since they can also store their arguments inside upvars, so it shouldn't be terribly difficult to extend this to coroutines. It would be good to come up with lots of test cases beforehand though (perhaps inspired by the tests for closures).
Repository: rust
Issue: Different NaN types on mipsel and mips64el than on most other architectures
Labels: O-MIPS,T-libs-api,T-compiler,C-bug

The following tests fail on mipsel and mips64el architectures while succeeding most others.
```rust
#[cfg(test)]
mod tests {
    #[test]
    fn min() {
        assert_eq!(1f64.min(std::f64::NAN), 1f64);
    }
    #[test]
    fn max() {
        assert_eq!(1f64.max(std::f64::NAN), 1f64);
    }
}
```
It succeeded on mipsel up to stable 1.36.0 rustc, and started failing in 1.37.0 and newer. I'll attempt to use [cargo-bisect-rustc](https://github.com/rust-lang/cargo-bisect-rustc) track down the exact nightly version that introduced the change (might take some time because it's a qemu vm that is rather slow).

https://github.com/rust-lang/rust/issues/52897#issuecomment-582514493 was where the initial discussion started, but it seems to be worth a separate issue instead of creating noise there.

It looks as if the failing platforms have a signaling NAN (sNAN) in opposite to the succeeding ones with a quiet NAN (qNAN).
Repository: godot
Issue: Godot Standard version crashes when opening project created with Godot Mono version.
Labels: bug,topic:core,crash

**Godot version:** 3.2 Standard

**OS/device including version:** Ubuntu 19.10

**Issue description:** When opening a project using Godot Standard version that contains a C# script that listens to a signal, Godot crashes.

Specifically, there is a null pointer dereference, because the `Ref<Script>(script)->` operator returns a null pointer when called here:
https://github.com/godotengine/godot/blob/00f46452b0206afe6aca79b0c4cd4a205f99067b/core/object.cpp#L1439

It returns a null pointer, because when trying to cast the script object pointer to a `Script` pointer here:
https://github.com/godotengine/godot/blob/00f46452b0206afe6aca79b0c4cd4a205f99067b/core/object.h#L598-L610
In the Standard version, the C# script object is a `TextFile`, which is not derived from `Script`. In the Mono version, the C#  script object is a `CSharpScript`, which is derived from `Script`. Therefore, in the Standard version, `dynamic_cast<Script *>()` returns a null pointer.

**Steps to reproduce:** Use Godot Mono version to create a project with a C# script that connects to a signal. Open the project with Godot Standard version.

**Expected behaviour:** Warn the user that the project is a Mono project and cannot be edited with Godot Standard version.

**Minimal reproduction project:**
[Crash CSharp Script.zip](https://github.com/godotengine/godot/files/4170702/Crash.CSharp.Script.zip)
Repository: pytorch
Issue: F.max_pool*d/F.min_pool*d should support integer dtypes and bool tensors
Labels: triaged,module: pooling,function request

max_pool and min_pool are dilation and erosion operations which can be convenient in postprocessing, so binary masks input can happen in practice

Error: `RuntimeError: "max_pool2d_with_indices_out_cuda_frame" not implemented for 'Int'`

cc @heitorschueroff
Repository: vscode
Issue: Explore line-end-rendering of code lenses
Labels: feature-request,code-lens

This is about exploring to render code lenses not interleaved with source text but at the end line source lines. The reasoning is that it might impact code structure less but at the cost of discoverability, e.g with long lines code lens won't be visible by default. This is an exploration with unknown outcome and any result will surely be configurable so that existing behaviour can be kept the way it is today.
Repository: vue
Issue: $http.delete shows warning "avoid using JavaScript unary operator as property name"
Labels: improvement,has workaround,warnings,feat:compiler

### Version
2.6.11

### Reproduction link
[https://codepen.io/frOracle/pen/vYOEEVW](https://codepen.io/frOracle/pen/vYOEEVW)







### Steps to reproduce
use $http.delete in @click

### What is expected?
$http.delete is a function, not unary operator

### What is actually happening?
a warning "avoid using JavaScript unary operator as property name"

---
Related https://github.com/vuejs/vue/issues/5464

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: rust
Issue: Confusing additional warnings when hitting bindings_with_variant_name
Labels: C-enhancement,A-diagnostics,T-compiler

We're working through a Rust training from Ferrous at my company and one of my colleagues wrote some code that hit the `bindings_with_variant_name` warning. A reduced testcase looks like ([on playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=56cdb3e0474225c306c8a1ccd1272e3c)):
```rust
pub enum E {
    One,
    Two,
}

pub fn f(e: E) -> u32 {
    match e {
        One => 1,
        Two => 2,
    }
}
``` 

If you build this code you get the good `bindings_with_variant_name` warnings and then a slew of other warnings. My colleague got lost in the sea of warnings and didn't notice the ones at the top that explained the problem directly:
```
   Compiling playground v0.0.1 (/playground)
warning[E0170]: pattern binding `One` is named the same as one of the variants of the type `E`
 --> src/lib.rs:8:9
  |
8 |         One => 1,
  |         ^^^ help: to match on the variant, qualify the path: `E::One`
  |
  = note: `#[warn(bindings_with_variant_name)]` on by default

warning[E0170]: pattern binding `Two` is named the same as one of the variants of the type `E`
 --> src/lib.rs:9:9
  |
9 |         Two => 2,
  |         ^^^ help: to match on the variant, qualify the path: `E::Two`

warning: unreachable pattern
 --> src/lib.rs:9:9
  |
8 |         One => 1,
  |         --- matches any value
9 |         Two => 2,
  |         ^^^ unreachable pattern
  |
  = note: `#[warn(unreachable_patterns)]` on by default

warning: unused variable: `One`
 --> src/lib.rs:8:9
  |
8 |         One => 1,
  |         ^^^ help: consider prefixing with an underscore: `_One`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `Two`
 --> src/lib.rs:9:9
  |
9 |         Two => 2,
  |         ^^^ help: consider prefixing with an underscore: `_Two`

warning: variable `One` should have a snake case name
 --> src/lib.rs:8:9
  |
8 |         One => 1,
  |         ^^^ help: convert the identifier to snake case (notice the capitalization): `one`
  |
  = note: `#[warn(non_snake_case)]` on by default

warning: variable `Two` should have a snake case name
 --> src/lib.rs:9:9
  |
9 |         Two => 2,
  |         ^^^ help: convert the identifier to snake case: `two`

    Finished dev [unoptimized + debuginfo] target(s) in 0.55s
```

It'd be great if we could suppress those latter warnings in this case since we've already told the user what the exact problem is.

cc @estebank @skade
Repository: pytorch
Issue: test_baddbmm_cpu_float32 fails locally for me when built with DEBUG=1
Labels: module: tests,triaged,small

```
======================================================================
FAIL: test_baddbmm_cpu_float32 (__main__.TestTorchDeviceTypeCPU)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/users/ezyang/pytorch-tmp/torch/testing/_internal/common_device_type.py", line 197, in instantiated_test
    result = test(self, device_arg, dtype)
  File "/data/users/ezyang/pytorch-tmp/torch/testing/_internal/common_device_type.py", line 389, in only_fn
    return fn(slf, device, *args, **kwargs)
  File "test/test_torch.py", line 13558, in test_baddbmm
    self.assertEqual(res4, res * 3)
  File "/data/users/ezyang/pytorch-tmp/torch/testing/_internal/common_utils.py", line 862, in assertEqual
    assertTensorsEqual(x, y)
  File "/data/users/ezyang/pytorch-tmp/torch/testing/_internal/common_utils.py", line 832, in assertTensorsEqual
    self.assertLessEqual(max_err, prec, message)
AssertionError: tensor(1.3351e-05) not less than or equal to 1e-05 : 

----------------------------------------------------------------------
```

Version information:

```
Collecting environment information...
PyTorch version: 1.5.0a0+35b1486
Is debug build: Yes
CUDA used to build PyTorch: None

OS: CentOS Linux 7 (Core)
GCC version: (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
CMake version: version 3.14.0

Python version: 3.8
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] numpy==1.17.4
[pip] torch==1.5.0a0+35b1486
[conda] blas                      1.0                         mkl  
[conda] magma-cuda80              2.3.0                         1    soumith
[conda] mkl                       2019.4                      243  
[conda] mkl-service               2.3.0            py38he904b0f_0  
[conda] mkl_fft                   1.0.15           py38ha843d7b_0  
[conda] mkl_random                1.1.0            py38h962f231_0  
[conda] torch                     1.5.0a0+35b1486           dev_0    <develop>
```

cc @ezyang @gchanan @zou3519
Repository: material-ui
Issue: [Drawer] Mini variant with SwipableDrawer
Labels: new feature,component: drawer

There's an example in the [docs](https://material-ui.com/components/drawers/#mini-variant-drawer) on how to make a small drawer with only icons shown that can be expanded to its full width. 

Super useful on small screens. Unfortunately, this doesn't seem possible to implement with SwipableDrawer.

- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Summary 💡

If there was a way to keep the content of the swipable drawer in the dom when it's closed, then a similar example to that in the docs could be used.

## Motivation 🔦

Mini drawers are useful on small screens. Small screens usually have touch capabilities so people naturally want to open/close drawers by swiping.
Repository: rust
Issue: Borrow scope for pattern matches - again
Labels: A-borrow-checker,T-compiler,C-bug,fixed-by-polonius

This issue seems to be similar to [this one](https://stackoverflow.com/questions/23328702/rust-cannot-move-out-of-self-because-it-is-borrowed-error), but the referenced issue #6379, does not solve it:

[playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a80be0555b914552ed2071ebbf642610)

```rs
enum Either<A,B> {
    Left(A),
    Right(B)
}

enum Tree<'a, A, B> {
    ALeaf(A),
    BLeaf(B),
    ABranch(&'a mut Tree<'a, A, B>, A),
    BBranch(&'a mut Tree<'a, A, B>, B)
}

impl<'a, A: PartialOrd, B> Tree<'a, A ,B> {
    fn deep_fetch(&mut self, value: Either<A, B>) -> Result<&mut Self, (&mut Self, Either<A,B>)> {
        match (self, value) {
            (Tree::ABranch(ref mut a, ref v), Either::Left(vv)) if v > &vv => {
                a.deep_fetch(Either::Left(vv))
            }

            (this, _v) => Err((this, _v))
        }
    }
}
```

```
error[E0505]: cannot move out of `_` because it is borrowed
  --> src/lib.rs:20:14
   |
14 |     fn deep_fetch(&mut self, value: Either<A, B>) -> Result<&mut Self, (&mut Self, Either<A,B>)> {
   |                   - let's call the lifetime of this reference `'1`
15 |         match (&mut *self, value) {
16 |             (Tree::ABranch(ref mut a, ref v), Either::Left(vv)) if v > &vv => {
   |                            --------- borrow of value occurs here
17 |                 a.deep_fetch(Either::Left(vv))
   |                 ------------------------------ returning this value requires that borrow lasts for `'1`
...
20 |             (this, _v) => Err((this, _v))
   |              ^^^^ move out of value occurs here
```
Repository: go
Issue: x/tools/go/packages: loader doesn't handle/recognize "context canceled" error 
Labels: NeedsInvestigation,Tools

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.7 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mm/.cache/go-build"
GOENV="/home/mm/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/mm/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/mm/go/src/github.com/mmirolim/gtr/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build542977077=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
I used packages.Load function with Config.Context set. If context canceled and packages.loader in loadPackage function, appendError prints "internal error" message
https://github.com/golang/tools/blob/master/go/packages/packages.go#L791 
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
To reproduce error, we can inject delay in loader.loadRecursive/loadPackage function and 
modify testParseFileModifyAST, set context to config, which will be canceled before delay in loader.
https://github.com/golang/tools/blob/master/go/packages/packages_test.go#L870
### What did you expect to see?
no error messages in stdout


### What did you see instead?
..... many lines of ...
2020/02/07 16:18:23 internal error: error "context canceled" (*errors.errorString) without position
.....