sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: 'Can't find name' for enum type in generated .d.ts 
Labels: Bug,Domain: Declaration Emit

<!-- 🚨 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 `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.2.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
enum
.d.ts
Can't find name
**Code**
in A.ts.
```ts
export const enum EControl {
    NONE = 0,
    CONTROL3D,
    RESIZE3D,
}
const setControlActive = actionCreator<EControl>('setControlActive');

export default {
    setControlActive,
};
```

in B.ts.
```ts
import controlAXR from './A';

export default {
    ....controlAXR,
}
```

**Expected behavior:**
in generated B.d.ts, the EControl should have a import path.
```ts
...
{
    setControlActive: import("A").ASRAction<import("A").EControl>;
};
...
```
**Actual behavior:**
in generated B.d.ts. The EControl has no import path, the compiler will rise an error "Can't find name EControl".
```ts
...
{
    // Will get a ts error "Can't find name EControl"
    setControlActive: import("A").ASRAction<EControl>;
};
...
```

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: flutter
Issue: Apple CarPlay / Android Auto support?
Labels: c: new feature,engine,customer: crowd,P3,team-engine,triaged-engine

Status update: https://github.com/flutter/flutter/issues/26801#issuecomment-1013565542

----

As I understand, at least with Apple CarPlay, the apps are run strictly on the phone, so it isn't a case of Apple Watch nor tvOS which require bitcode.
I'm not sure about Android Auto as I don't own any Android device.

Is there any way to run Flutter app in car? Is it on a roadmap?
Repository: godot
Issue: iOS requires optional capability description strings
Labels: enhancement,platform:ios,topic:editor

In iOS there are a number of capabilities an application can have that require entries in the plist file that are presented to the user.

For instance, if Godot attempts to access the camera it will check for an entry called NSCameraUsageDescription. If it does not exist access will fail. If it does exist the string held within is presented to the user.

Apple doesn't seem to have a ready list of these, they are strewed around the help pages that describe all plist entries. 

This is a list I found on stackoverflow that seems like a good starting point:
```
NSCameraUsageDescription
NSBluetoothPeripheralUsageDescription
NSCalendarsUsageDescription
NSContactsUsageDescription
NSHealthShareUsageDescription
NSHealthUpdateUsageDescription
NSHomeKitUsageDescription
NSLocationAlwaysUsageDescription
NSLocationUsageDescription
NSLocationWhenInUseUsageDescription
NSAppleMusicUsageDescription
NSMicrophoneUsageDescription
NSMotionUsageDescription
kTCCServiceMediaLibrary
NSPhotoLibraryUsageDescription
NSRemindersUsageDescription
NSSiriUsageDescription
NSSpeechRecognitionUsageDescription
NSVideoSubscriberAccountUsageDescription
```
Repository: pytorch
Issue: Sparse matrix multiplication is too slow
Labels: module: sparse,triaged

I'm comparing it to SciPy and it is clearly too slow. It can be 100 times slower on CPU, which makes it quite unusable. My GPU improves the times but it is still very slow. I show you my benchmarks and the code I used.

CPU: i5 4690k @ 4.4GHz
GPU: GTX 1060

```
SIZE: 5000 DENSITY: 0.01 DEVICE: cpu
torch: 0.0306358 seconds
np:    0.000252247 seconds
torch/np: 121.452
----------------------------------------
SIZE: 5000 DENSITY: 0.01 DEVICE: cuda
torch: 0.0127137 seconds
np:    0.000259161 seconds
torch/np: 49.057
----------------------------------------

SIZE: 10000 DENSITY: 0.01 DEVICE: cpu
torch: 0.155527 seconds
np:    0.00106144 seconds
torch/np: 146.524
----------------------------------------
SIZE: 10000 DENSITY: 0.01 DEVICE: cuda
torch: 0.0476248 seconds
np:    0.000991583 seconds
torch/np: 48.0291
----------------------------------------

SIZE: 50000 DENSITY: 0.01 DEVICE: cpu
torch: 5.94856 seconds
np:    0.0456181 seconds
torch/np: 130.399
----------------------------------------
SIZE: 50000 DENSITY: 0.01 DEVICE: cuda
torch: 1.06403 seconds
np:    0.0419693 seconds
torch/np: 25.3527

SIZE: 50000 DENSITY: 0.0001 DEVICE: cpu
torch: 0.0423768 seconds
np:    0.000562191 seconds
torch/np: 75.3779
----------------------------------------
SIZE: 50000 DENSITY: 0.0001 DEVICE: cuda
torch: 0.0175352 seconds
np:    0.000589371 seconds
torch/np: 29.7524
----------------------------------------
```

```python
import torch
import numpy as np
from scipy import sparse
import time

size = 50000
density = 0.0001
device = 'cuda'
print('SIZE:', size, 'DENSITY:', density, 'DEVICE:', device)

A = sparse.rand(size, size, format='coo', density=density).astype(np.float32)
b = torch.rand(size, 1, device=device)

values = A.data
indices = np.vstack((A.row, A.col))

i = torch.LongTensor(indices)
v = torch.FloatTensor(values)
shape = A.shape

A_torch = torch.sparse.FloatTensor(i, v, torch.Size(shape)).to(device)

s = time.time()
A_torch.mm(b)
t_torch = time.time() - s
print('torch: {:g} seconds'.format(t_torch))

b = b.cpu().numpy()

s = time.time()
A.dot(b)
t_np = time.time() - s
print('np:    {:g} seconds'.format(t_np))

print('torch/np: {:g}'.format(t_torch / t_np))
print('-'*40)
```



cc @nikitaved @pearu @cpuhrsch @IvanYashchuk
Repository: kubernetes
Issue: Provide a cluster wide security audit
Labels: kind/feature,lifecycle/frozen,wg/security-audit

<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:

It would be nice to have a cluster wide security audit to improve security of deployed cluster in the world. This feature request is highly inspired by introduced [npm audit](https://docs.npmjs.com/cli/audit) command for npm and [this](https://www.cncf.io/blog/2019/01/14/9-kubernetes-security-best-practices-everyone-must-follow/) blog post, which mention [CVE-2018-1002105](https://nvd.nist.gov/vuln/detail/CVE-2018-1002105).

**Why is this needed**:

It's needed to help to deploy secure clusters with ongoing security audit.

I'm aware of amazing [kube-bench](https://github.com/aquasecurity/kube-bench), but I'm very biased about security and I think that such functionality should be provided out of the box with tight integration with the core. Furthermore, I think it would be nice to have an API, which can be implemented by different functionality provider like Storage, Ingress etc. to provide checks. Ideally, that security metrics can be picked up by CI to manage white list and mailing on new threats.

What do you think?
Repository: godot
Issue: Setting Resource as key to Dictionary turns key unreadable in narrower inspector
Labels: enhancement,topic:editor,usability

**Godot version:**
3.1 Beta

**OS/device including version:**
OSX Mojave


**Issue description:**
Setting resource as key to Dictionary makes it unreadable in a narrower inspector.
Example before adding to the dictionary:

<img width="338" alt="captura de ecra 2019-01-19 as 20 22 39" src="https://user-images.githubusercontent.com/10358443/51431975-6fb65280-1c28-11e9-9e16-8102644afccb.png">

Example after adding to the dictionary:

<img width="328" alt="captura de ecra 2019-01-19 as 20 22 50" src="https://user-images.githubusercontent.com/10358443/51431980-86f54000-1c28-11e9-8e2b-a62d1426fe46.png">

Right now as you can see the key is added as:

**Resource([full file path])**

and it could be added as:

**[object icon][file name]**

like it happens with other displays (i.e: arrays)
Repository: pytorch
Issue: how to implement crf predict for segmentation task in Caffe2?
Labels: caffe2
Repository: rust
Issue: Assertion fails in doc example for std::thread::sleep() in 1.32.0 stable
Labels: O-windows,T-libs-api,C-bug,A-time

The description of [std::thread::sleep()](https://doc.rust-lang.org/stable/std/thread/fn.sleep.html) says:

> Puts the current thread to sleep for at least the specified amount of time.
The thread may sleep longer than the duration specified due to scheduling specifics or platform-dependent functionality. It will never sleep less.

and it gives the example code:

```rust
use std::{thread, time};

let ten_millis = time::Duration::from_millis(10);
let now = time::Instant::now();

thread::sleep(ten_millis);

assert!(now.elapsed() >= ten_millis);
```

But this assertion often fails when I run this code.

If the description is correct and it shouldn't fail, it happens on Windows 7 32 bit, **`stable-i686-pc-windows-gnu`**`- rustc 1.32.0 (9fda7c223 2019-01-16)`


## **EDIT:**


Though, the expected behaviour can be achieved with this wrapper function:
```rust
use std::time::{Duration, Instant};
use std::thread::sleep;

fn sleep_noless(wanted_sleep: Duration) {
    let now = Instant::now();
    let mut slept_total = now.elapsed();
    while slept_total < wanted_sleep {
        sleep(wanted_sleep - slept_total);
        slept_total = now.elapsed();
    }
}
```
Repository: rust
Issue: Can't assign results of generic functions to `const` variables
Labels: A-type-system,A-diagnostics,A-trait-system,T-lang,C-bug,needs-rfc,T-types

```rust
fn foo<T:Default>() {
    const bar : T = T::default();
}
```
gives the following error (twice for some reason):

```
$ cargo +nightly build
   Compiling arrys_sizeoof v0.1.0 (C:\work\trash\repros\arrys_sizeoof)
error[E0401]: can't use type parameters from outer function
 --> src\lib.rs:2:17
  |
1 | fn foo<T:Default>() {
  |    --- - type variable from outer function
  |    |
  |    try adding a local type parameter in this method instead
2 |     const bar : T = T::default();
  |                 ^ use of type variable from outer function

error[E0401]: can't use type parameters from outer function
 --> src\lib.rs:2:21
  |
1 | fn foo<T:Default>() {
  |    --- - type variable from outer function
  |    |
  |    try adding a local type parameter in this method instead
2 |     const bar : T = T::default();
  |                     ^^^^^^^^^^ use of type variable from outer function

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0401`.
error: Could not compile `arrys_sizeoof`.

To learn more, run the command again with --verbose.

```

Changing let to `const` to `let` makes it compile just fine.

Another, slightly different example:

```rust
fn get_size<T:Sized>() {
    const size : usize = std::mem::size_of::<T>();
}
```
Here, the type of the variable is non-generic now, and it's only a function that is. Results in the same error, but only once now:
```
$ cargo +nightly build
   Compiling arrys_sizeoof v0.1.0 (C:\work\trash\repros\arrys_sizeoof)
error[E0401]: can't use type parameters from outer function
 --> src\lib.rs:2:46
  |
1 | fn get_size<T:Sized>() {
  |    -------- - type variable from outer function
  |    |
  |    try adding a local type parameter in this method instead
2 |     const size : usize = std::mem::size_of::<T>();
  |                                              ^ use of type variable from outer function

error: aborting due to previous error

For more information about this error, try `rustc --explain E0401`.
error: Could not compile `arrys_sizeoof`.

To learn more, run the command again with --verbose.
```


P.s.: if this is the desired behavior, it is confusing, since 1) changing `const` to `let` should not result in *type* error, 2) `rustc --explain E0401`  doesn't mention anything close - all the examples are about definition of new functions/types inside the function body (and it's unclear how to adapt that knowledge to this particular use case).

P.p.s.: the behavior is exactly the same on current stable (1.32.0)
Repository: go
Issue: doc: second return value of syscall.Syscall needs to be documented
Labels: Suggested,Documentation,NeedsFix

I'm using Go 1.11.2 on 32 bit Windows.

[Current documentation](https://golang.org/pkg/syscall/?GOOS=windows#Syscall) of `Syscall*` doesn't give any sense about second return value `r2`. And in most cases, this value seems not needed at all. But Go codebase internally uses it:
https://github.com/golang/go/blob/5538a9a34fc4e395967c0233aab5bdde0cebbf9b/src/runtime/syscall_windows_test.go#L103-L118

And if I understood correctly, the second value is needed only when dealing with APIs that use 64 bit values(e.g. [VerSetConditionMask](https://docs.microsoft.com/en-us/windows/desktop/api/winnt/nf-winnt-versetconditionmask)). Since `uintptr` is 32 bit integer and can't hold those APIs' result, the second return value `r2` is used. But there isn't any documentation about return values from `syscall.Syscall*` that tells which one holds highest 32 bits, etc.

Also the arguments for those APIs seems to be merged(see code above) when dealing with 64 bit values. Without knowing that, I met a horrible panic that doesn't tell any meaningful reason. So it'd be good if these behaviors are well documented.
Repository: vscode
Issue: Input variables only work with one configuration in a compound launch config
Labels: bug,debug

- VSCode Version: VSCode 1.30.2
- OS Version: Windows 10 Pro

**Steps to reproduce**
1. Create a launch.json that has two configs, each referencing an input variable
2. Create a compound using both of those two configs
3. Launch the compound task.

**Expected**: User is prompted to select input variable, input variable is passed to all configs in the compound and all tasks in the compound are run.

**Actual**: User is prompted to select input variable, only the last config in the compound is run.


Example launch.json:

```
{
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceFolder}/hey.js",
            "env": {
                "Test": "${input:componentType}"
            }
        },
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program2",
            "program": "${workspaceFolder}/hey2.js",
            "env": {
                "Test": "${input:componentType}"
            }
        }
    ,],
    "compounds": [
        {
            "name": "Compound",
            "configurations": ["Launch Program", "Launch Program2"]
        }
    ],
    "inputs": [
        {
            "id": "componentType",
            "description": "What type of component do you want to create?",
            "default": "component",
            "type": "pickString",
            "options": ["component", "directive"]
        }
    ]
}
```

hey.js/hey2.js:

```
debugger;
console.log('foo');
```
Repository: go
Issue: cmd/go: invalidate cached binaries when statically-linked external libraries change
Labels: NeedsInvestigation,FeatureRequest

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

go 1.11.4

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

amd64

### What did you do?

We have a number of C libraries that need to be linked externally. We did it by manually passing `CGO_LDFLAGS` in the build process. Whenever we change the library, go cache does not detect the changes and thus the binary is not always relinked.

Turning GOCACHE off and deleting the binary will solve the problem. As go 1.12 will require the cache to be turned on, the workaround will no long work. What would be the best way to go forward?
Repository: godot
Issue: Time going backwards
Labels: bug,topic:core

<!-- 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.1 beta2


**Issue description:**
<!-- What happened, and what was expected. -->
See the screenshot attached.

<img width="557" alt="screen shot 2019-01-20 at 15 12 20" src="https://user-images.githubusercontent.com/961822/51439643-e5bcc700-1cc5-11e9-9b91-75b004e4a29b.png">
Repository: rust
Issue: Compiler should be able to compile EnumVariant(foo) == function_returning_enum() without PartialEq
Labels: T-lang,C-feature-request,needs-rfc

Given this pseudocode
```
let result: bool = Ok(something) == some_function_returning_result();
```
It should be transformed to this pseudocode
```
let result: bool = match some_function_returning_result() {
    Ok(something) => true,
    _ => false,
};
```
Currently I get this error.
```
error[E0277]: can't compare `errors::Error` with `errors::Error`
   --> src/rustup/toolchain.rs:349:35
    |
349 |                     Ok(something) == some_function_returning_result()
    |                                   ^^ no implementation for `errors::Error == errors::Error`
    |
    = help: the trait `std::cmp::PartialEq` is not implemented for `errors::Error`
    = note: required because of the requirements on the impl of `std::cmp::PartialEq` for `std::result::Result<std::string::String, errors::Error>`
```

It would be nice syntax sugar to have not only for `Result`, but for any generic enum.
Repository: angular
Issue: Child custom element's OnInit hook is called before parent's one
Labels: area: core,area: elements,state: confirmed,core: lifecycle hooks,P3

# 🐞 bug report

### Affected Package
The issue is caused by package @angular/elements


### Is this a regression?

Dunno

### Description

Wrong OnInit hooks call order when custom elements (parent + child) are added with some delay after (regular) angular component inited.


## 🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-elements-init-order?file=app%2Fapp.component.html

1. on toggle
```
> child OnInit
> parent OnInit
```
2. same wrong order on replacing `*ngIf="visible"` with `*ngIf="true"`
3. same wrong order on uncommenting `window.setTimeout` with `innerHTML` usage in AppComponent's OnInit hook
4. correct order on removing `<ng-container *ngIf="visible">`
```
> parent OnInit
> child OnInit
```

## 🌍  Your Environment

**Angular Version:**
7.1.4

**Anything else relevant?**

No such issue with native custom elements and `setTimeout` + `innerHTML` usage
https://stackblitz.com/edit/custom-elements-init-order?file=index.ts
```
> parent connected
> child connected
```

Real word use-case: adding unknown markup with custom elements from api response.
Repository: go
Issue: spec: arithmetic on complex numbers is underspecified
Labels: ExpertNeeded,NeedsInvestigation

I can't find much about the precise behavior of floating point and complex arithmetic (`+`, `-`, `*`, `/`). For floating point this is relatively easy. For complex numbers, not so much, due to special numbers (Infinity, -Infinity, NaN) and rounding: https://medium.com/@smcallis_71148/complex-arithmetic-is-complicated-873ec0c69fc5.

Would it be possible to better specify the exact behavior of complex numbers, or point to the relevant spec? It appears that IEEE-754 doesn't say anything about complex numbers.
Of course, one can take a look at the [source code of the compiler](https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/ssa.go#L2020), but I would expect such details to be included in the specification.

Background: I am working on a compiler for the Go language called [TinyGo](https://github.com/aykevl/tinygo). I would like to implement complex arithmetic but I'm not sure how it is supposed to be implemented.
Repository: rust
Issue: impl Fn with explicit lifetimes does not implement FnOnce
Labels: A-type-system,T-compiler,T-types

```rust
pub fn wrap_impl_trait<'c, 'i, I: 'i, O: 'i>(
    f: impl Fn(&'i I) -> &'i O + 'c,
) -> impl Fn(&'i I) -> &'i O + 'c {
    f
}
pub struct Outer(Inner);
struct Inner;

impl Outer {
    fn field(&self) -> &Inner {
        &self.0
    }
}

impl Inner {
    fn hello_world<'r, R, N>(this: N)
    where
        N: Fn(&R) -> &Self,
    {
        println!("Hello, World!");
    }
}

pub fn foo(m: &Outer) {
    let n = wrap_impl_trait(Outer::field);
    Inner::hello_world(n);
}
```
```
error: implementation of `std::ops::FnOnce` is not general enough
  --> src/lib.rs:26:5
   |
26 |     Inner::hello_world(n);
   |     ^^^^^^^^^^^^^^^^^^
   |
   = note: Due to a where-clause on `Inner::hello_world`,
   = note: `impl std::ops::Fn<(&Outer,)>` must implement `std::ops::FnOnce<(&Outer,)>`
   = note: but `impl std::ops::Fn<(&'0 Outer,)>` only implements `std::ops::FnOnce<(&Outer,)>` for the lifetime `'0`
```
[Playground](https://play.rust-lang.org/?version=beta&mode=debug&edition=2018&gist=7b721d819612b7673104e9153f4b8fa7)

Replacing wrap_impl_trait with the following works (Removing explicit `'i`)
```rust
pub fn wrap_impl_trait<'c, I, O>(
    f: impl Fn(& I) -> &O,
) -> impl Fn(& I) -> & O + 'c {
    f
}
```

Sometimes, explicitly annotating with `'i` is required, for example when chaining two closures.
Repository: rust
Issue: VaList: Allow VaList::arg to fetch bool values
Labels: C-enhancement,A-FFI,T-libs,F-c_variadic

## Summary

`VaList::arg::<bool>()` should work.

## Description

According to [<stdbool.h>] `false` is `0` and `true` is `1`. As long as our encoding of `bool` is the same, we should allow `VaList::arg::<bool>()`. Since we take care of types smaller than an `int` in the codegen, this *should* work.

Related to: #44930 

CC @alexcrichton @joshtriplett 

[<stdbool.h>]: http://pubs.opengroup.org/onlinepubs/009604499/basedefs/stdbool.h.html
Repository: vscode
Issue: Windows uninstaller should have option to also remove user data dir and extensions dir
Labels: help wanted,feature-request,install-update,windows

I tried to uninstall / Reinstall `Code Insider` because of a recurring Error/Crash at "startup/reloaded" (Update / Reboot / proper exit), disabling extensions and remove all custom settings did not fixed it
Before re-installing i wanted to be sure i has no crap left that code have hurted `Code Insiders` .... surprise surprise ....

- VSCode Version: Latest of `Code` and `Code Insider`
- OS Version: `Windows 10`

Steps to Reproduce:

1. Install it
2. Add extensions
3. Change settings
4. Use it
5. Update it
6. Uninstall it
7. Be curious on what's left

![image](https://user-images.githubusercontent.com/2266487/51462007-dd18cf00-1d5f-11e9-80ac-51fd683e7752.png)


On top of that, i uninstalled extensions long time ago and they were still on disk, here is what `code-insiders --list-extensions` output :

```
Angular.ng-template
bierner.markdown-preview-github-styles
eamodio.gitlens
EditorConfig.EditorConfig
eg2.tslint
formulahendry.dotnet-test-explorer
GitHub.vscode-pull-request-github
humao.rest-client
icsharpcode.ilspy-vscode
Ionide.Ionide-fsharp
mitchdenny.ecdc
ms-azuretools.vscode-azurefunctions
ms-vscode.azure-account
ms-vscode.cpptools
ms-vscode.csharp
ms-vscode.PowerShell
ms-vsts.team
msjsdiag.debugger-for-chrome
PeterJausovec.vscode-docker
ryanluker.vscode-coverage-gutters
Tyriar.sort-lines
VisualStudioExptTeam.vscodeintellicode
```