sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Symbol.species should in constructor, not instance
Labels: Bug,Help Wanted

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is a crash
- This changed between versions ______ and _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->

### 💻 Code

https://github.com/microsoft/TypeScript/blob/a3a5e009a5a7c95fbc0a08dff6d8947cceff7807/src/lib/es2017.sharedmemory.d.ts#L14

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->
Repository: vscode
Issue: Update codicon names to use aliases
Labels: debt,icons-product

We have the ability to add aliases for certain icon names like `add` and referencing the definiotn via `Codicon.add.definition`:

https://github.com/microsoft/vscode/blob/67e0e8f12fb5ef1a8acfb83511e44c2670500cbe/src/vs/base/common/codicons.ts#L52-L55

But we don't do a consistent way of updating these names:

https://github.com/microsoft/vscode/blob/67e0e8f12fb5ef1a8acfb83511e44c2670500cbe/src/vs/base/common/codicons.ts#L69-L102

cc @aeschli @daviddossett
Repository: pytorch
Issue: Refactor how errors decide whether to append C++ stacktrace
Labels: triaged,better-engineering

### 🚀 The feature, motivation and pitch

Per @zdevito's comment in https://github.com/pytorch/pytorch/pull/82665/files#r936022305, we should refactor the way C++ stacktrace is appended to errors.

Currently, in https://github.com/pytorch/pytorch/blob/752579a3735ce711ccaddd8d9acff8bd6260efe0/torch/csrc/Exceptions.h, each error goes through a try/catch and the C++ stacktrace is conditioned on whether cpp stacktraces are enabled or not.

Instead, specific exceptions can have a flag that determines whether cpp stacktrace is added or not. Most errors would set this in their constructor based on the env variable, but for certain types of errors which always report cpp stacktrace, this can just be set to true and this field can be checked when reporting errors.

### Alternatives

_No response_

### Additional context

_No response_
Repository: godot
Issue: Script editor ignores Alt + key shortcuts and inserts special character instead
Labels: bug,topic:editor,confirmed,usability

### Godot version

3.4.5.stable.mono

### System information

MacOS

### Issue description

When you are in the editor, in the script editor, after pressing Alt + 1 (Opt + 1) – Open 2D Editor, or Alt + 2 – Open 3D editor, etc. Whatever combination that requires you to press Alt + number or letter (by the way, Alt + Space inserts space), it will  insert a special characters.

I'd expect these shortcuts not to be ignored. 

After a quick lookup in the codebase, when you press one of the shortcuts, it only hits: `void FindReplaceBar::_editor_text_changed()` from the `code_editor.cpp` file.

These calls are being ignored (`editor_node.cpp`):
```
if (ED_IS_SHORTCUT("editor/editor_2d", p_event)) {
    _editor_select(EDITOR_2D);
} else if (ED_IS_SHORTCUT("editor/editor_3d", p_event)) {
    _editor_select(EDITOR_3D);
} else if (ED_IS_SHORTCUT("editor/editor_script", p_event)) {
    _editor_select(EDITOR_SCRIPT);
```

I'm not a C++ guru neither not so familiar with the project. Therefore I assume it was implemented intentionally.
I can try to fix that, but at the moment, I don't understand why those shortcut calls have "less priority" than "text_changed event".

There are two workarounds:
1. Have the same shortcuts as for windows, at least the second part: Alt + F1, Alt + F2, and so on.
2. Change bindings in the editor settings.

Maybe there is also an option to disable it in macOS.

NB: It doesn't work only from the script editor. It works if you are on the 2D Editor and want to jump to the script editor (Alt + 3).

It might be a related issue: https://github.com/godotengine/godot/issues/23548

### Steps to reproduce

1. Open the script editor;
2. Try to press Alt + 1, Alt + 2, Alt + Space.

### Minimal reproduction project

_No response_
Repository: terminal
Issue: Unable to use applications that hook the arrow keys using Windows Console Host.
Labels: Issue-Feature,Area-Accessibility,Product-Terminal,InclusionBacklog,InclusionBacklog-Windows TerminalWin32,Disability-LowVision

### Windows Terminal version

1.14.1962.0

### Windows build number

Windows 10 21H2 (64-bit) build 19044.1826

### Other Software

GitHub CLI latest version.

### Steps to reproduce

1. Run a GH (or other application that hooks the arrow keys) command
2. Attempt to arrow.


### Expected Behavior

This should behave exactly as it does in cmd. I'm able to arrow through the options accessibly and select an option.

### Actual Behavior

When using both Narrator and NVDA, I hear "blank". I'm unable to confirm if this is a visual problem as well.
Repository: flutter
Issue: [camera] Support to choose the audio source while recording
Labels: c: new feature,p: camera,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

Before start the recording with camera plugin, how can we change the audio source?
We can choose the camera as the `availableCameras()` give the list of available cameras. But what if we want to change the audio source for e.g from "Built In Microphone" to "External Microphone".

This question has already been asked on SO https://stackoverflow.com/questions/69882119/how-to-select-the-audio-source-while-recording-a-video-with-flutter-camera-plugi

But there is no answer. So I'm asking it here. It may be a feature request.
Repository: pytorch
Issue: Met bugs ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: -9) local_rank: 0
Labels: oncall: distributed,oncall: r2p

### 🐛 Describe the bug

I met bugs when I run distribute train. 
![image](https://user-images.githubusercontent.com/42291628/182712008-0389906c-84be-470d-9f49-bfa86d861cd0.png)

Package            Version
------------------ ----------------
certifi            2022.6.15
charset-normalizer 2.1.0
idna               3.3
numpy              1.23.1
Pillow             9.2.0
pip                22.1.2
PyYAML             6.0
requests           2.28.1
scipy              1.9.0
setuptools         61.2.0
timm               0.4.5
tlt                0.1.0
torch              1.12.0+rocm5.1.1
torchaudio         0.12.0+rocm5.1.1
torchvision        0.13.0+rocm5.1.1
typing_extensions  4.3.0
urllib3            1.26.11
wheel              0.37.1

### Versions

Collecting environment information...
PyTorch version: 1.12.0+rocm5.1.1
Is debug build: False
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: 5.1.20531-cacfa990

OS: Red Hat Enterprise Linux release 8.4 (Ootpa) (x86_64)
GCC version: (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1)
Clang version: Could not collect
CMake version: version 3.18.2
Libc version: glibc-2.28

Python version: 3.9.12 (main, Jun  1 2022, 11:38:51)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-4.18.0-305.28.1.el8_4.x86_64-x86_64-with-glibc2.28
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: 
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: 5.1.20531
MIOpen runtime version: 2.16.0
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.1
[pip3] torch==1.12.0+rocm5.1.1
[pip3] torchaudio==0.12.0+rocm5.1.1
[pip3] torchvision==0.13.0+rocm5.1.1
[conda] numpy                     1.23.1                   pypi_0    pypi
[conda] torch                     1.12.0+rocm5.1.1          pypi_0    pypi
[conda] torchaudio                0.12.0+rocm5.1.1          pypi_0    pypi
[conda] torchvision               0.13.0+rocm5.1.1          pypi_0    pypi

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @kwen2501
Repository: TypeScript
Issue: Add import on file drag/drop
Labels: Suggestion,Experience Enhancement

# Suggestion

From https://github.com/microsoft/vscode/issues/5240

## 🔍 Search Terms
- drop
- dnd
- import
- require


## ⭐ Suggestion

When I drag and drop a file from VS Code's explorer into the top of my TypeScript code, it should insert an import statement

For example if I have the workspace:

```
index.ts
sub/
    other.ts
```

And I drop `other.ts` into `index.ts`, it should insert:

```ts
import $1 from './sub/other'; // here $1 is where the cursor should be after the drop
```

## Other cases

- I should be able to drag and drop multiple files to create multiple imports

- Possible: If I drop the file into somewhere else in the file, we should instead insert an import expression

- The added import path should take into account TypeScript's path resolution logic

- This also should apply when copy and pasting a file into the editor
Repository: vscode
Issue: Undo Command only Un-Deleted/Un-Replaced 2 out of 4 Deleted Files when working on a remove server
Labels: bug,file-explorer,confirmation-pending

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: **Yes**/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.68.1
- OS Version: Mac OSX 11.3.1

Steps to Reproduce:

1. Connect to a remote server. All of the below steps should be done while connected to the remote server.
2. Create a folder and put many random files inside. (at least 3 or so).
3. Create another folder (outside of the step 2 folder) and put a folder with the same name as step 2's folder inside. This new sub-folder should have different or no files. Below is an example setup that can be tried to reproduce the bug.

TopFolder
    * SomeFolder (parent is TopFolder)
        * File1
        * File2
        * File3
    * OtherFolder (parent is TopFolder)
        * SomeFolder (parent is OtherFolder)
            * File4

        
4. Go inside of step 3's folder and try to drag out the new folder with step 2's name into the same folder that step 2's folder is in. (In this case try to drag the SomeFolder with only 1 file into TopFolder which the SomeFolder with 3 files is also in.)
5. Accept the replace prompt.
6. Try to use the undo command multiple times to restore all files.

I was working and when I tried to drag a sub-folder outside of a folder I accidentally replaced another folder with the same name that had some files I needed inside of it. The replaced folder contained 4 files. However, I tried using the undo command multiple times and yet only 2 of the 4 files were recovered.
Repository: vscode
Issue: Programmatically running a task in VS Code Web ignores `dependsOn` tasks
Labels: bug,tasks,web

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: VS Code Web v1.69.2
- OS Version: MacOS

Steps to Reproduce:

1. Create a custom task provider in an extension (process and shell tasks are unsupported in VS Code Web)
2. Create a tasks.json file with multiple tasks where one `dependsOn` the other
3. Contribute a command which executes the task with the dependency using `vscode.tasks.executeTask(...)`
4. Open the extension in VS Code Web and execute the command

Expectation: the dependent task is executed
Outcome: it isn't

Test details...

Executing `Run Task...` in command pallet to start the task with dependency

- VS Code Desktop: Works
- vscode-test-web: Works
- vscode.dev: Works

Executing task with dependency using custom command with  `vscode.tasks.executeTask(...)`

- VS Code Desktop: Works
- vscode-test-web: Does not work (dependent task not executed)
- vscode.dev: Does not work (dependent task not executed)

Extension reproducing this issue can be found here:

https://github.com/thegecko/web-extension-tasks
Repository: pytorch
Issue: torch.Tensor.bag() should automatically implement bagging
Labels: triaged,enhancement

### 🚀 The feature, motivation and pitch

Bootstrap aggregation, or bagging, is a common sampling technique in training ML models. For a dataset D of size N, bagging will randomly sample with replacement N data points from D. These bagged datasets can then be used to train an ensemble of models which will often outperform a single model trained on unbagged data (see Breiman, 1996). 

### Documentation

Tensor.bag(dim=0, n=1) should return a tensor of data points sampled randomly with replacement from the original tensor, and of the same size as that tensor. 

Dim refers the the dimension along which to randomly sample. 

N refers to the number of bagged datasets to return; if n>1, the tensor returned should include n independent bagged datasets of the same size as the original tensor. 

Out refers to what should be returned. The default is to return the bagged values. 'idx' should return the indices that would have been bagged, and 'both' should return a named tuple of both values and indices. 

### Questions
* Should the returned Tensor be a deep copy or simply a view of the original data? Views are sufficient if the data will not be transformed in the training process. But processing after bagging (e.g. normalizing the bagged dataset) would require a deep copy. Perhaps this should be an option, or two separate methods. 
* Is 'out' the correct way to handle this? What should be the default behavior, and what should the options be named?

### Alternatives

PyTorch could also implement the equivalent of numpy's np.random.choice(), which has an outstanding pull request as described in this issue: https://github.com/pytorch/pytorch/issues/16897

### Additional context

_No response_
Repository: pytorch
Issue: Fill in a bool Tensor not supported in jit
Labels: oncall: jit

### 🐛 Describe the bug

Fill in a bool Tensor not supported in jit 

```python
import torch

class Dumbo(torch.nn.Module):
    def forward(self, x):
        x_mask = torch.zeros(x.shape, dtype=torch.bool)
        x_mask[:,:] = True
        return x_mask + x


x = torch.rand(2, 3)
import io
torch.onnx.export(Dumbo(), (x, ), io.BytesIO())
```

Error message is as follows

```
RuntimeError: 0INTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1646755903507/work/torch/csrc/jit/ir/alias_analysis.cpp":607, please report a bug to PyTorch. We don't have an op for aten::fill_ but it isn't a special case.  Argument types: Tensor, bool, 

Candidates:
        aten::fill_.Scalar(Tensor(a!) self, Scalar value) -> (Tensor(a!))
        aten::fill_.Tensor(Tensor(a!) self, Tensor value) -> (Tensor(a!))
```

Current workaround, replace

```
x_mask = torch.zeros(x.shape, dtype=torch.bool)
x_mask[:,:] = True
```

with

```
x_mask = torch.zeros(x.shape)
x_mask[:,:] = 1
```



### Versions

Python version: 3.8.12 (default, Oct 12 2021, 13:49:34) [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.15.0-1014-azure-x86_64-with-glibc2.17
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
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

Versions of relevant libraries:
[pip3] mypy==0.950
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.6
[pip3] torch==1.13.0a0+gitf1aeea2
[pip3] torchvision==0.13.0a0+8e5844f
[conda] mkl 2022.0.1 h06a4308_117
[conda] mkl-include 2022.0.1 h06a4308_117
[conda] numpy 1.21.6 pypi_0 pypi
[conda] torch 1.13.0a0+git6997ac7 pypi_0 pypi
[conda] torchvision 0.13.0a0+8e5844f dev_0
Repository: pytorch
Issue: Subclass of Tensor doesn't support __format__
Labels: triaged,tensor subclass

### 🐛 Describe the bug

```__format__``` on a 0-dimension tensor works if the class is ```torch.Tensor```, but fails with a subclass. (Tripped over this when using fastai, which subclasses Tensor.)

```
from torch import Tensor, tensor

x = Tensor(tensor(4.8801))
print(x.__format__('.4f'))

class TensorSubclass(Tensor):
    pass

y = TensorSubclass(tensor(4.8801))
print(y.__format__('.4f'))
```
```
4.8801
Traceback (most recent call last):
  File "main.py", line 10, in <module>
    print(y.__format__('.4f'))
  File ".../pytorch/torch/_tensor.py", line 842, in __format__
    return handle_torch_function(Tensor.__format__, (self,), self, format_spec)
  File ".../pytorch/torch/overrides.py", line 1530, in handle_torch_function
    result = torch_func_method(public_api, types, args, kwargs)
  File ".../pytorch/torch/_tensor.py", line 1263, in __torch_function__
    ret = func(*args, **kwargs)
  File ".../pytorch/torch/_tensor.py", line 845, in __format__
    return object.__format__(self, format_spec)
TypeError: unsupported format string passed to TensorSubclass.__format__
```

### Versions

PyTorch version: 1.13.0a0+gitf4ee374
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.5 (x86_64)
GCC version: Could not collect
Clang version: 13.1.6 (clang-1316.0.21.2.5)
CMake version: version 3.23.3
Libc version: N/A

Python version: 3.9.12 (main, Jul 29 2022, 10:53:31)  [Clang 13.1.6 (clang-1316.0.21.2.5)] (64-bit runtime)
Python platform: macOS-12.5-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.22.4
[pip3] torch==1.13.0a0+gitf4ee374
[pip3] torchaudio==0.13.0.dev20220801
[pip3] torchvision==0.14.0.dev20220801
[conda] Could not collect

cc @ezyang
Repository: pytorch
Issue: UnaryUfuncInfo Sample Generation Ignores sample_kwarg function
Labels: high priority,triaged,module: correctness (silent),module: testing

### 🐛 Describe the bug

`op.sample_inputs` as is the common pattern throughout [test_ops](https://github.com/pytorch/pytorch/blob/master/test/test_ops.py) etc ignores the `sample_kwarg` that is passed into the UnaryUFunc OpInfo. 

As a result, no kwargs are passed in / tested. 

repro run `python test/test_ops.py -k test_fake_nan_to_num_cpu_float32` and print kwargs.

### Versions

master

cc @ezyang @gchanan @zou3519
Repository: flutter
Issue: [plugins] Add diff-level analysis to `publishable` check
Labels: team,p: tooling,package,team-ecosystem,P3,triaged-ecosystem

Currently the `publishable` check is course, only looking at files changed, so needs false-positive overrides fairly often. We could do better by looking at the actual diff. For instance:
- Ignore (non-doc-)comment-only changes (like the Cocoon test bot check does) in implementation files.
  - This comes regularly in particular for `// ignore:` annotations.
- Ignore `testImplementation` changes in Gradle files (e.g., https://github.com/flutter/plugins/pull/5899)
- Ignore `dev_dependency` changes in pubspec.yaml (although that would require more than just line-level analysis, so would be harder than the above).
Repository: pytorch
Issue: [LibTorch] the C++ api needs detailed error reports like pytorch 
Labels: module: logging,triaged,enhancement

### 🚀 The feature, motivation and pitch

 
Basically, I am currently working with Libtorch (the C++ version of pytorch), and encountered a problem.

When any operations fails within the libtorch engine, it will raise a debug error as intended. However, unlike pytorch which reports the error in details through log messages, the libtorch debug window leads up to the point of execution termination in the "disassembly version" of my application.

<img width="797" alt="15e9bafce8b1bd35a56abf36dd30dbd" src="https://user-images.githubusercontent.com/61119095/182743523-963e9486-3626-496f-8cd2-5389cec0ddb1.png">

Although the stack trace provides the function that causes the error in LLDB,  and the annotations within disassembled binaries indicates that libtorch went through an error checking and report stage, no reasonings or error messages are given before the application terminates its execution.

This is extremely troublesome while debugging an application, since many functions can fail in multiple ways and there will be no way to know the reasons of failure directly from libtorch. 

Therefore, I would like the error loggings like pytorch to be also possible within libtorch, which will be a great help for me and other C++ developers working on this engine.

### Alternatives

_No response_

### Additional context

_No response_