sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: isolatedModules doesn't respect enabled preserveConstEnum option what the project might be build with
Labels: Suggestion,Awaiting More Feedback,Fix Available

## Search Terms

isolatedModules, preserveConstEnum, const enum

## Suggestion

The compiler should respect/understand that the package/module was compiled with enabled `preserveConstEnums` compiler option.

## Use Cases

Let's say we have a project written in TypeScript, which uses const enums.

The project uses them because the main `const enum`'s advantage is inlining values instead of runtime accessing to the value.

In other hand the maintainers understand that const enums compiles in nothing in JS code, and that means that consumers can't use a const enums in their JS code (in some cases in TS code either, see above). Thus, they decided to enable `preserveConstEnums` compiler option to leave all const enums in JS code and allow consumers use them as well.

Up to this moment everything is good. But the next who appears on the stage is `isolatedModules` (say hello to `create-react-app`, webpack's transpile-only mode, `transpileModule` compiler's API and so on). This compiler option is used to detect that imported module could be transpiler without compilation into JS code and everything will work well. One of checks for this option is that you don't import const enums (error `TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided`).

To summarize, if the project/package is compiled with enabled `preserveConstEnums`, in `isolatedModules` mode the compiler shouldn't fail with error about unavailability of using const enums, because that's not actually true.

## Examples

Quite possible we need to provide that information to the compiler somehow (by providing tsconfig.export.json or in package.json for instance), but I don't even know how it would be done.

## 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: pytorch
Issue: TensorOptions shouldn't provide default values
Labels: triaged,better-engineering

TensorOptions shouldn't be in the business of providing default values for missing properties. 

TensorOptions provides a simple kwargs-like structure for ferrying around the bundle of Tensor-relevant properties in C++, in a multitude of contexts. Semantically it's a struct holding a bunch of `optional`s, nothing more. 

Currently the API provides the following query methods for most properties: 
* `optional<T> foo_opt()` returns the value of `foo`, as held by the TO object. 
* `T foo()` returns the value of `foo` if it's set. **Otherwise, it returns a default value.** 
  * note that all properties are initialized as unset, but can also be unset explicitly, by passing `nullopt` to their setters. 
* `bool has_foo()` is true iff the property value is set. `foo_opt().has_value() == has_foo()`

The problem is that baking defaults into TO's API canonicalizes particular default values that may be irrelevant or inappropriate for some contexts. Also, it's easier to lose or overlook information about which properties are actually set.

Ideally the API should be trimmed back to `foo_opt()` getters only. If this would bloat client code disastrously, we *could* retain `has_foo()` and the nonoptional `foo()` getters and make the latter throw. But it's a choice we would want to make carefully.
Repository: create-react-app
Issue: Pin babel-preset-react-app to a minor core-js version as per core-js readme
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

I've been trying to polyfill ```Promise.allSettled``` for Edge by using react-app-polyfill/stable but failing. My expectation was that it should work since react-app-polyfill@1.0.6 depends on core-js@3.6.4 and ```Promise.allSettled``` was moved into core-js/stable on v3.2.0.

I've dug a bit deeper to find that babel-preset-react-app has corejs set to major version 3 (https://github.com/facebook/create-react-app/blob/v3.4.1/packages/babel-preset-react-app/dependencies.js#L91)

Looking at the core-js readme I see this:

> Warning! Recommended to specify used minor core-js version, like corejs: '3.6', instead of corejs: 3, since with corejs: 3 will not be injected modules which were added in minor core-js releases.

Locally I've set corejs in babel-preset-react-app to 3.2 (just a proof this is the issue) and I can see ```Promise.allSettled``` is now polyfilled correctly. 

It's not clear to me why babel-preset-react-app does not follow the advice of core-js and pin to a minor version?

### Describe the solution you'd like

Update babel-preset-react-app to pin to a minor version of corejs in it's configuration.

### Describe alternatives you've considered

Eject and manage babel-preset-env myself but I'm very reluctant to go down this route.

I look forward to being told why things aren't as simple as changing babel-preset-react-app configuration :)
Repository: flutter
Issue: [Web] Early errors are not reported to the flutter tools
Labels: tool,platform-web,P3,team-web,triaged-web

In Flutter for Web, errors are only sent after the main.dart.js script loads, this means that, unfortunately, errors from things like _loading_ that main.dart.js, or from script errors in external scripts, are not always reported to the flutter tools.

This leads to frustrated users that don't know/forget about the browser's builtin debug tools thinking that "Flutter Web is broken" and "Their app only shows white and no errors in the console".

It could be important to either find a way to report early errors (via, maybe, some JS element that only does error catching/reporting), or a big prompt/automatic opening of the browser's developer tools in order to bring attention to them.

CC. @jonahwilliams
Repository: PowerToys
Issue: [Image Resizer] Show "Resize pictures" on all supported formats
Labels: Idea-Enhancement,Product-Image Resizer

**Resize pictures** should appear when right-clicking on any image format with a corresponding WIC codec. This would mean that installing things like following would make it appear.

- [HEIF Image Extensions](https://www.microsoft.com/p/heif-image-extensions/9pmmsr1cgpwg)
- [Raw Image Extension](https://www.microsoft.com/p/raw-image-extension/9nctdw2w1bh8)
- [Webp Image Extensions](https://www.microsoft.com/p/webp-image-extensions/9pg2dk419drg)
- [Microsoft Camera Codec Pack](https://www.microsoft.com/download/details.aspx?id=26829)

Ideally the formats would also appear in the fallback encoder list.
Repository: PowerToys
Issue: [Settings][Image Resizer] Allow reordering the default sizes
Labels: Product-Settings,Area-User Interface,Product-Image Resizer,Priority-3

You should be able to drag-and-drop reorder the default sizes in the **Settings** dialog.
Repository: TypeScript
Issue: 'declare method' quick fix for adding a private method
Labels: Suggestion,Help Wanted,Good First Issue

<!-- 🚨 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.
-->

From https://github.com/microsoft/vscode/issues/94118

<!--
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.9.0-dev.20200330

**Search terms**
- quick fix
- declare method
- private

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Repro**
For ts file:

`index.ts`
```ts
class Bar {
    bar() {
         this._baz(123)
    }
}
```

1. Trigger quick fixes on `_baz`


**Feature request:**
https://github.com/microsoft/TypeScript/issues/36249 added a quick fix for adding private properties. However there is no quick fix for adding a private method


**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
- https://github.com/microsoft/TypeScript/issues/36249
Repository: opencv
Issue: CUDA Canny missing edges near image border
Labels: category: imgproc,category: gpu/cuda (contrib),incomplete

##### System information (version)
- OpenCV => 2.4.13.6 and 3.4 (example for 3.4 shown below)
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017

##### Detailed description

Noticed that the CPU implementation of Canny will produce edges up to the image border, while the GPU/CUDA versions leave an empty border around the image (i.e., edges will not go to image border).  This becomes an issue when breaking a larger image into sub parts and merging back together in the end as it creates gaps between edges for the GPU/CUDA version, but not the CPU version.

##### Steps to reproduce

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/core/cuda.hpp>
#include <opencv2/cudaimgproc.hpp>

#include <opencv2/imgcodecs.hpp>
#include "opencv2/imgproc.hpp"
#include <opencv2/highgui.hpp>

int main()
{
   cv::Mat img;
   img = cv::imread("path_to_test_img");

   cv::Mat gray;
   cv::cvtColor(img, gray, cv::COLOR_BGR2GRAY);
   
   cv::cuda::GpuMat gray_gpu;
   gray_gpu.upload(gray);
   cv::Ptr<cv::cuda::CannyEdgeDetector> edge = cv::cuda::createCannyEdgeDetector(12, 60);
   cv::cuda::GpuMat edge_img;
   edge->detect(gray_gpu, edge_img);

   cv::Mat edge_out;
   edge_img.download(edge_out);

   cv::Mat edge_cpu;
   cv::Canny(gray, edge_cpu,12,60);

   std::cout << "done." << std::endl;
Repository: flutter
Issue: [Material] Add focus state, highlight state, and keyboard shortcuts to RangeSlider
Labels: c: new feature,framework,f: material design,c: proposal,P3,team-design,triaged-design

Related Slider bug: https://github.com/flutter/flutter/issues/48905

The RangeSlider solution should be similar, but having 2 thumbs makes this more tricky.
Repository: pytorch
Issue: [JIT] Tensor method API behavior discrepancy, Tensor.detach(..)
Labels: needs reproduction,oncall: jit,triaged

In Python, `Tensor.detach()` does not copy the tensor storage. In-place value changes update the original tensor.

See doc, https://pytorch.org/docs/stable/autograd.html#torch.Tensor.detach.

```py
b = a.detach()
b -= c
```
a is changed as well. 
More examples in https://github.com/pytorch/pytorch/issues/6990

In JIT, `Tensor.detach()` always copies the tensor storage. As the implementation is, 
https://github.com/pytorch/pytorch/blob/a72946dbab9c1b79a9c75df4f353a341e2ddb19c/aten/src/ATen/native/TensorProperties.cpp#L55-L80

cc @suo
Repository: TypeScript
Issue: Support bigint literals in const enums
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

 - "const enum member initializers can only contain literal values"
 - "bigint enum"
 - "ts(2474)"

## Suggestion

A bigint literal is a literal, but it does not seem usable in const enums.

```ts
const enum Foo {
  Bar = 123n
}
```

Currently produces, on 3.9.0-beta:

> const enum member initializers can only contain literal values and other computed enum values. ts(2474)

## Use Cases

Bigint compile-time constants 🙂 

## Examples

```
const enum Foo {
  Bar = 123n
}

console.log(Foo.Bar);
```

Should compile to

```
console.log(123n);
```

And log `123n` when run.

## 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: pytorch
Issue: JITed GRU too slow
Labels: high priority,triage review,oncall: jit,triaged

## 🐛 Bug

It is advertised, that forward pass of JITed RNNs (e.g. GRU) is as fast as cuDNN implementation.
But it is not the case.

## To Reproduce

Steps to reproduce the behavior:

See here: https://gist.github.com/usamec/af21be7b83e6b1a3f38c26136af811f3

## Expected behavior

Forward pass is as fast as cuDNN.

## Environment

```
Collecting environment information...
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.0

OS: Ubuntu 18.04.1 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.10.2

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.0.176
GPU models and configuration: GPU 0: TITAN Xp
Nvidia driver version: 430.50
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.6.0.21
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.5.0

Versions of relevant libraries:
[pip3] numpy==1.15.0
[conda] _pytorch_select           0.2                       gpu_0  
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               10.0.130                      0  
[conda] mkl                       2019.4                      243  
[conda] mkl-service               2.3.0            py36he904b0f_0  
[conda] mkl_fft                   1.0.15           py36ha843d7b_0  
[conda] mkl_random                1.1.0            py36hd6b4f25_0  
[conda] numpy                     1.18.1           py36h4f9e942_0  
[conda] numpy-base                1.18.1           py36hde5b4d6_1  
[conda] pytorch                   1.4.0           py3.6_cuda10.0.130_cudnn7.6.3_0    pytorch
[conda] pytorch-qrnn              0.2.1                    pypi_0    pypi
[conda] torch-scatter             1.4.0                    pypi_0    pypi
[conda] torchvision               0.5.0                    pypi_0    pypi
```

I am also getting same slowdown on GeForce RTX 2080 Ti

## Additional context

Posted here first. 
https://discuss.pytorch.org/t/jited-gru-too-slow/68873

Warm starting does not change much at all.


cc @ezyang @gchanan @zou3519 @suo
Repository: pytorch
Issue: C++ tensor print doesn't show requires_grad and grad_fn like Python tensor print
Labels: module: printing,module: cpp,triaged

In Python, we have the following tensor print behavior:
```python
>>> x=torch.ones(2, 2, requires_grad=True)
>>> x
tensor([[1., 1.],
        [1., 1.]], requires_grad=True)
>>> y=x*2
>>> y
tensor([[2., 2.],
        [2., 2.]], grad_fn=<MulBackward0>)
```
However in C++, we have the following behavior:
```cpp
auto x = torch::ones({2, 2}, torch::requires_grad());
std::cout << x << std::endl;
auto y = x * 2;
std::cout << y << std::endl;
```
```cpp
 1  1
 1  1
[ CPUFloatType{2,2} ]
 2  2
 2  2
[ CPUFloatType{2,2} ]
```
It would be nice to show `requires_grad` and `grad_fn` in C++ tensor print as well.

cc @yf225
Repository: rust
Issue: Multiple associated type-parametrized bounds fail to resolve
Labels: A-trait-system,A-associated-items,T-compiler,C-bug,A-lazy-normalization

With this source

```rust
use core::marker::PhantomData;

pub trait Wrap<T> {
    type Wrapper;
}

fn fail<
    T,
    C: Trait<<WrapMarker as Wrap<T>>::Wrapper>
        + Wrap<<C as Trait<<WrapMarker as Wrap<T>>::Wrapper>>::Assoc>,
>() {
}

fn succeed<
    T,
    C: Trait<PhantomData<T>> + Wrap<<C as Trait<<WrapMarker as Wrap<T>>::Wrapper>>::Assoc>,
>() {
}

pub trait Trait<P> {
    type Assoc;
}

pub struct WrapMarker;

impl<T> Wrap<T> for WrapMarker {
    type Wrapper = PhantomData<T>;
}
```

I expect both `fail` and `succeed` to compile. Instead, `fail` fails to compile with "E0277: the trait bound `C: Trait<std::marker::PhantomData<T>>` is not satisfied". `rustc` is clearly able to unambiguously resolve the type here, not only just in theory as associated types are singly defined for a given parametrization, but in practice as it is able to clearly specify the constraint to be added, indicating that `<C as Trait<<WrapMarker as Wrap<T>>::Wrapper` is already uniquely resolved. 

[playground reproduction](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fe6ad4e097de20ae2887ee6caa4ca795)
Repository: rust
Issue: rustdoc's treatment of cross-crate ("imported") files is suboptimal.
Labels: T-rustdoc,C-enhancement

@bjorn3 noted in https://github.com/rust-lang/rust/issues/70025#issuecomment-606566181 that single files missing disables `[src]` links for *the entire crate*.
That's not ideal UX, we should render as many source files as we can possible load.

<hr/>

And there's also the paths `rustdoc` uses (see https://github.com/rust-lang/rust/issues/70025#issuecomment-607699347), e.g.:
* https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/def_id/struct.CrateId.html
  * links to https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_span/checkout/src/librustc_index/vec.rs.html#110-112
  * but it should use https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_index/vec.rs.html#110-112

If we use the `CrateNum` of the original source file and reuse the existing `rustdoc` logic to get the relative path of that file in that crate, *I believe* we can even support linking to the source correctly even when the *absolute* paths are not usable (e.g. `/rustc/$hash/src/libstd/thread/local.rs` when using `thread_local!` and the `rust-src` `rustup` component isn't installed)

Because the downstream crate uses an exported macro from the original crate, the rendered source file should always have been generated, so we should never really need to re-generate it.

cc @rust-lang/rustdoc @Aaron1011
Repository: flutter
Issue: macOS project doesn't run pod install for me when building
Labels: platform-mac,a: desktop,a: build,P2,team-macos,triaged-macos

flutter created a project with `--enable-macos-desktop` turned on. 
added

```yaml
dependencies:
  graphql: ^3.0.0
```

to dependencies. 

flutter run

CLI just returned

```
Launching lib/main.dart on macOS in debug mode...
** BUILD FAILED **

Building macOS application...
Exception: Build process failed
``` 

which was rather cryptic. 

Running in Xcode gave 

```
Showing Recent Messages
<project>/macos/Runner/Configs/../../Flutter/Flutter-Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths

<project>/macos/Runner/Configs/../../Flutter/Flutter-Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths

<project>/macos/Runner/Configs/../../Flutter/Flutter-Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths
```

going into macos and `pod install`ing fixes it. But I would have assumed that flutter tool should run that for me.
Repository: PowerToys
Issue: [Image Resizer] Better support for HEiC image formats
Labels: Help Wanted,Product-Image Resizer

Can HEIC images be catered for in ImageResizer
Repository: node
Issue: Exception while running 'es' benchmarks
Labels: benchmark

* **Version**: master
* **Platform**: Linux x64
* **Subsystem**: console?

### What steps will reproduce the bug?

Running the 'es' benchmarks.

### How often does it reproduce? Is there a required condition?

Not often it seems, not sure if it's specific to any 'es' benchmark.

### What is the expected behavior?

To not crash.

### What do you see instead?

```
internal/console/global.js:45
globalConsole[kBindProperties](true, 'auto');
                              ^

TypeError: globalConsole[kBindProperties] is not a function
    at internal/console/global.js:45:31
    at NativeModule.compileForInternalLoader (internal/bootstrap/loaders.js:276:7)
    at nativeModuleRequire (internal/bootstrap/loaders.js:305:14)
    at createGlobalConsole (internal/bootstrap/node.js:317:5)
    at internal/bootstrap/node.js:120:38
```
Repository: flutter
Issue: Ability to use ParagraphBuilder & Paragraph in other isolates
Labels: engine,c: proposal,P3,team-engine,triaged-engine

I need to calculate metrics for thousands of paragraphs in a way that doesn't lead to UI jank.

Therefore I'd like to Instantiate a ParagraphBuilder and build a Paragraph in a separate isolate to  pass back metrics to the main isolate.

This is currently not possible.

Related issues:
#10647
#13343

_(I'm opening a separate issue because it was mentioned that it is theoretically possible to have parts of dart:ui accessible to other isolates. I don't need all of dart:ui, just the text related parts)_

Example:
```dart
import 'dart:ui';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

void main() async {
  final size = await compute(computeParagraph, "abc");
  runApp(Text("$size"));
}

Size computeParagraph(String text) {
  final builder = ParagraphBuilder(ParagraphStyle(textDirection: TextDirection.ltr));
  builder.addText(text);
  final paragraph = builder.build();
  paragraph.layout(const ParagraphConstraints(width: double.infinity));
  return Size(paragraph.width, paragraph.height);
}

```

throws
```
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Exception: error: native function 'ParagraphBuilder_constructor' (9 arguments) cannot be found
#0      new ParagraphBuilder (dart:ui/text.dart:2070:5)
#1      computeParagraph (package:flutter_companion_macos/main.dart:12:19)
#2      _IsolateConfiguration.apply (package:flutter/src/foundation/_isolates_io.dart:75:34)
#3      _spawn.<anonymous closure> (package:flutter/src/foundation/_isolates_io.dart:83:65)
#4      Timeline.timeSync (dart:developer/timeline.dart:163:22)
#5      _spawn (package:flutter/src/foundation/_isolates_io.dart:80:18)
#6      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:304:17)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
```