sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Enable `allowJs` with `isolatedDeclarations`
Labels: Experience Enhancement

### Acknowledgement

- [X] I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

### Comment

Today, an error is issued when `allowJs` is set alongside `isolatedDeclarations` - js and ts `.d.ts` emit use the same pipeline, so it really should work, provided the error generation logic isn't making too many syntax assumptions.

Mostly, unlocking this is going to involve looking through the `isolatedDeclarations` tests and copying them with their cast/annotation syntaxes swapped to jsdoc and filenames swapped to `.js` just to give confidence things are going to work OK (and that `getEffectiveTypeNode` is being used over a direct `.type` get in enough places in the error generator). There's a few other JS-specific error cases to look at (js's unique export/expression merges, for one) that may need some new errors, but the bulk of it is just ensuring the existing type node presence checking logic generalizes to jsdoc-sourced type nodes.
Repository: rust
Issue: Unheplful Borrow Error Related to Use of Borrows in Loop
Labels: A-diagnostics,T-compiler

### Code

```Rust
struct Cat {
    nya: String,
}

impl Cat {
    fn meow(&mut self) {}
}

fn use_cat(cat: &mut Cat) {
    let nya = &mut cat.nya;

    loop {
        if nya == "" {}

        cat.meow();
    }
}
```


### Current output

```Shell
error[E0499]: cannot borrow `*cat` as mutable more than once at a time
  --> src/lib.rs:15:9
   |
10 |     let nya = &mut cat.nya;
   |               ------------ first mutable borrow occurs here
...
13 |         if nya == "" {}
   |            --- first borrow later used here
14 |
15 |         cat.meow();
   |         ^^^ second mutable borrow occurs here
```


### Desired output

```Shell
error[E0499]: cannot borrow `*cat` as mutable more than once at a time
  --> src/lib.rs:15:9
   |
10 |     let nya = &mut cat.nya;
   |               ------------ first mutable borrow occurs here
...
13 |         if nya == "" {}
   |            --- first borrow later used here (in a future iteration of this loop)
14 |
15 |         cat.meow();
   |         ^^^ second mutable borrow occurs here (in a loop)
```


### Rationale and extra context

I encountered this issue in a real project where the binding equivalent to `nya` was very far away from the use, and i was using `cat` *immutably* above the `==` (but didn't recognize it as immutable), which led me to believe that the use of `cat` was not the issue.  Really I think this just needs a note about the fact that the uses are in a loop, so they are both used before and after each other.

### Rust Version

```Shell
rustc 1.79.0-nightly (e3181b091 2024-04-18)
binary: rustc
commit-hash: e3181b091e88321f5ea149afed6db0edf0a4f37b
commit-date: 2024-04-18
host: x86_64-unknown-linux-gnu
release: 1.79.0-nightly
LLVM version: 18.1.4
```
Repository: deno
Issue: [ext/web] `Event.timeStamp` is always 0
Labels: feat,web,ext/web

Version: Deno 1.42.4

Currently any `Event.timeStamp` is always set to 0
https://github.com/denoland/deno/blob/472a37064071c66cd1311cdea2e78de8d2bc0641/ext/web/02_event.js#L156

> The `timeStamp` read-only property of the [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event) interface returns the time (in milliseconds) at which the event was created.
>
> https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp

It should be set to `performance.now()` or similar to match more closely what is expected

**Motivation**
Make possible to test cases that requires this property to be non-zero:
```ts
const oldEvent = new Event()
await delay(5)
const lastEvent = new Event()
a.lastUpdated = oldEvent.timeStamp+1

a.addEventListener(event => {
  if (event.timeStamp < a.lastUpdated)
    return
  expect(event).toBe(lastEvent)
})

a.dispatchEvent(oldEvent)
a.dispatchEvent(lastEvent)
```
The above is not possible currently, because `timeStamp` property is readonly
Repository: next.js
Issue: `unstable_cache` loads `Object` instance instead of `Map` instance from cache. 
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/unstable-cache-map-bug-mq2xxm

### To Reproduce

1. Start the application in development (`next dev`)
2. On initial load, the page will correctly display the contents of the `Map`
3. Refresh the page
4. The page will show an error `cachedMap.entries is not a function`

### Current vs. Expected behavior

Following the steps from the previous section, I expected to still see the contents of the map even after refreshing / loading a cached version of the `Map`.

It seems to me that the `Map` is being loaded as an instance of `Object`. That's why it doesn't have an `entries` method defined.

If I inspect the cache contents at `./.next/cache/fetch-cache` I see
```
{"kind":"FETCH","data":{"headers":{},"body":"{}","status":200,"url":""},"revalidate":31536000,"tags":[]}
```

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 14.2.0-canary.9 // There is a newer canary version (14.3.0-canary.13) available, please upgrade! 
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A
 ⚠ There is a newer canary version (14.3.0-canary.13) available, please upgrade! 
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue
```


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

Runtime

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

next dev (local), Vercel (Deployed)

### Additional context

I tried to install latest canary in the sandbox, but the install command was erroring in CodeSandbox.

I've observed this exact issue outside of CodeSandbox environments, I'm certain the issue is not environment related (I've observed in Vercel deployments too).
Repository: go
Issue: proposal: log/slog: Add WithAttrs and Logger.WithAttrs
Labels: Proposal

### Proposal Details

This proposal addresses a deficiency in the log/slog package, specifically the lack of support for purely attribute-based logging functions/methods. The primary focus of this proposal is the introduction of a new function, WithAttrs, to both the package scope and the Logger interface. This addition seeks to streamline and enhance logging practices, particularly in scenarios such as:
```go
attrs := []slog.Attr{
    {
        Key:   "foo",
        Value: "bar",
    },
    {
        Key:   "bar",
        Value: "foo",
    },
}

slog.WithAttrs(attrs...)
```
Repository: rust
Issue: Tracking issue for future-incompatibility lint `self_constructor_from_outer_item`
Labels: A-lints,T-compiler,C-future-incompatibility,C-tracking-issue,T-types

This is a tracking issue for the future-incompatibility lint `self_constructor_from_outer_item`.

The goal of this page is describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our [breaking change policy guidelines](https://github.com/rust-lang/rfcs/blob/master/text/1589-rustc-bug-fix-procedure.md).

### What

Rust doesn't allow referencing generics from outer items in inner nested items:

```rust
fn test<T>() {
    fn nested() -> T { todo!() }
    //~^ ERROR can't use generic parameters from outer item
}
```

This includes, interestingly, the `Self` type alias, *even if* it's not generic itself:

```rust
struct Hello;

impl Hello {
    fn test() {
        fn nested() -> Self { todo!() }
        //~^ ERROR can't use generic parameters from outer item
    }
}
```

However, there was an oversight in the implementation of `Self` constructors in impls, such that this code worked:

```rust
struct Hello;

impl Hello {
    fn test() {
        fn nested() -> Hello { Self }
        // Allowed, for now... ^^^^
    }
}
```

This lint is implemented for the case where the `Self` constructor doesn't reference any generic parameters. If it does, then a hard error is given instead (since the code will typically ICE or at least almost always fail to compile).

### How to fix

Replace the `Self` with the relevant type in the `impl` header.

### Tracking

* [ ] Initial implementation: #124187
* [ ] Bump lint to deny
* [ ] Make it a hard error
Repository: transformers
Issue: Schedule Free Optimizers (pytorch) and Sophia optimizer
Labels: Feature request,optimization

### Feature request

See <https://github.com/facebookresearch/schedule_free> and <https://github.com/Liuhong99/Sophia> -- These optimizers have very different properties and are often useful over the existing choices.

### Motivation

Schedule free optimizer (especially schedule-free SGD) offers increased convergence over the existing implementation with no additional memory requirements. There's some variability on the end gradients but this is an equitable engineering tradeoff in many cases. In the same vein, sophia has been shown to converge twice as fast as adam on some language modeling tasks.

### Your contribution

These would add in additional dependencies if included straight on, I'm not sure what the typical approach for this is. I'd be willing to implement both features but I'm unsure how the addition of dependencies should go.
Repository: PowerToys
Issue: Awake settings are ignored when PC is woken from sleep
Labels: Issue-Bug,Product-Awake

### Microsoft PowerToys version

0.80.1

### Installation method

WinGet

### Running as admin

None

### Area(s) with issue?

Awake

### Steps to reproduce

1. right-click on the awake tray icon
2. select "無限に起動したままにする" (in English: "keep awake indefinitely" ?)
3. select "sleep" from the shutdown menu
4. turn on the pc from sleep

### ✔️ Expected Behavior

the "keep awake indefinitely" setting is applied and the pc remains runnnig even after a period of inactivity.

### ❌ Actual Behavior

1. the pc gose to sleep after a set amount of time on the power plan.
2. when right click on the awake tray icon, "keep awake indefinitely" has been selected.
3. when re-select the checked "keep awake indefinitely" again, "keep awake indefinitely" will be applied.

### Other Software

_No response_
Repository: transformers
Issue: Flash Attention Support for Blip2ForConditionalGeneration 
Labels: Feature request,Flash Attention

Is there anyone working on a FlashAttention support for Blip2ForConditionalGeneration?
Repository: godot
Issue: Lightmap baking creates noticeable seams on meshes
Labels: bug,topic:rendering,topic:3d

### Tested versions

v4.2.2.stable.official [15073afe3]

### System information

Godot v4.2.2.stable - Fedora Linux 39 (Workstation Edition) - Wayland - Vulkan (Forward+) - integrated AMD Radeon Graphics (RADV RENOIR) () - AMD Ryzen 7 5700G with Radeon Graphics (16 Threads)

### Issue description

Lightmap baking creates noticeable seams on meshes.

The seams appear with and without the denoiser.

![image](https://github.com/godotengine/godot/assets/36744029/9269012b-1e9f-40ec-bc69-82959bc4de20)

### Minimal reproduction project (MRP)

[Lightmap Seams.zip](https://github.com/godotengine/godot/files/15047529/Lightmap.Seams.zip)
Repository: godot
Issue: CollisionShape3D duplicate size wrong
Labels: enhancement,topic:editor

### Tested versions

- only tested 4.3 dev5

### System information

Godot v4.3.dev5 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 (NVIDIA; 31.0.15.4617) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)

### Issue description

Duplicating a collision shape and changing its size affects the original shape in a weird way it should change to the same, correct? It fixes by just making the shape unique, but this is still not how it should work, I think they should be unique by default tough. 

### Steps to reproduce

- add CollisionShape3D
- make shape BoxShape3D
- duplicate CollisionShape3D
- Change any of the two and the other one will be affected wrong way

### Minimal reproduction project (MRP)



https://github.com/godotengine/godot/assets/102230735/ca94cfe7-b33b-4103-9c83-011ce6449c11
https://github.com/godotengine/godot/assets/102230735/c53cb45e-e1d9-4f3f-bacc-b49632c896f8
Repository: godot
Issue: `MovieWriterMJPEG` doesn't work with `module_jpg_enabled=no`
Labels: bug,topic:buildsystem

### Tested versions

master [9bc49a66bae5e9e506f12df3b3e141c8da13f983]

### Issue description

`MovieWriterMJPEG` uses `save_jpg_to_buffer` which is only implemented in jpg module:
https://github.com/godotengine/godot/blob/4a0160241fd0c1e874e297f6b08676cf0761e5e8/servers/movie_writer/movie_writer_mjpeg.cpp#L196
https://github.com/godotengine/godot/blob/4a0160241fd0c1e874e297f6b08676cf0761e5e8/modules/jpg/image_loader_jpegd.cpp#L211
Without jpg module there will be no video, only audio.
Perhaps `MovieWriterMJPEG` should be moved to jpg module or an error should be displayed.

### Steps to reproduce

Record a video to `.avi` file fomat.
Repository: godot
Issue: Shaderinc inconsistent behavior for shadowed variables in Godot4
Labels: bug,topic:rendering,topic:shaders

### Tested versions

- Reproducible in: 4.2.1-stable, 4.3-dev5

### System information

Godot v4.2.1.stable - Windows 10.0.22631 - Vulkan (Forward+)

### Issue description

The behaviour of the Shaderin differ between the Compatibility, Mobile and Forward+ rendering mode: when there is a conflict between variables names in a Shader and it's imported Shaderinc, the shading variable depends on the current rendering mode:

 * In "Compatibility" mode, the behaviour seems the most coherent, as it is the parameter the function recieve that prevails.
 * In "Forward+" and "Mobile" modes, the recieved parameter for function is silently substituted for the same name variable. 
 
![image](https://github.com/godotengine/godot/assets/55429341/c0e3644b-47fa-45ec-9c09-08e7dd4b1a4c)
*Sprite 2D with shader in Forward+*

![image](https://github.com/godotengine/godot/assets/55429341/d611678a-ba34-4d46-9111-42f443caee52)
*Sprite 2D with shader in Mobile*

![image](https://github.com/godotengine/godot/assets/55429341/7b582ceb-9950-46d5-8890-c95189298117)
*Sprite 2D with shader in Compatibility*

The Forward+ and Mobile behaviour may be the intended one, but it would be less confusing to add a warning message explaining it, as it is done for shadowed variables in GDScript.

### Steps to reproduce

1. Create a new project in Godot 4.2-stable
2. Create a new 2D scene and add a Sprite2D
3. Create a new Shader material and add a new Shader
4. In the shader, declare a variable with a name "x"
5. Create a new Shaderinc with a function that take a parameter named "x"
6. Import the Shaderinc in the Shader and call it's function by giving it any parameter

### Minimal reproduction project (MRP)

https://github.com/mlhoutel/GodotInconsistentShaderincBehaviourRendering
Repository: godot
Issue: Shader instance parameters can have a wrong icon for return to default values function.
Labels: discussion,topic:editor,topic:shaders

### Tested versions

4.3[3b1806182a3564736ad64793b203c2c13c251f56]

### System information

Windows 11 - Vulkan - Nvidia RTX 4070 - intel i5 13600KF

### Issue description

When labeled as None:
![image](https://github.com/godotengine/godot/assets/33526847/33f96e21-c58f-4342-8f41-0cc14eec77df)
When labeled as Instance parameter (notice the checkbox):
![image](https://github.com/godotengine/godot/assets/33526847/64c158f7-3bd2-4a9c-98fa-d653b5dd72ec)


### Steps to reproduce

Add a visual shader with an instance parameter of Vector2, set its default value and check it in the editor, change the value in the editor.

### Minimal reproduction project (MRP)

[shadermrp.zip](https://github.com/godotengine/godot/files/15048040/shadermrp.zip)
Repository: godot
Issue: Errors on image re-import when using the "Import Resources When Unfocused" editor setting
Labels: bug,topic:import

### Tested versions

v4.3.dev.custom_build [4a0160241]

### System information

Godot v4.3.dev (4a0160241) - macOS 14.4.0 - Vulkan (Forward+) - integrated Apple M1 Max - Apple M1 Max (10 Threads)

### Issue description

This is a somewhat expected aftermath of https://github.com/godotengine/godot/pull/76991, opening this issue so it can be tracked

When exporting a large 4k texture set from Substance Painter, Godot attempts to import files that weren't finished exporting yet, resulting in error spam (notice no error spam when exporting a small texture set):

https://github.com/godotengine/godot/assets/60579014/1511f0a7-14e2-4ffa-a170-b4d1ba6a2c35

```
drivers/png/png_driver_common.cpp:56 - read beyond end of data
drivers/png/png_driver_common.cpp:119 - Condition "!success" is true. Returning: ERR_FILE_CORRUPT
core/io/image_loader.cpp:101 - Error loading image: res://textures_Cube/Cube_Roughness.png
Error importing 'res://textures_Cube/Cube_Roughness.png'.
drivers/png/png_driver_common.cpp:56 - read beyond end of data
drivers/png/png_driver_common.cpp:119 - Condition "!success" is true. Returning: ERR_FILE_CORRUPT
core/io/image_loader.cpp:101 - Error loading image: res://textures_Cube/Cube_BaseColor.png
Error importing 'res://textures_Cube/Cube_BaseColor.png'.

...
```

Despite the error spam the textures still seem to get imported into Godot

### Steps to reproduce

I'm putting everything from that video into the MRP zip, including blend and spp files. Can't think of an easier way to test this off the top of my head

### Minimal reproduction project (MRP)

https://drive.proton.me/urls/TYYMW9QST8#Z8cdSLaaavRB
Repository: godot
Issue: AnimatableBody2D Visible Debug Shape does not always correctly position when child of Node2D
Labels: bug,topic:editor

### Tested versions

Found in Godot 4.2.2 stable official

### System information

Godot v4.2.2.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 SUPER (NVIDIA; 31.0.15.5123) - Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 Threads)

### Issue description

When an AnimatableBody2D is a child of a Node2D and "sync to physics" is set to true the physics Collision shape does not update when the parent is moved or rotated - this is expected behaviour. The visible debug shape however **does** move with the parent which is misleading as it no longer matches where the actual collision shape is.

### Steps to reproduce

* In a 2D scene, add a Node2D and add an AnimatableBody2D as a child of that. 
* Ensure "sync to physics" on the AnimatableBody2D is set to True.
* Add a script somewhere in the project that will move or rotate the AnimatableBody2D's Parent Node2D at runtime.
* Ensure "Visible Collision Shapes' are switched on and run the project
* Note that the visible collision shape appears to move with the parent
* Potentially add some RigidBody2D objects to determine the true location of the collision shape
See the minimal reproduction project.

### Minimal reproduction project (MRP)

https://www.dropbox.com/scl/fi/spbtreimu129uq2sl1g9i/testphysics.7z?rlkey=cprvyvdz3q30jk920aiaaq00a&dl=0

In this project, with "sync to physics" set to true on the AnimatableBody2D, the falling circle can be seen to collide with the AnimatableBody2D's shape even though the debug visible collision shape is seen to rotate out of the way.
With "sync to physics" set to false the visible collision shape correctly matches the position of the actual collision shape.
Repository: terminal
Issue: open new tab icon at the top title is not centered correctly
Labels: Help Wanted,Issue-Bug,Area-UserInterface,Product-Terminal,Priority-3

### Windows Terminal version

1.19.10821.0

### Windows build number

10.0.22631.3447

### Other Software

_No response_

### Steps to reproduce

![Ekran görüntüsü 2024-04-20 151314](https://github.com/microsoft/terminal/assets/96685085/d66873c3-5f52-4af6-afb9-a9842a71168c)

its hard to notice it but if you set "Use acrylic material in the tab row" to true it becomes highly noticable

### Expected Behavior

open a new tab icon to be centered

### Actual Behavior

open a new tab icon is not centered
Repository: godot
Issue: Editor window moves on top of the game window when reimporting resources in the background
Labels: bug,topic:editor,confirmed,usability,topic:import

### Tested versions

v4.3.dev.custom_build [4a0160241]

### System information

Godot v4.3.dev (4a0160241) - macOS 14.4.0 - Vulkan (Forward+) - integrated Apple M1 Max - Apple M1 Max (10 Threads)

### Issue description

I mentioned it [here](https://github.com/godotengine/godot-proposals/issues/9519#issuecomment-2060983977) but I'm opening an issue for it so that it doesn't get lost

When using the [Import Resources When Unfocused](https://github.com/godotengine/godot/pull/76991) editor setting, reimporting the assets makes the editor window move on top of the running game window (notice that it only goes on top of the game window, and not for example on top of the blender window):

https://github.com/godotengine/godot/assets/60579014/06ada90c-ef2f-44fc-b6cb-4228c81f1a3c

This is a problem because in order to be able to reimport assets while testing them in a running game using a single display, I need to change the minimum editor window size to (100,100) via an editor script to be able to move it out of the way (minimizing the editor window doesn't work either, it will just get maximized)

### Steps to reproduce

1. Enable the "Import Resources When Unfocused" editor setting
2. Run the game
3. Modify some external resource
4. See that the editor jumps in front of the game window

### Minimal reproduction project (MRP)

If you need a project with an external mesh and a blend file for testing, I have one in the MRP for this issue: https://github.com/godotengine/godot/issues/90659
Repository: godot
Issue: Cannot modify instance_index for instance parameters in VisualShader editor
Labels: bug,topic:editor,topic:shaders

### Tested versions

Discovered in v4.2.2.stable.official [15073afe3], presumably affects other 4.x versions

### System information

Windows 10, Forward+ Rendering

### Issue description

Apologies if this is more of a feature request or has been found before, i'm up late going slowly mad and just need to write this down somewhere.

As mentioned in the docs already, [per-instance shader uniforms can collide](https://docs.godotengine.org/en/stable/tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms) when used in the next_pass/material_overlay steps and this is solved in standard shaders using the `instance_index` hint.
This is not accessible in VisualShaders, though it can be worked around by adding in a dummy parameter *if* you manage make the shader generator put it in the right spot for the actual code.

### Steps to reproduce

1. Create two VisualShaders that use instance parameters
2. Put one into the material_override and one into the material_overlay of a MeshInstance3D or other similar node
3. Modify the instance parameter in the editor. It should affect both materials.

### Minimal reproduction project (MRP)

N/A