sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Getting error when scenes are set using PackedScene among each other
Labels: discussion,topic:core

### Godot version

4.1.stable

### System information

Windows 11 64-bit, Ryzen 5 5500U, 8GB RAM, Nvidia GTX 1650

### Issue description

## Background (Optional)
So initially I was trying to create a minimal project for a different bug. But while doing so, I came across another bug, upon which I have created this issue on. The initial bug was related to getting errors when renaming/moving files in the editor. However, this issue talks about a different bug I'm facing now.

## Current Issue
In the minimal project I provided, there are three scenes A, B, and C with their own scripts. Each of them tries to access the other via `export var x: PackedScene` statements.

### a.tscn (a.gd)
```
@export var b: PackedScene
@export var c: PackedScene
```

### b.tscn (b.gd)
```
@export var a: PackedScene
@export var c: PackedScene
```

### c.tscn (c.gd)
```
@export var a: PackedScene
@export var b: PackedScene
```

After setting the fields in inspector, and running the scene, I get a bunch of errors in the output log, including a popup window saying - `Error while loading file 'filename'`. This make it impossible to open the scene itself in editor.

### Steps to reproduce

1. Download and extract the `FileModifyErrors.zip` file.
2. Add it to the Godot projects list.
3. The project uses Git. So there are two branches, `main` and `error`.
	- `main` has the initial code without any references to other scenes, you will get no errors.
	- `error` has the updated code with references to other scenes, where you'll get the errors.

The code is simple, so you can try recreating the changes of `error` branch if you want, when inside the `main` branch.

### Minimal reproduction project

[FileModifyErrors.zip](https://github.com/godotengine/godot/files/12085586/FileModifyErrors.zip)
Repository: pytorch
Issue: [OpInfo] index.Tensor
Labels: triaged,module: testing

Create opinfo for index.Tensor. E.g. https://github.com/microsoft/onnxscript/pull/883
Repository: godot
Issue: Mutating a mutable dictionary key causes weird behaviour (instead of an error.)
Labels: bug,topic:core

### Godot version

v4.1.1.stable.official.bd6af8e0e

### System information

Windows 10.0.19045 - Vulkan (Compatibility) - GeForce GT 540M- Intel Core i7-2670QM CPU @ 2.20GHz (8 Threads)

### Issue description

When a dictionary is made with a mutable key, for example:
```gdscript
var x = [1, 2, 3]
var test = {x: "cat"}
```
And then then the key is mutated:
```gdscript
x[2] = 4
```
Weird behaviour can be observed:
```gdscript
print(test)
print(test[x])
print(test[[1,2,4]])
```
Returns:
```gdscript
{[1, 2, 4]: <null>}
<null>
<null>
```
Instead of:
```gdscript
{[1, 2, 4]: "cat"}
"cat"
"cat"
```
Even though:
```gdscript
print(test.find_key("cat"))
```
Works correctly:
```gdscript
[1, 2, 4]
```
 
 
 
For reference in Python:
```python
test = {[1, 2, 3]: "cat"}
```
Is:
```python
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    test = {[1, 2, 3]: "cat"}
TypeError: unhashable type: 'list'
```

### Steps to reproduce

0. Use the minimal reproduction project.
1. Run the project.
2. Observe the bug.

### Minimal reproduction project

[Mutable-Dictionary-Key-4.1.1-Test.zip](https://github.com/godotengine/godot/files/12087282/Mutable-Dictionary-Key-4.1.1-Test.zip)
Repository: godot
Issue: Distorted viewport when changing the `render_target_size_multiplier` of the `OpenXRInterface` (GL Compatibility)
Labels: bug,topic:xr

### Godot version

v4.1.stable.official [970459615]

### System information

Windows 10, GL Compatibility, NVIDIA GeForce GTX 1050 Ti (528.24)

### Issue description

When you change the `render_target_size_multiplier` of the `OpenXRInterface`, the viewport seems to scale improperly. This is only an issue when using the `GL Compatibility` renderer - the Vulkan mobile renderer works fine (and I assume Forward+ too).

Even though you won't be able to fully see the effect I describe without using a VR headset, in the preview window that Godot shows when running the project from the editor you can see the borders when scaling down:

https://github.com/godotengine/godot/assets/6643844/4aca82da-fbfc-4148-a872-6f7b3e31ad55

The MRP I attached changes the `render_target_size_multiplier` when pressing the trigger. It goes from 1.0 -> 1.1 -> 1.2 -> 0.8 -> 0.9 and back to 1.0

I have tested using a Meta Quest 2 over AirLink and using the Oculus OpenXR runtime, but I imagine this is not an issue with OpenXR and rather with the GL Compatibility renderer, given that it works fine using Vulkan mobile.

### Steps to reproduce

Change the `render_target_size_multiplier` to something other than 1.0

### Minimal reproduction project

[RenderTargetSizeMultiplier.zip](https://github.com/godotengine/godot/files/12087367/RenderTargetSizeMultiplier.zip)
Repository: stable-diffusion-webui
Issue: Script Version for Automating Textual Inversion finetuning
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 ?

Just wondering if there is a script version or at the very least the script that I can use when automating the Textual Inversion finetuning instead of using the GUI.

### Proposed workflow

How do I get it?

### Additional information

_No response_
Repository: storybook
Issue: [Bug]: ModuleNotFoundError when updating to 7.1.0 (Win+CRA+Yarn PnP)
Labels: bug,needs triage,windows,upgrade:7.1

### Describe the bug

### Setup
I have a sample React app project, running on Windows, initialized with `create-react-app` (non-ejected), with TypeScript and Yarn PnP. I updated to the latest version `7.1.0` from `7.0.26`.  Sample project can be found [here](https://github.com/rawfg/storybook-pnp-issue/tree/typescript-issue),

### Reproduction
When running `yarn storybook` it crashes with `ModuleNotFoundError: Module not found: Can't resolve 'util' in 'C:\Users\rawf\projects\yarn\graceful-fs-npm-4.2`.

### Expected result
It doesn't crash or it's documented if migration is needed



### To Reproduce

_No response_

### System

```shell
Environment Info:

  System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
  Binaries:
    Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.6.1 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1992.0), Chromium (114.0.1823.82)
```


### Additional context

_No response_
Repository: rust
Issue: More precisely point out what is immutable, in E0596 "cannot borrow data in a `&` reference as mutable"
Labels: A-diagnostics,T-compiler

### Code

```Rust
mod some_library {
    pub fn foo(_: &mut [i32]) {}
    pub fn bar<'a>() -> &'a [i32] {
        &[]
    }
    pub fn bar_mut<'a>() -> &'a mut [i32] {
        &mut []
    }
}

fn main() {
    some_library::foo(&mut some_library::bar());
}
```


### Current output

```Shell
error[E0596]: cannot borrow data in a `&` reference as mutable
  --> src/main.rs:12:23
   |
12 |     some_library::foo(&mut some_library::bar());
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable
```


### Desired output

```Shell
error[E0596]: cannot borrow data in a `&` reference as mutable
  --> src/main.rs:12:23
   |
12 |     some_library::foo(&mut some_library::bar());
   |                            ^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable

help: `some_library::bar()` is of type `&[i32]`, which is an immutable reference
help: `some_library::bar_mut()` might be the operation you need
```


### Rationale and extra context

The current output is confusing because it does not indicate which part of the input is the source of the immutability, and especially because the span contains the `&mut` (which in this case is irrelevant, but is often _attempted_ and may be needed to trigger `DerefMut`).

Many newcomers to Rust are not yet familiar with the idea that in order to get mutable access to some data, *every part of the path* by which they get that data must be mutable.

I have proposed that the compiler suggest calling `bar_mut()` per the naming convention, but this is questionable since the function might have different semantics, and it is secondary to the main issue here of pointing to the immutability clearly.

### Other cases

Without the `&mut`,

```rust
    some_library::foo(some_library::bar());
```

the error is much clearer, but completely different since no reborrowing is involved:

```
error[E0308]: mismatched types
  --> src/main.rs:12:23
   |
12 |     some_library::foo(some_library::bar());
   |     ----------------- ^^^^^^^^^^^^^^^^^^^ types differ in mutability
   |     |
   |     arguments to this function are incorrect
   |
   = note: expected mutable reference `&mut [i32]`
                      found reference `&[i32]`
```
Repository: godot
Issue: Integer values are imprecise when @export-ed to the editor.
Labels: bug,discussion,topic:editor

### Godot version

v4.1.1.stable.official.bd6af8e0e

### System information

Windows 10.0.19045 - Vulkan (Compatibility) - GeForce GT 540M- Intel Core i7-2670QM CPU @ 2.20GHz (8 Threads)

### Issue description

Big integers that are set in code are always fully precise, while those input in the editor from:
```gdscript
@export var integer_test_1: int
```
Are not.
 
 
Reproduction video:

https://github.com/godotengine/godot/assets/84321760/d30f7244-97d2-4c72-a9d0-bde87c08326f


### Steps to reproduce

0. Use the minimal reproduction project.
1. Copy the integer from the var declaration into the exported var in the editor.
2. Run the project.
3. Observe how the integer in the editor is different than the pasted one, and different than the printed one.

### Minimal reproduction project

[Editor-Integer-Precision-Test-4.1.1.zip](https://github.com/godotengine/godot/files/12088395/Editor-Integer-Precision-Test-4.1.1.zip)
Repository: pytorch
Issue: workaround for using vmap when .item() is being used internally
Labels: triaged,module: vmap,module: functorch

Example code:

    def func(x):
        for i in torch.arange(x):
            pass
        return None

    y = torch.tensor([3, 3])
    torch.vmap(func)(y)

Output:

    RuntimeError                              Traceback (most recent call last)
          4     return None
          6 y = torch.tensor([3, 3])
    ----> 7 torch.vmap(func)(y)

    ...

          1 def func(x):
    ----> 2     for i in torch.arange(x):
          3         pass
          4     return None

    RuntimeError: vmap: It looks like you're calling .item() on a Tensor. We don't support vmap over calling .item() on a Tensor, please try to rewrite what you're doing with other operations. If error is occurring somewhere inside PyTorch internals, please file a bug report.

Commentary: I would like to use functorch's vmap, with one of the input arguments of the function an integer representing a variable number of iterations of a for loop. Apparently, torch.arange() internally uses .item() and vmap cannot handle that. Is there any workaround?

This issue seems similar to pytorch/pytorch#124423, but it is not exactly the same.



cc @zou3519 @Chillee @samdow @kshitij12345 @janeyx99
Repository: TypeScript
Issue: Add flip operator refactoring
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:
-->

flip operator, flip operators, refactoring

## ✅ 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

Implement flip operator refactoring for swapping left and right operands and update operator if needed.

This small feature would make some refactorings, that require copy-pasting operands and operators much easier.

## 📃 Motivating Example
Before:
```ts
// harder to understand
if (5 < position) {
    // ...
}
```
After:
```ts
// much easier
if (position > 5) {
    // ...
}
```
Repository: pytorch
Issue: [FSDP] Revisit mixed-precision casting logic
Labels: triaged,module: fsdp

**Overview**
We may want to revisit FSDP's behavior for casting forward input tensors and buffers. Our mixed precision API has options `param_dtype` ,`reduce_dtype`, `buffer_dtype`, `cast_forward_inputs `, and `cast_root_forward_inputs`:
https://github.com/pytorch/pytorch/blob/abc1cadddba00b7412240b56314d9592d7ad29c7/torch/distributed/fsdp/api.py#L211-L216
In addition, we allow using full precision in eval, configured by an environment variable:
https://github.com/pytorch/pytorch/blob/abc1cadddba00b7412240b56314d9592d7ad29c7/torch/distributed/fsdp/flat_param.py#L482-L484

After https://github.com/pytorch/pytorch/pull/104408, every FSDP state has either 0 or 1 handles (see https://github.com/pytorch/pytorch/pull/104488). Note that `any(...)` in Python returns `True` if the `...` is empty. This means that currently:
- For the case where `cast_root_forward_inputs=True` and the root does not have a handle, the `(module.training or not state._use_full_prec_in_eval)` is there to represent the `(not self._fully_sharded_module.training and self._use_full_prec_in_eval)` check, which cannot happen without a handle.
    - [ ] We should be able to simplify this to `should_cast_forward_inputs = (module.training or not state._use_full_prec_in_eval) and state.mixed_precision.cast_root_forward_inputs` (removing the check on `not handle._force_full_precision`). However, this creates some asymmetry with the condition for `cast_forward_inputs=True` (`_pre_forward()`).
- For the case where `cast_forward_inputs=True`, the `len(state._handles) > 0` check avoids the need for something similar. If the FSDP instance does not manage any parameters (and hence has no handle), it never casts its forward inputs.
    - [ ] Unlike `cast_root_forward_inputs=True`, if the module does not manage any parameters, then this will not cast. We should document this behavior explicitly.
- [ ] If the root does not have a handle, then it always casts buffers to full precision. This may not be the desired behavior, and we may want to add a `state._force_full_precision` clause as part of this check.

**Code Pointers**
`cast_root_forward_inputs=True` (`_root_pre_forward()`):
https://github.com/pytorch/pytorch/blob/91ab32e4b1f9e601cd42b7e9887b93a444c99dfb/torch/distributed/fsdp/_runtime_utils.py#L655-L658

`cast_forward_inputs=True` (`_pre_forwarrd()`):
https://github.com/pytorch/pytorch/blob/91ab32e4b1f9e601cd42b7e9887b93a444c99dfb/torch/distributed/fsdp/_runtime_utils.py#L461-L463

(`_root_pre_forward()`):
https://github.com/pytorch/pytorch/blob/91ab32e4b1f9e601cd42b7e9887b93a444c99dfb/torch/distributed/fsdp/_runtime_utils.py#L587-L589

https://github.com/pytorch/pytorch/blob/abc1cadddba00b7412240b56314d9592d7ad29c7/torch/distributed/fsdp/flat_param.py#L2469-L2478



---



cc @zhaojuanmao @mrshenli @rohan-varma
Repository: godot
Issue: Code after the await keyword is executed in the main thread instead of the original thread.
Labels: bug,topic:gdscript,confirmed

### Godot version

4.1+

### System information

Arch Linux - Vulkan (Forward+)

### Issue description

When using `await` in a thread, the code after the `await` is executed in the main thread, instead of the original thread.

~~This bug only happens in 4.1 and above. It works fine 4.0.3 - stable.~~
(Apparently I got my builds mixed up, this also does not work in 4.0.3)


### Steps to reproduce

Using this minimal function running in a thread as an example:

```gdscript
func run_in_thread() -> void:
	print("Caller thread before await: ", OS.get_thread_caller_id())

	await get_tree().create_timer(1.0).timeout

	print("Caller thread after await: ", OS.get_thread_caller_id())
```

In theory, this should print the same thread ID twice, but that's not the case, the second time it prints the main thread ID.

Also, it's not just a reporting issue, the main thread does freeze if you put a heavy workload after the await keyword.


### Minimal reproduction project

+ Download this project:
[await_thread_minimal_project.zip](https://github.com/godotengine/godot/files/12093240/await_thread_minimal_project.zip)


+ Or put this script on a node:
```gdscript
extends Node


var _thread: Thread


func _ready():
	print("Main thread ID: ", OS.get_thread_caller_id())
	_thread = Thread.new()
	_thread.start(_run_in_thread)


func _exit_tree():
	_thread.wait_to_finish()


func _run_in_thread() -> void:
	print("Caller thread before: ", OS.get_thread_caller_id())

	await get_tree().create_timer(1.0).timeout

	print("Caller thread After: ", OS.get_thread_caller_id())

	# Code from here will run on the main thread instead of the thread
```

+ Open the project.
+ Press F5 (or run the minimal_scene.tscn).
+ Check the console output, the last thread ID matches the main thread ID.
Repository: flutter
Issue: Replace deprecated [UIScreen mainScreen] in FlutterPlatformViews_Internal.mm
Labels: platform-ios,engine,P2,c: tech-debt,team-ios,triaged-ios

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Refer to the umbrella issue: https://github.com/flutter/flutter/issues/125496

### Proposal

Instances of `[UIScreen mainScreen]` should be replaced in `FlutterPlatformViews_Internal.mm`
Repository: flutter
Issue: Replace deprecated [UIScreen mainScreen] in FlutterDartProject.mm and FlutterDartProjectTest.mm
Labels: platform-ios,engine,P2,c: tech-debt,team-ios,triaged-ios

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Refer to the umbrella issue: https://github.com/flutter/flutter/issues/125496

### Proposal

Instances of `[UIScreen mainScreen]` should be replaced in `FlutterDartProject.mm` and `FlutterDartProjectTest.mm`
Repository: godot
Issue: Viewport texture treated as screen texture
Labels: bug,platform:android,topic:rendering,needs testing

### Godot version

4.1.stable

### System information

Windows 10, Intel core i5 (2 cores @2.8Ghz), Intel HD Graphics 4000. 

### Issue description

The **get_viewport().get_texture()** is treated as a screen texture instead on mobile but on pc it works just fine. 

I used compatibility renderer Backend (openGL/ES) in Godot 4.1.stable

### Steps to reproduce

1. Create a 2d node and give it a shader
2. Using gdscript, get the viewport texture from the physics process function with get_viewport().get_texture()
3. Assign the texture to the 2d node shader using a texture parameter and other blah blah blah process
4. Create a 3d mesh and using a screen texture as albedo/color on it's shader
5. While it looks fine and behave as expected on PC (editor), but when exported to an android mobile, the screen texture 3d mesh model dissappears (this is due to the fact that the viewport texture acts as screen texture on mobile), meanwhile they're supposed to both be visible 


![InCollage_20230718_212555604n](https://github.com/godotengine/godot/assets/118528804/05dc302c-f7e5-45ed-9846-7a633d2b7ccc)


### Minimal reproduction project

This is a sample project, run it in editor, it'll appear just fine, but then export to android mobile and run it, you'll see that the pool disappears 

[viewport and screen texture mobile bug.zip](https://github.com/godotengine/godot/files/12089079/viewport.and.screen.texture.mobile.bug.zip)
Repository: flutter
Issue: Replace deprecated [UIScreen mainScreen] in vsync_waiter_ios.mm
Labels: platform-ios,engine,P2,c: tech-debt,team-ios,triaged-ios

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Refer to the umbrella issue: https://github.com/flutter/flutter/issues/125496

### Proposal

Instances of `[UIScreen mainScreen] `should be replaced in `vsync_waiter_ios.mm`
Repository: flutter
Issue: Replace deprecated [UIScreen mainScreen] in SemanticsObject.mm
Labels: platform-ios,engine,P2,c: tech-debt,team-ios,triaged-ios

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Refer to the umbrella issue: https://github.com/flutter/flutter/issues/125496

### Proposal

Instances of `[UIScreen mainScreen]` should be replaced in `SemanticsObject.mm`
Repository: flutter
Issue: Replace deprecated [UIScreen mainScreen] in FlutterPlatformViews.mm and FlutterPlatformViewsTest.mm
Labels: platform-ios,engine,P2,c: tech-debt,team-ios,triaged-ios

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Refer to the umbrella issue: https://github.com/flutter/flutter/issues/125496

### Proposal

Instances of `[UIScreen mainScreen]` should be replaced in `FlutterPlatformViews.mm` and `FlutterPlatformViewsTest.mm`
Repository: flutter
Issue: Replace deprecated [UIScreen mainScreen] in AppDelegate.m
Labels: platform-ios,engine,P2,c: tech-debt,team-ios,triaged-ios

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Refer to the umbrella issue: https://github.com/flutter/flutter/issues/125496

### Proposal

Instances of `[UIScreen mainScreen]` should be replaced in `AppDelegate.m`