sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Allow concatenated strings to be cast as const type
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

Concatenated strings const type

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->

Allow `as const` cast to be applied to concatenated string literals like so:

```ts
// s0 would be 'ab'
const s0 = ('a' + 'b') as const;
```

https://www.typescriptlang.org/play?#code/FAehAIGcAZwdwPYFcA2ATcAjApuA5AIaZ7ADGCAdpAC5SwC84AFIXuANT7ECU4Bk4clWoBuYKAiQAjOACWAwsTKUaUGY0Vt+glaKA

## 📃 Motivating Example

<!--
  If you were announcing this feature in a blog post, what's a short explanation that shows
  a developer why this feature improves the language?
-->

It's convenient to split a long string into multiple concatenated lines to enhance code readability, so `as const` cast should work for it as well.

## 💻 Use Cases

<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->

Currently only a single string is allowed to be cast to its literal type. So as a workaround you just sacrifice code readability and make multiple strings into one:

`'a' + 'b' => 'ab'`
Repository: rust
Issue: Borrow checking can be effected by seemingly irrelevant statements
Labels: A-borrow-checker,T-compiler,C-bug,NLL-polonius

I tried this code:

```rust
trait Trait { type Item; }

impl<'a, X> Trait for &'a Vec<X> {
    type Item = &'a X;
}

impl<X> Trait for Box<dyn Trait<Item = X>> {
    type Item = X;
}

fn make_dyn_trait(_: &()) -> Box<dyn Trait<Item = &()>> {
    todo!()
}

struct diff<'a, M, N, S>(N, S)
where
    M: 'a,
    N: Trait<Item = &'a M>,
    S: Trait<Item = &'a M>;

fn may_panic<X>(_: X) { }

struct Droppable;

impl Drop for Droppable {
    fn drop(&mut self) {}
}


fn main() {
    let dyn_trait = make_dyn_trait(&());
    let storage = vec![()];
    let _x = may_panic(());
    let storage_ref = &storage;
    // Comment this line and compilation fails
    let a = Droppable;
    diff(dyn_trait, storage_ref);
}
```

I expected to see this happen: Commenting let statement has no effect on borrowck

Instead, this happened: borrowck succeed with the additional statement

See https://github.com/rust-lang/rust/issues/80949#issuecomment-760417066 for an explanation of a similar bug that occurred after a change in mir generation.
Repository: godot
Issue: Gray squares - rectangles
Labels: topic:rendering,needs testing

### Godot version

4.0.2 stable

### System information

Windows 11. i9 12900k Alder lake. RTX 3060,

### Issue description


When I open Godot and press any button, Godot starts lagging and just shows gray squares - rectangles of instead settings, depending on the window I'm pointing to. I've been trying to fix this for 2 days now, but I can't get it fixed.  
  

### Steps to reproduce



### Minimal reproduction project

N/A
Repository: deno
Issue: Low level primitives for implementing HTTPS proxy
Labels: suggestion,tls

Hi, I would to use Deno for building an HTTPS proxy however there are some low level networking primitives missing (And that i would not like to implement):

(Some of those might not be missing, but I just didn't know how to use or find them).

1. Deno.startTls should be able to upgrade server Deno.Conn connections.
1.1 Deno.startTls should be able to handle clientHellos, in order to upgrade connections acting as server.
1.2 Deno.startTls should be able to receive a key and cert for the hostname it will represent.
2. It should be possible to unlock a Deno.Conn object.
3. It should be possible to "peek" into a readable stream without consuming it.
4. Maybe expose some low level Crypto functionality to allow creating self signed certs.
5. Optionally expose the internal HTTP parser without the FetchAPI wrapper so that the raw request is available, maybe trough an iterator that resolves to the strings that represent HTTP messages instead of the Fetch Request object.

The reason those are needed is because the HTTPS proxy protocol works over a TCP connection and not TLS because the CONNECT message is not encrypted, and then after receiving the first CONNECT message the connection should be upgraded to TLS over TCP. Its also important to be able to inspect a message in order to see if its TLS or not before passing it to the HTTP/HTTPS handlers.

In node this is easier, but its still great DX, I believe that Deno can make it much better given how the current APIs look and feel.
Repository: rust
Issue: Tracking Issue for `--extern force`
Labels: C-tracking-issue

This is a tracking issue for the MCP https://github.com/rust-lang/compiler-team/issues/605: `force` option for `--extern` flag.

### About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

### Steps
<!--
Include each step required to complete the feature. Typically this is a PR
implementing a feature, followed by a PR that stabilises the feature. However
for larger features an implementation could be broken up into multiple PRs.
-->

- [x] Implementation: https://github.com/rust-lang/rust/pull/109421
- [ ] Adjust documentation ([see instructions on rustc-dev-guide][doc-guide])
- [ ] Stabilization PR ([see instructions on rustc-dev-guide][stabilization-guide])

[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs

### Unresolved Questions

- [ ] The syntax for adding options to --extern flags was added without much bikeshedding or discussion. It may need adjusting to be more flexible for more complex options.
- Refer to https://github.com/rust-lang/rust/issues/98405
### Implementation history

- https://github.com/rust-lang/rust/pull/109421
Repository: godot
Issue: `notify_property_list_changed` does not refresh the inspector in certain cases
Labels: bug,topic:editor

### Godot version

Godot 4.0.2
Godot `4.0` 90b4ca2e506c6a0d432770d59f62ae7eea565ad0

### System information

Windows 10 64 bits NVIDIA GeForce GTX 1060

### Issue description

I have a class with a `TypedArray<Resource>` property (where the Resource is a custom one, but it doesnt matter in this issue). When items of this array are modified, it calls the setter of that property, which is ok. I rely on that to update certain things.
In that class, I generate new properties in `_get_property_list` depending on the non-null contents of the array (null has to be allowed otherwise the inspector wouldn't work). So inside the setter of the array, I call `notify_property_list_changed` to refresh the inspector. However, in certain cases, Godot is not refreshing the inspector.

### Steps to reproduce

In the test project:

1) Open main.tscn, select the root node.
2) In the inspector, select the `Array` property to expand it.
3) Click `Add Element`. This makes the array contain one null item. Notice in the Output panel that the setter was called, `notify_property_list_changed` was called, and `_get_property_list` was called, printing `0 variants`, that's fine.
4) In the array, click the null item, and create a new `Resource`. Now the array contains one `Resource`. Observe `notify_property_list_changed` has been printed again, however it is not followed by `_get_property_list`, and the inspector is not refreshing. This is not expected.
5) To confirm, inspect something else (child node or icon.png), and inspect the root node again. This forces the inspector to refresh. Observe that now `_get_property_list: 1 variants` is printed, and a new property shows up, `variants/0`.

### Minimal reproduction project

[NotifyPropertyListChangedArray.zip](https://github.com/godotengine/godot/files/11413515/NotifyPropertyListChangedArray.zip)
Repository: stable-diffusion-webui
Issue: [Feature Request]: In "sdapi/v1/*2img", ControlNet input image will return in parameters，is it possible not to return them？
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

In "sdapi/v1/*2img", ControlNet input image will return in parameters，is it possible not to return them？

### Proposed workflow

...

### Additional information

_No response_
Repository: rust
Issue: don't use region variables in borrowck query response
Labels: C-cleanup,T-compiler

[`ClosureOutlivesRequirements`](https://github.com/rust-lang/rust/blob/34bee196cb85b5e7f45118a791360161c46cf000/compiler/rustc_middle/src/mir/query.rs#L309) abuses `RegionVid`s by using them as an index into the early bound regions of the closure.  This should be changed to use late-bound regions instead and instantiating them later in a way similar to [`ClosureOutlivesSubjectTy`](https://github.com/rust-lang/rust/blob/34bee196cb85b5e7f45118a791360161c46cf000/compiler/rustc_middle/src/mir/query.rs#L404).

See the original discussion in https://github.com/rust-lang/rust/pull/108691#discussion_r1125917012.
Repository: tauri
Issue: [bug] Sidecar not working after signing app - MAC OS
Labels: type: bug,status: needs more info,platform: macOS,scope: bundler

### Discussed in https://github.com/tauri-apps/tauri/discussions/2269

<div type='discussions-op-text'>

<sup>Originally posted by **NitinRamnani** July 21, 2021</sup>
Did anyone tried to use sidecar with signed app? It seems sidecar doesn't work.</div>
Repository: storybook
Issue: [Feature Request]: Parse all JSDoc documentation
Labels: feature request,argtypes

### Is your feature request related to a problem? Please describe

I want to create some DocBlocks that take their data from JSDoc.
One example is to have a "related" components - I wanted to use the `@see` tag for that.
The problem is that currently, the description is stripped and everything else is thrown

### Describe the solution you'd like

I would like to have the entire JSDoc object in the parameters

### Describe alternatives you've considered

An alternative solution would be to expose a hook / function that will allow me to fetch whatever data I want from the JSDoc

### Are you able to assist to bring the feature to reality?

no

### Additional context

_No response_
Repository: rust
Issue: Overflow evaluating a trait requirement
Labels: A-trait-system,C-bug,T-types

<!--
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 ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=3efac1cbfb7d06d47d67dc010e68a43e)):

```rust
use std::ops::Add;

struct A<T>(T);

impl<T> Add<A<T>> for i32
where
    i32: Add<T, Output = T>,
{
    type Output = A<T>;

    fn add(self, rhs: A<T>) -> Self::Output {
        A(Add::add(self, rhs.0))
    }
}

fn main() {}
```

I think this code should compile. However, I got the following compile error:

```
error[E0275]: overflow evaluating the requirement `i32: Add<A<_>>`
  --> src/lib.rs:12:11
   |
12 | ...   A(Add::add(self, rhs.0))
   |         ^^^^^^^^
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`geometry`)
note: required for `i32` to implement `Add<A<A<_>>>`
  --> src/lib.rs:5:9
   |
5  | impl<T> Add<A<T>> for i32
   |         ^^^^^^^^^     ^^^
6  | where
7  |     i32: Add<T, Output = T>,
   |                 ---------- unsatisfied trait bound introduced here
   = note: 127 redundant requirements hidden
   = note: required for `i32` to implement `Add<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<_>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
```

Changing `A(Add::add(self, rhs.0))` to `A(self + rhs.0)` or `A(Add::<T>::add(self, rhs.0))` results in a successful compilation. Maybe related to https://github.com/rust-lang/rust/issues/39959?

### Meta
`rustc --version --verbose`:
```
rustc 1.68.2 (9eb3afe9e 2023-03-27)
binary: rustc
commit-hash: 9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0
commit-date: 2023-03-27
host: aarch64-apple-darwin
release: 1.68.2
LLVM version: 15.0.6
```
Repository: godot
Issue: Android keyboard can cover most of the editor interface
Labels: bug,platform:android,topic:editor,usability

### Godot version

4.0.2

### System information

Android, Samsung A7 Lite

### Issue description

When clicking on any field requiring input, Android keyboard will pop up. However there is no code to adjust editor to it, so the keyboard can cover the field, making it impossible to see what you're typing. E.g. naming a new scene, saving it.

### Steps to reproduce

See above

### Minimal reproduction project

N/A (editor issue unrelated to a project)
Repository: neovim
Issue: Performance degradation on big files when disabling line wrapping
Labels: performance,bug-vim,syntax

### Problem

I used this file for testing: https://github.com/json-iterator/test-data/blob/master/large-file.json

Without any configuration NeoVim is able to instantaneously open the file but adding a single option to init.lua makes NeoVim to struggle opening it:
```
vim.opt.wrap = false
```

Additionally removing more that roughly ten lines introduces lags. With enabled line wrapping deletion happens  instantaneously

### Steps to reproduce

issue.lua:
```lua
vim.opt.wrap = false
```

1. nvim --clean large-file.json
2. nvim --clean -u issue.lua large-file.json

Observe the difference between startup time. 
With disabled line wrapping it takes for NeoVim a couple seconds to open the file on my machine.

Try selecting about 10 lines or more in Visual Selection mode and delete it.
With disabled line wrapping it lags.

### Expected behavior

Performance should be identical or even better when disabling line wrapping since it often gets recommended in "Optimizing Vim" guides.

### Neovim version (nvim -v)

v0.10.0-dev-242+g22170efb4

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

Yes, v9.0.1420

### Operating system/version

Arch Linux

### Terminal name/version

alacritty 0.13.0-dev

### $TERM environment variable

xterm-256color

### Installation

AUR
Repository: PowerToys
Issue: Quick power-rename keystroke clashes with new in the right-click menu (W)
Labels: Issue-Bug,Idea-Enhancement,Product-PowerRename

### Microsoft PowerToys version

0.69.1

### Installation method

GitHub, PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

PowerRename

### Steps to reproduce

Open any folder in windows explorer, right-click to show actions menu, press {W}

![image](https://user-images.githubusercontent.com/88754523/236668724-35dfbdd2-ed55-40f5-9fa8-2d728518c2a5.png)


### ✔️ Expected Behavior

Opens the "New" menu

![image](https://user-images.githubusercontent.com/88754523/236668758-826fe68b-6209-4379-81b8-4b43a18bdf95.png)


### ❌ Actual Behavior

Opens power-rename, because their key-combos clash

![image](https://user-images.githubusercontent.com/88754523/236668846-a23c08f0-eaad-472a-9320-344feac97c12.png)


### Other Software

_No response_
Repository: rust
Issue: Error output improvement: when using semicolon, it leads to more than one possibility where developer might be going wrong. 
Labels: A-diagnostics,A-macros,T-compiler

### Code

```Rust
use std::env;

fn main() {
    let args: Vec<String> = env::args().collect();
    dbg!(args) // missing the semi colon here gives rise to two cases, either developer is missing the semi colon or he is actually passing a wrong return type
}
```


### Current output

```Shell
Compiling rustgrep v0.1.0 (C:\Users\<user>\Documents\Personal Workspace\rustgrep)
error[E0308]: mismatched types
 --> src\main.rs:5:5
  |
3 | fn main() {
  |           - expected `()` because of default return type
4 |     let args: Vec<String> = env::args().collect();
5 |     dbg!(args)
  |     ^^^^^^^^^^ expected `()`, found struct `Vec`
  |
  = note: expected unit type `()`
                found struct `Vec<String>`
  = note: this error originates in the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
```


### Desired output

```Shell
the desired output would be to allow the user to know all the possible cases that he might want to do. The current behaviour isn't wrong and it does help in a way.

Still, rust is a language where sometimes you put a semicolon and sometimes you don't, depending on the use case. I feel it would be more developer friendly if error messages were defined well in this case.

For example: (roughly saying what should be expected in output)
Hey developer, missing a semicolon had led to two possible things you might be doing wrong ->
Case 1: you are returning the wrong type to the main function
Case 2: you are returning the right thing but possibly you don't want the last statement as an expression. Please use a semicolon here on this line bla bla.
```


### Rationale and extra context

_No response_

### Other cases

_No response_

### Anything else?

_No response_
Repository: rustdesk
Issue: Unable to interact if laptop lid is closed (TV works)
Labels: bug,help wanted

### Bug Description

on any laptop, if you close the laptop lid, you cannot control the remote desktop. This is true even if you have the virtual display installed from nightly.
<details>
  <summary>old</summary>
  
On any laptop with switchable graphics (i.e. igpu + dgpu), if you close the laptop lid you cannot control the remote desktop.

This is true even if you have the virtual display installed from nightly. I tested this on 2 laptops.

My test setup is a T470p with an intel 630 igpu and a NVidia 940MX dgpu. I also briefly tested this on a P52 with an intel 630 igpu and P3200 dgpu. It does not work on both. As soon as you open the lid, you are able to resume controlling the desktop.

On a laptop with /only/ igpu, you can control the desktop if the lid is closed.

I tested this with hardware acceleration both turned on (default) and off. In both cases, the result was the same (could not interact with remote desktop).

Are there any (recommended) fixes for this, either through software, system settings (BIOS, LidAlwaysOpen, or otherwise) or hardware?
  
</details>


### How to Reproduce

install rustdesk on any laptop
try to control it with the lid closed

### Expected Behavior

should be able to control remote desktop.

### Operating system(s) on local side and remote side

Windows 11 -> Windows 11

### RustDesk Version(s) on local side and remote side

1.2.0 nightly -> 1.2.0 nightly (both Oct 20, 2022)

### Screenshots

N/A, screen just stays stuck

### Additional Context

_No response_
Repository: deno
Issue: KV: atomic operation check to check if key exists
Labels: ext/kv

Right now to check whether a given key exists, you have to do:

```ts
const res = await kv.get(["users", userId]);
if (res.value === null) throw new Error();
await kv.atomic()
  .check(res)
  .set(["posts", 1], { userId, content: "..." })
  .commit();
```

It would be great if you could do:

```ts
await kv.atomic()
  .check({ key: ["users", userId], versionstamp: "any" })
  .set(["posts", 1], { userId, content: "..." })
  .commit();
```

Alternative API ideas:

```ts
.check({ key, exists: true })

// and then we also support

.check({ key, exists: false }) // same as .check({ key, versionstamp: null })
```
Repository: godot
Issue: CharacterBody2D template inconsistency for GDScript vs. C#
Labels: bug,topic:editor

### Godot version

4.0.2.stable.mono.official

### System information

Ubuntu 23.04, Intel Core i9-9880H × 16, NVIDIA Quadro T2000

### Issue description

I found an inconsistency in templates for CharacterBody2D. Differences were found between the files `basic_movement.gd` and `basic_movement.cs`. In case of gdscript template the calculation for direction is made by function **GetAxis**
`var direction = Input.get_axis("ui_left", "ui_right")`
unlike in case of csharp template, where the calculation is made by function **GetVector**
`var direction = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down");`

**GetVector** takes in count two axes instead of one and therefor calculated movement speed is different than in case of **GetAxis**.

In my opinion - implementation in the C# script is the correct one.

### Steps to reproduce

- Create CharacterBody2D with default templates for both gdscript and csharp
- (optional) change in code input key for jump from `ui_accept` to 'ui_up'
- Test both scripts and see how horizontal movement is affected when vertical axis is included

### Minimal reproduction project

[PixelDemo.zip](https://github.com/godotengine/godot/files/11414816/PixelDemo.zip)
Repository: PowerToys
Issue: more features for calculation
Labels: Idea-Enhancement,Product-PowerToys Run,Needs-Triage

### Description of the new feature / enhancement

the powertoys run should support keywords like sqrt for square root, curt for cube root,  fact for factorial, and more such keywords

### Scenario when this would be used?

this can be used whenever required, it can help in doing calculations on the same window without opening/changing a window 

### Supporting information

_No response_