sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Bogus `higher-ranked lifetime error` in an async block
Labels: A-lifetimes,T-compiler,C-bug,A-async-await,AsyncAwait-Triaged,A-higher-ranked

Running stable 1.64.0.

Unfortunately this happened in a complex bit of code that I can't easily reduce :(

```rust
            task::spawn({
                let handle_service = handle_service.clone();
                async move {
                    if let Err(e) = handle_service.call(connection).await {
                        debug!("http connection terminated", error: e);
                    }
                }
            });
```

```
error: higher-ranked lifetime error
   --> witchcraft-server/src/server.rs:118:13
    |
118 | /             task::spawn({
119 | |                 let handle_service = handle_service.clone();
120 | |                 async move {
121 | |                     if let Err(e) = handle_service.call(connection).await {
...   |
124 | |                 }
125 | |             });
    | |______________^
    |
    = note: could not prove `for<'r> impl for<'r> futures_util::Future<Output = ()>: std::marker::Send`
```

The future returned by `handle_service.call(connection)` is definitely `Send`, and I can work around the failure by boxing it:

```rust
            task::spawn({
                let handle_service = handle_service.clone();
                async move {
                    // The compiler hits a `higher-ranked lifetime error` if we don't box this future :/
                    let f: Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> =
                        Box::pin(handle_service.call(connection));
                    if let Err(e) = f.await {
                        debug!("http connection terminated", error: e);
                    }
                }
            });
```

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"vincenzopalazzo"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: neovim
Issue: vim.ui_attach: with `ext_cmdline`, `ext_messages` want an event for user input with getchar/getcharstr
Labels: enhancement,ui,lua,ui-extensibility

### Feature already in Vim?

_No response_

### Feature description

Currently, `input()` is handled by `cmdline_show` and `confirm()` is handled by `msg_show.confirm`.

There are no events yet to know theres any input requested from the user with `getchar` or `getcharstr`.

As a work-around, I'm wrapping the respective `vim.fn` functions, but that only works for `Lua` calls.

Would be great to have this as part of the `ext_cmdline` or `ext_messages` API.
Repository: godot
Issue: TileMap may trigger Area2D.body_shape_entered with null tile body_rid.
Labels: bug,topic:core,topic:2d

### Godot version

4.0 beta 1

### System information

Windows 10

### Issue description

I'm using 
```swift
Area2D.body_shape_entered(body_rid, body, body_shape_index, local_shape_index):
	if (body is TileMap):
		var tile_coords : Vector2i = body.get_coords_for_body_rid(body_rid)
		var tile = body.get_cell_atlas_coords(0,tile_coords)	#This is just to check tile atlas on crash
		if body.get_cell_tile_data(0,tile_coords).terrain == 0:
...
```
This works wonderfully most of the time, until intermittently a cleared tile (atlas(-1,-1)) somehow trips the body_shape_entered and causes a crash.

This only seems to trigger on cells set with clear_cell or set_cell, not on those set by set_cells_terrain_connect.
Using set_cell to a tile with no physics or terrain will still occasionally trigger the area_body_shape_entered but not crash on the cell's.terrain being queried.

### Steps to reproduce

Create a TileMap's "map" in code using set_tile and clear_tile
Pass an Area2d across the TileMap catching it's body_shape_entered signal
Query ```body.get_cell_atlas_coords(0,body.get_coords_for_body_rid(body_rid))``` and catch tiles without physics assigned (and possibly no cell tile data

Unfortunately I have only gotten this to trigger intermittently.

### Minimal reproduction project

Appologies, not the smallest possible but the most reliable trigger
[Destructable Images Test v0.2.zip](https://github.com/godotengine/godot/files/9637472/Destructable.Images.Test.v0.2.zip)
Repository: TypeScript
Issue: Indexed access lookup on enum type could produce specific key types
Labels: Suggestion,Awaiting More Feedback

# Suggestion

Per the [documentation](https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings), it is possible to reverse map an enum at runtime:
```typescript
enum Enum {
  A,
}
 
let a = Enum.A;
let nameOfA = Enum[a]; // "A"
```

However, suppose we wanted to get the ***type*** of the enum name from the enum value at compile time. That is, get some `type T = "A"` from `Enum.A`. From the example above, we would expect something like the following to work:
```typescript
type T = typeof Enum[Enum.a]; // evaluates to string rather than "A"

const A: T = "A"; // compiler has no issues
const B: T = "B"; // compiler has no issues
```

As written above, the compiler fails to get the correct type. However, I have found a workaround:
```typescript
type T = keyof { [K in keyof typeof Enum as typeof Enum[K] extends Enum.A ? K : never]: any }; // evaluates to "A"

const A: T = "A"; // compiler has no issues
const B: T = "B"; // compiler now throws a fit as expected
``` 

It would be nice if this could be abstracted away from the developer.
Repository: godot
Issue: [3.x] Modeless WindowDialogs do not emit popup_hide
Labels: bug,topic:gui

### Godot version

3.5 stable

### System information

Windows 10

### Issue description

Setting a WindowDialog as exclusive will normally force the control as modal and capture all input outside its bounds until it's manually destroyed or hidden.  However, by calling `show()` (and presumably manually setting the control to visible), one can create a persistent modeless window.  These windows can be hidden by the close button, but this will not trigger the popup_hide signal and thus, cleanup operations can't be done without manually connecting the close button. 

### Steps to reproduce

1.  Add a WindowDialog to project.  Set `exclusive` to true.
2. In the Node tab, add a signal connection for `popup_hide()` to your parent script.  Have it `print()` data to show when it's triggered.
3. In the parent script, call `$WindowDialog.show()` on ready -- calling a `popup()` derivative would force the control modal; we only want modeless operation without the auto-hide functionality
4. Run project and try to close the window from the close button.


### Workaround:
add this line to the `_ready()` func of your WindowDialog:
```
get_close_button().connect("pressed", self, "[NAME OF FUNCTION HERE]")
```

### Minimal reproduction project

_No response_
Repository: godot
Issue: VideoStreamTheora: Identical frames make the audio buggy
Labels: bug,topic:core,confirmed,topic:audio

### Godot version

Both 3.5 and 4.0 beta 1

### System information

Kubuntu 22.04

### Issue description

On videos that start with a black screen, the audio plays incorrectly.

This bug is much more noticeable if the keyframe interval is set to a high value (through `-g` or `-g:v`) such as 300 (10 times the frame rate, the max recommended by Theora guides), where the audio only begins playing after the first non-black frame appears, then randomly starts trying to seek to the correct position. This won't happen in video players such as VLC or mpv.

On videos that don't start with a black screen, or have a keyframe interval set to 1 (which will result in a very heavy file) the audio begins playing normally.

(Seriously, increasing the keyframe interval is simply an amazing way to reduce Theora file sizes, at the cost of having some *very* minor motion artifacts, but you can get a video of quality 8 at the same size as quality 6 at low keyframe interval)

### Steps to reproduce

1. Download the Bink file at [this video](https://www.youtube.com/watch?v=4oijqgtd3Gg)'s description (this is the exact same video I used to find this bug);
2. Convert it to Ogg Theora using FFmpeg (`-g:v` set to a high number such as 300 is very important)
3. Drag the video into Godot and play it.

- Also try using a low keyframe interval, it will noticeably reduce the delay.
- FFmpeg uses a default value of 12 for the keyframe interval.

### Minimal reproduction project

I'm afraid of inserting a branded video here.
Repository: stable-diffusion-webui
Issue: Apply Style should have an option to also apply the full configuration
Labels: enhancement

**Is your feature request related to a problem? Please describe.**
Quickly getting back to where we left another time, the Style feature should include configuration

**Describe the solution you'd like**
When storing a Style it should also store the configuration (CFG, Sampler, Steps, Highres, Resolution, Seed etc)
When restoring a Style you should have a checkbox to also restore config
Repository: pytorch
Issue: `as_tensor` will return a different dtype with script
Labels: oncall: jit

### 🐛 Describe the bug

`as_tensor` will return a different dtype with script

```py
import torch
def m(data):
    return torch.as_tensor(data)

input = torch.tensor(2.25, dtype=torch.bfloat16)

print(m(input).dtype)

jit_m = torch.jit.script(m)
print(jit_m(input).dtype)
```

```
torch.bfloat16
torch.float32
```

### Versions

PyTorch version: 1.13.0.dev20220923+cu116
Repository: rust
Issue: 1.64 - Unexpected `dead_code` warning from inside macro expansion.
Labels: A-lints,E-needs-test,P-medium,T-compiler,regression-from-stable-to-stable,C-bug,E-needs-mcve,L-dead_code

<!--
Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to.

Please provide a short summary of the regression, along with any information you feel is relevant to replicate it.
-->

I am getting an unexpected `dead_code` warning from inside a procedural macro's output. This warning did not appear in the previous version of the Rust Compiler. This is not present in the changelog for 1.64, so I do not believe it to be an expected change.

### Code

I tried this code:

```rust
#[pin_project(project = Merge2Proj)]
#[derive(Debug)]
pub struct Merge2
{
	// struct contents...
}

// impl that only makes use of Merge2Proj::project...
```

I expected to see this happen: I expected the code to compile without warnings, as was true for the previous compiler version.

Instead, this happened: I get a `dead_code` warning from inside the `pin_project` macro expansion, telling me that `Merge2Proj::project_ref` is unused. This warning is impossible for me to remove, as I have no need for `project_ref` and there is no way to tell `pin_project` to not generate it.

### Version it worked on

<!--
Provide the most recent version this worked on, for example:

It most recently worked on: Rust 1.47
-->

It most recently worked on: 1.63

### Version with regression

<!--
Provide the version you are using that has the regression.
-->

`rustc --version --verbose`:
```
rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: x86_64-pc-windows-msvc
release: 1.64.0
LLVM version: 14.0.6
```

<!--
If you know when this regression occurred, please add a line like below, replacing `{channel}` with one of stable, beta, or nightly.

@rustbot modify labels: +regression-from-stable-to-{channel} -regression-untriaged
-->
Repository: pytorch
Issue: `linalg.norm` cannot compute the grad in forward mode after script
Labels: oncall: jit

### 🐛 Describe the bug

`linalg.norm` cannot compute the grad in forward mode after script

```py
import torch

def m(input):
    return input.norm(p=1)

input = torch.tensor([[1., 2., 3., 4.]], dtype=torch.float32)

from torch.autograd.functional import jacobian

input1 = input.clone().requires_grad_()
jac1 = jacobian(m, input1, vectorize=True, strategy='forward-mode')
print(jac1)

jit_m = torch.jit.script(m)
input2 = input.clone().requires_grad_()
jac2 = jacobian(jit_m, input2, vectorize=True, strategy='forward-mode')
print(jac2)
```

```
tensor([[1., 1., 1., 1.]], grad_fn=<ReshapeAliasBackward0>)

RuntimeError: Trying to set a forward gradient that has a different size than that of the original Tensor, this is not supported. Tensor is of size [] while the given forward gradient is of size [1, 1].
```

### Versions

```
Collecting environment information...
PyTorch version: 1.13.0.dev20220923+cu116
Is debug build: False
CUDA used to build PyTorch: 11.6
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.1 LTS (x86_64)
GCC version: (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.9.13 (main, Aug 25 2022, 23:26:10)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.19.5-051905-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060
Nvidia driver version: 515.65.01
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.3
[pip3] torch==1.13.0.dev20220923+cu116
[pip3] torchaudio==0.13.0.dev20220923+cu116
[pip3] torchvision==0.14.0.dev20220923+cu116
[conda] numpy                     1.23.3                   pypi_0    pypi
[conda] torch                     1.13.0.dev20220923+cu116          pypi_0    pypi
[conda] torchaudio                0.13.0.dev20220923+cu116          pypi_0    pypi
[conda] torchvision               0.14.0.dev20220923+cu116          pypi_0    pypi

```

cc @ezyang  @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: pytorch
Issue: Solve default argument induced include cycles by not using defaults / moving the defaults to inl
Labels: module: build,module: internals,triaged

### 🐛 Describe the bug

Here is an example of a particularly pernicious cause of import cycles in our C++ codebase:

```
struct Scalar {
    Scalar(int i) : i_(i) {};
    int i_;
};

struct Tensor {
    void add(const Tensor& other, const Scalar& s = 0);
};
```

To compile this, the FULL definition of Scalar must be available at the time Tensor is being defined, so that the default parameter can be specified. This means that Scalar must NOT include any headers that transitively depend on Tensor. In the past, when people have been monkeying around with Scalar (e.g., wanting it to depend on IValue), this easily causes include cycles, and for no good reason: Tensor doesn't *really* depend (as far as struct layout is concerned) on Scalar, and although intuitively there shouldn't be a dependency between Scalar and Tensor, there seemingly is one. You cannot even solve the problem by wrapping the Scalar in a c10::optional, as c10::optional is an incomplete type without Scalar being complete.

Fortunately, there is a resolution to this problem. In fact, there are two options:

First, we can simply not use defaulted arguments. Thus, instead of a single add definition, we instead have:

```
struct Tensor {
    void add(const Tensor& other);
    void add(const Tensor& other, const Scalar& s);
};
```

As most methods on Tensor are code-generated, this doesn't involve driving a big refactor; just modify the codegen to separately define each definition and generate the necessary boilerplate.

Second, we can define the default argument later. If we assume that add is going to be implemented inline in an inl header later, this is perfectly valid, and still defaults the argument:

```
struct Tensor {
    void add(const Tensor& other, const Scalar& s);
};

// Later, in Tensor_inl.h where we can assume we have Scalar struct defined now
void Tensor::add(const Tensor& other, const Scalar& s = 0) {
  ... definition ...
};
```

alas, you are obligated to also provide the definition at this point; if you are looking to define out-of-line, option one is probably easier.

I looked into this because I wanted to see if it would be feasible to implement Scalar using IValue. In the end I decided this refactor would take too much time to be worth it for just this. But maybe someone else will find it useful some time...

### Versions

master

cc @malfet @seemethere @bhosmer @smessmer @ljk53 @bdhirsh
Repository: rust
Issue: intra-doc link failed linkchecker when depending on `cfg(doc)`
Labels: T-rustdoc,C-bug,A-intra-doc-links

In one version of #102169 I was using `cfg(doc)` to bring in a `use` that one of the intra-doc links needed: https://github.com/rust-lang/rust/commit/96314f9cfb3a489b83e05ce70a48ef045aca6d62

But which that worked to make `x.py doc` pass, it later failed linkcheck: https://github.com/rust-lang/rust/actions/runs/3111111451/jobs/5043028360
```
std/collections/struct.VecDeque.html:317: broken intra-doc link - [<code>mem::forget</code>]
std/collections/vec_deque/struct.VecDeque.html:317: broken intra-doc link - [<code>mem::forget</code>]
```

So I had to go back to a `use` with an `allow` (https://github.com/rust-lang/rust/commit/f0dc35927becebf20730117a0bf00840ac1dd4ff) to get it to work again.
Repository: godot
Issue: Generic6DOFJoint3D Motors and Springs not working
Labels: bug,confirmed,topic:physics,regression,topic:3d

### Godot version

4.0 Beta 1

### System information

Linux (but it doesn't matter)

### Issue description

First I thought it was a bug, since I didn't get the motors and springs of the Generic6DOFJoint3D to work, after I looked up the source code https://github.com/godotengine/godot/blob/bcf754d735249a779469839455d925cf42b48057/servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp I saw that it was just not implemented.

Will this be available in the final 4 release or is 3D physics not in scope yet?

### Steps to reproduce

Add a Generic6DOFJoint3D, setup motors or springs, see them do nothing

### Minimal reproduction project

_No response_
Repository: neovim
Issue: Deleting the only non-floating window's buffer from inside a floating window fails silently
Labels: bug,floatwin

### Neovim version (nvim -v)

0.7.2

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

NA

### Operating system/version

NA

### Terminal name/version

NA

### $TERM environment variable

NA

### Installation

Package manager

### How to reproduce the issue

```
echo "delete me please" > deleteme
touch init.lua
```

The contents of `init.lua`:

```
-- just for looks
local opts = {
    relative = 'editor',
    row = 5,
    col = 20,
    width = 40,
    height = 20,
}

local scratch = vim.api.nvim_create_buf(false --[[tested it with true, same behavior--]], true)
vim.api.nvim_open_win(scratch, true, opts)
```

Now try the following
```
nvim --clean deleteme
:so init.lua
:bd1
```

### Expected behavior

The buffer `deleteme` gets deleted and we're presented with a scratch buffer in the current (non-floating) window.

### Actual behavior

Nothing happens. No error messages or anything. It seems that the command fails silently. I also tried deleting the buffer using `vim.api.nvim_buf_delete()`, but the result is the same.

My guess is the problem is probably somewhere around `close_buffer()` in `buffer.c`
Repository: PowerToys
Issue: Notification By Sound When Network Connection Is Lost
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

Option to play a sound when network connection has been lost

### Scenario when this would be used?

I have to hotspot my phone for internet service and it goes in/out alot because I live in a rural area. All satelite internet companies want over $100/month for service so I'm stuck with this. When my service goes out, I have to just sit here and stare at the little network icon in the notification area like an idiot until it comes back on.

### Supporting information

_No response_
Repository: godot
Issue: Blending results may not match if BlendSpace2D vertex indices are different
Labels: enhancement,usability,topic:animation

### Godot version

4.0 b1

### System information

Win10 Vulkan gtx1060

### Issue description

A 2d sprite uses an animationTree, the same blend 2d space nodes, the same blend point coordinates, but the result is different.

![adminTree_bug](https://user-images.githubusercontent.com/14953625/192086640-3f326e6b-012e-4b2e-9faa-7b7fb2a48d14.gif)

ps: Connecting and not connecting nodes does not affect the results.the update mode is discrete.

### Steps to reproduce

See minimal sample

### Minimal reproduction project

[AnimationTree_Bug.zip](https://github.com/godotengine/godot/files/9638181/AnimationTree_Bug.zip)
Repository: rust
Issue: Warm/disallow NaN equality?
Labels: A-lints,A-diagnostics,T-lang,T-compiler

TypeScript 4.9 Beta now errors on direct comparisons against NaN:
https://devblogs.microsoft.com/typescript/announcing-typescript-4-9-beta/#bye-bye-batman

Rust 1.66.0-nightly compiles this silently:

```rust
pub fn validate(x: f64) -> bool {
    x != f64::NAN
}

fn main() {}
```

Clippy gives an error:

```
error: doomed comparison with `NAN`, use `{f32,f64}::is_nan()` instead
 --> main.rs:2:5
  |
2 |     x != f64::NAN
  |     ^^^^^^^^^^^^^
  |
  = note: `#[deny(clippy::cmp_nan)]` on by default
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_nan
```

Perhaps it's worth upstream this error in rustc?
Repository: PowerToys
Issue:  button that appears near the search mark in powertoys run to stop running applications 
Labels: Needs-Triage

### Description of the new feature / enhancement

If possible, is there a way to stop the applications that are running through the button that appears near the search mark in powertoys run

### Scenario when this would be used?

Your search for the program and stop it immediately without the need for me to open the task manager, select the program, search for and then close it

### Supporting information

_No response_
Repository: godot
Issue: 4.0: Generated script documentations does not update with external change
Labels: bug,topic:gdscript,topic:editor

### Godot version

v4.0.beta1.official [20d667284]

### System information

N/A

### Issue description

When scripts are edited using external editors, their generated documentations do not get updated accordingly.

### Steps to reproduce

1. Create a script and open it in an external editor
2. Add some documented variables and functions and save
3. There is a documentation page, but it will either be blank or not updated until you make a change and save from the built-in script editor.

### Minimal reproduction project

_No response_
Repository: PowerToys
Issue: Embed different folder windows in the same window
Labels: Needs-Triage

### Description of the new feature / enhancement

Embed different folder windows in the same window

### Scenario when this would be used?

reduce the number of open windows on the screen

### Supporting information

_No response_