sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Add API to reopen document with specific CustomTextEditor
Labels: feature-request,api,custom-editors

My use case is this:

- I defined a `CustomTextEditor` for viewing `.md` files. 
- I want to toggle between my custom editor and other editors (including the default plain text one) for the current document
- Currently I do this by running `workbench.action.closeActiveEditor` chained with `.then` calling `vscode.openWith` to open my editor. There are problems with this...
   - It prompts the user with a confirmation dialog if the file has unsaved changes
   - Even if the document is already saved, closing and then reopening it causes the tab and title to briefly disappear/flicker
   - It loses track of undo history

Could there be an addition to the VS Code API that lets you seamlessly switch editors while keeping the file dirty and not losing the undo history?

I tried `workbench.action.reopenWithEditor` but this seems to behave the same as closing the current editor and opening a new one.
Repository: vscode
Issue: "Reveal in Explorer View" misbehaves with out-of-workspace files
Labels: bug,workbench-tabs,context-keys

**Current behavior:** When the user selects "Reveal in Explorer View" from the context menu of a non-workspace file, the file is not always revealed in the Explorer View (for any reasonable definition of the word "reveal"). 
**Expected behavior:** When the user selects "Reveal in Explorer View" from the context menu of a file, the file is revealed in the Explorer View.


<!-- ⚠️⚠️ 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: 1.73.1 (and source code reviewed from the current main branch 7f65f0213caa93be075fedb6ce87885a4ce56eab)
- OS Version: Linux x64

Steps to Reproduce:

1. Open a folder or workspace, and open some files from there (e.g., foo.c and foo.h).
2. Open a file which is *not* in the folder or workspace (e.g., /usr/include/stdio.h).
3. While a workspace file (e.g., foo.h) is active, right-click the non-workspace file and select "Reveal in Explorer View":
![reveal](https://user-images.githubusercontent.com/96844552/209344108-d8baef18-a22c-4c33-a81c-0962c7f01196.png)
4. Observe how the non-workspace file is *not* revealed in the Explorer View. Instead, the active workspace file is highlighted:
![Screenshot_20221223_080814](https://user-images.githubusercontent.com/96844552/209344354-d3f12f90-82ca-4ab7-994a-f3e31a79dcb1.png)

The expected behavior could potentially be to "partially highlight" the non-workspace file like this:
![Screenshot_20221223_081257](https://user-images.githubusercontent.com/96844552/209344472-4fdcc5d8-9b4c-480c-b8c5-a0b023ac518b.png)

The relevant section in the source code:
https://github.com/microsoft/vscode/blob/7f65f0213caa93be075fedb6ce87885a4ce56eab/src/vs/workbench/contrib/files/browser/fileCommands.ts#L330-L343
Repository: storybook
Issue: [Bug]: addon-docs should use React 18 root to render in MDX 
Labels: bug,addon: docs,mdx

### Describe the bug

The `DocsRenderer` is using `ReactDOM.render` when rendering MDX. If the client is running React 18, this results in a console error, and React falling back to React 17 behaviour.

<img width="807" alt="image" src="https://user-images.githubusercontent.com/3764345/209346305-06f6aceb-aba1-46e7-9a88-a428da194045.png">

This should be upgraded to to use the new `react-dom/client` to create a `root`, when available. A similar solution has already been implemented in `code/renderers/react/src/render.tsx`

### To Reproduce

```shell
Open an MDX docs page in Storybook, after upgrading to React 18.
```


### System

_No response_

### Additional context

_No response_
Repository: vscode
Issue: Merge conflict: save the file when choosing "accept all"
Labels: bug,merge-conflict

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

I have a merge conflict. I shift+click to select multiple files in the SCM "Merge Changes" section, right click and choose "Accept all current" (or incoming). 

![image](https://user-images.githubusercontent.com/61982285/209346671-cd2dc963-aae9-4cf9-b306-4f1958031448.png)

At this point VSCode opens all of these files and leaves them unsaved, for some reason. Please just save the files, and don't open them.
Repository: pytorch
Issue: Offer `get_buffer` and `get_submodule` in `ScriptModule`?
Labels: oncall: jit

### 🚀 The feature, motivation and pitch

This is something in-between a feature request / documentation issue / bug report.

The documentation of [`ScriptModule`](https://pytorch.org/docs/stable/generated/torch.jit.ScriptModule.html#torch.jit.ScriptModule) documents that the class offers [`get_buffer`](https://pytorch.org/docs/stable/generated/torch.jit.ScriptModule.html#torch.jit.ScriptModule.get_buffer) and [`get_submodule`](https://pytorch.org/docs/stable/generated/torch.jit.ScriptModule.html#torch.jit.ScriptModule.get_submodule). This doesn't seem to be the case though, because trying to access them errors with

```
RuntimeError: get_buffer is not supported on ScriptModules
```

because they are not in the allow list here:

https://github.com/pytorch/pytorch/blob/71d50f4f8955cde773e30b207bfeb98616206823/torch/jit/_script.py#L943

Since `ScriptModules` apparently offers access the buffers and modules, it would feel more consistent if these methods were allowed, right? Furthermore they could offer extra safety when trying to access non-existing buffers/modules. In particular I was running into a bug because setting a buffer like the following is possible without an error:

```py
# Attempting to set a "known" buffer, but due to a typo it didn't have an effect.
# Unfortunately this doesn't seem to error, which hides the fact that there is a typo.
my_script_module.buffer_with_typo = torch.tensor(True)
```

I was hoping that I can use `get_buffer` instead, which (hopefully) would perform a check if the buffer actually exists:

```py
# Would hope that this gives a clear error if the accessed buffer doesn't exist.
my_script_module.get_buffer("buffer_with_typo").copy_(torch.tensor(True))
```

Since `get_buffer` isn't supported at all, this isn't possible though.

For now I'm resorting to `hasattr` checks to make this a bit more robust.

### Alternatives

Adapt the documentation to avoid suggesting the functions are usable.

### Additional context

_No response_

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
Repository: rust
Issue: Error message implies I need a const impl, but there is no such thing
Labels: A-diagnostics,T-compiler

I am using Rust 1.65.0. I run
`cargo new impl_test && cd impl_test && cargo add glam && vi src/main.rs`
and enter this code:

```
use glam::IVec2;

const AXES: [IVec2; 4] = [ -IVec2::Y, IVec2::Y, -IVec2::X, IVec2::X ];

fn main() {
}
```
What I am trying to do is create an array containing the four cardinal directions\*. Rust doesn't like it:
```
error[E0015]: cannot call non-const operator in constants
   --> src\main.rs:3:28
    |
3   | const AXES: [IVec2; 4] = [ -IVec2::Y, IVec2::Y, -IVec2::X, IVec2::X ];
    |                            ^^^^^^^^^
    |
note: impl defined here, but it is not `const`
   --> C:\Users\Andi\.cargo\registry\src\github.com-1ecc6299db9ec823\glam-0.22.0\src\i32\ivec2.rs:628:1
    |
628 | impl Neg for IVec2 {
    | ^^^^^^^^^^^^^^^^^^
    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
```
Oh!, I think. The impl is not const! I will go file a issue on glam and ask them to make this impl const.

But then after a moment I think to check, and I realize [const impls are an experimental feature](https://github.com/rust-lang/rust/issues/67792). It is not stable and the RFC has not even been accepted yet. So that would have been a very unhelpful issue.

The error message seems to be a generic one (the method is not const) but **the wording implies that you can fix it by making the impl const**. In other words it implies the problem is with your impl, but actually the problem is impls are not adequate for what you want them to do. (And if this is something that works in nightly, someone might have the unpleasant experience of thinking the compiler told them to add a const to their impl, adding a const to their impl, and then getting a "sorry, unstable" error message).

**"Ideally the output should look like:"**

I would probably word it like
```
note: impl defined here, but impl methods are not `const`
```
or to be even more explicit
```
note: impl defined here, but impl methods can never be `const`
```

If const impls work in nightly, a `hint: const impl is allowed in nightly [tracking issue link]` could be helpful to in addition to the wording change (or could be used in place of the above wording completely)

\* *What I should have done in this case is use IVec2::NEG_X and IVec2::NEG_Y. But that's not the point.*
Repository: godot
Issue: `class_name` script can be connected to without advanced mode
Labels: bug,topic:editor

### Godot version

4.0 0369475

### System information

Windows 10 x64

### Issue description

If you add a custom type via `add_custom_type()` in EditorPlugin, you can't connect to it using the connection dialog.
![image](https://user-images.githubusercontent.com/2223172/209394289-ee6a8e88-24b0-4ac4-b9bf-7102dd74ab14.png)
The same is not true for `class_name` custom type. You can click it normally, also the icon is not grayed out.

### Steps to reproduce

1. Add a `class_name` type
2. Create an instance on a scene
3. Try to connect a signal without advanced mode
4. You can, but it should be locked

### Minimal reproduction project

[ClassConnect.zip](https://github.com/godotengine/godot/files/10296926/ClassConnect.zip)
Try connecting a Button's signal.
Repository: deno
Issue: node-compat: `@commitlint/cli`dynamic package not installed
Labels: bug,node compat,auto-install

I was trying to use [`commitlint`](https://github.com/conventional-changelog/commitlint), to "lint" commit messages, but am getting this error:

```
error: Uncaught Error: Empty filepath.
    at pathDirname (deno:ext/node/02_require.js:50:13)
    at new Module (deno:ext/node/02_require.js:255:17)
    at Function.Module._resolveFilename (deno:ext/node/02_require.js:553:30)
    at Function.resolve (deno:ext/node/02_require.js:811:21)
    at projectLocalResolveHelper (file:///home/gitpod/.cache/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/util.js:117:24)
    at resolveCompiler (file:///home/gitpod/.cache/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/configuration.js:232:22)
    at resolveAndLoadCompiler (file:///home/gitpod/.cache/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/configuration.js:225:26)
    at findAndReadConfig (file:///home/gitpod/.cache/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/configuration.js:48:28)
    at create (file:///home/gitpod/.cache/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/index.js:146:69)
    at register (file:///home/gitpod/.cache/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/index.js:127:19)
```

### Steps to Reproduce:

In any git repo (with at least 1 commit), run `deno run --allow-read --allow-env --allow-run npm:@commitlint/cli@^17 -x @commitlint/config-conventional --from=HEAD`

### Expected

`commitlint` will validate the commit message of `HEAD` and exit with a 0 status code

### Actual

`deno` crashes due to the uncaught error above.
Repository: deno
Issue: npm:ts-node doesn't work in Deno
Labels: bug,node compat,node API

```
deno run -A npm:ts-node
error: Uncaught Error: Empty filepath.
    at pathDirname (deno:ext/node/02_require.js:50:13)
    at new Module (deno:ext/node/02_require.js:255:17)
    at Function.Module._resolveFilename (deno:ext/node/02_require.js:553:30)
    at Function.resolve (deno:ext/node/02_require.js:811:21)
    at projectLocalResolveHelper (file:///Users/ib/Library/Caches/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/util.js:117:24)
    at resolveCompiler (file:///Users/ib/Library/Caches/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/configuration.js:232:22)
    at resolveAndLoadCompiler (file:///Users/ib/Library/Caches/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/configuration.js:225:26)
    at findAndReadConfig (file:///Users/ib/Library/Caches/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/configuration.js:48:28)
    at phase3 (file:///Users/ib/Library/Caches/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/bin.js:253:67)
    at bootstrap (file:///Users/ib/Library/Caches/deno/npm/registry.npmjs.org/ts-node/10.9.1/dist/bin.js:46:30)

```

Related to https://github.com/denoland/deno/issues/17175
Repository: ant-design
Issue: Add halfChecked controlled state in rowSelection for Table with tree structured dataSource (indeterminate checkbox) 
Labels: Inactive

### What problem does this feature solve?

For now, if we have a Table with tree structured dataSource, there is no way to manage the `indeterminate` state of the checkboxes.
In `rowSelection` of the Table component, the `selectedRowKeys` prop doesn't allow to manage halfChecked keys like we can in the Tree component with `checkedKeys` prop.
Moreover, if we try to manually change the checkbox prop to `indeterminate` with `rowSelection.getCheckboxProps`, it doesn't work and a warning is shown : `Warning: [antd: Table] set 'indeterminate' using 'rowSelection.getCheckboxProps' is not allowed with tree structured dataSource.`

This can be an absolute necessity when using tree structured dataSource with `checkStrictly = true`.

### What does the proposed API look like?

Like for the Tree component, when `checkStrictly = true` , `selectedRowKeys` should look like `{checked: string[], halfChecked: string[]}`

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: vscode
Issue: Right To Left text with numbers
Labels: bug,editor-RTL

Hello
I have a problem with Right To Left (RTL) language and numbers.
I want to write this text

להציג רק את 3 המוצרים הראשונים בטבלה
But on VSCode the result is:
המוצרים הראשונים בטבלה 3 להציג רק את

https://i.imgur.com/aHQHIVy.png

- VS Code Version: 1.74.2
- OS Version:  Windows 11
Repository: godot
Issue: project.godot _global_script_classes doesn't contain classes with open parentheses
Labels: discussion,topic:gdscript

### Godot version

4.0 beta 9

### System information

Windows 10

### Issue description

Not that big of an issue, but it is strange, so thought I'd report it anyways.

Classes with the class_name keyword will not be contained in the godot.project _global_script_classes if a parathesis, bracket, or curly brace is left open, meaning that they cannot be used in other scripts. 
Other errors seem to not have this effect, and classes with errors can still be accessed with their class_name.
This is demonstrated in the provided project.

Took me a minute to find that a script I had class_name in had a missing paranethesis after autocomplete missed one. Godot's autocomplete for functions will not write the closing parenthesis if one is already there, even if that parenthesis is already used to close an existing function call, but that's another issue of it's own.

### Steps to reproduce

- Create a .gd script
- add class_name SomeName
- Add a static func
- Leave a parentheses open (this can happen & not be detected right away when Godot's autocomplete not adding all parantheses)
- Try to call the static func through the class name ->
- -> Will get "Error at (x, y): Identifier "SomeName" is not declared in the current scope

You will see in the example project that the same is not true if there are other types of errors (i.e pas instead of pass).

### Minimal reproduction project

[y.zip](https://github.com/godotengine/godot/files/10297299/y.zip)
Repository: pytorch
Issue: PyTorch memory leak reference cycle in for loop, Mac M1 
Labels: module: memory usage,triaged,module: arm,module: mps

### 🐛 Describe the bug


I am facing a memory leak when iteratively updating tensors in PyTorch on my Mac M1 GPU using the PyTorch mps interface. The following is a minimal reproducible example that replicates the behavior:

```python
import torch 

def leak_example(p1, ubar, device):
    
    t1 = torch.cat((torch.diff(ubar, dim=0), torch.zeros_like(ubar[:1,:,:,:], dtype = torch.float32)), dim = 0)
    u1 = p1 + 2 * (t1)
    
    B = torch.rand_like(u1, device = device)
    mask = u1 < B
    
    a1 = u1
    a1[~mask] = torch.rand_like(a1)[~mask]
    return a1

if torch.cuda.is_available(): # cuda gpus
    device = torch.device("cuda")
elif torch.backends.mps.is_available(): # mac gpus
    device = torch.device("mps")
torch.set_grad_enabled(False)
        
p1 = torch.rand(5, 5, 224, 224, device = device)
ubar = torch.rand(5, 5, 224, 224, device = device)
for i in range(10000):
    p1 = leak_example(p1, ubar, device)    
```

My Mac's GPU memory steadily grows when I execute this loop. I have tried running it on a CUDA GPU in Google Colab and the output of `print(torch.cuda.memory_allocated()/1024**2)` remains constant, though the GPU's Active memory, Non-releasable memory, and Allocated memory do appear to increase as the loop progresses (the output of `torch.cuda.memory_summary()`).

I have tried detaching and cloning the tensors and using weakrefs, to no avail. Interestingly, if I don't reassign the output of `leak_example` to `p1`, the behavior disappears, so it really seems related to the recursive assignment. Also, if I drop the `torch.diff()` assignment, the memory increase stalls out at some point, so it may be related to this function. Does anyone have any idea how I could resolve this?

### Versions

PyTorch version: 1.13.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.5.1 (arm64)
GCC version: Could not collect
Clang version: 14.0.0 (clang-1400.0.29.102)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.15 (main, Nov 24 2022, 08:28:41)  [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-12.5.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
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.23.4
[pip3] torch==1.13.0
[conda] numpy                     1.23.4           py39h1398885_0  
[conda] numpy-base                1.23.4           py39h90707a3_0  
[conda] torch                     1.13.0                   pypi_0    pypi

cc @malfet @snadampal @milpuz01 @kulinseth @albanD @DenisVieriu97 @jhavukainen @razarmehr @abhudev
Repository: godot
Issue: Godot debugger crashes when loading and unloading specific scenes without error
Labels: bug,topic:gdscript,needs testing,crash

### Godot version

Godot Engine v4.0.beta8.official.45cac42c0

### System information

Windows 10, Vulkan API 1.3.194 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 2080

### Issue description

When switching between 2 scenes by adding child and queue_free. and hooking up some connections to UI elements a crash occurs with no debug info and no error.


Video of occurrence is here.
https://youtu.be/3SqTafYZL50


### Steps to reproduce

Easies method to reproduce is to open the above project and run it, the default scene should be save, and when it runs it should switch between 2 scenes at 0.5 second intervals until it crashes. 

One note, if you remove the tilemap from skymap the repro seems to break. 


### Minimal reproduction project

Some extra art assets are included, however when i was removing them the reproduction seemed to be impacted. In-order to reduce churn i left the assets in. 
[repro bug in scene switching.zip](https://github.com/godotengine/godot/files/10297542/repro.bug.in.scene.switching.zip)
Repository: flutter
Issue: [Proposal] Support animated expansion for GridView 
Labels: framework,f: scrolling,c: proposal,P3,team-framework,triaged-framework

I wanted to create a gridview which would look like 4 items (with 2 items cross axis length) and a "show more" button, upon pressing which more items would appear. This works if i just add more entries to the list of aforementioned items but there is no animation to the process. I tried to use the Animated Container widget, but to do that i needed the height of the grid. Long story short I had to install third party package which allows to create grid where elements could have unique height. Thus manually calculating height of the grid i got animation through Animated Container. 

But this is just not a good solution.

I would love to have a Gridview which would expand with animation FROM certain iteration in main axis TO the last iteration. And collapse.

Thank you for your attention. If what I am proposing is already exists please note it out or give away information about where I could find more about the problem.
Repository: godot
Issue: Improper normal detection with CharacterBody3D on edges of trimesh collision shapes
Labels: bug,confirmed,topic:physics,topic:3d

### Godot version

4.0.2 Stable

### System information

Windows 10; Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz 2.30 GHz

### Issue description

Corners of CharacterBody collision shapes don't properly detect the collision normal. This happens on the corners of rectangular collider shapes and also at the very vertex of the capsule shape when on a flat version of the slope included in this example project. This is likely related to https://github.com/godotengine/godot/issues/69137.

https://user-images.githubusercontent.com/23440295/209416069-09db21b8-3a43-45ee-b46e-ed5f879dbddd.mp4

There is a high chance that this also happens on the edges of all shapes, not just concave collision shapes. It's harder to replicate with primitive shapes because the angles between the edges are usually 90 degrees.

### Steps to reproduce

1.) Download the sample project
2.) Turn on visible collision shapes
3.) Slowly move on the line (the edge of the concave shape)
4.) Observe as the raycast that shows the floor normal does not properly show the normal when on the "crack".

### Minimal reproduction project

[NormalDetectionBug.zip](https://github.com/godotengine/godot/files/10297787/NormalDetectionBug.zip)