sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: `retainContextWhenHidden` does not work with `when` clauses for Webview Views
Labels: bug,help wanted,webview-views

<!-- ⚠️⚠️ 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?: (This scenario only applies to extensions)

<!-- 🪓 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.67.0-insider
- OS Version: Windows 10

Steps to Reproduce:

1. Register a custom view provider with `vscode.window.registerWebviewViewProvider` and the option `retainContextWhenHidden: true`
2. Add a `when` clause for the view in `package.json`
3. Observe that when the panel is hidden due to the view context, the context is not retained and the panel needs to reload

I noticed also that manually hiding the panel (e.g. right clicking in a panel and deselecting the view) will retain the context. Would it be possible to do something similar or at least providing an API/command to programmatically trigger the same hiding mechanism?
Repository: neovim
Issue: crash in frame2win()
Labels: needs:repro,has:backtrace,bug-crash

### Neovim version (nvim -v)

v0.8.0-dev+89-g872622bcd-dirty

### Vim (not Nvim) behaves the same?

no idea

### Operating system/version

Fedora 35

### Terminal name/version

alacritty 0.10.1

### $TERM environment variable

alacritty

### Installation

build from repo

### How to reproduce the issue

No idea. Not easily reproducible, happened while running the function `BufOnly` from: https://github.com/schickling/vim-bufonly/blob/05a9f2d79f7aa7e2a94f9a6e29555e878e88d411/plugin/bufonly.vim#L28

Backtrace is here: https://gist.github.com/hasufell/e8fe98f9c6102e73ab40e21b6f4560dc

### Expected behavior

Doesn't segfault.

### Actual behavior

Segfaults.
Repository: pytorch
Issue: Incorrect documentation in ``gumble_softmax`` function.
Labels: module: docs,module: nn,triaged

### 📚 The doc issue

[Gumbel-Softmax documentation](https://pytorch.org/docs/stable/generated/torch.nn.functional.gumbel_softmax.html) states that the ``logits`` argument should be unnormalized. However, this is not how the formula is defined in the [original article](https://arxiv.org/abs/1611.01144), but apparently it's how it is coded in the accompanying notebook. The issue was referenced in this [PyTorch forum post](https://discuss.pytorch.org/t/gumbel-softmax-function-logits/22797).

The problem is that unnormalized log-probabilities may be to large w.r.t. the values introduced by the random samples from the Gumbel distribution, which defeats the purpose of the layer. This in turn leads to poor training performance.

### Suggest a potential alternative/fix

Two possible fixes: 
1. Change the documentation to state that the ``logits`` should be normalized.
2. Normalize the logits inside the function using ``log_softmax``.

cc @svekars @holly1238 @albanD @mruberry @jbschlosser @walterddr @kshitij12345
Repository: rust
Issue: weird warning diagnostic when nesting panics: unreachale nested panic is not unreachable
Labels: A-diagnostics,T-compiler


```rust
fn main() {
    unreachable!("oh no: {}", panic!("unreachable!!"));
}
```

The current output is:

```
warning: unreachable expression
 --> src/main.rs:2:31
  |
2 |     unreachable!("oh no: {}", panic!("unreachable!!"));
  |                               ^^^^^^^^^^^^^^^^^^^^^^^
  |                               |
  |                               unreachable expression
  |                               any code following this expression is unreachable
  |
  = note: `#[warn(unreachable_code)]` on by default
```

It looks like rustc is telling me that the `panic!("unreachable")` is unreachable, but when running the code, it is actually executed:
````
    Finished dev [unoptimized + debuginfo] target(s) in 0.89s
     Running `target/debug/ff`
thread 'main' panicked at 'unreachable!!', src/main.rs:2:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrac
````
Repository: rust
Issue: using const &str as format "literal"?
Labels: C-enhancement

I wonder if at some point we could support using a `const &str`  as format `literal`, sorta like this:

I thought that it would simply get inlined but that probably happens way after macro expansion etc..?

@oli-obk  do you think this is something that is technically possible? :D

````rust
const lit: &'static str = "this is a test: {}, {}";

fn main() {
    println!(lit, "a", "b");
    println!(lit, "hello world", lit);
}
````
Repository: vscode
Issue: White bar appears when using external keyboard on iPad
Labels: bug,upstream,workbench-window,web,upstream-issue-linked,safari,ios-ipados

<!-- ⚠️⚠️ 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. -->
* Device: iPad Pro
* code-server: v4.4.0
* VSCode: 1.66.2

Steps to Reproduce:
Using an iPad with external keyboard, selecting an area that allows keyboard input causes a white bar to appear at the bottom of the screen:

![90480EB9-A3EF-4E35-BF99-EB8863513749](https://user-images.githubusercontent.com/138502/167321887-9b17cbec-4899-4ab7-9780-aa667aac00ab.png)

This is similar to #122390, though I am running a version after that fix has been added. 
This occurs in both PWA mode and regular Safari. Problem does not appear when using the in-built keyboard

The bar disappears when the keyboard is not active/usable.
Repository: PowerToys
Issue: Translate Error in Chinese
Labels: Issue-Bug,Product-PowerToys Run,Loc-Sent To Team,Issue-Translation

### Microsoft PowerToys version

v0.58.0

### Running as admin

- [X] Yes

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

Translate Error in Chinese: “second” should be translated as “秒” there, not “第二个”
![image](https://user-images.githubusercontent.com/89737170/167325565-990d4900-9d7d-4d4e-ba06-619920ecba3d.png)

### ✔️ Expected Behavior

“秒”

### ❌ Actual Behavior

“第二个” ——another means in Chinese

### Other Software

_No response_
Repository: neovim
Issue: Built-in multi-character commands with fake motions (`dd`, `<<`, `yy`, ...) are hard to override with custom mappings
Labels: enhancement,bug-vim,multicursor,mappings

### Neovim version (nvim -v)

Latest

### Vim (not Nvim) behaves the same?

Yes

### Operating system/version

macOS 12

### Terminal name/version

N/A

### $TERM environment variable

N/A

### Installation

From source

### How to reproduce the issue

## Scenario 1

- `:map dd <Cmd>echo "Hello, world"<CR>`
- Press `d`.
- Wait more than `timeoutlen`.
- Press `d`.

## Scenario 2

- `:map dd <Cmd>echo "Hello, world"<CR>`
- Press `d`.
- Wait more than `timeoutlen`.
- Press `dd` quickly.

### Expected behavior

## Scenario 1

`Hello, world` is printed.

## Scenario 2

`Hello, world` is printed, then we re-enter Operator-pending mode (because of the third `d`).

### Actual behavior

## Scenario 1

After the second `d` keystroke, Neovim waits another `timeoutlen`, then deletes the line under the cursor.

## Scenario 2

`Hello, world` is printed, nothing is deleted, and we are back in Normal mode. This is because after the second press of `d`, Vim waits to see if the user will complete that `d` to the Operator-pending mode `dd` `:map` created by `:map dd ...`.

## Note

This is particularly annoying when trying to remap `<<` and `>>` if you use a short `timeoutlen`. I was doing this to customize the behavior of `<<` for some `filetype` and I thought I was going crazy because my custom indent logic was behaving nondeterministically -- because sometimes I was pressing both `<` within `timeoutlen` and sometimes I wasn't, so sometimes I would get a normal one-indent shift and sometimes I would get my custom behavior to fire.
Repository: rust
Issue: Re-export symbols recursion occurs
Labels: A-linkage,A-FFI,T-compiler,C-bug,S-needs-repro

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
#[link(name="frida-core",kind="static")]
extern{
    fn frida_init();
}

pub extern "C" fn frida_init(){
    unsafe {
        frida_init()
    }
}
```

I expected to see this happen: *explanation*

Export normally in cdylib mode

Instead, this happened: *explanation*

Re-export symbols recursion occurs

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.62.0-nightly (30f386087 2022-05-05)
binary: rustc
commit-hash: 30f386087564243ab88a93c984c265290a31580b
commit-date: 2022-05-05
host: x86_64-pc-windows-msvc
release: 1.62.0-nightly
LLVM version: 14.0.1
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>
cdylib compilation
</summary>
<p>

```
<backtrace>
```

</p>



</details>
Repository: flutter
Issue: SliverReorderableList can't properly reorder widgets that require a material widget (eg an IconButton)
Labels: framework,f: material design,f: scrolling,has reproducible steps,P3,found in release: 2.10,found in release: 2.13,team-design,triaged-design

The way reordering is implemented seems to prevent basic widgets to be part of a `SliverReorderableList`. It also breaks Riverpod use cases that require the context to be preserved - for example, when the root provider throws an error because it needs to be locally overriden.

## Steps to Reproduce

The following app will present a list of rows with a text and a button. Click and drag on the text to reorder the elements, and you'll get an exception stating that the IconButton requires a material widget ancestor.

```
import 'package:flutter/material.dart';

const Color darkBlue = Color.fromARGB(255, 18, 32, 47);

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.dark().copyWith(
        scaffoldBackgroundColor: darkBlue,
      ),
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: MyWidget(),
        ),
      ),
    );
  }
}

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return CustomScrollView(
      slivers: <Widget>[
        SliverReorderableList(
          itemCount: 10,
          itemBuilder: (context, index) => ReorderableDragStartListener(
            key: Key('$index'),
            child: Row(children: [
              Text('Element $index'),
              IconButton(icon: const Icon(Icons.cancel), onPressed: () {})
            ]),
            index: index,
          ),
          onReorder: (_from, _to) {},
        ),
      ],
    );
  }
}
```
Repository: vscode
Issue: Explore more obvious section headers in quick pick
Labels: ux,under-discussion

The right-aligned label text has always been slightly confusing to me as a pattern to separate sections in quick pick lists. I think it's worth exploring how we might make these more obvious while still using vertical space efficiently.

## Current

<img width="631" alt="CleanShot 2022-05-08 at 21 29 37@2x" src="https://user-images.githubusercontent.com/25163139/167340909-4237b4a9-d6ed-4cb3-849e-4fe016625122.png">

## Examples

### GitHub

<img width="812" alt="CleanShot 2022-05-08 at 21 30 48@2x" src="https://user-images.githubusercontent.com/25163139/167341026-78dbab4a-8c82-4107-a6cf-147cc2bab906.png">

### Raycast 

<img width="770" alt="CleanShot 2022-05-08 at 21 31 09@2x" src="https://user-images.githubusercontent.com/25163139/167341043-34db2bd9-a15e-42dc-abcd-90ecf9d76ca0.png">

cc @lychung7 @misolori
Repository: flutter
Issue: [camera][iOS] App throws `CameraException(IOError, AVAssetWriter could not finish writing!)` when resuming video recording after returning from background in `release/profile` mode
Labels: platform-ios,p: camera,package,a: release,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-ios,triaged-ios

I have the exception sometimes in the following code.
What is the reason?

```
    try {
      if(controller==null){
        return null;
      }
      if (!controller.value.isRecordingVideo) {
        return null;
      }
      if (controller != null &&
          controller.value.isInitialized &&
          controller.value.isRecordingVideo) {
        try{
          videoFile = await controller.stopVideoRecording();
        } catch (e){
          loggerDBN("stopRecording - exception - " + e.toString());
          }

```
camera version - version: "0.9.4+21"
Flutter version 2.10.3
Dart version 2.16.1
Repository: flutter
Issue: Parent widget scrolls while dragging a draggable widget which is on top of it. 
Labels: framework,f: scrolling,has reproducible steps,P2,found in release: 3.7,found in release: 3.10,team-framework,triaged-framework

I have a PDF ListView and a draggable element per PDF page. 
**How when dragging that element vertically, the document list does not move along?**
**How to prevent events being passed through to parent?**


**<summary>Code sample ListView </summary>**

  ```
@override
  Widget build(BuildContext context) {
    return ListView.builder(
      primary: true,
      shrinkWrap: true,
      itemCount: this.widget.pageCount,
      itemBuilder: (context, index) => PdfPageView(
        key: _keys[index],
        pdfDocument: this.widget.pdfDocument,
        pageNumber: index + 1,
        pageBuilder: (context, textureBuilder, pageSize) =>
            pageBuilder(context, textureBuilder, pageSize, index),
      ),
    );
  }

```
```
 pageBuilder(BuildContext context, PdfPageTextureBuilder textureBuilder,
      Size pageSize, int index) {
    _pageSizes[index] = pageSize;
    double _height = this.widget.viewPortWidth / pageSize.aspectRatio;

    return Container(
      height: _height,
      alignment: Alignment.center,
      width: this.widget.viewPortWidth,
      margin: EdgeInsets.only(bottom: 10),
      child: index != 0
          ? textureBuilder()
          : Stack(
              children: [
                textureBuilder(),
                DraggableWidget(
                  viewPortWidth: this.widget.viewPortWidth,
                  viewPortHeight: _height,
                  pageSize: pageSize,
                )
              ],
            ),
    );
  }
```

**<summary>Code sample Draggable Element </summary>**

```
 @override
  Widget build(BuildContext context) {
    return Positioned(
      top: _y - padding / 2,
      left: _x - padding / 2,
      child: GestureDetector(
        onPanUpdate: (DragUpdateDetails details) {
          updatePosition(details.delta.dx, details.delta.dy);
        },
        child: Container(
          height: _height + padding,
          width: _width + padding,
          padding: EdgeInsets.all(padding / 2),
          child: Container(
            height: _height,
            width: _width,
            padding: EdgeInsets.all(2),
            alignment: Alignment.center,
            decoration: BoxDecoration(
              border: Border.all(
                width: borderWidth,
                color: Colors.blue,
              ),
              color: Colors.lightBlue.shade50.withOpacity(0.9),
            ),
            child: Text(
              'Content',
              textAlign: TextAlign.center,
              style: TextStyle(
                fontSize: _width / 10,
              ),
            ),
          ),
        ),
      ),
    );
  }
```

**<summary>Video</summary>**

https://user-images.githubusercontent.com/19162524/167368059-e4f82c42-8050-4e92-9673-24a078581956.mov
Repository: godot
Issue: Other bottom panels are not reshown when the console is automatically closed after stopping the running project
Labels: discussion,topic:editor,usability

### Godot version

v3.5.beta5.official [815f7fe63]

### System information

win10 64

### Issue description

The animationplayer dock is not activated if the console is closed after executing.

https://user-images.githubusercontent.com/19652075/167369803-d8b1d83e-6314-4d98-bf13-d63fdd5b736c.mp4




### Steps to reproduce

See the video.

The animation dock was open.
Run the project.
The output was opened automatically (the option open console automatically is activated)
Execution stopped.
The console was closed automatically (the option to close output automatically is activated).
The animationplayer node is pressed but its dock does not open.

### Minimal reproduction project

...
Repository: neovim
Issue: Provide more guidance on how to set `zindex` in `nvim_open_win`
Labels: enhancement,documentation

There are quite a few plugins appearing now that make interesting use of floating windows and several of them are not setting `zindex` appropriately and thus undesired overlaps are occurring.

The documentation should provide more guidance on how to set this value.

Below are some popular applications.

### Applications

#### LSP (hover, etc.)
Default value is probably appropriate here.

#### https://github.com/hrsh7th/nvim-cmp
Implements a completion menu which already has a documented value of `100`.

#### [Telescope](https://github.com/nvim-telescope/telescope.nvim)
Should set a high index since it should appear on top of any buffer or window related element.

#### https://github.com/dstein64/nvim-scrollview
Floating window is a buffer decoration and thus needs a low value

#### https://github.com/b0o/incline.nvim
Floating window for each pane. Higher than default but lower than Telescope

#### https://github.com/lewis6991/gitsigns.nvim
Similar application as LSP

#### https://github.com/rcarriga/nvim-notify
In the realm of `message scrollback` which has a value of `200`. Should probably sit higher than telescope.

#### https://github.com/lewis6991/nvim-treesitter-context
Buffer decoration and thus should be very low.

### Current documentation

```
          • zindex: Stacking order. floats with higher `zindex` go on top on floats with lower indices. Must
            be larger than zero. The following screen elements have hard-coded z-indices:
            • 100: insert completion popupmenu
            • 200: message scrollback
            • 250: cmdline completion popupmenu (when wildoptions+=pum) The default value for
              floats are 50. In general, values below 100 are recommended, unless there is a good
              reason to overshadow builtin elements.
```

### Proposal (WIP)

| Index | Description |
|----|----|
| `0-49` | Buffer related elements |
| `50-99` | Window related elements (this includes the default) |
| `100-199` | ??? (includes insert completion menu) |
| `200-249` |  ??? (includes message scrollback) |
| `250...` | ??? (includes cmdline completion menu) |
Repository: pytorch
Issue: Unable to continue adding modules to `nn.Sequential` after using `del` method
Labels: module: nn,triaged,enhancement

### 🐛 Describe the bug

When the module deleted by the `del` method is not the last module of the `torch.nn.Sequential` object, the index will be discontinuous and the module cannot be correctly added.

```python
from torch import nn

net = nn.Sequential(
    nn.Linear(20, 10),
    nn.ReLU(),
    nn.Linear(10, 5)
)

del net[1]
print(net)
```
Output:
```python
Sequential(
  (0): Linear(in_features=20, out_features=10, bias=True)
  (2): Linear(in_features=10, out_features=5, bias=True)
)
```
It can be seen that the index is no longer consecutive. Continue to add modules:
```python
net.append(nn.ReLU())
net.append(nn.Sigmoid())
print(net)
```
Output:
```python
Sequential(
  (0): Linear(in_features=20, out_features=10, bias=True)
  (2): Sigmoid()
)
```
This does not match the expected result.

---

If the last module is removed, other modules can be added correctly later:
```python
from torch import nn

net = nn.Sequential(
    nn.Linear(20, 10),
    nn.ReLU(),
    nn.Linear(10, 5)
)

del net[2]
net.append(nn.ReLU())
net.append(nn.Sigmoid())
print(net)
```
Output:
```python
Sequential(
  (0): Linear(in_features=20, out_features=10, bias=True)
  (1): ReLU()
  (2): ReLU()
  (3): Sigmoid()
)
```



### Versions

Pytorch Version: 1.11.0

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345