sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: tsx bug when template string rule meet hyphen
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

tsx template string hyphen

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is a crash
- This changed between versions 4.4.x and higher
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?#code/CYUwxgNghgTiAEYD2A7AzgF3gJRFMGAXPFCgJ4DcAsAFC0pQC2IaADvgrvhgHQBSAZQAa8AN614k+CAAerJDCwBLFBhAwAZh3gBJVTBVolYAKIQQzVWjESpdgEYBXDBlTFxNO16kBtNY1ZoNWIAA1QAElFMAxQAcwBfEIBdYgAxRxQCJVRbb3jc+HyaItpZeUV4UC1HCCwAHicXVHhUSGMAawBaMChWDEc4AF5RAEYAJgBmePgAegA+CiA)

### 💻 Code

```tsx
declare const React: any;

namespace React.JSX {
    export interface IntrinsicElements {
        button: {
            [template: `on${string}`]: Function
        }
    }
}

export default <button onclick-capture={123} />;
```

### 🙁 Actual behavior

no error

### 🙂 Expected behavior

report error

BTW: normal key with hyphen works correctly (report error as expected),

```tsx
declare const React: any;

namespace React.JSX {
    export interface IntrinsicElements {
        button: {
            'onclick-capture'?: Function
        }
    }
}

export default <button onclick-capture={123} />;
```
Repository: vscode
Issue: Keybinding doesn't work.
Labels: bug,help wanted,editor-core

<!-- ⚠️⚠️ 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:Version: 1.70.2 (Universal)
- OS Version: macOS 12.5.1 

Steps to Reproduce:

1. Adding keybindings.
```
    {
        "key": "alt+backspace",
        "command": "deleteWordLeft",
        "when": "textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+w",
        "command": "deleteWordLeft",
        "when": "textInputFocus && !editorReadonly"
    }
```
2. There are different behaviors.
Opening Command Palette and inputing `test`, then pressing `alt+backspace` will show `>`  in Command Palette.
Opening Command Palette and inputing `test`, then pressing `ctrl+w` will show nothing(without `>`)  in Command Palette.
Repository: rust
Issue: Bad diagnostics when expression followed by call is instead parsed as statement followed by parenthesized value
Labels: A-diagnostics,T-compiler,L-unused_parens

Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=424c13966bd147553adbb7c2359b73f1

```rust
fn foo(_: usize) {}
fn bar(_: usize) {}

pub fn do_stuff(use_foo: bool, value: usize) {
    if use_foo {
        foo
    } else {
        bar
    }(value)
}
```

The current (1.63.0 and nightly-2022-09-02) output is:

```
warning: unnecessary parentheses around block return value
 --> src/lib.rs:9:6
  |
9 |     }(value)
  |      ^     ^
  |
  = note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
  |
9 -     }(value)
9 +     }value
  |

error[E0308]: mismatched types
 --> src/lib.rs:6:9
  |
1 |   fn foo(_: usize) {}
  |   ---------------- fn(usize) {foo} defined here
...
5 | /     if use_foo {
6 | |         foo
  | |         ^^^ expected `()`, found fn item
7 | |     } else {
8 | |         bar
9 | |     }(value)
  | |_____- expected this to be `()`
  |
  = note: expected unit type `()`
               found fn item `fn(usize) {foo}`
help: use parentheses to call this function
  |
6 |         foo(_)
  |            +++

error[E0308]: mismatched types
 --> src/lib.rs:8:9
  |
2 |   fn bar(_: usize) {}
  |   ---------------- fn(usize) {bar} defined here
...
5 | /     if use_foo {
6 | |         foo
7 | |     } else {
8 | |         bar
  | |         ^^^ expected `()`, found fn item
9 | |     }(value)
  | |_____- expected this to be `()`
  |
  = note: expected unit type `()`
               found fn item `fn(usize) {bar}`
help: use parentheses to call this function
  |
8 |         bar(_)
  |            +++

error[E0308]: mismatched types
 --> src/lib.rs:9:6
  |
4 | pub fn do_stuff(use_foo: bool, value: usize) {
  |                                              - help: try adding a return type: `-> usize`
...
9 |     }(value)
  |      ^^^^^^^ expected `()`, found `usize`
```

Ideally the output should include a hint like this, as is already the case for binary operator expressions instead of call expressions (e.g. `if ... { ... } else { ... } + 3`):

```
help: parentheses are required to parse this as an expression
  |
5 ~     (if use_foo {
6 |         foo
7 |     } else {
8 |         bar
9 ~     })(value)
  |
```
Repository: yt-dlp
Issue: Imply `--hls-use-mpegts` if `-o` is `.ts`
Labels: enhancement,triage,core:post-processor

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm requesting a feature unrelated to a specific site
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've verified that I'm running yt-dlp version **2022.09.01** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Provide a description that is worded well enough to be understood

It would be nice to have so if I specify -o `XXX.ts`, it will automatically download HLS in its original mpeg-ts format instead of converting to MP4 at the end.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

(Not relevant)
Repository: rust
Issue: Slightly extend help diagnostic for immediately invoked closure
Labels: A-diagnostics,T-compiler

<!--
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.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: [link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=3502f70964f7f5e0955eeb83e22286ca)

```rust
fn main() {
    println!("{}", || 123 ());
}
```

The current output is:

```
Compiling playground v0.0.1 (/playground)
error[[E0618]](https://doc.rust-lang.org/nightly/error-index.html#E0618): expected function, found `{integer}`
 --> src/main.rs:2:23
  |
2 |     println!("{}", || 123 ());
  |                       ^^^---
  |                       |
  |                       call expression requires function

For more information about this error, try `rustc --explain E0618`.
error: could not compile `playground` due to previous error
```

<!-- The following is not always necessary. -->
Ideally the output should suggest adding parentheses around the closure before calling it, since that suggestion is already present if the return value of the closure is wrapped in braces, as shown below.


```rust
fn main() {
    println!("{}", || { 123 } ());
}
```

Output with help suggestion:

```
Compiling playground v0.0.1 (/playground)
error[[E0618]](https://doc.rust-lang.org/nightly/error-index.html#E0618): expected function, found `{integer}`
 --> src/main.rs:2:23
  |
2 |     println!("{}", || { 123 } ());
  |                       ^^^^^^^---
  |                       |
  |                       call expression requires function
  |
help: if you meant to create this closure and immediately call it, surround the closure with parentheses
  |
2 |     println!("{}", (|| { 123 }) ());
  |                    +          +

For more information about this error, try `rustc --explain E0618`.
error: could not compile `playground` due to previous error
```

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

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. The output might also be
different depending on the Edition.
-->
Repository: godot
Issue: The editor does not honor the original name when renaming a node.
Labels: discussion,topic:editor

### Godot version

v3.5.1.rc1.official [293c3844b]

### System information

win10 64

### Issue description

The editor does not honor the original node name when you add a node to the tree and then duplicate it.

### Steps to reproduce

Add a node named "SpriteVer1" to the tree.
Duplicate the node.
The editor renames it as "SpriteVer2".
The editor should rename as "SpriteVer11".

### Minimal reproduction project

...
Repository: PowerToys
Issue: [keyboard manager] touchcursor
Labels: Needs-Triage

### Description of the new feature / enhancement

can hold space,... + ? to remap

### Scenario when this would be used?

hold space + 1 for `win + 1`,... good for touch typing users

### Supporting information

https://github.com/martin-stone/touchcursor
Repository: pytorch
Issue: Torch.FX work with autograd.Function
Labels: triaged,module: fx,fx

### 🚀 The feature, motivation and pitch

Dear fx guys,

Making Torch.FX work with `autograd.Function` is important when transform or fuse custom implemented operators, there's someone else meet the same problem at https://discuss.pytorch.org/t/how-can-torch-fx-work-with-autograd-function/145922.

For now, Torch.JIT can trace `autograd.Function` like this: `%x : Float(a, b, c, strides=[a, b, c], requires_grad=1, device=cpu) = ^CustomFunction()(...)`.
While Torch.FX trying to call the custom function with proxied `fx.Proxy` parameters, that causes errors.


### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @SherlockNoMad @soumith
Repository: godot
Issue: Implement LOD generation when importing OBJ as mesh
Labels: enhancement,discussion,confirmed,topic:import,topic:3d

### Godot version

4.0 alpha15

### System information

Windows 10

### Issue description

The build in Auto Lod systems seems to not work on obj´s as meshinstances

### Steps to reproduce

Creat a meshinstance from an obj and set LOD Bias, import the same model as a gltf and set the LOD Bias to the same value on both models.

### Minimal reproduction project

[lodbug.zip](https://github.com/godotengine/godot/files/9483073/lodbug.zip)
Repository: godot
Issue: RigidBody2D: sleeping set to false in second frame after scene is ready
Labels: bug,confirmed,topic:physics,regression

### Godot version

3.5; 3.5.1 RC1

### System information

Linux

### Issue description

In the Inspector I set the sleeping and can sleep options. I even set both in _ready function.
But when I start the scene  the RigidBody2D fall down.
In the _process function I print the state of sleeping.
The first print is true, the second and following are false.
If I set sleeping later to true it will work, but not on scene begin.
This issue is since version 3.5. In version 3.4.5 or older I don't have this issue.


### Steps to reproduce

create a RigidBody2D with CollisionShape2D and a visualisation.
set sleeping to true.

### Minimal reproduction project

[rigidbody2dtest.zip](https://github.com/godotengine/godot/files/9483259/rigidbody2dtest.zip)
Repository: excalidraw
Issue: linear element's hitbox interweaved with holes
Labels: bug

not a recent regression

![excal-linear-hitbox-bug](https://user-images.githubusercontent.com/5153846/188288076-136c23bd-e289-498a-be6f-05b30d4973b6.gif)

https://excalidraw.com/#json=seAp8lS2iGYAV2FtuLFT-,PA6KsAwSEYmLiZ8Y-vF1yg ([perma](https://excalidraw-lawdr4qrx-excalidraw.vercel.app/#json=seAp8lS2iGYAV2FtuLFT-,PA6KsAwSEYmLiZ8Y-vF1yg))
Repository: rust
Issue: Suggest `Struct::<'_>` instead of `Self` when lifetime does not match
Labels: A-diagnostics,A-lifetimes,T-compiler,A-suggestion-diagnostics,D-newcomer-roadblock

Heads-up: [PR 100976](https://github.com/rust-lang/rust/pull/100976) probably fixes this but I still felt its own issue was warranted (and didn't find an existing one).

---

[Given the following code:](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=0bf33196179908c605f448226b34ea53)

```rust
pub struct Path<'a> {
    string: &'a mut String,
}

impl<'a> Path<'a> {
    pub fn sub(&mut self) -> Path/*<'_>*/ {
        Self {
            string: self.string,
        }
    }
}
```

The current output is:

```
error: lifetime may not live long enough
 --> src/lib.rs:8:21
  |
5 | impl<'a> Path<'a> {
  |      -- lifetime `'a` defined here
6 |     pub fn sub(&mut self) -> Path/*<'_>*/ {
  |                - let's call the lifetime of this reference `'1`
7 |         Self {
8 |             string: self.string,
  |                     ^^^^^^^^^^^ this usage requires that `'1` must outlive `'a`
```
Ideally the output should look like:

```
7 |         Self {
   |         ^^^^ help: Consider replacing `Self` with `Path`
```

Programmers not-infrequently [expect `Self` to act as a type constructor](https://users.rust-lang.org/t/rewrite-generics-parameter-of-self/80347/6) and not fully aliased type (including lifetimes).  Using `Path` in this context infers the lifetime, whereas using `Self` make the lifetime exactly `'a`.

Though I haven't included it in my example, consider also the case when `Self` is used as the return type.

[Another recent URLO example which inspired this report.](https://users.rust-lang.org/t/implement-a-stack-of-path-component-with-a-shared-buffer/80666)

The same error appears on stable, nightly, and beta.  But see [PR 100976](https://github.com/rust-lang/rust/pull/100976) which may resolve this issue.

@rustbot label +A-lifetimes +A-suggestion-diagnostics +D-newcomer-roadblock
Repository: rust
Issue: Lack of warning for getting pointer on a temporary CString declared in array
Labels: A-diagnostics,T-compiler

<!--
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.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: <!-- Please provide a link to play.rust-lang.org -->

```rust
let instance_layer_names: Vec<_> = [
	CString::new("VK_LAYER_KHRONOS_validation").unwrap()
].iter().map(|l| l.as_ptr()).collect();
```

There is no error / warning reported, but the string is invalid. If I was to try to pass this variable to the InstanceCreateInfoBuilder in ash for example I would get an `ERROR_LAYER_NOT_PRESENT`.

I was able to fix my code by splitting that expression as shown:
```rust
let instance_layers = [
    CString::new("VK_LAYER_KHRONOS_validation").unwrap()
];

let instance_layer_names: Vec<_> = instance_layers.iter().map(|l| l.as_ptr()).collect(); 
```
While testing before writing this error report I noticed that if I have that new code alongside my original code the original code will actually work given that they both have the same string value.

<!-- The following is not always necessary. -->
Ideally the assignment I was trying to do originally should give a warning/error, I assume the warning would be

```
warning: getting the inner pointer of a temporary `CString`
```

since that seems to be the cause of the issue.
<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

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. The output might also be
different depending on the Edition.
-->
Repository: vscode
Issue: Git - gpg commit failed when using vscode terminal
Labels: bug,git,terminal-env-collection

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.70.0
- OS Version: Ubuntu 22.04

Steps to Reproduce:
When I commit using gpg, there is an error.
```
$ git commit -S -m "test" -a
error: gpg failed to sign the data
fatal: failed to write commit object
```
![image](https://user-images.githubusercontent.com/47464217/188289927-b1c60c45-479e-4685-8175-433e7d146a04.png)

However, when I do same command on gnome-terminal, it works.
![image](https://user-images.githubusercontent.com/47464217/188289964-e0572cd6-927a-4431-bc73-08c9806ec432.png)

So, it indicates there is no problem on my gpg key. I think this caused by VSCode it self.
Repository: godot
Issue: [3.5 Stable] EditorPlugin messes up when code is changed/saved while enabled.
Labels: bug,topic:editor,topic:plugin

### Godot version

v3.5.stable.official [991bb6ac7]

### System information

Mac OS X (Catalina) 10.15.7

### Issue description

I added a button to the CONTAINER_CANVAS_EDITOR_BOTTOM and when I enabled the plugin the first time it shows it correctly in the 2D view. However if you forget to disable the plugin and make a change (E.g. change the text of the button), save and then disable and re-enable, the button control appears twice in the 2D view and an error message appears.

This is an issue because when you are testing plugins you should now have to disable it before saving. It is annoying as I am used to pressing ALT-S to save frequently.

![image](https://user-images.githubusercontent.com/930478/188290221-3e9900ec-ea91-4209-8492-21e0027d9f6c.png)



### Steps to reproduce

- Make sure no other plugins are enabled
- Create a simple plugin from Project and copy the code below into the plugin.gd. 
- Enable it. 
- Check that the button has appeared at the bottom on the 2D view. 
- Now (without disabling the plugin) make a change to the plugin.gd (change text of button) and save it. 
- Disable/re-enable the plugin.  
- An error will appear in Output and an additional button will appear top left corner.
- There is no way to rescue this other than quitting Godot.



```python
tool extends EditorPlugin

var menu = Button.new()
var last_position = CONTAINER_CANVAS_EDITOR_BOTTOM

func _enter_tree():
	print("Tree Entered-2")
	menu.text="BUTTON5"
	add_control_to_container(last_position, menu)


func _exit_tree():
	print("Tree Exited-1")	
	remove_control_from_container(last_position, menu)
	menu.queue_free()

```







![image](https://user-images.githubusercontent.com/930478/188290282-2b69d2d5-086d-4eee-a864-e75e8958983a.png)







### Minimal reproduction project

_No response_
Repository: PowerToys
Issue: Resize Picture Context menu entries appear twice in context menu
Labels: Issue-Bug,Product-Image Resizer,Priority-2,Area-Context Menu

![Untitled - Copy](https://user-images.githubusercontent.com/78860632/188291369-c6b4489f-0b9b-4c84-b9e0-43625b85c46f.png)
### Microsoft PowerToys version

0.61.1

### Running as admin

- [X] Yes

### Area(s) with issue?

Image Resizer

### Steps to reproduce

right click

### ✔️ Expected Behavior

one instance of "resize image"

### ❌ Actual Behavior

two instances of "resize image". This is also the case for PowerRename but at least that one has an option in its settings titled "default and extended context menu" (where you can choose to display either two or one only), whereas Image Resizer doesn't have that option.

### Other Software

OS = Windows 11