sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Auto indent when move line up or down
Labels: bug,editor-autoindent

<!-- ⚠️⚠️ 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. -->

When using `Alt+Up` or `Alt+Down` to move lines in code, automatic adjustment of indentation would greatly benefit languages like Python, where correct indentation does matter and saves time. Currently, as shown in the gif below, I must manually readjust indentation using TAB or Space after moving lines.
![Animation](https://github.com/user-attachments/assets/22c42a92-f52d-4562-bae3-589e39d7817c)
Repository: godot
Issue: Keyboard and mouse not working in Android editor
Labels: bug,platform:android,topic:editor,topic:porting,needs testing,topic:input,regression

### Tested versions

godot 4.3 rc2 mobile version 

### System information

Xiaomi A2 android 10 snapdragon 660 4gb ram 

### Issue description

cant drag or delete nodes and cant long press to save files or create one 

### Steps to reproduce



### Minimal reproduction project (MRP)
Repository: vscode
Issue: VS Code tried to update itself and deleted `resources/app/out`; no longer starts and broke my existing open sessions
Labels: bug,install-update,winget

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
Does this issue occur when all extensions are disabled?: Unknown

Version: 1.91.1 (system setup)
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

Steps to Reproduce:

1. Wait for a VS Code update to be automatically installed at 12:00 on an arbitrary day (I do not know how/why/when exactly this occurs).
2. Observe that any open VS Code window suddenly becomes nonfunctional - many button presses do nothing, tasks fail to launch.
3. Observe that VS Code logs (e.g. user settings sync log) complain about missing `.js` files.
4. Observe that starting new VS Code instances fails with the below error message.

```
Error: Cannot find module 'C:\Program Files\Microsoft VS Code\resources\app\out\main'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1055:15)
    at s._resolveFilename (node:electron/js2c/browser_init:2:115690)
    at node:electron/js2c/browser_init:2:121111
    at node:electron/js2c/browser_init:2:121360
    at node:electron/js2c/browser_init:2:121364
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:392:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328:10)
    at loadBuiltinModule (node:internal/modules/helpers:68:7)
    at Module._load (node:internal/modules/cjs/loader:923:17)
    at c._load (node:electron/js2c/node_init:2:13672)
```

Has happened twice so far (last time about a month ago, presumably with previous update).

VS code `main.log` has the following on recent startup before the event:

```
2024-08-02 07:04:09.468 [info] update#setState idle
2024-08-02 07:04:39.476 [info] update#setState checking for updates
2024-08-02 07:04:39.480 [info] update#setState downloading
2024-08-02 07:04:39.481 [info] update#setState downloaded 
```

The Application event log has some `RestartManager` entries at the time when the problem started:

1. `Starting session 0 - ‎2024‎-‎08‎-‎02T09:00:39.339256800Z.`
2. `Application 'C:\Program Files\Microsoft VS Code\Code.exe' (pid 8852) cannot be restarted - Application SID does not match Conductor SID..` (repeated with different PIDs)
3. `Machine restart is required.`
4. `Ending session 0 started ‎2024‎-‎08‎-‎02T09:00:39.339256800Z.`

Next to the vanished `resources/app/out` directory is a directory `resources/app/node_modules.asar.unpacked` whose timestamp matches the event in the Application event log.

I surmise that VS Code tried to update itself but somehow messed up and left me with a broken installation. I will reinstall since I need to continue my work but I have made copies of relevant folders in case there may be something valuable in there (I was not able to find any other relevant logs, though).
Repository: pytorch
Issue: lazy_clone does not work for pinned memory
Labels: module: cuda,triaged,module: copy on write

### 🐛 Describe the bug

```python
import torch

x = torch.randn(30, device='cuda')

xcpu = x.to('cpu', non_blocking=True)

torch.cuda.synchronize()

clone = xcpu._lazy_clone()

```

crashed with 
```
Traceback (most recent call last):
  File "a.py", line 9, in <module>
    clone = xcpu._lazy_clone()
RuntimeError: Expected storage != nullptr to be true, but got false.  (Could this error message be improved?  If so, please report an enhancement request to PyTorch.)
Exception raised from _lazy_clone at ../aten/src/ATen/native/AutogradComposite.cpp:98 (most recent call first):
C++ CapturedTraceback:
#4 ?? from /home/XXX/.pyenv/versions/torch24/lib/python3.10/site-packages/torch/lib/libc10.so:545789
#5 c10::Error::Error(c10::SourceLocation, std::string) from /home/XXX/.pyenv/versions/torch24/lib/python3.10/site-packages/torch/lib/libc10.so:552837
#6 c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*) from /home/XXX/.pyenv/versions/torch24/lib/python3.10/site-packages/torch/lib/libc10.so:220632
#7 at::native::_lazy_clone(at::Tensor const&) from /home/XXX/.pyenv/versions/torch24/lib/python3.10/site-packages/torch/lib/libtorch_cpu.so:29235390
```


### Versions

torch2.4

cc @ptrblck @msaroufim @kurtamohler
Repository: vscode
Issue: Unable to sign in with Plasma 6 Wayland
Labels: upstream,electron


Type: <b>Bug</b>

I'm running Plasma 6 Wayland on NixOS. When attempting to sign in it gets stuck on "Signing in to your account" for both Microsoft and GitHub, and never opens the browser window to actually let me sign in.

Switching to an X11 desktop session works correctly and I am able to go through the authentication process.

VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:08:12.169Z)
OS version: Linux x64 6.6.43
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD Ryzen 7 7800X3D 8-Core Processor (16 x 4474)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|5, 5, 3|
|Memory (System)|30.51GB (25.51GB free)|
|Process Argv|--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --crash-reporter-id b8d59def-a744-4a45-a693-f803e9242e18|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|plasma|
|XDG_CURRENT_DESKTOP|KDE|
|XDG_SESSION_DESKTOP|KDE|
|XDG_SESSION_TYPE|wayland|
</details><details><summary>Extensions (15)</summary>

Extension|Author (truncated)|Version
---|---|---
tasks|act|0.16.0
Bookmarks|ale|13.5.0
Nix|bbe|1.0.1
githistory|don|0.6.20
git-commits|Exe|4.2.0
codespaces|Git|1.17.2
vscode-github-actions|git|0.26.3
vscode-pull-request-github|Git|0.92.0
rainbow-csv|mec|3.12.0
vscode-docker|ms-|1.29.1
remote-containers|ms-|0.380.0
remote-wsl|ms-|0.88.2
hexeditor|ms-|1.10.0
material-icon-theme|PKi|5.8.0
material-theme|zhu|3.17.2


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
0ee40948:31013168
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
impr_priority:31102340
refactort:31108082
ccplc:31103425
pythonrstrctxtcf:31103194

```

</details>

<!-- generated by issue reporter -->
Repository: godot
Issue: Embedding Godot in existing Android projects memory leaks
Labels: bug,platform:android,needs testing

### Tested versions

version: 4.2.2.stable 

Device: Samsung S10 Lite (Android  13)

### System information

Ubuntu 22.04.4 LTS, GODOT ENGINE version: 4.2.2.stable, Device: Samsung S10 Lite (Android  13)

### Issue description

I just tried the official demo GLTF viewer
https://github.com/m4gr3d/Godot-Android-Samples/tree/master/apps/gltf_viewer



When i close the app with back button of device below error came in log and also sometime app crashing

```
**Object::Destroy(0xb4000079e9dc7f00) for engine ignored; 2 total active objects
16:55:00.866 libOpenSLES              E  Object::Destroy(0xb4000079e9dc7f00) for engine ignored; active object ID 2 at 0xb4000079e9c08e00
16:55:00.866 libOpenSLES              E  Object::Destroy(0xb4000079e9dc7f00) for engine ignored; active object ID 3 at 0xb4000079e9c4c400
16:55:00.914 godot                    E  USER WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
16:55:00.914 godot                    E     at: cleanup (core/object/object.cpp:2209)
16:55:00.935 libc                     A  FORTIFY: pthread_mutex_trylock called on a destroyed mutex (0xb400007a6573c66c)
16:55:00.936 libc                     A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 28395 (AudioTrack), pid 28260 (com.gododemo3)
16:55:01.245 DEBUG                    A  Cmdline: com.gododemo3
16:55:01.245 DEBUG                    A  pid: 28260, tid: 28395, name: AudioTrack  >>> com.gododemo3 <<<
16:55:01.245 DEBUG                    A        #04 pc 00000000000c2d7c  /data/app/~~RGYPDDw01I0KEmkQOkUWMw==/com.gododemo3-EfB8SEs8A_rvRlWxX7KLPw==/base.apk!libc++_shared.so (std::__ndk1::recursive_mutex::try_lock()+12) (BuildId: 25b13e08a3a359bf0ac835176dfbc89a7b30c1c4)
16:55:01.245 DEBUG                    A        #05 pc 0000000000d6e620  /data/app/~~RGYPDDw01I0KEmkQOkUWMw==/com.gododemo3-EfB8SEs8A_rvRlWxX7KLPw==/base.apk!libgodot_android.so**
```

i also made the Node2D hello world demo both have same issue.

### Steps to reproduce

Load the demo app in android phone and press back button. 

### Minimal reproduction project (MRP)

[GodotoDemo3_App.zip](https://github.com/user-attachments/files/16469776/GodotoDemo3_App.zip)
[TestEmbedded_GODOT_PROJECT.zip](https://github.com/user-attachments/files/16469798/TestEmbedded_GODOT_PROJECT.zip)
Repository: PowerToys
Issue: Switch for Power Rename to NOT act on subfolders and files within subfolders.
Labels: Idea-Enhancement,Product-PowerRename,Needs-Triage

### Description of the new feature / enhancement

The expected behavior would be that the rename window pops up with only the selected folders/files checked, and any subfolders/files contained within the selected folders unchecked or preferably not even showing.

### Scenario when this would be used?

If you only want to rename some top folders, you get presented with a rename window with EVERY subfolder and file showing AND checked within the selected topfolder(s).

It's downright impossible to just quickly rename some top/parent folders this way because 

A) You cannot multi-select files in the rename window to toggle the checkmark
B) it takes way too much clicking to uncheck individual files/subfolders
C) The buttons next to the dropdown to select `filename+ext`/`filename only`/`extension only` just don't have any effect on the checkmarks, everything stays selected

### Supporting information

_No response_
Repository: vscode
Issue: [json] colorize string literals based on language information coming from schemas
Labels: help wanted,feature-request,json

<!-- ⚠️⚠️ 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. -->

The built in `json-language-features` extension provides plenty of nice features for JSON Schemas, such as [`markdownDescription`](https://code.visualstudio.com/docs/languages/json#_use-rich-formatting-in-hovers) and [`defaultSnippets`](https://code.visualstudio.com/docs/languages/json#_define-snippets-in-json-schemas).

I would love for it to also enable indicating that the value of a property is an embedded language.

Specifically I would love for the built in `npm` extension to be able to indicate that values within the `"scripts"` property of `package.json` files are `shellscript` values.

Would make it easier to interpret and author complex npm-scripts setup such as this:

[![Skärmavbild 2024-08-02 kl  14 19 11](https://github.com/user-attachments/assets/878a7988-7114-4168-9af4-bbbba490a019)](https://github.com/neostandard/neostandard/blob/3f65825582520709ac2900d17049340b5d9256a2/package.json#L31-L63)

### Implementation brainstorming

The current schema that the `npm` extension uses is [json.schemastore.org/package](https://json.schemastore.org/package):

https://github.com/microsoft/vscode/blob/444d7a4b35745ed7733c700a8008f55cd659eb1d/extensions/npm/package.json#L314-L318

It actually already contains something similar that's aimed at IntelliJ – `"x-intellij-language-injection": "Shell Script"`, which IntelliJ added in https://github.com/JetBrains/intellij-community/commit/2e490cee9ea05967ebaa5084ae42fe58ffc5800a

Here's how it looks in the `package.json` schema:

```json
"scriptsInstallAfter": {
  "description": "Run AFTER the package is installed.",
  "type": "string",
  "x-intellij-language-injection": "Shell Script"
},
```

Maybe something similar, such as `"x-vscode-language-injection": "shellscript"` could work? Or, considering that [`Shell Script` is an alias of `shellscript`](https://github.com/microsoft/vscode/blob/444d7a4b35745ed7733c700a8008f55cd659eb1d/extensions/shellscript/package.json#L20), consume `x-intellij-language-injection` wherever it is available?

### Related discussions

Mostly stumbled upon people requesting this for yaml:

- Desire for embedded languages in GitHub Action workflow files: https://github.com/github/vscode-github-actions/issues/266
- Desire for embedded languages at large in yaml files: https://github.com/redhat-developer/vscode-yaml/issues/943
Repository: vscode
Issue: Incorrect Wrapping of Selected Expression When Typing "{" in Multi-line Conditional Expression
Labels: bug,editor-autoindent

<!-- ⚠️⚠️ 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.92.0**
- OS Version: Windows 11 Pro Version **23H2** Build: **22631.3880**
- (Language: **Javascript**/**Typescript**)

**Steps to Reproduce**:

1. Configure the formatter to split long conditional expressions into multiple lines.

2. Use the following code snippet:

    `[0, 1, 2].filter(x => `
    `    'LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG' || true`
    `)`

3. Select the inner expression `'LONG...' || true` using `Shift + Alt + Arrow`.
4. Type `{`.

**Observed Behavior**:
The selected expression is replaced by `{`, resulting in:

`[0, 1, 2].filter(x => `
 `    {`
`)`

**Expected Behavior**:
The selected expression should be wrapped in `{ }`, resulting in:

`[0, 1, 2].filter(x => `
 `    {'LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG' || true}`
`)`


**Additional Observation**:
When the line break after the conditional expression is included in the selection, the wrapping functions as expected.
Repository: PowerToys
Issue: Fancy Zones does not follow `Move newly created windows to their last known zone` setting
Labels: Issue-Bug,Product-FancyZones,Needs-Triage

### Microsoft PowerToys version

0.83.0

### Installation method

PowerToys auto-update

### Running as admin

No

### Area(s) with issue?

FancyZones

### Steps to reproduce

Uncheck `Move newly created windows to their last known zone` 
Open a program and place it in a zone other than where it was last closed or where another instance is currently running.

### ✔️ Expected Behavior

Expected behavior is that the newly opened program(instance) stays put in the zone you placed it in, regardless of the mentioned setting being checked or unchecked, but especially when it is unchecked.
It may open in the zone where it was last closed **if no other instance is running**, but if the program supports running multiple instances, I expect it to 

A) Open in the zone where the last opened instance is running
B) Stay put in the zone I place it in after it has opened.

Even if I enable the mentioned setting, I would expect a new opened instance of the same program to open in the zone where that last opened instance is running, not where the last **closed** instance was running.
Afterall, the setting does not make any mention whether the last known zone is one where the program instance was last closed or where it was last placed, which is a crucial difference.


### ❌ Actual Behavior

Observe that after several seconds (sometimes more than just a few) a new opened instance of the same program moves to the zone where it was last closed, **even if you just placed it in another zone**.

For instance, I have a template with 2 equally sized zones (horizontal layout), I open, for instance, two Explorers or two Text Editor windows and want to put each new opened instance in its own zone. 
However, instead of the new opened instance staying put in the zone I placed it in, it moves to the zone where the last known instance was closed.

This is to put it bluntly, bloody annoying. 

### Other Software

_No response_
Repository: node
Issue: Implement support for `async iterable<T>` WebIDL type
Labels: web-standards

https://github.com/whatwg/webidl/pull/1397 adds the `async iterable<T>` type to WebIDL (lifted from whatwg/streams).

WHATWG Streams are changing to use this API in https://github.com/whatwg/streams/pull/1310.
Repository: godot
Issue: Collisions not working in @tool scripts
Labels: enhancement,discussion,topic:editor,documentation,topic:physics

### Tested versions

- Reproducible in v4.3.rc2.official.3978628c6 and 4.2.2

### System information

Godot v4.3.rc2 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.5152) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)

### Issue description

I have been unable to find any info in the docs that collisions are not intended to work with `@tool` scripts, so I assume they should. Seems like a pretty fundamental thing, so perhaps I am doing something wrong or missing something obvious.

In the example, at runtime, the collisions work as intended, but if you interactively drag the collider around in the editor with a `@tool` script, the collision signals don't trigger.

![Tool_collisions_not_working](https://github.com/user-attachments/assets/8d79f7d3-73c3-4bb5-b432-31e46751d24c)

Here is the script code for the signals...

![Tool_collisions_not_working_code](https://github.com/user-attachments/assets/49638086-4668-4b03-b2c4-4cb4e2f58313)

The attached example has two colliders, one is a Static body (square) and another Area2D (capsule). The Area2D circle overlaps them both and the collision signals fire correctly at runtime (see screenshot for output). But it does not work if I drag the circle over them in the editor. Shouldn't this work with `@tool` scripts?


### Steps to reproduce

- Run the example MRP project and you'll see in the output window that the collision signals trigger correctly
- However, if you pick up the Area2D_CIRCLE and move it in the editor, the signals do no fire. I believe the should with a `@tool` script. If they should not, this should be stated somewhere in the docs, but this seems very fundamental.

### Minimal reproduction project (MRP)

[Area2D_Tool_bug.zip](https://github.com/user-attachments/files/16471090/Area2D_Tool_bug.zip)
Repository: go
Issue: proposal: flags: <Type>VarDefault functions
Labels: Proposal

### Proposal Details

Implement flag.<Type>VarDefault() functions that would take the default value from the variable itself. For example:

```go
var p string = "default value"
flag.StringVarDefault(&p,"flagName", "usage")
```

should equal to:

```go
var p string = "default value"
flag.StringVar(&p,"flagName", p, "usage")
```
If approved, I would like to implement this myself.
Repository: react
Issue: Bug: Conditionally rendering a lazy loaded component only after the parent node is attached causes infinite loop
Labels: Type: Bug,Component: Suspense

React version: 18.3.1 and [19.0.0-rc-b57d2823-20240822](https://codesandbox.io/p/sandbox/conditionally-rendering-a-lazy-loaded-component-only-after-the-parent-node-is-attached-causes-infinite-loop-s9gzml)

## Steps To Reproduce

1. Create a component that renders the children inside a `<div>`, but only after it has obtained reference to that div (via putting the div node into a state)
2. Pass a lazy loaded component as children

So basically something like:
```jsx
import { Suspense, lazy, useState } from 'react';

const LazyLoadedComponent = lazy(
  () =>
    new Promise((resolve) => {
      setTimeout(
        () =>
          resolve({
            default: () => <div>Lazy loaded component</div>,
          }),
        500,
      );
    }),
);

const RenderAfterMount = (props) => {
  const [node, setNode] = useState(null);

  return <div ref={setNode}>{node && props.children}</div>;
};

export const App = () => (
  <Suspense>
    <RenderAfterMount>
      <LazyLoadedComponent />
    </RenderAfterMount>
  </Suspense>
);
```

Link to code example:
https://codesandbox.io/s/vibrant-murdock-jpnznd?file=/src/App.js:542-561

## The current behavior
Runtime error due to an infinite loop.

## The expected behavior
The lazy loaded component is rendered.