sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Refactorings to convert from function declarations to function expressions
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

refactoring quick fix vs code action

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
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, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->

We already have refactorings to convert function expressions (arrow or non-arrow) to a function declaration, e.g. we can use "convert to named function" on both of these:

```ts
const fn1 = function () {
    return 1;
};

const fn2 = () => {
    return 1;
};

```

However, there is no refactoring to convert in the opposite direction—from a function declaration to a function expression.

I would like to suggest adding these refactorings so we cover all possibilities.

Note we do already have these refactorings (https://github.com/microsoft/TypeScript/pull/28250):

- "Convert to arrow function"
- "Convert to anonymous function"

However these only work on function expressions—they don't work on function declarations. Perhaps we could fix this by extending the scope of those refactorings so they do work on function declarations.
Repository: godot
Issue: [visual script] Object.call(method: String) lacks an argument in block.
Labels: bug,confirmed,topic:visualscript

<!-- 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.3

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
MacOS

**Issue description:**
<!-- What happened, and what was expected. -->
Expected Object.call(method: String) to have argument in visual script block. It was not there. Confirmed by several other users in godot discord.

**Steps to reproduce:**
1) Create .call for node. See there is no argument.
![изображение](https://user-images.githubusercontent.com/4563032/118176588-4691df80-b43a-11eb-87a2-6d5af2381030.png)


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->


P.S. Workaround: .callv can be used, it has method name as argument.
BUT it makes it hard time for non programmers to understand why they should use .callv when help doc says .call is perfectly suitable for method without arguments.
Repository: godot
Issue: App works on Xcode release mode, crashes on Testflight.
Labels: bug,platform:ios,topic:porting,confirmed,topic:dotnet,crash

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
Godot 3.3 Mono


**Issue description:**
Managed to run my app on both Debug and Release modes on Xcode without any problems. Then I uploaded it to App Store Connect for distribution and tried downloading & running it from Testflight. 

The app opens up with a loading scene and when the loading is complete it proceeds to the main scene. But when this loading is complete, app crashes immediately. 

Testflight feedback was as follows. 

[testflight_feedback.zip](https://github.com/godotengine/godot/files/6474834/testflight_feedback.zip)

I tried detaching most of the scripts I use. The scene without scripts works on Testflight, so I know its not a rendering issue. Also tried loading a test script to see if it was related to Mono, again worked on Testflight. So its not a Mono issue as well?

Couldn't figure out why it would only crash on Testflight though. Everything works perfectly when I run it from Xcode.

I would be very happy If anyone can make up anything from the feedback I uploaded. Thanks for your help!
Repository: vscode
Issue: Clear secrets when extension is uninstalled
Labels: feature-request,secret-storage

I am relying on the fact that secrets are not cleared after every session. I am using it to store PAT token.

I think the secrets are also not cleared when extensions are uninstalled. I uninstalled my extension, reloaded and reinstalled the extension and the secrets still existed. It would be helpful if uninstalling extension will clear out the secrets. Which brings me to a potential feature to force clear all secrets of an extension similar to how browser devtools provide a way to force clear cache and application data. Will be again helpful in situations where extension authors do not provide a way to clear the secrets.

Let me know if these needs to go to separate issue as this is about the documentation.

_Originally posted by @ankitbko in https://github.com/microsoft/vscode/issues/115252#issuecomment-773886577_
Repository: storybook
Issue: [Vue3] Watching control.type = 'file' omits url
Labels: bug,help wanted,addon: controls

**Describe the bug**
I am unable to capture the upload of a file in the storybook controls, so that I can convert it to a blob.
The component I'm developing is dependent on this interaction.
I'm able to get array of object urls so that I could fetch when needed but am unable, within the `setup()` of a story template, to read this anywhere. Currently trying by watching the args object passed through setup.

**To Reproduce**
I have created https://github.com/Mootook/sb-file-argtype with a README to showcase how to find the warning/error.

**System**
  System:
    OS: macOS 11.2.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 12.20.1 - ~/.nvm/versions/node/v12.20.1/bin/node
    Yarn: 2.4.1 - /usr/local/bin/yarn
    npm: 7.11.1 - ~/.nvm/versions/node/v12.20.1/bin/npm
  Browsers:
    Chrome: 90.0.4430.212
    Safari: 14.0.3
  npmPackages:
    @storybook/addon-actions: ^6.3.0-alpha.25 => 6.3.0-alpha.25
    @storybook/addon-docs: ^6.3.0-alpha.25 => 6.3.0-alpha.25
    @storybook/addon-essentials: ^6.3.0-alpha.25 => 6.3.0-alpha.25
    @storybook/addon-links: ^6.3.0-alpha.25 => 6.3.0-alpha.25
    @storybook/vue3: ^6.3.0-alpha.25 => 6.3.0-alpha.25

**Additional context**
I found this while attempting to uploading stl, ply files for a 3d model viewer for my application, but this happens no matter the file type that I've tried.
Repository: flutter
Issue: Add tool logging functionality to warn a subcommand is taking longer than expected, without timing out
Labels: c: new feature,tool,P3,team-tool,triaged-tool

See logging behavior introduced in https://github.com/flutter/flutter/pull/81229.  Would like to have a generic way to do this to remove more timeouts, such as the one reported in https://github.com/flutter/flutter/issues/42265.
Repository: flutter
Issue: [web] Blank page on PWA when reloading right after installing the app.
Labels: platform-web,P2,team-web,triaged-web

## Steps to Reproduce

Dependencies: Chrome 90 (or 91) on Mac, with MacOS in Dark Mode (see fig. 1)

1. Create a Flutter web app and deploy it somewhere (by default it'll have PWA features). Example: https://dit-tests.web.app
2. Navigate to the deployed app. Open Chrome DevTools.
3. Click the install icon (see fig. 2), and install the App.
4. In the new "stand-alone" version of the app, right click the top bar and hit "Reload" (see fig. 3)

**Expected results:** The app reloads normally

**Actual results:** White page, with a seemingly blank cover on top of it (see fig. 4)

### Screenshots

**Fig. 1: Dark mode in MacOSX**
<img width="780" alt="Screen Shot 2021-05-13 at 2 40 08 PM" src="https://user-images.githubusercontent.com/1255594/118191329-41f90700-b3f9-11eb-9cf2-a5b24407d3da.png">

**Fig. 2: Installing a PWA**
<img width="933" alt="Screen Shot 2021-05-13 at 2 43 38 PM" src="https://user-images.githubusercontent.com/1255594/118191632-bc298b80-b3f9-11eb-8fa2-35fae9a23491.png">

**Fig. 3: Reloading the PWA**
<img width="630" alt="Screen Shot 2021-05-13 at 2 45 49 PM" src="https://user-images.githubusercontent.com/1255594/118191763-f85cec00-b3f9-11eb-90fb-f41a6bc4239b.png">

**Fig. 4: After reloading the PWA**

https://user-images.githubusercontent.com/1255594/118191871-1de9f580-b3fa-11eb-83a6-807e97e7b6ec.mov
Repository: godot
Issue: AA on polygons with internal faces is rendered improperly
Labels: bug,topic:rendering,confirmed,topic:2d

Version: Still as of 3.3

Description: Improperly here means strings on the outside of concave shapes, and on the inside of convex shapes that have some sort of color difference (for instance, vertex colors which the AA strings inherit from their origin vertex). 

Note that because AA is rendering in the wrong order/places, some external edges of polygons may be missing their AA.

Likely caused(/missed) in https://github.com/godotengine/godot/pull/33857 by @pouleyKetchoupp


How to reproduce: It's easiest to see with a concave shape, particularly 4 external vertices in the shape of a V and turn AA on (and HDR off, or Framebuffer to 2D). Assign any texture (required to use the UV editor to add internal verts/faces) and add 3 internal vertices in the shape of a triangle and then add at least 1 face.

A similar situation can be had with a convex shape, instead 3 external vertices and 3 internal vertices, but you also need to add differing vertex colors to see the strings.


Minimal reproduction project: [broken_aa_advanced_polygon.zip](https://github.com/godotengine/godot/files/6475324/broken_aa_advanced_polygon.zip)

Visual of example project:

![ArcoLinux_2021-05-13_18-12-57](https://user-images.githubusercontent.com/4397725/118194422-5a781a00-b417-11eb-8911-56bc9758c1dd.png)
Repository: deno
Issue: Separate `deno graph` from `deno info`
Labels: suggestion

The `deno info` subcommand should only output cache info and for a single module at a time. We should have a separate `deno graph` subcommand for outputting the dependency graph of a module.

1. The use cases for these two things are entirely separate. A large list of dependencies creates a lot of noise to sift through when you are just trying to get the location of a cache file. You never need both of these things at once.
2. It allows more versatility for `deno info`. I propose that `deno info` doesn't implicitly invoke `deno cache` (which it would no longer need to), and should show null cache file paths for uncached modules. You can instead call `deno cache <url> && deno info <url>` for the current behaviour. This design can be applied to query the state of the cache, which partially satisfies feature requests like #5600.

~~This would be a 2.0 change.~~
Repository: godot
Issue: Undoing quickly (i.e. holding ctrl+Z) a lot of text editor changes successively causes issues
Labels: bug,topic:editor,needs testing,topic:gui

**Godot version:**
3.3 stable


**OS/device including version:**
Windows 10 desktop with AMD Ryzen 9 3900X, 64 GB RAM, GTX 1080 Ti.


**Issue description:**
I worked on a code (`gd`) file for about a half hour, then wanted to undo everything. I held ctrl+Z for about 15 seconds or so, and the editor threw seveval errors as well as performing incorrect undos.

For example, what should have been restored to this:
![image](https://user-images.githubusercontent.com/1350074/118211006-3a008d80-b420-11eb-9ee6-7bf4ca1bd75d.png)

Ended up as this instead:
![image](https://user-images.githubusercontent.com/1350074/118211014-3e2cab00-b420-11eb-907e-22eda8b6d80e.png)

And the console looks like a whole lot of this:
![image](https://user-images.githubusercontent.com/1350074/118211031-471d7c80-b420-11eb-9117-814d7e6daac3.png)

Here's one more example of when I commited a file, then held ctrl+Z for a few seconds, then redid everything I undid, and compared to the committed file:
![image](https://user-images.githubusercontent.com/1350074/118211695-5bae4480-b421-11eb-99fb-53a7fd1e24b3.png)


**Steps to reproduce:**
Unfortunately I don't know the minimum amount of undos required to trigger this issue. But it should be replicable in any `gd` file after performing a sufficient amount of changes and then holding ctrl+Z to undo them all. I was able to reliably reproduce this at any point just by undoing/redoing for about 5-7 seconds straight.


**Minimal reproduction project:**
I'm not sure if I can even do this? Based on the repro steps, it occurs irrespective of the project.
Repository: PowerToys
Issue: [Bug Report tool] Add in app is run from different user flag of some sort
Labels: Idea-Enhancement,Area-Bug Report Tool

### Provide a description of the new feature / enhancement

We should add in a flag "Is app user different from user logged in" or something to that regard / Elevated under different user.

We're seeing a few bugs where the app is launched typically under admin from a different user.
Repository: PowerToys
Issue: Test harness for testing Preview pane components
Labels: Area-Quality,Product-File Explorer,Issue-Task

### Provide a description of the new feature / enhancement

We need a better, easier way to test / iterate on these tools.  Right now it is too manual (installing / uninstalling) for doing e2e testing and debugging
Repository: flutter
Issue: [web]: ClipPath widget in iOS Web scroll page height calculation error
Labels: platform-ios,framework,engine,f: material design,f: scrolling,platform-web,e: web_html,has reproducible steps,P2,found in release: 2.3,team-design,triaged-design

Flutter 2.1.0-12.2.pre • channel beta
Tools • Dart 2.13.0 (build 2.13.0-116.0.dev)
iOS 14.5.1
Safari latest

--web-renderer html

Preview img: [normal](https://drive.google.com/file/d/17J2AeqaKSJT2E25z7Q-JBLCmtbyANIzj/view?usp=sharing)、 [after page scroll error](https://drive.google.com/file/d/1Yzm6WtEuVJC8m9XMUGNh1cC_XwYEqE5_/view?usp=sharing)
Preview code link : https://codepen.io/kerwin/pen/mdWPWvy
Repository: storybook
Issue: Controls do not handle `null` or incorrect typed args properly
Labels: bug,addon: controls

**Describe the bug**
Arg type inference can be incorrect; users can make mistakes.

An arg can be "wrong" in various ways:

1. It can be `null` for non-object arg types
1. It can be `undefined` for required arg types
1. It can be the wrong type (e.g. a string when the arg type is number).

Most of our controls either don't show any error, show the value wrong, or even error out when you do 1&3. For 2, they work but they should probably tell you that you need to set a value for the arg.

**To Reproduce**

See the stories in this branch: https://github.com/storybookjs/storybook/pull/14927
Repository: godot
Issue: Wrong formula for 2x2 matrix inversion.
Labels: discussion,topic:core

**Godot version:**
The bug is present in the latest
https://github.com/godotengine/godot/blob/master/core/math/transform_2d.h

I am using Godot 3.2, from Debian. But I don't think it matters.


**Issue description:**
The formula for matrix inversion used in
`Vector2 Transform2D::basis_xform_inv(const Vector2 &p_vec) const {`
`	return Vector2(`
`			elements[0].dot(p_vec),`
`			elements[1].dot(p_vec));`
`}`
is wrong. Unless I am missing something. :-)

Calling the basis matrix by B, this is calculating B^T p_vec, where B^T stands for B transposed. It should calculate B^{-1} p_vec, where B^{-1} stands for inverse of B.

This is the stable documentation:
https://docs.godotengine.org/en/stable/classes/class_transform2d.html#class-transform2d-method-basis-xform-inv

And this is the latest documentation:
https://docs.godotengine.org/en/latest/classes/class_transform2d.html#class-transform2d-method-basis-xform-inv

By the way, "latest documentation" got a bit uglier! :-(

The correct formula needs to calculate the determinant... it should be something like:
`Vector2 Transform2D::basis_xform_inv(const Vector2 &p_vec) const {`
`	return Vector2(`
`			real_t determinant = elements[0][0] * elements[1][1] - elements[0][1] * elements[1][0];`
`			(elements[1][1] * p_vec.x - elements[1][0] * p_vec.y) / determinant,`
`			(elements[0][0] * p_vec.y - elements[0][1] * p_vec.x) / determinant);`
`}`

I didn't test it because I am just browsing the source code to see why my GDScript is not working. I do not have the toolchain, sources and so on installed in my system.
Repository: godot
Issue: Windows IME window not able to show in Editor Full Screen Mode
Labels: bug,platform:windows,topic:editor,topic:porting,confirmed,topic:input,topic:gui

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:** 3.3
<!-- Specify commit hash if using non-official build. -->


**OS/device including version:**
- Dell Precision M4500
- Microsoft Windows 10 Enterprise-N x64
- Nvidia Quadro FX 1800M (342.01)
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->


**Issue description:**
While using Godot Editor in Full Screen, Windows' IME input window is not shown albeit the IME is working and output from IME is able to be inputted into Godot Editor. 
![image](https://user-images.githubusercontent.com/17796518/118248832-53184580-b4d7-11eb-955a-a2189b11bb9f.png)
Picture 1: IME window showing in non-full screen mode

While in full screen mode, the shown IME window won't be visible to the user. 
<!-- What happened, and what was expected. -->


**Steps to reproduce:**
1. Enable a language IME in Windows. (ie. Simplified Chinese)
2. Launch Godot Editor in Full Screen
3. Create a label node. 
4. Focus the Text section in Inspector. 
5. Enable the IME (WinKey + Space) and attempt to type something. (ie. for chinese pinyin, type: ni hao shi jie) Notice that IME window is not showing. Typing the pinyin and toggle SPACE does select a selection in IME and outputs text. 

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Shouldn't be necessary, but here's it: 
[default.zip](https://github.com/godotengine/godot/files/6477784/default.zip)
Repository: godot
Issue: Make the editor debugger stack variables read-only since modifying variables has no effect there
Labels: enhancement,topic:editor

godot version: 3.3.stable.openSUSE
OS: openSUSE tumbleweed 20210511

I was trying to modify a variable while debugging, however the variable's value was not changed. I suspect there is a bug, or it is just a monitor for variables that is not for modify the variables' value? 

how to reproduce:
![bug](https://user-images.githubusercontent.com/52484447/118250266-dbe3b100-b4d8-11eb-80a0-0fca0f250b6b.gif)
use the example below and follow the gif
minimal example project:
[godotbug.tar.gz](https://github.com/godotengine/godot/files/6478112/godotbug.tar.gz)
Repository: pytorch
Issue: [JIT] Can't handle creating new objects in compiled methods: "Class does not have an __init__ function defined"
Labels: oncall: jit

## :bug: Bug

When I'm trying to compile a module with a method containing call to a constructor of a different class, I'm getting the following error:

```
RuntimeError:
Class FooModule does not have an __init__ function defined:
  File "test.py", line 16
    def forward(self, x):
        trouble = FooModule()
                  ~~~~~~~~~ <--- HERE
        return x
```

When the object is created only in the constructor as a field, I can use it's methods etc. just fine.

## To Reproduce

Here is the code I used for testing:

```
import torch
import torch.nn as nn

class FooModule(nn.Module):
    def __init__(self):
        super(FooModule, self).__init__()

class BarModule(nn.Module):
    def __init__(self):
        super(BarModule, self).__init__()
        self.foo = FooModule()

    def forward(self, x):
        trouble = FooModule()
        return x

module = BarModule()
torch.jit.script(module)
```

When I was trying to reproduce it, I got another error, which happens when the new class appears for the first time in the compiled method (i.e. it is not instantiated in the constructor):

```
RuntimeError:
Python type cannot be used as a value:
  File "test.py", line 7
    def __init__(self):
        super(FooModule, self).__init__()
              ~~~~~~~~~ <--- HERE
'FooModule.__init__' is being compiled since it was called from '__torch__.FooModule'
  File "test.py", line 16
    def forward(self, x):
        trouble = FooModule()
                  ~~~~~~~~~ <--- HERE
        return x
'__torch__.FooModule' is being compiled since it was called from 'BarModule.forward'
  File "test.py", line 16
    def forward(self, x):
        trouble = FooModule()
        ~~~~~~~~~~~~~~~~~~~ <--- HERE
        return x
```

## Environment

PyTorch version: 1.8.0
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (aarch64)
GCC version: (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.10.2

Python version: 3.6 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: 10.2.89
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.0.0
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.13.3
[pip3] torch==1.8.0
[pip3] torchvision==0.8.0a0+45f960c
[pip3] trtorch==0.4.0a0


cc @gmagogsfm