sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Deprecate homomorphic mapped type over primitive
Labels: Suggestion,Awaiting More Feedback

### 🔍 Search Terms

homomorphic mapped primitive

### ✅ Viability Checklist

- [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 isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

I would like homomorphic mapped types over primitives to emit a warning if the base type is not an object type. An explicit conditional `type Foo<T> = T extends object ? { [K in keyof T]: ...} : T` can be used to recover the pre-existing behavior. This should be mentioned in the warning message.

Homomorphic mapped type over primitives has surprising behavior that bears mention in the FAQ:

> - This mapped type returns a primitive type, not an object type.
>   - Mapped types declared as `{ [ K in keyof T ]: U }` where `T` is a type parameter are known as homomorphic mapped types, which means that the mapped type is a structure preserving function of T`. When type parameter `T` is instantiated with a primitive type the mapped type evaluates to the same primitive.

This behavior is surprising since:
1. It is *not* referentially transparent; that is, replacing a type parameter with its value does not result in the same type
2. Although a mapped type *may* be assignable to the original type, it may specifically *not* be, e.g. `{[k in keyof T]: never}` whereas it always is in the case of primitives.
3. The expression `keyof T` has surprising behavior on primitive types, differing substantially from object types.
4. The syntax of a mapped type visually suggests an object-like type, which is incorrect when mapping over `null`.

### 📃 Motivating Example

```tsx
type NullValued<X> = {[k in keyof X]: null};
type Okay = NullValued<{x:1, y:2}>; // {x:null, y:null}
type Oops = NullValued<number>; // oops! This is `number`, which is likely not what you expected
```

### 💻 Use Cases

1. What do you want to use this for?
2. What shortcomings exist with current approaches?
  - You have to know about homeomorphic mapped types and anticipate this corner case.
3. What workarounds are you using in the meantime?
  - A type guard `type Foo<T extends object> = { [K in keyof T]: ...}` guards against the current behavior.
  - A conditional `type Foo<T> = T extends object ? { [K in keyof T]: ...} : T` makes the current behavior explicit.
Repository: godot
Issue: DisplayServer: Error spam when `Window` pops up and when closed with always_on_top and non-embedded
Labels: bug,topic:porting

### Tested versions

4.3dev, 4.2rc

### System information

Windows 10 and macOS 13.6

### Issue description

With project settings `embed_subwindows` _disabled_:

When popping and also closing a `PopupPanel`, error spam is generated when `always_on_top` is enabled, either in code or with the flag toggled in the inspector, no matter the states of `transient` or `popup_window`.

Error:
Windows with the 'on top' can't become transient.
  <C++ Error>    Condition "wd_window.on_top" is true.

<C++ Source>   platform/macos/display_server_macos.mm:3122 @ window_set_transient()
<C++ Source>   platform/windows/display_server_windows.cpp:1449 @ window_set_transient()




### Steps to reproduce

See MRP.

### Minimal reproduction project (MRP)

[transient_window_error_spam.zip](https://github.com/godotengine/godot/files/13822807/transient_window_error_spam.zip)
Repository: material-ui
Issue: [material-ui][docs] Broken demo in the Progress page in the Material 3 section
Labels: bug 🐛,docs,package: material-ui,component: progress

### Related page

https://mui.com/material-ui/react-progress/#experimental-apis

### Kind of issue

Broken demo

### Issue description

I was playing around with the demo and noticed that it stops working when I switch between the `LinearProgress` and `CircularProgress` types from the dropdown

Steps to reproduce:
1. Navigate to the Experimental APIs section of the Progress component
2. Select `LinearProgress` from the `Types` dropdown
3. Select `query` or `buffer` from the `variants` dropdown
4. Change the `Type` back the `CircularProgress`. The demo no longer works and needs either to be reset or a correct option for the `variant` be selected for it to work properly

### Context 🔦
I was exploring the documentation for the Progress component since I needed to use it in a project

**Search keywords**: progress component experimental api demo
Repository: godot
Issue: Scene tab loses path in some cases
Labels: bug,topic:editor

### Tested versions

3.2 .. 4.3

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

Normally when you delete scene's root node and add a new root, the scene tab will retain it's path:

https://github.com/godotengine/godot/assets/2223172/dfc0fea1-2363-4964-8085-7dc444654db8

However the tab will lose the path in some cases, like:
- the new root is scene instance. It will create a new inherited scene
- a texture is dropped onto 2D viewport. It probably also creates a new scene

### Steps to reproduce

1. Open a scene
2. Delete root node
3. Instantiate scene using ![image](https://github.com/godotengine/godot/assets/2223172/ddac15aa-5a4f-431d-a3c9-15ca8b1a30ba)
4. Save scene. The editor will prompt to select file, while it shouldn't

### Minimal reproduction project (MRP)

N/A
Repository: react-native
Issue: <Image /> with GIF renders incorrectly when resizeMode is set to "repeat"
Labels: Issue: Author Provided Repro,Component: Image,Needs: Triage :mag:,Newer Patch Available

### Description

`<Image />` cannot render GIF correctly when (Android) or after (iOS) setting `resizeMode` to `"repeat"`.

The issue on iOS and Android are different:
1. on iOS,
1.1. the first issue is GIF cannot animate when `resizeMode` is set to `"repeat"`
1.2. the second issue is `<Image />` cannot get out of `"repeat"` mode after setting `resizeMode` to it. 
2. on Android, the issue is `<Image />` cannot render `"repeat"` mode correctly -- there GIF will not "repeat", but shrink to top left corner instead

JPG and PNG files don't have any issue.


### Steps to reproduce

Setup: create a vanilla React Native app, add a `Image` component in it. Or try the linked Expo Snack below

1. try JPG and PNG with various resizeMode value, including "repeat", and observe JPG and PNG are always rendered correctly
2. try the same with GIF, and observe:
2.1. on iOS, GIF cannot animate when `resizeMode` is set to "repeat"
2.2. on iOS, GIF cannot recover from "repeat" after setting `resizeMode` to "repeat" and then other value (e.g. "cover")
2.2. on Android, GIF cannot "repeat", but shrinks to the top left corner instead


### React Native Version

0.72.6

### Affected Platforms

Runtime - Android, Runtime - iOS

### Output of `npx react-native info`

```text
N/A
```


### Stacktrace or Logs

```text
N/A
```


### Reproducer

https://snack.expo.dev/@l1m2p3/image-gif-resizemode-bug

### Screenshots and Videos

**iOS:** 

https://github.com/facebook/react-native/assets/6405712/9d2795bd-79f1-444e-8815-228db3446855

**Android:** 

https://github.com/facebook/react-native/assets/6405712/ca4e803e-56bc-4f58-9fb6-77bfa03279eb
Repository: PowerToys
Issue: Fancy Zones Causing Issues With Greenshot
Labels: Issue-Bug,Product-FancyZones

### Microsoft PowerToys version

0.76.2

### Installation method

GitHub

### Running as admin

No

### Area(s) with issue?

FancyZones

### Steps to reproduce

Install greenshot
Enable fancy zones.
Press screenshot button, select area on third screen, puts first screen over top
screenshots correctly, but now I cannot see selection

### ✔️ Expected Behavior

see third screen visual

### ❌ Actual Behavior

overlays first screen

https://github.com/microsoft/PowerToys/assets/16603906/fa915d57-a620-495d-a5b0-2505d3426e4a



### Other Software

firefox, greenshot, powertools
Repository: terminal
Issue: Tabs visual style changes when moving Terminal window to another display
Labels: Issue-Bug,Area-UserInterface,Product-Terminal,Priority-3,Culprit-WinUI

### Windows Terminal version

1.18.3181.0

### Windows build number

10.0.22621.0

### Other Software

_No response_

### Steps to reproduce

I have two monitors, monitor 1 2560x1440 (125% scale, landscape) and monitor 2 1080x1920 (100% scale, portrait). Last few versions of Terminal the tabs are rendered with square bottom corners on the monitor 1. If I move the Terminal window to the monitor 2 the tabs are immediately rendered with the round bottom corners. The top corners of the tabs are always round.

### Expected Behavior

The visual style of the tabs should be consistent with the look and feel of Windows 11 (like windows explorer tabs) regardless of the chosen display.

### Actual Behavior

The visual style of the tabs is inconsistent when using multiple displays.
Repository: PowerToys
Issue: [Mouse Without Borders] Can't use NumLock/ScrollLock/CapsLock key on slave PC.
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.76.2

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

Mouse Without Borders

### Steps to reproduce

1. Open "Mouse Without Borders" and connect 2 machines.
2. Move mouse between them and use keyboard.

### ✔️ Expected Behavior

When the mouse is placed on the slave and the NumLock key is pressed, the Numpad status of the host is synchronously disabled or enabled.

### ❌ Actual Behavior

Only on master machine can use these 3 key.
When mouse on slave machine and press them, Nothing happend.

### Other Software

_No response_
Repository: angular
Issue: Navigation scrollbar issue on IOS 17.1.2
Labels: area: dev-infra,iOS

### Describe the problem that you experienced

There is a scroll issue on the [Angular dev website](https://angular.dev). Mostly, similar visual bugs appear on iOS mobile. To fully understand what the issue is, please check the video.

https://github.com/angular/angular/assets/68782786/1db82eae-00f9-47e1-9a3e-81c4b2391aed

There is 2 UI bug:

1. couldn't see all links as shown in video
2. there is small gap in navigations (check the image)

![Capture](https://github.com/angular/angular/assets/68782786/9848f648-87cf-49af-82e8-9cb4cc23f039)



### Enter the URL of the topic with the problem

https://angular.dev/overview

### Describe what you were looking for in the documentation

Nothing just were browsing

### Describe the actions that led you to experience the problem

Already demonstrated in the video

### Describe what you want to experience that would fix the problem

_No response_

### Add a screenshot if that helps illustrate the problem

_No response_

### If this problem caused an exception or error, please paste it here

_No response_

### If the problem is browser-specific, please specify the device, OS, browser, and version

```true
Iphone 13 | IOS 17.1.2
```


### Provide any additional information here in as much as detail as you can

_No response_
Repository: pytorch
Issue: parametrized should fail to generate tests with weird names
Labels: triaged,module: testing

The parametrized decorator generates tests with names like "test_convert_np_dtypes_'bool_'" (e.g. https://github.com/pytorch/pytorch/issues/116716). This leads to some weird interactions with tooling that may assume that a test name must be a valid symbol (i.e. consists of letters, underscore, or numbers).

Pitch: parametrized should error if it tries to generate a test with a weird name and force users to manually specify names via subtest().

cc @jbschlosser
Repository: PowerToys
Issue: Please add feature to schedule or trigger power plans and make it easy to switch between them
Labels: Needs-Triage

### Description of the new feature / enhancement

Automate switching of windows power plans

### Scenario when this would be used?

To run power saver when afk as it does use less power than balanced.   To be able to switch power plans either via hotkey or system tray app or something because currently you have to go to control panel interface to switch between high performance/balanced and power saver.

Example is Virtualbox Virtual Machines which will randomly misbehave if power plan is anything other than High Performance.    Can either stall out or windows will stall out and idle your unvirtualized apps, likely made worse with the scheduling of e-cores.

### Supporting information

A widget to automate power plan switching based on triggers/schedules and to make it easier to switch between plans, and make it more obvious which one is active.
Repository: godot
Issue: Error at loading remapped scripts on exported project
Labels: discussion,topic:gdscript,topic:editor,needs testing,topic:export

### Tested versions

Reproducible in 4.2.1.stable

### System information

Godot v4.2.1.stable - Windows 10.0.19045 - GLES3 (Compatibility) - Intel(R) HD Graphics 4600 (Intel Corporation; 20.19.15.5126) - Intel(R) Core(TM) i3-4330 CPU @ 3.50GHz (4 Threads)

### Issue description

I made a small EditorExportPlugin that remaps every GDScript file (*.gd) into the root of the project ('res://'), here's the code:

```
extends EditorExportPlugin

var index: int = 0

func _export_begin(features: PackedStringArray, is_debug: bool, path: String, flags: int) -> void:
	index = 0

func _export_file(path: String, type: String, features: PackedStringArray) -> void:
	var file: FileAccess = FileAccess.open(path, FileAccess.READ)
	if file == null: return
	
	var extension: String = path.get_extension()
	var buffer: PackedByteArray = file.get_buffer(file.get_length())
	
	add_file("MyRemapNumber%s.%s" % [str(index), extension], buffer, true)
	index += 1
```

The case is, everything works fine until the executable runs, throws the next error, and the script doesn't get executed:
```
SCRIPT ERROR: Parse Error: Class "Main" hides a global script class.
          at: GDScript::reload (MyRemapNumber3.gd:2)
ERROR: Failed to load script "MyRemapNumber3.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript.cpp:2788)
```

Here's the script in question (originally named as 'main.gd'):
```
extends Node2D
class_name Main

func _ready() -> void:
	print("Hello World")
```

And, as you can see, parser marks the error at line 2. Maybe it's a global script cache issue, and maybe it can be solved by just reloading the 'new' script if it already exists in the global scope or detected as a remap.

### Notes:

- This doesn't happen with Autoloads
- Project doesn't close after that because it was tested with just one script. Maybe with more it could be worse

### Steps to reproduce

1. Create a debug export for desktop
2. When exporting the game, remap some script which uses `class_name`
3. Run the exported project and see the console error

### Minimal reproduction project (MRP)

[TestExporting.zip](https://github.com/godotengine/godot/files/13826988/TestExporting.zip)
Repository: flutter
Issue: WebView text input is hidden by soft keyboard
Labels: a: text input,platform-android,p: webview,package,has reproducible steps,P2,team-android,triaged-android,found in release: 3.16,found in release: 3.18

### Steps to reproduce

1:flutter version 1.22.6 or 3.16.0 or newer
2:Platform: MeiZu Android 11
3:webview_flutter:  3.0.4 or newer
I set Scaffold  resizeToAvoidBottomInset: true, but WebView text input is hidden by soft keyboard

### Expected results

WebView text input is not hidden by soft keyboard

### Actual results

WebView text input is hidden by soft keyboard,and not scroll to content

https://github.com/flutter/flutter/assets/53683919/9d372133-6f7f-4d42-a048-6c42516513dc



### Code sample

```dart
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';


void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(MainApp());
}

class MainApp extends StatelessWidget {

  const MainApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        resizeToAvoidBottomInset: true,
        body: WebView(
          initialUrl: "http://218.75.104.131:50010/meter",
          javascriptMode: JavascriptMode.unrestricted,
          debuggingEnabled: kDebugMode,
          javascriptChannels: <JavascriptChannel>[
          ].toSet(),
          onWebViewCreated: (WebViewController controller) {
          },
          navigationDelegate: (NavigationRequest request) {
            var url = request.url;
            return NavigationDecision.navigate;
          },
          gestureNavigationEnabled: false,
        ),
      ),
    );
  }
}
```
### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>

https://github.com/flutter/flutter/assets/53683919/1440f202-aaef-4292-be62-197cbc97e185




### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[Paste your output here]
```

</details>
Repository: three.js
Issue: MaterialX: `viewdirection` node
Labels: Nodes

### Description

MaterialX finally brings back non-photorealistic rendering with a new `nprlib`; right now it contains a single node, `viewdirection` with the same possible spaces as position/normal/tangent.

More here: https://github.com/AcademySoftwareFoundation/MaterialX/pull/1631

cc @sunag

### Solution

I tried to add support for it but am not sure if the right view direction nodes already exist:

```js			
} else if ( element === 'viewdirection' ) {
    
    const space = this.getAttribute( 'space' );
    // not sure what to use here for "view direction in world space" and "view direction in object space" – these are wrong
    node = space === 'world' ? positionView : positionViewDirection; 

}
```

### Alternatives

Emitting transformation nodes that convert between spaces?

### Additional context

MaterialX PR including some (unlit) sample materials (would require #27494): 
- https://github.com/AcademySoftwareFoundation/MaterialX/pull/1631
Repository: excalidraw
Issue: TypeError with App router using excalidraw
Labels: bug,package:excalidraw,SSR

I copied the code above, the app router gives me this error, how to solve this issue?

TypeError: _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default(...) is not a function
Repository: three.js
Issue: GroundedSkybox zenit/nadir visual artifacts
Labels: Suggestion

### Description

The new approach exhibits relatively obvious typical rendering artifacts from "just" sampling a texture on a UVed sphere at the top and bottom:

<img width="597" alt="image" src="https://github.com/mrdoob/three.js/assets/2693840/af3bdb06-799a-4f57-8b1a-8b40d097e74c">
<img width="594" alt="image" src="https://github.com/mrdoob/three.js/assets/2693840/a9b3b4b1-b9ad-4ef2-9c0b-1a88f0ea6d2c">

I think that's why typically a shader is used to sample exact values, instead of relying on UV interpolation to do its thing.

(I understand bringing back a custom shader introduces some of the same complexities on why GroundProjectedSkybox was removed)

cc @elalish 

### Reproduction steps

1. Add GroundedSkybox to a scene with a typical radius
2. Note artifacts

### Code

-

### Live example

-

### Version

r161
Repository: godot
Issue: 3D collision shapes difficult to see in editor
Labels: enhancement,discussion,topic:editor,usability,topic:3d

### Tested versions

not version-dependent

### System information

not system-dependent

### Issue description

It is often difficult to see collisionshapes in the editor (3d scenes).  There doesn't seem to be a way to make the lines more easily visible (color, thickness). 
Examples from front view & top view :

![front_view_collisionshape3d_line_visibility](https://github.com/godotengine/godot/assets/59080934/0cd52c51-4c46-4f8c-a018-036f0df0c00e)

![top_view_collisionshape3d_line_visibility](https://github.com/godotengine/godot/assets/59080934/20d25bad-0beb-416f-b7d5-9adb5120c05b)


### Steps to reproduce

/

### Minimal reproduction project (MRP)

/
Repository: rust
Issue: Missing CSE caused by for loop on slice
Labels: A-LLVM,I-slow,T-compiler,C-bug,llvm-fixed-upstream

While examining a weird performance regression on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Odd.20Performance.20Phenomenon), we noticed a peculiar thing caused by a simple for loop.

Consider this code:
```rust
#[inline(never)]
fn add_index(bools: &[bool]) -> usize {
    let mut count: usize = 0;
    for i in 0..bools.len() {
        if bools[i] {
            count += 1;
        }
    }
    count
}

#[inline(never)]
fn add_iter(bools: &[bool]) -> usize {
    let mut count: usize = 0;
    for b in bools {
        if *b {
            count += 1;
        }
    }
    count
}
```
These two functions do the same thing, but the first one uses slice indexing, while the other one uses a more natural for loop. One would expect that the second version will optimize better (or same).

However, when these functions are called multiple times, only the first function is eligible for CSE (common subexpression elimination):
```rust
pub fn foo1(bools: &[bool]) {
    // CSE applied
    println!("a: {}", add_index(bools));
    println!("b: {}", add_index(bools));
}

pub fn foo2(bools: &[bool]) {
    // CSE not applied
    println!("a: {}", add_iter(bools));
    println!("b: {}", add_iter(bools));
}
```
Link to [Godbolt](https://godbolt.org/z/bcdf7hn7G).

When examining these two functions, I noticed that the indexed version uses `nocapture` for its argument, while the for loop version doesn't:
```
define noundef i64 @add_index(ptr noalias nocapture noundef nonnull readonly align 1 %bools.0, i64 noundef %bools.1) unnamed_addr #0 !dbg !7 {

define noundef i64 @add_iter(ptr noalias noundef nonnull readonly align 1 %bools.0, i64 noundef %bools.1) unnamed_addr #1 !dbg !57 {
```
which might be the reason of why CSE isn't applied.

It seems weird that the canonical way of iterating over a slice produces worse code (or at least function attributes) than manual indexing.