sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Linker errors when building `wasm32-wasi`
Labels: A-codegen,T-compiler,O-wasm,C-bug

First, I tried to use `tokio` when compiling in `wasm32-wasi` with `rt`, `time` features
And got:

<details><summary>rust-lld message</summary>
<p>

```
rust-lld: error: function signature mismatch: _ZN5tokio7runtime4task4core11TaskIdGuard5enter17h6a97b9fd17627a62E
     defined as (i64) -> i64 in ..\deps\wasm.2e227afycm7gw02n.rcgu.o
     defined as (i32, i64) -> void in ..\deps\libtokio-e32be7e448bee767.rlib(tokio-e32be7e448bee767.tokio.be9105f8-cgu.0.rcgu.o)

rust-lld: error: function signature mismatch: _ZN5tokio7runtime4task5waker9raw_waker17h7cf8396c921ccb61E
     defined as (i32) -> i32 in ..\deps\wasm.2e227afycm7gw02n.rcgu.o
     defined as (i32, i32) -> void in ..\deps\libtokio-e32be7e448bee767.rlib(tokio-e32be7e448bee767.tokio.be9105f8-cgu.0.rcgu.o)

rust-lld: error: function signature mismatch: _ZN5tokio7runtime4task5state5State21unset_join_interested17he39960ef09ad9f2aE
     defined as (i32) -> i32 in ..\deps\wasm.2e227afycm7gw02n.rcgu.o
     defined as (i32, i32) -> void in ..\deps\libtokio-e32be7e448bee767.rlib(tokio-e32be7e448bee767.tokio.be9105f8-cgu.0.rcgu.o)
```

</p>
</details>


I then tried to implement a small custom executor, but ran into the fact that `std` uses `hashbrown`: 
```rust
#[no_mangle]
pub extern "wasm" fn foo() {
    let x = HashMap::<i32, i32>::new();
}
```
And I got:
<details><summary>rust-lld message (not so scary)</summary>
<p>

```
rust-lld: error: function signature mismatch: _ZN3std3sys4wasi19hashmap_random_keys17hb926006eb278ce27E
     defined as () -> i64 in ..\deps\wasm.2eimp74zrlub6rxs.rcgu.o
     defined as (i32) -> void in ..\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\wasm32-wasi\lib\libstd-0cc507706e4a1289.rlib(std-0cc507706e4a1289.std.e0347f5c-cgu.0.rcgu.o)

```

</p>
</details>

I was also getting similar errors when I didn't spell `#[inline]` to some functions that others delegated?
Why would something like this happen. Is this a rust error or am I doing something wrong?

---- 
I also thought about upgrading, but that didn't work, so I now have 
<details><summary>nightly 1.70</summary>

```
rustc 1.70.0-nightly (4a04d086c 2023-03-18)
binary: rustc
commit-hash: 4a04d086cac54a41517d5657b59d5fe2caca2d71
commit-date: 2023-03-18
host: x86_64-pc-windows-msvc
release: 1.70.0-nightly
LLVM version: 16.0.0
```

</details>
Repository: TypeScript
Issue: `unknown && false` is too loosely typed
Labels: Suggestion,Awaiting More Feedback

# Bug Report

The following code should type-check: https://www.typescriptlang.org/play?#code/FAFwngDgpgBAYgQwDYGcwwLwwHYFclIwA+Mu2AJlAGYCW2U5xMVyKsJeAtgEZQBOTAAzYmAIlFMAEgBUAsgBkAggQDCAewJQAxiBprswYFTI69IqmrUAKAB4AuUtgDW2NQHdsASgeJU6AN7AMMEwfFAguHwiNjAAZLHMrFDAAL7AQA

### 🔎 Search Terms

unknown falsy false and &&

### 🕗 Version & Regression Information

Please keep and fill in the line that best applies:
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about unknown values and &&
- 
### ⏯ Playground Link


[Playground link with relevant code](https://www.typescriptlang.org/play?#code/FAFwngDgpgBAYgQwDYGcwwLwwHYFclIwA+Mu2AJlAGYCW2U5xMVyKsJeAtgEZQBOTAAzYmAIlFMAEgBUAsgBkAggQDCAewJQAxiBprswYFTI69IqmrUAKAB4AuUtgDW2NQHdsASgeJU6AN7AMMEwfFAguHwiNjAAZLHMrFDAAL7AQA)

### 💻 Code

```ts
type Falsy = null | undefined | false | number | 0n | "" | HTMLAllCollection

function foo(x: unknown): Falsy {
    return x && false
}
```

### 🙁 Actual behavior

Fails to type-check

### 🙂 Expected behavior

Should type-check

This would be improved further if:
- NaN was its own type, so `Falsy` could be more specific than `number`. (#28682)
- `Falsy`/`Truthy` were built in types.
- `HTMLAllCollection` variant could be omitted as a legacy value since `document.all` is deprecated and it's otherwise the case that objects are not falsy.
Repository: react-native
Issue: React Native onEndReached FlatList trigger error
Labels: Component: FlatList,Needs: Triage :mag:,Newer Patch Available

### Description

I'm developing a react native app using the version 0.71.3 and I'm having some problems with the extremely discussed onEndReached callback.


### React Native Version

0.71.3

### Output of `npx react-native info`

System:
    OS: macOS 12.6.3
    CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
    Memory: 228.86 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.14.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.5.0 - /usr/local/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.12.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 17.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.3 => 0.71.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

### Steps to reproduce

Here's my `onEndReached` re-implementation to prevent the callback to be triggered even if the list is empty and to trigger it only once:

```
if (!endReached.current && dataSize > 0) {
  endReached.current = true;
  onEndReached?.();
}
```

And every time the data size changes, the endReached is set to false again:

```
useEffect(() => {
  endReached.current = false;
}, [dataSize]);
```

And then the list:

`<FlatList onEndReachedThreshold={0.2} />`

Now the problem arise when loading the list for the first time, the onEndReached callback is triggered even if the list is empty and once the list is populated, downloading items asynchronously, and reach the end the callback it's not triggered.

But if the list data area cached, the second time I load the list the onEndReached is not triggered at the beginning but on the right way.

It seems that the error, or I think the bug, arise when the list is empty because data are loading, indeed if I set a condition to render the list only after the data are fully loaded, the onEndReached is trigged correctly.
Repository: godot
Issue: Vsync-Disabled only works when application is out of focus.
Labels: platform:windows,topic:rendering,needs testing

### Godot version

4.0 stable

### System information

Windows 11, Vulkan, RTX 3070

### Issue description

Setting VSync-mode to disabled only takes effect when the application has no focus. When regaining focus vsync is "enabled" again. The engine still thinks vsync is set to "disabled" never the less.
Changing Vsync from Editor or code makes no difference.

Further things I've noticed; 

- When having another window open on a second screen it magically works. If the other window is minimized it falls back to vsync enabled.

- if the second window is maximized the issue returns. if the window is anything but minimized/maximized the issue vanishes.

- certain programs have different effects on the behavior. OBS "fixes" the issue while the task manager somehow brings the fps down to fluctuate between Vsync-value and 1 bit above.


How it should work:
Vsync should not change based on window focus but instead respect the value set.


https://user-images.githubusercontent.com/47256718/226190274-ae29c45f-f3c8-4f76-83b8-94fc0e4da39d.mp4



### Steps to reproduce

1. Try to disable vsync.

### Minimal reproduction project

[VsyncTest.zip](https://github.com/godotengine/godot/files/11011645/VsyncTest.zip)


Edit: Setting Vsync : On has an opposite effect. When focus is lost FPS drop to low values (~60fps) but ONLY if focus is still in any window in the same monitor as the game
Repository: PowerToys
Issue: Fancy zones - add option for default border
Labels: Idea-Enhancement,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

I love fancy zones but always like to set my padding space between zones to 0. I'd imagine that is the case for many/most, and it could be worth considering setting that as a default. If not, i'd like the option under fancy zones to set a default border/space around zones value and have it apply to all zones created so I don't have to change it each time on every layout. 

### Scenario when this would be used?

Applying new values to all existing zones, and having newly created zones follow a user's spacing preferences rather than being set each time. 

### Supporting information

_No response_
Repository: transformers
Issue: Ernie-M for pretraining multilingual models
Labels: New model,Feature request

### Feature request

Two things that might help in that regard: 

- To train TSDAE, one needs support as class ErnieMForPreTraining, just as for Ernie
https://huggingface.co/docs/transformers/model_doc/ernie#transformers.ErnieForPreTraining

- To train cross-encoders with contrastive loss, a bit like SimCSE, one needs standard support for getting the 'attention_mask' out of the tokenizer sbert uses. Sbert just expects those. Tried to hack it in into sbert, but failed. 

### Motivation

Suspect getting Ernie-M-large for pretraining multilingual sentence embeddings will yield close to sota results.  
According to mSimCSE, we can get top multilingual embeddings just on training on their 300k dataset of english pairs, alone (worked better than cross-lingual training). 
With a stronger base model (they used xlm-roberta), sota embeddings might just lie on the streets.  
https://github.com/yaushian/mSimCSE

### Your contribution

Can't do it alone, plz help.
Repository: TypeScript
Issue: The intersection of a tuple with an unrelated array is handled inconsistently
Labels: Suggestion,Experimentation Needed

# Bug Report

### 🔎 Search Terms

tuple, intersection, array, unrelated, narrowing, index signature

### 🕗 Version & Regression Information

This is the behavior in every version I tried

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=5.0.2#code/PQKgBArgdgTgpgGwIYBc4BMxJjJBPMEYAKGJTwAc4wBlACwHsIF0AhOAOTgDc4YwAvGADOKGAEsoAcwDaAXTAAyMDICMAGjAAmTQGY5pclTAB5ANKCwACnpMW7LrxgBKGVAgBbAEZ8FwYGBQPHyGlNQcDCjmljaMzGycwS5qfgFaocYA6nDiMOgmTggMSJhCsXYJjnyuAOQUDBQ1qWAA3sT+YJ3WzgBcImKSUmAAPpBQ6HAAZpIY7QFdVr1guiNgqqtaq9AT00HocwC+pADGDFCiYOLCNAPSMWqaOssKSMK0cfaJTs4AdPUUizAHVEEjuo22Uxm+1IoDA8GQaEw2FwBC8EBQgUiWBEECoMCM1CIGWotniDmRDAA7hhLG5PD5+KMQYNNO5vHxVl4GAwEHAkFAFMorMywWAuTy+VBVsI8N4ea4DGQwmAAGIqyykz4cCnU9B09kwZoioajcW8-lK4wACStGo+lR1GBkAAYjbcTYF6XwgA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
/* unrelated array */

type ShouldBeNever = string[] & [1, 2, 3]

type OK = (ShouldBeNever)[number] // never

type NotOK = (ShouldBeNever)[1] // 2

type WeirdOverload = (ShouldBeNever)['pop'] // {
//    (): string | undefined
//    (): 3 | 1 | 2 | undefined
//}

const isString = ([1, 2, 3] as ShouldBeNever).pop() // string | undefined


/* related array but not a supertype */

type ShouldBeNarrowed = [number | string, number | boolean] & (string | boolean | symbol)[]

type FF = ShouldBeNarrowed[number] // string | boolean
type HH = ShouldBeNarrowed[0] // string | number
```

### 🙁 Actual behavior

The index signature is appropriately updated, but not the individual elements nor the methods operating on the resulting tuple. Additionally, methods get overloaded, so when calling `pop` for example, the first overload is selected and the return type is not the intersection of the original components return types as it should be.

### 🙂 Expected behavior

I would expect `ShouldBeNever` to be `[never, never, never]` and `ShouldBeNarrowed` to be `[string, boolean]`
Repository: godot
Issue: Compatibility Renderer Bugged State Resources
Labels: bug,platform:macos,topic:rendering,confirmed,topic:import,topic:3d

### Godot version

4.0.stable

### System information

macOS 13.2.1, Compatibility Renderer

### Issue description

Texture resources become bugged/unusable using the Compatibility Renderer.

```
Failed loading resource: res://icon.svg. Make sure resources have been imported by opening the project in the editor at least once.

editor/editor_node.cpp:1209 - Condition "!res.is_valid()" is true. Returning: ERR_CANT_OPEN
```

Deleting `*.import` and `.godot` and reopening sometimes temporarily resolves the issue.

The issue is consistently reproducible on a Mac Studio M1 Max and a MacBook Pro M2 Max, both running macOS 13.2.1.

I could not reproduce on Windows, or using Forward+ or Mobile renderers.

### Steps to reproduce

- Create New Project, Compatibility Renderer
- Open Output view
- Create New Resource, StandardMaterial3D, and save
- Drag `res://icon.svg` to the new material Albedo Texture, without double clicking icon.svg
- Output shows `Failed loading resource: res://icon.svg. Make sure resources have been imported by opening the project in the editor at least once.`
- Any attempt to open `res://icon.svg` now shows the error above along with `editor/editor_node.cpp:1209 - Condition "!res.is_valid()" is true. Returning: ERR_CANT_OPEN` and persists across restarts

### Minimal reproduction project

N/A
Repository: stable-diffusion-webui
Issue: [Feature Request]: Add ability to manually mark model as NSFW for extra CSS styling  
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 ?

I'd like to submit a feature request for the Stable Diffusion WebUI, particularly regarding the integration of extensions like ["Civitai-Helper"](https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper). This extension lets users download, update, and maintain thumbnail info for models hosted on [Civitai](https://civitai.com/). **Some of these thumbnails are of course 18+ models using NSFW thumbnails.** 

We're all adults here, I don't mind seeing some titties on the screen, but **I think it would be nice to have the option to toggle blur on NSFW thumbnails, or even a toggle to hide these NSFW models outright, for when I'm working on workflows that aren't of the adult nature.**

In short, I request the Stable Diffusion WebUI add a toggle feature that allows users to blur or hide NSFW thumbnail images in the Extra Network gallery, as I think it's important to offer options for those who prefer to work in a more professional environment. 

Quick Example:

![image](https://user-images.githubusercontent.com/6223821/226203758-4cf0ce62-0450-471d-8d26-a1a36e99c0be.png)


### Proposed workflow

1. Go to 'Settings' tab
2. Go to 'Extra Networks' category
3. Tick checkbox to blur/hide model/lora/other network that are flagged for NSFW.
3.1 If no metadata exists, let user manually flag model/lora/other network as NSFW.

Alternative workflow:
1. Click on 'txt2img' tab
2. Click on 'Show Extra Networks' button to show thumbnail gallery
3. Click on 'Hide NSFW' or "Blur NSFW' button to hide or blur NSFW thumbnails.

### Additional information

_No response_
Repository: godot
Issue: ParallaxLayer does not respect z-index when motion_mirroring is set
Labels: bug,confirmed,topic:2d

### Godot version

4.0 Stable and 4.0.1-rc2

### System information

Windows 10, Forward+, Nvidia 3090 v 531.29

### Issue description

When using motion_mirroring for a ParallaxLayer, the only draw ordering which the Texture2D respects is the tree order of Parralax Layers and CanvasLayers

### Steps to reproduce

There are two scenes `without_mirroring_A_over_B` and `with_mirroring_A_over_B`. They are named as such because their z-index values should order them such that A is drawn over B.

You can reorder the tree-order of the two ParallaxLayers that contain `SpriteA` and `SpriteB`. You will see that for `without_mirroring...` it has no affect on draw order, but it does have an affect on `with_mirroring...`.

Additionally, you can reorder `SpriteD` which shows the same thing, that ParallaxLayer does not consider z-index whatsoever when `motion_mirroring` is used.

### Minimal reproduction project

[ParallaxLayerOrdering.zip](https://github.com/godotengine/godot/files/11012187/ParallaxLayerOrdering.zip)
Repository: PowerToys
Issue: Screen ruler takes long to open
Labels: Issue-Bug,Idea-Enhancement,Product-Screen Ruler

### Microsoft PowerToys version

0.68.0

### Installation method

PowerToys auto-update

### Running as admin

None

### Area(s) with issue?

Screen ruler

### Steps to reproduce

Enable screen ruler module on low-spec hardware
enable screen ruler
it takes 1-2s to show up

### ✔️ Expected Behavior

_No response_

### ❌ Actual Behavior

_No response_

### Other Software

_No response_
Repository: godot
Issue: Godot editor freezes when a new window appears 
Labels: bug,platform:linuxbsd,topic:editor,needs testing

### Godot version

4.0 stable mono official

### System information

Ubuntu 22.04.2 LTS , Stoney [Radeon R2/R3/R4/R5 Graphics]  diver=amdgpu, Mobile Renderer,

### Issue description

godot always freeze suddenly after a new window or dialogue opens .
examples:
when saving scene dialogue opens,
choosing main scene dialogue,
building solution progress pop up,
choosing node to add ,
etc... 
```
sobhan@Blackrose:~$ ./Godot/Godot_v4.0-stable_mono_linux_x86_64/Godot_v4.0-stable_mono_linux.x86_64 
Godot Engine v4.0.stable.mono.official.92bee43ad - https://godotengine.org
OpenGL API 4.5 (Core Profile) Mesa 23.1.0-devel (git-210c6c1 2023-03-19 jammy-oibaf-ppa) - Compatibility - Using Device: AMD - AMD Radeon R4 Graphics (stoney, LLVM 15.0.6, DRM 3.47, 5.19.0-35-generic)
 
Project is missing: /home/sobhan/Downloads/Godot/prja/Game#0/project.godot
Editing project: /home/sobhan/Projects/Godot-4
Godot Engine v4.0.stable.mono.official.92bee43ad - https://godotengine.org
sobhan@Blackrose:~$ Vulkan API 1.3.241 - Forward Mobile - Using Vulkan Device #0: AMD - AMD Radeon R4 Graphics (RADV STONEY)
 
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:70)
Running: /home/sobhan/Godot/Godot_v4.0-stable_mono_linux_x86_64/Godot_v4.0-stable_mono_linux.x86_64 --path /home/sobhan/Projects/Godot-4 --remote-debug tcp://127.0.0.1:6007 --editor-pid 3889 --position 107,60 res://main_window.tscn
Godot Engine v4.0.stable.mono.official.92bee43ad - https://godotengine.org
Vulkan API 1.3.241 - Forward Mobile - Using Vulkan Device #0: AMD - AMD Radeon R4 Graphics (RADV STONEY)
 
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8394)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8394)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8394)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8394)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8394)
ERROR: Condition "!shader" is true.
   at: shader_free (servers/rendering/renderer_rd/storage_rd/material_storage.cpp:2453)
ERROR: Condition "!material" is true.
   at: material_free (servers/rendering/renderer_rd/storage_rd/material_storage.cpp:2686)
^C
sobhan@Blackrose:~$ ^C

```

### Steps to reproduce

1. create a new project (any renderer)
2.  it is possible to freeze right now when "importing assets to project" progress popups
3. if not it can happen after clicking on play button for choosing main scene
4. if not eventually it is going to happen on some pop ups 

### Minimal reproduction project


[Godot-4.zip](https://github.com/godotengine/godot/files/11012203/Godot-4.zip)
Repository: pytorch
Issue: [Feature Proposal: New Distributed Training Algorithms] LSGD and EASGD
Labels: oncall: distributed,triaged

### 🚀 The feature, motivation and pitch

Currently, PyTorch only offers support for DataParallelism. I am working on integrating two additional distributed training optimizers, EASGD and LSGD, into the codebase. The motivation is to enable a straightforward alternative of vanilla DataParallelism.

Vanilla DataParallelism:
``` python
model = DistributedDataParallel(model, device_ids=[args.gpu])
model.forward(data); model.backward(loss) ; optimizer.step() 
```

Alternative Distributed Training:
``` python
optimizer = CommOptimizer(optimizer, dist_optim_name='LSGD+', comm_period=1, dist_pulling_strength=0.1, local_pulling_strength=0.1)
model.forward(data); model.backward(loss) ; optimizer.step() 
```

The synchronous version could be implemented and wrapped up easily. A quick glance is available at [**SDTL GitHub**](https://github.com/yunfei-teng/SDTL).

The asynchronous version presents greater difficulty in implementation, but a prototype version could be found at [**LSGD GitHub**](https://github.com/yunfei-teng/LSGD).

### Alternatives

_No response_

### Additional context

LSGD:
* Paper: https://arxiv.org/abs/1905.10395
* LSGD Blog: https://yunfei-teng.github.io/LSGD-Blog

EASGD:
* Paper: https://arxiv.org/abs/1412.6651


cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu