sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: gccgo: aliases of *T should be embeddable if T is a defined type which is neither pointer nor interface
Labels: NeedsInvestigation

I create this issue per [@ianlancetaylor's suggestion](https://github.com/golang/go/issues/22005).

### What version of Go are you using (`go version`)?

<pre>
$ gccgo --version
gccgo (Debian 8.3.0-6) 8.3.0
</pre>

### Does this issue reproduce with the latest release?

yes.

### What did you do?

```golang
package main

type P1 = *bool
type P2 = *struct{}

type T struct {
	P1
	P2
}

func main() {}
```

### What did you expect to see?

Compiles okay.

### What did you see instead?

Doesn't compile.
Repository: TypeScript
Issue: Codefix: removing inferable types
Labels: Suggestion,Awaiting More Feedback,Domain: Quick Fixes

## Search Terms

inferable types no-inferable-types no-inferrable-types removal

## Suggestion

It is somewhat unnecessary to add `:` type declarations for member, parameter, and/or variable types already inferable from code. 

```ts
// This type declaration actually requests a lower amount of type information,
// as `number` is less specific (narrow) than `3`
const value: number = 3;
```

It'd be nice to have a codefix to remove them to clean up code. 

## Use Cases

These unnecessary type declarations can easily get introduced in code as it gets changing during editing, and can cause visual clutter.

We should note that some users choose to prefer including these inferable type declarations as a style preference to increase the amount of type information visible purely from source code.

The [@typescript-eslint/no-inferable-types](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md) already exists with an auto-fixer for a good starting reference.

## Examples

**Variables** such as the above `value` can generally have their type removed if either is true:

* The variable is `let`, contains an initializer, and the type is the same as what it would be inferred as
    ```ts
    // We can remove `: number` here
    let value: number = 0;

    // We cannot remove `: number | string`, as `| string` is not added by TypeScript
    let otherValue: number | string = 0;
    ```

* The variable is `const` and the type is less narrow than what the type is inferred as

**Parameters** can similarly be treated as `let` parameters:

```ts
// The `: string` can be safely removed
function takesStringWithDefault(input: string = "") { }
```

Parameters can also have type declarations removed if their parent function is already declared to be a type that provides the same type declaration for the parameter:

```ts
type TakesString = (input: string) => void;

// We can remove the `: string` here too
const takesString: TakesString = (input: string) => {};
````

**Class members** can be treated as `let` variables here too.

```ts
class WithValue {
    // We can remove the `: string` here
    value: string = "";
}
```

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: node
Issue: `in` operator not working correctly when using Proxy as VM context
Labels: vm,v8 engine

<!--
Thank you for reporting a possible bug in Node.js.

Please fill in as much of the template below as you can.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify the affected core module name

If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you can.
-->

* **Version**: v12.13.1
* **Platform**: Windows 10

<!-- Please provide more details below this comment. -->

The `in` operator does not work correctly when using a Proxy as a VM context.

```js
var o = {};
var p = new Proxy(o, {
    has(target, key) {
        console.log('has', key);
        return Reflect.has(target, key);
    },
    get(target, key, receiver) {
        console.log('get', key);
        return Reflect.get(target, key, receiver);
    },
});
vm.createContext(p);
vm.runInContext(`this.abcInThis = 'abc' in this`, p);
console.log(JSON.stringify(o)); // Prints {"abcInThis":false}
```

In the above code, the expected output is:
```
has abc
{"abcInThis":false}
```
but the actual output is:
```
get abc
{"abcInThis":true}
```

If we remove the `get(target, key, receiver)` function, the still incorrect output is:
```
{"abcInThis":false}
```
Repository: flutter
Issue: Change camera `CameraController` `takePicture` API to optionally pass in the path where the image should be saved
Labels: d: stackoverflow,p: camera,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

````dart
final path = join((await getTemporaryDirectory()).path, '${DateTime.now()}.png');
void value = await controller.takePicture(path);
File file = File(path);
````

Hello Flutter Team! and Community!
I'm just want to know if we can do something like this? (Code Below to reduce boilerplate)

````dart
final path = join((await getTemporaryDirectory()).path, '${DateTime.now()}.png');
File file = await controller.takePicture(path);
````

It will be great if takePicture future directly return the captured file :)
Repository: pytorch
Issue: [mac] Failure to import torch
Labels: triaged,module: macos

## 🐛 Bug

Failure to import torch in Jupyter Lab

## To Reproduce

Steps to reproduce the behavior:

1. conda install pytorch torchvision -c pytorch
2. import torch

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-eb42ca6e4af3> in <module>
----> 1 import torch

/Library/anaconda/lib/python3.6/site-packages/torch/__init__.py in <module>
     79 del _dl_flags
     80 
---> 81 from torch._C import *
     82 
     83 __all__ += [name for name in dir(_C)

ImportError: dlopen(/Library/anaconda/lib/python3.6/site-packages/torch/_C.cpython-36m-darwin.so, 9): Library not loaded: @rpath/libiomp5.dylib
  Referenced from: /Library/anaconda/lib/python3.6/site-packages/torch/lib/libshm.dylib
  Reason: image not found

                                                                                                                                                   
## Expected behavior

PyTorch should be imported.

## Environment

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A

OS: Mac OSX 10.15.1
GCC version: Could not collect
CMake version: Could not collect

Python version: 3.6
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.15.4
[pip3] numpydoc==0.8.0
[pip3] torch==1.3.1
[pip3] torchvision==0.4.2
[conda] _tflow_select             2.3.0                       mkl    anaconda
[conda] mkl                       2019.5                intel_281    intel
[conda] mkl-service               1.1.2                    py36_3    https://repo.anaconda.com/pkgs/free
[conda] pytorch                   1.3.1                   py3.6_0    pytorch
[conda] tensorflow                1.14.0          mkl_py36h933f829_0    anaconda
[conda] tensorflow-base           1.14.0          mkl_py36h655c25b_0    anaconda
[conda] torchvision               0.4.2                  py36_cpu    pytorch

## Additional context

I also checked this thread: https://github.com/pytorch/pytorch/issues/4989
However, with  "conda install -c intel mkl", the same error still occurs when importing.

I had no problem with installing using conda in ubuntu.
Repository: angular
Issue: The possibility of setting Timeouts with HttpClient
Labels: feature,area: common/http,feature: in backlog

<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅

Oh hi there! 😄 

To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.

🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->


# 🚀 feature request

### Relevant Package
<!-- Can you pin-point one or more @angular/* packages the are relevant for this feature request? -->
<!-- ✍️edit: --> This feature request is for @angular/common/http


### Description
<!-- ✍️--> Angular's [HttpClient](https://angular.io/guide/http) has no timeout feature. Using alternative solutions like HTTPInterceptors or RxJS for this purpose a connection timeout functionality cannot be achieved. See: https://stackoverflow.com/questions/59348500/is-there-an-http-connection-timeout-in-client-side-js-angular


### Describe the solution you'd like
<!-- ✍️--> Angular's HttpClient could use and expose [XMLHttpRequest.timeout](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout) that would make this possible.


### Describe alternatives you've considered
<!-- ✍️--> HTTPInterceptors, RxJS timeouts, custom HTTP client implementation
Repository: TypeScript
Issue: Transpiling async/await to generators instead of es6-Generator-function for es6
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 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 FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
async await es6 transpile generator
## Suggestion

<!-- A summary of what you'd like to see added or changed -->
If there was a compile option that i can tell the compiler to emit generators instead of es6-Generator-function when targeting es6. 
## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->
   I have to use 3rd-party libs that implemented in es6，so targeting es5 will not work. But i can't write  code with async/await when targeting es6 because the platform on which to run the app dose not support yield/funtion* (but other es6 features's ok). 
## Examples

<!-- Show how this would be used and what the behavior would be -->

## Checklist

I try [Babel](https://babeljs.io/) and [regenerator](https://github.com/facebook/regenerator), all of them transpile es6 code into es5(or other version), but then I can't use 3rd-party libs. Work round is applying transpilation on libs too. 

My suggestion meets these guidelines:

* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: electron
Issue: Allow localization of 'Cancel' button in Open and Save dialogs
Labels: enhancement :sparkles:

### Problem Description
Hi guys! 
I'm working on localization of electron application and faced a problem with localization 'Cancel' button in Open and Save dialogs. There is property `buttonLabel` for 'Save'/'Open' button, so when the language is, for example, Japanese, the 'Save'/'Open' button is translated and the 'Cancel' isn't, which looks confusing.

### Proposed Solution
Add the ability to customize the button's label.

### Additional Information
I've seen the similar issue https://github.com/electron/electron/issues/19663, however, it was related to Linux.

Thanks!
Repository: rust
Issue: `==` after unsafe block is not correctly recognized
Labels: C-enhancement,T-compiler,A-suggestion-diagnostics

Given the following code:
```rust
let mut a = std::mem::MaybeUninit::new(10);
unsafe { std::ptr::read(a.as_ptr()) } == 10;
```
Rust reports error:
```
error: expected expression, found `==`
 --> src/main.rs:3:43
  |
3 |     unsafe { std::ptr::read(a.as_ptr()) } == 10;
  |                                           ^^ expected expression
```

However, if I change `==` to `+`, Rust would instead mentions that a pair of parens should be added to wrap the block:
```
error: expected expression, found `+`
 --> src/main.rs:3:43
  |
3 |     unsafe { std::ptr::read(a.as_ptr()) } + 10;
  |     ------------------------------------- ^ expected expression
  |     |
  |     help: parentheses are required to parse this as an expression: `(unsafe { std::ptr::read(a.as_ptr()) })`
```

I guess the error message should probably be updated for the `==` case as well.

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":null}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: flutter
Issue: Flutter does not render in firefox extension popup
Labels: c: crash,engine,platform-web,browser: firefox,P2,team-web,triaged-web


## Steps to Reproduce

1. Clone https://github.com/billy1380/flutter_firefox_extension
2. Install the extension (prebuilt files located in the extension folder)
Note: the extension is installable in both firefox and chrome
3. Click on the flutter icon
In Firefox

![image](https://user-images.githubusercontent.com/1329727/70909411-5cad2d80-2005-11ea-9b45-845014079a53.png)

In Chrome

![image](https://user-images.githubusercontent.com/1329727/70909496-85cdbe00-2005-11ea-82a0-356217453417.png)

**Target Platform:**
Web
**Target OS version/browser:**
Linux firefox, and Linux Chrome

## flutter analyze

```
flutter analyze
Analyzing flutter-firefox-plugin...                                     
No issues found! (ran in 2.4s)
```

## flutter doctor -v

```
flutter doctor -v
[✓] Flutter (Channel master, v1.13.3-pre.23, on Linux, locale en_GB.UTF-8)
    • Flutter version 1.13.3-pre.23 at /home/billy1380/git/flutter-linux/flutter
    • Framework revision c06bf6503a (3 days ago), 2019-12-13 17:42:35 -0500
    • Engine revision e0e0ac0a68
    • Dart version 2.8.0 (build 2.8.0-dev.0.0 45db297095)

⣽Error 1 retrieving device properties for ro.product.cpu.abi:
error: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [http://developer.android.com/tools/device.html] for more information


 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /home/billy1380/android-sdk-linux
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /home/billy1380/android-sdk-linux
    • ANDROID_SDK_ROOT = /home/billy1380/android-sdk-linux
    • Java binary at: /home/billy1380/Downloads/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang++ 9.0.0
    • GNU Make 4.2.1

[✓] Android Studio (version 3.5)
    • Android Studio at /home/billy1380/Downloads/android-studio
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.40.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.7.1

[✓] Connected device (4 available)
    • 891Y036PE  • 891Y036PE  • android-arm    • Android null (API null)
    • Linux      • Linux      • linux-x64      • Linux
    • Chrome     • chrome     • web-javascript • Google Chrome 79.0.3945.79
    • Web Server • web-server • web-javascript • Flutter Tools

• No issues found!
```
Repository: pytorch
Issue: quantization - Missing operations needed for object detection
Labels: oncall: quantization,triaged

Any sample code of object detection quantization?
 I got the following errors when I try to quantized the faster-rcnn. 

Could not run 'aten::empty_strided' with arguments from the 'QuantizedCPUTensorId' backend. 'aten::empty_strided' is only available for these backends: [CPUTensorId, VariableTensorId]


Could not run 'aten::div.Tensor' with arguments from the 'QuantizedCPUTensorId' backend. 'aten::div.Tensor' is only available for these backends: [CPUTensorId, SparseCPUTensorId, VariableTensorId].



cc @jerryzh168 @jianyuh @dzhulgakov @raghuramank100 @jamesr66a @vkuzo
Repository: TypeScript
Issue: Generated code when re-exporting a const enum inside a namespace using "preserveConstEnums": true leads to a runtime error
Labels: Bug,Help Wanted

**TypeScript Version:**  3.8.0-dev.20191216

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** const enum import export preserveConstEnums

**Code**

MyEnum.ts
```ts
const enum MyEnum {
    FirstValue,
    SecondValue
}
export default MyEnum;
```
ImportExportInNamespace.ts
```ts
import _MyEnum from "./MyEnum";
export namespace MyNamespace {
    export import MyEnum = _MyEnum;
}
```

App.ts
```ts
import { MyNamespace } from "./ImportExportInNamespace";
console.log(MyNamespace.MyEnum.FirstValue);
```

Compile the above using
```json
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "preserveConstEnums": true
  }
}
```

**Expected behavior:**
ImportExportInNamespace.ts compiles to
```js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MyEnum_1 = require("./MyEnum");
var MyNamespace;
(function (MyNamespace) {
    MyNamespace.MyEnum = MyEnum_1.default;
})(MyNamespace = exports.MyNamespace || (exports.MyNamespace = {}));
```

**Actual behavior:**
ImportExportInNamespace.ts wrongly compiles to
```js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MyNamespace;
(function (MyNamespace) {
    MyNamespace.MyEnum = MyEnum_1.default;
})(MyNamespace = exports.MyNamespace || (exports.MyNamespace = {}));
```
i.e. we are missing
```js
var MyEnum_1 = require("./MyEnum");
```
If I change the `enum` not to be a `const` the code compiles correctly. I'm using it as a workaround.

**Related Issues:**
[#23514](https://github.com/microsoft/TypeScript/issues/23514)
Repository: pytorch
Issue: Ability to download docs HTML for offline use
Labels: module: docs,triaged

## 🚀 Feature
It would be excellent to have a button to download the docs for offline use, from the main docs page. This is an included feature on Sphinx. For example: on [Flask's docs](http://flask.palletsprojects.com/en/1.1.x/), if you click the floating green version in the lower right, there's a "download html" option.

## Motivation
Building the source to make the docs locally is very time consuming, and sometimes you want to learn something offline. My specific use-case is programming on a plane.
Repository: rust
Issue: Misleading message for [E0392] with associated types of trait bound
Labels: A-diagnostics,T-compiler,C-bug,A-variance

E0392 notifies the user that a type parameter is not being used, but it sometimes falsely identifies parameters as being unused **only when there is already another that is _actually_ unused.** I don't entirely understand expected behavior here, see the bottom for clarification.

For example, the [following code](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0eef8d9cbffb058857a4a17141e5dc60) (on 1.39.0 stable, 1.40.0-beta6, and 1.41.0-nightly) correctly fails to compile
```rust
trait MyTrait<A> {
    type Foo;
}

struct MyStructFails<A, B, M>
where
    M: MyTrait<A, Foo = B>,
{
    my_trait: M,
}
```
but it has the following error message
```
error[E0392]: parameter `A` is never used
 --> src/lib.rs:7:22
  |
7 | struct MyStructFails<A, B, M>
  |                      ^ unused parameter
  |
  = help: consider removing `A` or using a marker such as `std::marker::PhantomData`

error[E0392]: parameter `B` is never used
 --> src/lib.rs:7:25
  |
7 | struct MyStructFails<A, B, M>
  |                         ^ unused parameter
  |
  = help: consider removing `B` or using a marker such as `std::marker::PhantomData`
```
which notably includes `B` as an unused parameter. Clearly this isn't the case, because changing `MyStruct` to **only** add `PhantomData<A>` allows it to compile:
```rust
struct MyStructWorks<A, B, M>
where
    M: MyTrait<A, Foo = B>,
{
    my_trait: M,
    _marker: std::marker::PhantomData<A>,
}
```
and only adding `PhantomData<B>` does not get rid of the error. Tuple structs produce the same error.

Also notable is that this false identification only occurs for the associated type of the trait bound that `A` is being used in; this example produces the correct error:

[playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3ce493c9de74a12337dc59d227106db5)
```rust
trait Bar {
    type Foo;
}

trait MyTrait<T> {}

struct MyStruct<F, B, T, M>
where
    B: Bar<Foo = F>,
    M: MyTrait<T>,
{
    bar: B,
    my_trait: M,
}
```

---

#### Clarification

I'm not very familiar with what the expected behavior should be. If the [following code](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c0e52a80d118cc5b0d4da31f88f56fb5) should indeed give an error, it's just a diagnostics bug.
```rust
trait MyTrait<T> {}

struct MyStructFails<T, M: MyTrait<T>> {
    inner: M,
}
```
Repository: flutter
Issue: Reduce usage of context getters and globals in the flutter tool
Labels: team,tool,P3,team-tool,triaged-tool

Internal: b/139713315

The flutter_tool currently makes heavy usage of context getter globals to inject objects throughout the tool for both configuration and testability issues. For example:

```
Foo get foo => context.get<Foo>();

class Bar {

  void doThing() {
    foo.fizz(); // context global
  }
}

```

This is making it more difficult than necessary to unit test tooling code. Besides mocking foo, we must also ensure the context injection is correct which leads to a significant amount of boilerplate configuration for each test case. Mistakes in this boilerplate can lead to tests silently doing the wrong thing.

Previously I attempted to clean this up with the Testbed class, but this hasn't succeeded it  simplifying the test cases.

Instead, we should gradually reduce our usage of these context getters which removes the need for the test configuration and makes it more explicit which instances are being used for tests. For example, rewriting the snippet above becomes:

```
class Bar {
  Bar({Foo foo}) : _foo = foo;

  final Foo _foo;

  void doThing() {
    _foo.fizz();
  }
}
```

To ensure we don't regress in usage of context getters, we can use the forthcoming `testWithoutContext` test method that throws if `context.get` is invoked. See also https://github.com/flutter/flutter/pull/45739

cc @zanderso