sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Mapped types over subclassed arrays behave strangely
Labels: Needs Investigation

### 🔎 Search Terms

mapped type array subclass numeric constraint

### 🕗 Version & Regression Information

- This is the behavior in every version I tried

### ⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.6.0-dev.20240712#code/MYGwhgzhAEDKCuAjAggJ1WAngHgCoD5oBTADwBciA7AExjQxwOgG8BYAKGmnAjIAV4EABZFqALmjwaRAGYBLSqOgAfaLgDcHAL4cOZTAAciaorzzFyVWtABKRMNQD2lEJnpZsYSpnyEAvCwcXADaANLQCtAA1kSYjjJqALoSuGGJmuxaGXqGxnYQ8CBk0AG4pmTYCCjoHpTwALaIRKi+GQD0bVzQAHoA-DlG0ALCJbamhWTBAEQGgkJT6RwdXX1AA

### 💻 Code

```ts
class SubArray<T> extends Array<T> {
  lastPushed: undefined | T;
}

type Test<T extends ReadonlyArray<any>> = {
  [K in keyof T]: T[K];
};

type Result = Test<SubArray<number>>;
//   ^?
type Push = Result["push"];
//   ^?
```


### 🙁 Actual behavior

This mapped type doesn't have a homomorphic instantiation - its arrayness is not preserved. But yet all members are mapped to the `Array`'s type argument

### 🙂 Expected behavior

I'm not entirely sure. On one hand, it feels that those members should be instantiated with the type of the original member. This wouldn't work with generic mapped types as `T[K]` has the numeric constraint when `T` has an array/tuple constraint. So the generic constraints wouldn't match what those could end up being instantiated with.

Should the result be a remapped subclassed array? That means that extra members wouldn't be mappable... but hey, regular array methods etc arent. So perhaps that's the most appropriate solution here.

cc @ahejlsberg 

### Additional information about the issue

_No response_
Repository: godot
Issue: VSProj file generated by SCons doesn't include third party headers
Labels: bug,platform:windows,topic:buildsystem

### Tested versions

- Reproducible in: master branch custom build

### System information

Windows 10 - Godot master branch - Vulkan (Forward+) - Dedicated AMD

### Issue description

When trying to add a custom third party DLL and headers to a C++ module the VSProj file that is created when using `scons platform=windows vsproj=yes` doesn't recognise the additional headers as included in the project and as a result will register as errors. Error does not persist when using VSCode with `compile_commands.json`. But that also means not being able to use VS2022 which I prefer

### Steps to reproduce

- Checkout Godot source code
- Copy C++ module folder into the Godot `modules` folder
- Generate VSProj file with `scons platform=windows vsproj=yes`
- Attempt to include on of the headers in the include folder. It will show up as an error with no found file, and as a result will not provide any intellisense for the 3rd party library

### Minimal reproduction project (MRP)

C++ module: https://github.com/LouChiSoft/GodotSlang. Can be cloned into the modules folder of the Godot source and built normally.
Repository: vscode
Issue: Inline terminal chat is too small when response comes in
Labels: bug,terminal-chat

1. On a new window, ask a question of terminal chat
2. See the result:

<img width="674" alt="image" src="https://github.com/user-attachments/assets/a8cfa0ac-f7b0-442b-9e98-dadee8c0acb2">
Repository: go
Issue: proposal: x/tools/testfiles: provide utilities for testing tools for Go code with modules
Labels: Proposal

Updated July 30.

### Proposal Details

The proposal is to move the existing internal `x/tools/internal/testfiles.CopyToTmp` function for testing Go code with `go.mod` files into a new exported package `x/tools/testfiles`. This function creates a temporary testing directory from an `io/fs.FS` and then potentially renaming files.

```
// CopyToTmp copies the files and directories in src to a new temporary testing
// directory dst, and returns dst on success.
//
// After copying the files, it processes each of the 'old,new,' rename
// directives in order. Each rename directive moves the relative path "old"
// to the relative path "new" within the directory.
//
// Renaming allows tests to hide files whose names have
// special meaning, such as "go.mod" files or "testdata" directories
// from the go command, or ill-formed Go source files from gofmt.
func CopyToTmp(t testing.TB, src fs.FS, rename ...string) string
```

The potential renaming allows for populating the new directory with files names significant to Go, such as `go.mod`, without checking in files with special names. For example if we copy the directory testdata:
```
	testdata/
	    go.mod.test
	    a/a.go
	    b/b.go
```
using `dir := testfiles.CopyToTmp(t, os.DirFS("testdata"), "go.mod.test,go.mod"), the resulting files will be:
```
	dir/
	    go.mod
	    a/a.go
	    b/b.go
```

This package was originally created to support [`x/tools/analysistest.Run`](https://pkg.go.dev/golang.org/x/tools/go/analysis/analysistest#Run). From it's documentation:

> func Run(t Testing, dir string, a *analysis.Analyzer, patterns ...string) []*Result
Run applies an analysis to the packages denoted by the "go list" patterns.
>
> It loads the packages from the specified directory using golang.org/x/tools/go/packages, runs the analysis on them, and checks that each analysis emits the expected diagnostics and facts [...] .
>
>  If the directory contains a go.mod file, Run treats it as the root of the Go module in which to work.

Adopting this proposal would resolve #37054, #46041, #53063, and #61336.

Note this proposal works well with both `testdata/` directories using `os.DirFS`, and txtar archives using `x/tools/txtar.FS` (#44158).
Repository: next.js
Issue: Constants from use client files not outputting correctly inside template string
Labels: bug,Output (export/standalone)

### Link to the code that reproduces this issue

https://github.com/okcoker/vercel-bug-report

### To Reproduce

1. Start the application
2. Inspect the output on the `<main>` element
3. See inline style output as `style="margin-top:30px;height:calc(100vh - [object Object]px)"`

### Current vs. Expected behavior

I expected to see the style output as `style="margin-top:30px;height:calc(100vh - 30px)"`

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:37 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6031
  Available memory (MB): 49152
  Available CPU cores: 16
Binaries:
  Node: 18.17.1
  npm: 9.6.7
  Yarn: 1.22.21
  pnpm: 9.5.0
Relevant Packages:
  next: 14.2.5 // Latest available version is detected (14.2.5).
  eslint-config-next: 14.2.5
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Output (export/standalone)

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

### Additional context

_No response_
Repository: deno
Issue: Use etag for npm packument
Labels: perf

I think the npm registry packument code doesn't use an etag.
Repository: godot
Issue: `@export_storage` is missing parser safeguards
Labels: bug,discussion,topic:gdscript

### Tested versions

- Tested in 4.3beta6

### System information

Godot v4.3.beta (d15597767) - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.4601) - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 Threads)

### Issue description

Exports are limited to built-in types, resources, nodes, or enums. However, `@export_storage` can accept invalid types (such as inner classes). This causes bizarre, unpredictable editor instability (like the resource script being resaved into the scene, or new scripts manifesting in the scripts panel).

This raises the parser error `Export type can only be built-in, a resource, a node, or an enum.`
```gdscript
class Item:
	pass

@export var item: Item
```

This raises no parser error.
```gdscript
class Item:
	pass

@export_storage var item: Item
```

### Steps to reproduce

1. Create an invalid `@export` using an inner class.
2. Swap it to `@export_storage`.

### Minimal reproduction project (MRP)

[export_issue_mrp.zip](https://github.com/user-attachments/files/16200017/export_issue_mrp.zip)
Repository: flutter
Issue: [Impeller] rendering bug in CanRenderStrokePathThatEndsAtSharpTurn .
Labels: P2,e: impeller,team-engine,triaged-engine

Moving from impeller::Path to SkPath reveals the issue. Since flutter only interacts with impeller via SkPath this is likely an existing bug.

![image](https://github.com/user-attachments/assets/4ab937bd-6f1c-405b-bfe9-af16e1389302)
Repository: ollama
Issue: 不能识别上传文件
Labels: bug

### What is the issue?

![image](https://github.com/user-attachments/assets/9d990720-c5fd-4621-9394-f7a87ce93d94)
![image](https://github.com/user-attachments/assets/f065581f-2e10-477c-b5f1-ad866465bfef)
上一个版本还可以

### OS

Windows

### GPU

Nvidia

### CPU

Intel

### Ollama version

0.2.2
Repository: pytorch
Issue: [torchelastic] torchrun with static backend hangs when used with port '0' 
Labels: triaged,module: elastic

repro is from torchtitan -

clone the repo, follow the readme to install deps, and run `run_llama_train.sh` - this should work

now, if you edit run_llama_train.sh and change the `--rdzv_backend c10d` to `--rdzv_backend static` or simply delete it, but keep the  `--rdzv_endpoint="localhost:0"`, the launch will hang forever.

cc @dzhulgakov
Repository: godot
Issue: RigidBody not waking up with dynamic linear/angular velocity on StaticBody
Labels: bug,topic:physics

### Tested versions

- Reproducible in: v4.2.2.stable.nixpkgs [15073afe3]

### System information

Godot v4.2.2.stable (15073afe3) - NixOS #1-NixOS SMP PREEMPT_DYNAMIC Fri Jul  5 07:34:07 UTC 2024 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER - 13th Gen Intel(R) Core(TM) i7-13700KF (24 Threads)

### Issue description

When setting `constant_linear_velocity` or `constant_linear_velocity` dynamically during runtime, sleeping RigidBodies will not wake up and react to the forces. 
RigidBodies should detect changes of touching StaticBodies and possibly wake up to move.

### Steps to reproduce

The example project provided will set the `constant_linear_velocity` to `Vector3(1, 0, 0)` after ~3s. However, no movement of the RigidBody can be observed. For the `constant_linear_velocity` or also `constant_angular_velocity` to work, you have to set the initial delay within `StaticBody3D.gd` to 0s or also the `can_sleep` property of the RigidBody to `false`.

### Minimal reproduction project (MRP)

[NotWakingUp.zip](https://github.com/user-attachments/files/16200354/NotWakingUp.zip)
Repository: ollama
Issue: Using both CPU + GPU for Parallel Models
Labels: feature request

As starting 0.2, Ollama support running in parallel models. That makes memories are more valuable than before. Even more, in operation system like Windows, if we you GPU, the memory of GPU is fixed unless we purchase another one. 

Gladly, the system memory is much more cheaper than replacing the GPU and Ollama can work with CPU only with a lower speed. So if we could use both CPU + GPU at the same time, we can add more system memories and get more parallel models.

The approach should be like:

1. Using GPU only, but use system memory as model cache. That will make switch model more quickly. 
2. Using GPU first, after the memories of GPU are full, using CPU as second method. 

That all what I thought. More ideas are appreciated.
Repository: vscode
Issue: Provide a "withoutFormatting" option for `document.save` and `workspace.save`
Labels: feature-request,api,file-io

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

Currently, invoking these two APIs triggers `editor.formatOnSave` and `editor.codeActionsOnSave`. Is it possible to provide an option to skip this behavior? Just like:
https://github.com/microsoft/vscode/blob/f8a54c74adb45ec263b019432758e477c6732386/src/vs/workbench/common/editor.ts#L747-L750
Repository: godot
Issue: Jitter and Shaking issue in Character2D node using physics process
Labels: topic:physics,needs testing,topic:2d

### Tested versions

Tested on version Godot 4.2.1 and Godot 4.0

### System information

Windows 11 - Godot v4.2.1

### Issue description

Godot Engine v4.2.1

**Jitter in Character2d Node move right and left or top and down **

https://docs.godotengine.org/en/stable/tutorials/rendering/jitter_stutter.html

Below are some steps done to resolve the Jitter issue

Update the Max FPS to 60 and also make sure that the ticks_per_second is 60 still jitter issues

Tried change the ticks_per_second to 60 and Increase the Max Physics step per second, but issue is still there.

```gdscript
extends CharacterBody2D

const SPEED = 300
var viewport_size
const MARGIN = 20

func _ready() -> void:
	viewport_size = get_viewport_rect().size


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass

func _physics_process(delta: float) -> void:
	var direction = Input.get_axis("move_left", "move_right")
	velocity = velocity.normalized()
	if direction:
		velocity.x = direction * SPEED
	else:
		velocity.x = move_toward(velocity.x, 0, SPEED)
	
	move_and_slide()
```

### Steps to reproduce

Create a Character2D player and add the sprite 2D and Rectangle collision 2D node. Once done configure the script for Character2D Node and add the following below code

```gdscript
extends CharacterBody2D

const SPEED = 300
var viewport_size
const MARGIN = 20

func _ready() -> void:
	viewport_size = get_viewport_rect().size


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass

func _physics_process(delta: float) -> void:
	var direction = Input.get_axis("move_left", "move_right")
	velocity = velocity.normalized()
	if direction:
		velocity.x = direction * SPEED
	else:
		velocity.x = move_toward(velocity.x, 0, SPEED)
	
	move_and_slide()
	
	if global_position.x > viewport_size.x - MARGIN:
		global_position.x = -MARGIN

```

Sprite2D will contain the simple PNG image of character and run application to check if character move left to right.

**Note: ** move_left and move_right is the Input mapping to A(physical)  Left(physical) and D(physical) Right(physical) respectively.

Character shows the jitter and shaking response. 

Sometime it works for few minutes after it again shows Jitter effect and below are steps also followed provided in document: https://docs.godotengine.org/en/stable/tutorials/rendering/jitter_stutter.html

Still no effect.


### Minimal reproduction project (MRP)

Added player.tscn and png file in below zip file, with script

[Game.zip](https://github.com/user-attachments/files/16200374/Game.zip)
Repository: godot
Issue: Dynamic OmniLight3D shadows are slower than godot3
Labels: discussion,topic:rendering,topic:3d,performance

### Tested versions

Reproducible in 4.2.2 and 4.3-beta2 

### System information

Godot v4.3.beta3 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads)

### Issue description

When porting to godot4 it can be expected that the forward+ renderer will be slower due to it's higher fidelity. I wasn't expecting such a penalty when adding lights with dynamic shadows, which also affects the compatibility renderer. Maybe we were spoiled with how fast they were in godot3?

It seems like dynamic shadows are disproportionately slower than in godot3.

Ideally optimizations can be found going forward to tighten the gap or at least we can document what quality gains we are getting for the frame time cost?

Having a baseline set of benchmarks in godot3 can help set targets for performance in godot4.

### Steps to reproduce

Create a scene in godot3 and godot4 with dynamic vs baked shadows and benchmark them. (see mrp)

There is a results.ods and results.txt with much more data on other methods/drivers but this summary highlights the important parts.
![image](https://github.com/user-attachments/assets/1dc4113d-c286-40c9-90a4-c64667c8db79)

Performance for baked lighting seems comparable in the compatibility rendering method but there are large losses when dynamic shadows are enabled.



### Minimal reproduction project (MRP)

[shadow-perf.zip](https://github.com/user-attachments/files/16200558/shadow-perf.zip)
Repository: opencv
Issue: SimpleBlobDetector lacks documentation 
Labels: feature,category: documentation

### Describe the feature and motivation

In PR [!21942](https://github.com/opencv/opencv/pull/21942/checks)  new functionality was added but without an issue that describes what the new functionality does and why it was needed/desired. Additionally the public API was extended by an undocumented method.

The main change is somewhat clear: SimpleBlobDetector was introduced as a feature2d class that detects key points in a image. Thus only the center points of the detected contours are returned which is much less useful than the full contour for further processing. Since the method findBlobs is protected, a new public method was introduced to get the blobs of the last detect call as long as the param collectBlobs was set to true.

Overall a good change to make the SimpleBlobDetector  usable but it lacks documentation. Without looking at the code it's completely unclear what the things do. Neither the documentation nor the sample code was updated.

I would be happy to provide a few lines of explanation for the next reader now that I have stumbled upon this and read the source code.

### Additional context

_No response_
Repository: pytorch
Issue: `atleast_{1,2,3}d()` with no arguments works returning an empty tuple against the doc
Labels: module: docs,triaged,actionable,module: python frontend

### 🐛 Describe the bug

[The doc](https://pytorch.org/docs/stable/generated/torch.atleast_3d.html) of `atleast_3d()` says the type for `input` is a tensor or a list of tensors as shown below:

> - input ([Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor) or [list](https://docs.python.org/3/library/stdtypes.html#list) of Tensors) –

But, no arguments for `atleast_3d()` work returning an empty tuple as shown below:

```python
import torch

torch.atleast_3d() # ()
```

In, addition, the error message doesn't say the combination of no arguments as shown below:

```python
import torch

torch.atleast_3d(7) # Error
```

```lang-none
TypeError: atleast_3d() received an invalid combination of arguments - got (int), but expected one of:
 * (Tensor input)
      didn't match because some of the arguments have invalid types: (!int!)
 * (tuple of Tensors tensors)
      didn't match because some of the arguments have invalid types: (!int!)
```

### Versions

```python
import torch

torch.__version__ # 2.3.0+cu121
```

cc @svekars @brycebortree @albanD
Repository: rust
Issue: Lint unused assoc types although the trait is used
Labels: A-diagnostics,T-compiler

### Code

```Rust
trait Tr {
    type X;
}

impl Tr for () {
    type X = Self;
}

fn foo() -> impl Tr {}

fn main() {
    foo();
}
```


### Current output

```Shell
No warning.
```


### Desired output

```Shell
warning: associated type `X` is never used
 --> src/main.rs:2:11
  |
1 | trait Tr {
  |       -- associated type in this trait
2 |     type X;
  |          ^
  |
  = note: `#[warn(dead_code)]` on by default
```


### Rationale and extra context

_No response_

### Other cases

_No response_

### Rust Version

```Shell
Build using the Nightly version: 1.81.0-nightly
(2024-07-12 c6727fc9b5c64cefa726)
```


### Anything else?

_No response_

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

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

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: godot
Issue: LightmapGI fails to bake on mobile devices
Labels: platform:android,topic:rendering,topic:editor,documentation,topic:3d

### Tested versions

Reproducible in 4.3 beta 3-  Godot 4.2.2 stable

### System information

Qualcom adreno 740 Sansung s23+

### Issue description

When i tried to bake the lightmap on the vulkan mobile backend, i i tried with the default primitive shapes, unwrapping the uv 2 and the common things when baking.

Then when i tried  to bake, it resulted on an error where it says there's no lightmapper.  I tried even on the forward + backend , but neither it worled.

And while this may be related to  https://github.com/godotengine/godot/issues/77001 , in this case it isn't even  trying to bake , it just throw an editor and doesn't bake light.

The error is this one   
scene/3d/lightmap_gi.cpp:744 - Condition "lightmapper.is_null()" is true. Returning: BAKE_ERROR_NO_LIGHTMAPPER


### Steps to reproduce

1 Open the project on your phone.

2 Try to bake the lightmap.

3 See the error in console.

### Minimal reproduction project 

[Lightmap_mobile.zip](https://github.com/user-attachments/files/16200899/Lightmap_mobile.zip)
Repository: puppeteer
Issue: [Feature]: Publish a ESM on JSR.io for puppeteer 
Labels: feature,P3

### Feature description

Please publish module on [JSR](https://jsr.io/) so javascript ecosystem can have real benefits to use it in multiple runtime of js seamlessly. Thanks
Repository: kubernetes
Issue: Mention fields' immutability in spec
Labels: kind/cleanup,sig/storage,triage/accepted

/sig storage
/kind cleanup

https://kubernetes.slack.com/archives/C09QZFCE5/p1720848771491719
I should've raised it as an issue for a better tracking.

> Hi, one general feedback.
I suppose maybe it’s not only sig-storage area’s problem, though. I saw several fields don’t mention they’re immutable while they actually are, which made reviewing hard when I did scheduler plugins PRs.
Examples I could list are VolumeBindingMode or ReclaimPolicy in StorageClass and CSINode.Spec.Drivers. I guess there are actually more.
Please consider updating those fields’ comments.
Repository: PowerToys
Issue: PowerToys Peek stopped responding while previewing JPEG images
Labels: Issue-Bug,Needs-Triage,Product-Peek

### Microsoft PowerToys version

0.82.0

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

Peek

### Steps to reproduce

Download several .JPEG images and use Peek to preview them, repeatedly scrolling through them.
[PowerToysReport_2024-07-13-02-38-02.zip](https://github.com/user-attachments/files/16201037/PowerToysReport_2024-07-13-02-38-02.zip)
![Captura de tela 2024-07-13 023810](https://github.com/user-attachments/assets/e923ec36-5882-4b05-87a7-8f31d0489bc3)


### ✔️ Expected Behavior

Peek would display the images normally.

### ❌ Actual Behavior

Stopped responding, couldn't be closed conventionally, by closing PowerToys as a whole nor be terminated through Task Manager.

### Other Software

_No response_
Repository: PowerToys
Issue: PowerToys causes frequent input lag when a resource intensive program is running
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.82.0

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

General

### Steps to reproduce

Open an app or program that is resource demanding, preferably a game such as Overwatch, and random input lag will often occur. Otherwise, it will happen randomly while using the OS.

### ✔️ Expected Behavior

PowerToys does not interfere with keyboard input when another program is using a lot of the computer's resources.

### ❌ Actual Behavior

PowerToys introduces random input lag issues while it is running, especially and more intensively when another program is using a lot of resources.

### Other Software

Overwatch 2 (2.11.1.0.127168)
Roblox (1088f3c8e4a44cc7)
Microsoft Edge (126.0.2592.102)
Floorp (11.15.0)
Notepad (11.2405.13.0)
Media Player (11.2406.13.0)
WhatsApp Beta (2.2428.7.0)