sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: `esModuleInterop: true` cause runtime error
Labels: Needs Investigation

Hi there, problems happened when I toggled `esModuleInterop` flag for my project, I have to because one library it depends enabled this flag.

**TypeScript Version:**  2.7+

**Search Terms:**
esModuleInterop
allowSyntheticDefaultImports

**Code**

```ts
import * as apmStar from 'elastic-apm-node'
import SentryDefault from '@sentry/node'

apmStar.start // undefined
SentryDefault // undefined
```

Explains:
- for `@sentry/node` it is an es module, so `esModuleInterop` has no effects on it, but with `allowSyntheticDefaultImports` you can import its default, which property it does not export, so you got an undefined error at runtime
- for `elastic-apm-node`, it is a commonjs module, and it exports an instance, `start` is a prototype method of it, so it is lost after `__importStar`. 

But these problems are not informed in the document, guess we could discourage enabling it for library projects?
And I wonder if we could improve type checking for these situations, for example:
- for `apmStar`, it is imported as esmodule namespace, so an type error could be thrown when accessing `.start` method on it.
- for `SentryDefault`, it is a esmodule, `allowSyntheticDefaultImports` could be disabled for it

**Expected behavior:**
Error emitted at compiling time
**Actual behavior:**
Compiled successfully, but got an error at runtime.

**Playground Link:** 
https://repl.it/@themez1/esModuleInteropTest

**Related Issues:** 
https://github.com/microsoft/TypeScript/issues/28009
https://github.com/microsoft/TypeScript/issues/33954
https://github.com/microsoft/TypeScript/issues/36026
Repository: PowerToys
Issue: When plug the external storage or mount the ISO/SMB/NFS，show the drive icon in desktop
Labels: Idea-New PowerToy,Product-Tweak UI Design

like in macOS
<img width="122" alt="截屏2020-12-09 下午10 33 52" src="https://user-images.githubusercontent.com/14149967/101643017-a4c32c80-3a6e-11eb-826d-4915f32452bd.png">
when try to “delete（like ctrl + D）” the icon，the drive will remove/umount
Repository: flutter
Issue: Better/More efficient Keyboard accessibility for TimePicker dialog.
Labels: framework,f: material design,a: accessibility,f: date/time picker,c: proposal,f: focus,P2,team-design,triaged-design

![Flutter timepicker accessability](https://user-images.githubusercontent.com/29028262/101649531-4892e500-3a3b-11eb-816e-cc98000420a5.gif)



## Use case
We have a web app where users can add events to an calender.  
The user needs to pick a start and end time for this event.  
We want this time picking to be accessible by keyboard and also be quick an efficient. 

My current problems with the design:
* The first (hour) field is not automatically focused when the dialog opens.  This means the user will have to always press TAB one time before he can enter/edit the input.
* With `showTimePicker` `initialTime` is required.\
This means the user will **always** have to first delete the initial input before he inserts his own time.
* To confirm the input the user will have to press "TAB" multiple times to get to the "OK" button and the press space to confirm.

## Proposal
* The `initalTime` should not be required, instead there may be a "hint time" with low opacity.\
or
* When focusing the hour and minutes field the existing input should be selected by default (see picture). In this case the useer can just overwrite the existing input by just typing in their own. 
<img width="319" alt="Bildschirmfoto 2020-12-09 um 16 19 42" src="https://user-images.githubusercontent.com/29028262/101648784-77f52200-3a3a-11eb-819b-26909e0c8d25.png">

* When `showTimePicker` is called the first field (hour) should be focused automatically instead of having the user press TAB or click into the field.
* When pressing enter in the hour field the user focus should change to the minutes field (same behavior as pressing space in the hour field)
* When pressing "Enter" in the minutes field the dialog should successfully close (same as pressing the "OK" button). With this change users wont have to repeatedly press TAB to get the focus to the "OK" button. 

For the last two bullet points see also: #71998
Repository: flutter
Issue: ValueListenableBuilder with an Animation<> rebuilds even when the value didn't change
Labels: framework,a: animation,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-framework,triaged-framework

You can see this running at https://codepen.io/ravenblack/pen/OJRROgm

```
import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp(
      home: MyWidget(),
    ),
  );
}

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: _Bloop(),
      ),
    );
  }
}

class _Bloop extends StatefulWidget {
  @override
  State<_Bloop> createState() => _BloopState();
}

class _BloopState extends State<_Bloop> with SingleTickerProviderStateMixin {
  int i = 0;
  AnimationController _controller;
  Animation<double> _animation;
  @override
  void initState() {
    _controller =
        AnimationController(vsync: this, duration: Duration(seconds: 1));
    _animation = _controller.drive(TweenSequence([
      TweenSequenceItem(tween: ConstantTween(0.0), weight: 1.0),
      TweenSequenceItem(tween: ConstantTween(1.0), weight: 1.0),
    ]));
    _controller.repeat();
  }

  @override
  Widget build(BuildContext context) {
    return ValueListenableBuilder<double>(
        valueListenable: _animation,
        builder: (_, value, ___) {
          return Text(
            '$value ${i++}',
            style: Theme.of(context).textTheme.headline4,
          );
        });
  }
}
```

Expected behavior: the value of 'i' ticks up once each time 'value' changes.
Actual behavior: the value of 'i' ticks up every frame, while 'value' changes only every 15 frames.

I think the underlying issue is that the an `Animation<double>` notifies whenever its associated controller notifies, but since it's nominally a `ValueListenable` it should really not trigger that notification if its output value didn't change.
Repository: opencv
Issue: cv::normalize dst parameter type
Labels: category: core,RFC,future

##### System information (version)
<!-- Example
- OpenCV => 4.2
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
-->

- OpenCV => 4.5
- Operating System / Platform => Ubuntu 20.04
- Compiler => g++ 9.3.0

##### Detailed description
The parameter `dst` to `cv::normalize()` is of type `cv::InputOutputArray`, but it has no bearing on the output and should instead be of type `cv::OutputArray`. This mistake uglifies code that needs to call `cv::normalize()`.

##### Steps to reproduce
N/A

##### Issue submission checklist

 - [x] I report the issue, it's not a question
   <!--
   OpenCV team works with answers.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [x] I checked the problem with documentation, FAQ, open issues,
       answers.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://answers.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [x] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [x] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archive to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->
Repository: godot
Issue: Light2D inside Light Occluder lights it up
Labels: discussion,topic:rendering,documentation,topic:2d

<!-- 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 using non-official build. -->
3.2.3 Stable Official

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Windows 10, RTX 2070, for both GLES2 and GLES3

**Issue description:**
<!-- What happened, and what was expected. -->
Light Occluders light up when there's a Light2D inside of it. It should stay in shadows since it's a closed shape, or have an option to disable it while inside an occluder shape.

**Steps to reproduce:**
- Create a Tilemap
- Create a tileset and a tile that has a light occlusion shape
- Create a Light2D and put it inside the tile
- Tile will light up

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[hidden_tilemap_light_occlusion.zip](https://github.com/godotengine/godot/files/5667812/hidden_tilemap_light_occlusion.zip)
Repository: material-ui
Issue: [Autocomplete] Differentiate hover & keyboard states
Labels: new feature,component: autocomplete,ready to take

With the current implementation, if you hover over an option, and then move your cursor outside of the option menu, the last option you were hovering over remains highlighted. I would like to remove this highlight programmatically. 

- [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.

#20615 is related, but it has been closed.

## Summary 💡

If setHighlightedIndex were exposed (along with the option to pass null for the index to remove the highlighted option), I could call `setHighlightedIndex({ index: null})` to remove the highlight. Alternatively, if Autocomplete had a `clearHighlight` or `removeHighlight` prop that was simply a boolean, Autocomplete could check its status and call `setHighlightedIndex({ index: null})` internally if it was ever set to `true`. Or, a `removeHighlightOnExit` prop could be set.

## Examples 🌈

As you can see below, after moving the cursor outside of the menu, pressing "Enter" searches for the text in the input - "material ui" rather than the previously highlighted option "material ui textfield."
![autocomplete](https://user-images.githubusercontent.com/2874325/101673741-cc85a680-3a14-11eb-99a0-80f5be87934b.gif)

## Motivation 🔦

With the current implementation, if you hover over an option, and then move your cursor outside of the option menu, the last option you were hovering over remains highlighted. This means that pressing "Enter" automatically selects the last selected option. I would like to implement functionality similar to Google's search, so that if you if press "Enter" it redirects you to a search results page. I added a custom onMouseLeave function to ListboxProps that removes `[data-focus]` from the highlighted option (to remove its styling) and removes `[aria-activedescendant]` from the input element when hovering outside of the menu. Then, in my Autocomplete onChange function, I'm checking for the existence of `[aria-activedescendant]` on the input. If it doesn't exist, it means the cursor is outside of the menu and it returns (thus not selecting anything), and allows the form to submit. This is working fine; however, if a user hovers outside of the menu (removing the highlight) and presses the down arrow on their keyboard, the option below the previously highlighted option is selected, rather than the first option as one would expect. There is no method to reset the highlighted index.
Repository: flutter
Issue: Material text selection menu overflow buttons should be full-width
Labels: a: text input,framework,f: material design,team-design,triaged-design

Tapping in the empty space to the right of "Custom button 2" should hit the button.  Currently, it has no effect.

<img width="391" alt="Screen Shot 2020-12-09 at 1 59 45 PM" src="https://user-images.githubusercontent.com/389558/101693752-ec25ca80-3a26-11eb-81ce-deafb7852883.png">

### To fix this:

  1. Make the buttons full-width by setting the min and max width in their layout to the full width of the menu ([code](https://github.com/flutter/flutter/blob/53119af105d2e8808e4e8be3675b6bdd3668f4b9/packages/flutter/lib/src/material/text_selection.dart#L472)).
  1. Align the text in the button to the left or right depending on the text direction.

Currently, TextButton always centers its child and can't align to the left or right.
Repository: godot
Issue: Huge memory consumption when importing large obj files
Labels: bug,topic:import

**Godot version:**
3.2.3

**OS/device including version:**
OS: ArchLinux
Linux Kernel: 5.4.80-2-lts
GPU: RX Vega 64
drivers: mesa-20.3.0-3
backend: GLES3

**Issue description:**
I imported a ~600MB OBJ file in Godot. It filled up nearly my entire 32GB of RAM. Importing the same 3D model in Blender only consumes 4GB of RAM. Exporting it in Blender to glTF 2.0 and then importing that in Godot does not cause this issue and can currently be used as a workaround.

**Steps to reproduce:**
1. Download the data from this blog: 
https://ingowald.blog/2020/10/10/sharing-my-nasa-mars-lander-unstructured-mesh-data-set/
2. Download `umesh`
3. Run `./umeshExtractIsoSurface /space/lander-small-rho-9000.umesh --obj iso.obj --iso 0.2`
4. Import `iso.obj`
Repository: flutter
Issue: Asynchronous Shell and VM creation
Labels: platform-android,platform-ios,engine,P3,team-engine,triaged-engine

Some previous work and exploration were done in this area such as https://github.com/flutter/engine/pull/20433, https://github.com/flutter/engine/pull/18047 and https://github.com/flutter/engine/pull/20142. 

1- Split out a path to asynchronously create the VM in the FlutterEngineGroup ahead of engine creation. 

@mkustermann says "Separate `Dart_Initialize()` (once per process) from `Dart_CreateIsolateGroup*()` (once per isolate-group, reads AOT snapshot) and `Dart_CreateIsolateInGroup()` (once per lightweight UI isolate)." 

2- Make the new APIs https://github.com/flutter/flutter/issues/72010 and https://github.com/flutter/flutter/issues/72018 work asynchronously to not block the main thread when creating new engines and isolates, such as when creating Flutter views in a scrollable list.
Repository: flutter
Issue: Create a Software Transactional Memory sharing mechanism between platform and isolates
Labels: c: new feature,platform-android,platform-ios,framework,engine,p: pigeon,P2,team-engine,triaged-engine

Described in https://docs.google.com/document/d/1NwiZPWHd1te46eP2GWwIezDV9CdMQkODAMuF5kWdtLw/edit#heading=h.ydac865pjhl of flutter.dev/go/multiple-engines

Create a solution to let isolates share data without using the Isolate SendPort mechanism manually.
Repository: flutter
Issue: Garbage collect only when all isolates are idle
Labels: platform-android,platform-ios,engine,dependency: dart,P2,team-engine,triaged-engine

We're currently signaling the Dart garbage collector to collect when the animator/engine is notifying idle. To avoid one isolate signaling idle and causing a garbage collection which would jank another rendering isolate, alter the logic to let the garbage collection only occur when all isolates are idle. 

https://github.com/flutter/flutter/issues/71253 partly related.
Repository: flutter
Issue: Share image cache between multiple engines
Labels: platform-android,platform-ios,engine,a: images,perf: memory,P2,team-engine,triaged-engine

For multiple engines in a FlutterEngineGroup, each has an instance of [ImageCache](https://api.flutter.dev/flutter/painting/ImageCache-class.html) and may cause undesirable effects. For instance, if 3 engines with 3 separate ImageCaches specified a maximum size of 100MB each, there might be a memory footprint of 300MB before eviction starts happening.
Repository: PowerToys
Issue: Option to disable light dismiss for Action Center
Labels: Idea-New PowerToy,Product-Tweak UI Design

## 📝 Add an option to disable Action Center auto dimiss

There are many cases where someone would like to have the Action Center still open when working on other stuff. A simple registry hack allows to disable the auto-dismiss feature of the Action Center and you can toggle it open/closed from its icon in the taskbar.

It would be nice if Powertoys will have an option to set the following registry setting:
in **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell\Launcher** create(or set) a **DWORD(32-bit)** value labeled as **"DisableLightDismiss"** and set it to **"1"**.
Removing the value or setting it to "0" will restore the default behaviour.

This comes really useful for developers that have to code and debug ToastNotifications.

---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: rust
Issue: Associated types weirdness
Labels: A-trait-system,A-associated-items,C-bug,T-types

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I have two code snippets [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ee9edf7f1486729032d7c8a3e28e9f14)

```rust
pub trait HasAssoc {
    type Assoc;
}

pub trait Trait {}
struct Foo<A, B>(A, B);

// Snippet 1
impl<H, F, G, A> Trait for Foo<G, F>
where
    H: HasAssoc<Assoc = A>,
    F: FnOnce(A) -> H,
    G: FnOnce() -> A,
{}
```

```rust
pub trait HasAssoc {
    type Assoc;
}

pub trait Trait {}
struct Foo<A, B>(A, B);

// Snippet 2
impl<H, F, G> Trait for Foo<G, F>
where
    H: HasAssoc,
    F: FnOnce(H::Assoc) -> H,
    G: FnOnce() -> H::Assoc,
{}
```

The only difference between them is, in the first one I bind the associated type to a type parameter, but not in the second snippet. I would expect that these two should either both compile, or both fail to compile because there isn't anything semantically different about them.

Instead, Snippet 1 compiles, and Snippet 2 fails to compile, with the error message

```rust
error[E0207]: the type parameter `H` is not constrained by the impl trait, self type, or predicates
  --> src/lib.rs:15:6
   |
15 | impl<H, F, G> Trait for Foo<G, F>
   |      ^ unconstrained type parameter

error: aborting due to previous error
```

But this is constrained, otherwise, Snippet 1 could not work.
Repository: rust
Issue: asm! doesn't accept `offset` syntax, but gcc does
Labels: A-LLVM,O-x86_64,A-inline-assembly,T-compiler,C-bug,F-asm

In Intel-syntax assembly, to refer to the address of a symbol rather than the memory pointed to by that symbol, you have to write `offset symbol` rather than just `symbol`. For instance, `mov rax, 1f` is equivalent to `mov rax, qword ptr 1f` and moves the memory pointed to by `1f` into `rax`, while `mov rax, offset 1f` moves the address of `1f` into `rax`.

GCC and GAS accept this syntax. However, clang and Rust do not.

(The examples below use position-dependent addressing for simplicity. Production code should use position-independent addressing.)

```
/tmp$ cat offset.c 
#include <stdio.h>

int main() {
    unsigned value = 0;
    __asm__ __volatile__(
        "mov %0, 1\n"
        "mov rax, offset 3f\n"
        "jmp rax\n"
        "mov %0, 2\n"
        "3:"
        : "=r" (value)
        :
        : "rax"
    );
    printf("%u\n", value);
    return 0;
}

/tmp$ gcc -no-pie -masm=intel -O3 offset.c -o offset
/tmp$ ./offset 
1
/tmp$ clang-12 -no-pie -masm=intel -O3 offset.c -o offset
offset.c:7:10: error: unexpected token in argument list
        "mov rax, offset 3f\n"
         ^
<inline asm>:2:17: note: instantiated into assembly here
mov rax, offset 3f
                ^
1 error generated.
(1) /tmp$ cat offset.rs 
#![feature(asm)]

fn main() {
    let mut value: u64;
    unsafe {
        asm!(
          "mov {value}, 1",
          "mov rax, offset 3f",
          "jmp rax",
          "mov {value}, 2",
          "3:",
          value = out(reg) value,
          out("rax") _,
        );
    }
    dbg!(value);
}
/tmp$ rustc +nightly offset.rs 
error: unexpected token!
 --> offset.rs:8:12
  |
8 |           "mov rax, offset 3f",
  |            ^
  |
note: instantiated into assembly here
 --> <inline asm>:3:17
  |
3 | mov rax, offset 3f
  |                 ^

error: aborting due to previous error

(1) /tmp$ rustc +nightly --version
rustc 1.50.0-nightly (1c389ffef 2020-11-24)
```
Repository: flutter
Issue: Linux desktop doesn't seem to support --route
Labels: engine,f: routes,platform-linux,a: desktop,P2,team-linux,triaged-linux

`flutter run --route xxx` on Linux doesn't seem to be setting `window.defaultRouteName`.

(Found this by trying to run our diagram generator in the assets-for-api-docs repo, passing it a `--name` argument.)
Repository: TypeScript
Issue: Cache importFixes/fixMissingImport in getCodeFixes requests
Labels: Needs Investigation

<!-- 🚨 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

- getCodeFixes cache

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion

In tsserver, the [`completionInfo` request](https://github.com/microsoft/TypeScript/blob/d156bb805eba314be2fbe86e4c4ca0179380580e/src/server/protocol.ts#L2111) benefits from a cache of import suggestions.

https://github.com/microsoft/TypeScript/blob/d156bb805eba314be2fbe86e4c4ca0179380580e/src/services/completions.ts#L1627-L1631

Could the [`getCodeFixes` request](https://github.com/microsoft/TypeScript/blob/d156bb805eba314be2fbe86e4c4ca0179380580e/src/server/protocol.ts#L699) be extended to use a suggestion imports cache as well?

https://github.com/microsoft/TypeScript/blob/2428ade1a91248e847f3e1561e31a9426650efee/src/services/codefixes/importFixes.ts#L234

Both call `codeFixes.forEachExternalModuleToImportFrom`, which can be very slow in a large project. Thanks!

## 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).