sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Toast queue can't be cleared and has unexpected notification behaviour.
Labels: discussion,topic:editor,usability

### Godot version

v4.0.alpha1.official [31a7ddbf8]

### System information

Windows 10

### Issue description

Clicking the X on a toast only clears it temporarily.

Moreover, once toasts have been hidden (either by closing them or letting them disappear), the red dot informing users of an error is hidden. If instead the user mutes the toasts, the red dot is always present.

https://user-images.githubusercontent.com/61291296/151861034-7bdd8f07-314c-4349-b20e-28d8d835fde8.mp4

(not shown above, but clearing the output doesn't clear the toasts)

### Steps to reproduce

Get some toasts and try to remove them from the list. Click the bell icon and see them reappear.

Mute the toasts by clicking the bell icon, see the red dot persist.

### Minimal reproduction project

_No response_
Repository: flutter
Issue: Support a config file in test.dart for manually load balancing test shards
Labels: a: tests,tool,P3,team-tool

This would help with shards that have only a single shard timing out because it is unbalanced with the longest running tests, e.g. https://github.com/flutter/flutter/issues/97525

This config file could also be parsed to validate that all files in `package:flutter_tools` ending in `_test.dart` is in one of these directories that get run, avoiding situations where we have valid test files that never run because of their location, e.g. https://github.com/flutter/flutter/pull/98926#discussion_r812290305

---

It would also be nice to group the tests functionally.
Repository: flutter
Issue: [camera] Support device orientation and camera facing detection on Windows platform
Labels: c: new feature,platform-windows,p: camera,package,a: desktop,P3,team-windows,triaged-windows

## Use case

[#4641](https://github.com/flutter/plugins/pull/4641) adds support for camera on Windows platform but is missing implementation for 

- **Device orientation detection**
- **Camera facing detection**

## Proposal

### Device orientation
Screen on device orientation need to be handler by windows camera plugin.
Camera plugin implementation must be updated to handle also landscape devices with following rotations:

A **landscape** oriented devices, i.e. laptops:
- **landscapeLeft**: 0 degrees
- **portraitUp**: 90 degrees
- **landscapeRight**: 180 degrees
- **portraitDown**: 270 degrees

Where current **portrait** impementation uses following values:
- **portraitUp**: 0 degrees
- **landscapeRight**: 90 degrees
- **portraitDown**: 180 degrees
- **landscapeLeft**: 270 degrees

Camera plugin should send `DeviceOrientationChangedEvent` events via method channel.


### Camera facing
Plugin should detect camera facing setting as it is one of the following:

- front
- back
- external

On Windows 10+ platform this can be easily read from device with [Win10 only DeviceInformation API](https://docs.microsoft.com/en-us/uwp/api/windows.devices.enumeration?view=winrt-22000).
Each camera device should have camera location/[panel](https://docs.microsoft.com/en-us/uwp/api/windows.devices.enumeration.panel?view=winrt-22000).

For Windows 8+ this information is not available via APIs, but devices and drivers should write this information to registry: [link](https://docs.microsoft.com/en-us/windows-hardware/drivers/devapps/identifying-the-location-of-internal-cameras#pld_panel-registry-value)
Repository: rust
Issue: Opaque error message for opaque type
Labels: A-diagnostics,T-compiler

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: <!-- Please provide a link to play.rust-lang.org -->
[For this code](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c1a7b6c97dd8eace89b04c5b6b2f1137)
```rust
use anyhow;

fn main() {}

trait MyTrait {}

async fn endpoint() -> anyhow::Result<impl MyTrait> {
    if true {
        call_a().await
    } else {
        call_b().await
    }
}

async fn call_a() -> anyhow::Result<impl MyTrait> {
    todo!()
}

async fn call_b() -> anyhow::Result<impl MyTrait> {
    todo!()
}
```

The current output is:

```
error[E0308]: mismatched types
  --> src/main.rs:11:9
   |
11 |         call_b().await
   |         ^^^^^^^^^^^^^^ expected opaque type, found a different opaque type
...
15 | async fn call_a() -> anyhow::Result<impl MyTrait> {
   |                                     ------------ the expected opaque type
...
19 | async fn call_b() -> anyhow::Result<impl MyTrait> {
   |                                     ------------ the found opaque type
   |
   = note: expected enum `Result<impl MyTrait, _>` (opaque type at <src/main.rs:15:37>)
              found enum `Result<impl MyTrait, _>` (opaque type at <src/main.rs:19:37>)
   = note: distinct uses of `impl Trait` result in different opaque types

error[E0720]: cannot resolve opaque type
  --> src/main.rs:15:37
   |
15 | async fn call_a() -> anyhow::Result<impl MyTrait> {
   |                                     ^^^^^^^^^^^^ cannot resolve opaque type

error[E0720]: cannot resolve opaque type
  --> src/main.rs:19:37
   |
19 | async fn call_b() -> anyhow::Result<impl MyTrait> {
   |                                     ^^^^^^^^^^^^ cannot resolve opaque type
```

<!-- The following is not always necessary. -->
Ideally the output should look like:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d937792ca9217c9556025f96e5574df9

I was asked to create a ticket to improve the compiler when the Result type of a Future is an `impl Trait` after asking the question on the forum: https://users.rust-lang.org/t/another-distinct-uses-of-impl-trait-result-in-different-opaque-types/71136
<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions. The output might also be
different depending on the Edition.
-->
Repository: flutter
Issue: [camera] Support image streams on Windows platform
Labels: c: new feature,platform-windows,p: camera,package,a: desktop,P3,has partial patch,team-windows,triaged-windows

## Use case

[#4641](https://github.com/flutter/plugins/pull/4641) adds support for camera on Windows platform but is missing implementation for CameraController feature: 

- **ImageStream**

## Proposal

Camera Windows plugin should have support for these camera plugin methods:

- startImageStream
- stopImageStream

Plugin should send images over the MethodChannel. Images are already handled as raw format on windows camera plugin platform, and sending them over the channel should not be a big task to implement.
Repository: vscode
Issue: Virtual document for screen reader announces document three times.
Labels: bug,accessibility,webview

- VS Code Version: N/A
- OS Version: Windows 10

Using screen reader NVDA.

Steps to Reproduce:

1. Open a notebook in vscode, with NVDA active.
2. Tab focus on the first few focusable items in the notebook, such as a code button or add code cell,
3. Shift tab until it focuses on the document window as a whole.
4. NVDA will announce "Virtual Document, Document, Document" confusingly when this is done.

The screenshot below shows the transcript of the text when this happens:
![Virtual Document Screenshot](https://user-images.githubusercontent.com/18018452/151870280-4dc70c8e-19f9-44f2-86f4-c22170a29402.png)

This was first reported in here: occurring with an HTML webview window for the vscode-mssql extension

https://github.com/microsoft/vscode-mssql/issues/17197
Repository: flutter
Issue: SliverWrap widget
Labels: c: new feature,framework,f: scrolling,c: proposal,P3,team-framework,triaged-framework

We should consider adding a sliver wrap widget. This widget would function like the Wrap widget, but support scrolling.

SliverGrid currently relies on users specifying a fixed cross axis count, or a max extent for the cross axis. Further, the only layout we support (SliverGridRegularTileLayout) assumes that the items in the grid are all the same size as well as evenly spaced.

Adding a SliverWrap widget could provide a lot more flexibility for users' layouts.
Repository: rust
Issue: [rustdoc-json] `paths` is inconsistent and questionably useful
Labels: C-enhancement,A-rustdoc-json

**Problem:**
Currently, the items `paths` includes is just the list of paths used in the rustdoc cache. This is implementation-dependent, misses some items that should possibly be included such as re-export source items, and generally imperfect.

**Solution:**
`paths` inclusion should be standardized, and separated from the internal cache implementation.
Repository: rust
Issue: [rustdoc-json] absolute position of item is hard to get
Labels: C-enhancement,A-rustdoc-json

**Problem**:
Currently, the only way to accurately (see https://github.com/rust-lang/rust/issues/93522 for reason why `paths` is not accurate) know the position of an item is to traverse all modules and items down to the item that we want, this is costly and inefficient especially for `Id`s that comes from the documentation (ie intra-doc-links) because they can link to outside.

**Solution**:
Have a `parent_id` field that link the current `Item` to it's direct parent. This would mean that we could go from down (item) to upper (module) in a straightforward way.
Repository: go
Issue: cmd/go: suggestion to use go mod download does not work
Labels: NeedsInvestigation,GoCommand,modules

I ran into this just now after upgrading x/mod in x/tools, running tests from the x/tools/gopls module:
```
[gopls]> go test ./internal/regtest/workspace
go: golang.org/x/tools@v0.1.7 requires
        golang.org/x/mod@v0.6.0-dev.0.20220106191415-9b9b3d81d5e3: missing go.sum entry; to add it:
        go mod download golang.org/x/mod
[gopls]> go mod download golang.org/x/mod
[gopls]> go test ./internal/regtest/workspace
go: golang.org/x/tools@v0.1.7 requires
        golang.org/x/mod@v0.6.0-dev.0.20220106191415-9b9b3d81d5e3: missing go.sum entry; to add it:
        go mod download golang.org/x/mod
```

The error message suggests that `go mod download` will fix the missing go.sum entry, but this does not work. I had to `go mod tidy`. 
 Can this suggestion be made more accurate?

This looks similar to #46528, but not quite a duplicate. Apologies if I missed another dupe.

CC @bcmills @matloob
Repository: go
Issue: go/types, types2: enable `real`, `imag` and `complex` with type parameter arguments
Labels: NeedsInvestigation

For 1.18 we disabled (report an error) when applying one of these built-in functions to arguments of type parameter type because it involves the creation of a synthetic type parameter which may break `go/types` API invariants if those types leak.

Need to investigate what the correct approach is (e.g., should we track the type parameters in the `types.Info.Implicits` map?) and re-enable the code. The compiler may also need minor adjustments.

cc: @findleyr 
cc: @ianlancetaylor
Repository: pytorch
Issue: halt or exit function implementation
Labels: oncall: distributed,feature,module: c10d

### 🚀 The feature, motivation and pitch

In multi-GPU training, sometimes I write an exit() function under an if statement. If the condition of the if statement gets satisfied by only one GPU, then the exit() function is called on that GPU and not on the rest of the GPUs. Is there any way I can indicate a halt or an exit() for all GPUs simultaneously? If not, is it possible to include such a function in the API itself?

Thanks.

### Alternatives

_No response_

### Additional context

_No response_

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: PowerToys
Issue: [Mouse utilities] Mouse highlighter adds support for middle button
Labels: Idea-Enhancement,Product-Mouse Utilities

### Description of the new feature / enhancement

Please add support for the middle button in the mouse highlighter. Because many mice have middle button. Thanks!

### Scenario when this would be used?

When using the middle key, there is no color cue. This is bad for some people.

### Supporting information

_No response_
Repository: flutter
Issue: In App Purchase documentation logical conflict related to `PurchaseStatus.purchased`
Labels: d: api docs,p: in_app_purchase,package,team-ecosystem,P2,triaged-ecosystem

`PurchaseDetails` class has field `final String? transactionDate;` In documentation it is written:
``` /// The value is `null` if [status] is not [PurchaseStatus.purchased].```

But when using android with status restored, I also get value for this field.

Moreover, in app kit documentation it is mentioned that field is not null when the status is restored.

```
/// The timestamp of the transaction.
///
/// Seconds since epoch. It is only defined when the [transactionState] is
/// [SKPaymentTransactionStateWrapper.purchased] or
/// [SKPaymentTransactionStateWrapper.restored].
/// Otherwise, the value is null.
final double? transactionTimeStamp;
```

Am I right that in all scenarios when the `status` is `restored`, the `transactionDate` field has no null value?
If I am, is there an option to make documentation consistent?
I propose rewrite documentation as so:
```/// The value is `null` if [status] is neither [PurchaseStatus.purchased] nor [PurchaseStatus.restored].```
Repository: godot
Issue: The SpotLight and OmniLight ‘s shadow did not work in HTML5 games.
Labels: bug,platform:web,topic:rendering,needs testing,topic:3d

### Godot version

3.4.2

### System information

Window10, GLES3

### Issue description

The main error is on the computer side of Chrome, Firefox browser. Huawei browser on mobile. But in GLES2 they works.

### Steps to reproduce

I found a solution. Project files have been uploaded.
In Html5, only a moving object is needed to enter the light range, so that the light and shadow can be displayed normally.

### Minimal reproduction project

I tested the main bugs on the PC side of Chrome and Firefox. Can't display shadows properly. But if I test it in the Android phone browser, it still doesn't work the first time I open it, but if I rotate portrait to landscape, or from landscape to portrait, it does work, which is really weird.

[light_test_html5.zip](https://github.com/godotengine/godot/files/8001186/light_test_html5.zip)
Repository: transformers
Issue: Adding RelationExtraction head to layoutLMv2 and layoutXLM models
Labels: New model

# 🌟 New model head addition
Relation Extraction Head for LayoutLMv2/XLM
## Addition description
Hey all,

I've see a bunch of different requests across huggingface issues [[0]](https://github.com/huggingface/transformers/issues/14330), unilm issues [[0]](https://github.com/microsoft/unilm/issues/286)[[1]](https://github.com/microsoft/unilm/issues/465) and on @NielsRogge Transformer Tutorials issues [[0]](https://github.com/NielsRogge/Transformers-Tutorials/issues/6)[[1]](https://github.com/NielsRogge/Transformers-Tutorials/issues/39) about adding the relation extraction head from layoutlmv2 to the huggingface library. As the model is quite difficult to use in it's current state I was going to write my own layer ontop but I saw in this [issue](https://github.com/NielsRogge/Transformers-Tutorials/issues/39) that it may be a good idea to add it to transformers as a separate layoutlmv2/xlm head and thought it would be a good way to contribute back to a library I use so much.

I've gone ahead and added it under my own [branch](https://github.com/R0bk/transformers/tree/layoutlm-relation-extraction) and got it successfully working with the library. [Here](https://colab.research.google.com/drive/16wqA3oTUf7yzUKsSSZxiMf1443_ZO3wC?usp=sharing) is a colab using my branch of transformers if you want to test it yourself.

Before I add tests/ write more docs I just wanted to post here first to see if there's interest in potentially merging this in. If there is interest I have a few questions that it would be helpful to get some info on to ensure that I've correctly done the integration.
Repository: PowerToys
Issue: Double-clicking on the update screen launches it twice.
Labels: Issue-Bug,Area-Setup/Install

### Microsoft PowerToys version

"0.53.3" "0.55.0"

### Running as admin

- [X] Yes

### Area(s) with issue?

Installer

### Steps to reproduce

When I double click on update to v0.55.0 in PowerToys v0.53.3, the update screen launches twice.
In both cases, when I exit, PowerToys is uninstalled and does not show up when I search for it.

![image](https://user-images.githubusercontent.com/75793267/151927453-c70d3539-0bec-4193-b989-4ad9e650e628.png)
![image](https://user-images.githubusercontent.com/75793267/151928226-5a34a421-0cba-444a-a6d1-7a0833ccf600.png)

---
PowerToys v0.53.3 でv0.55.0へアップデートを二重クリックすると、アップデート画面が二重起動する。
どちらも、終了すると、PowerToysがアンインストールされていて、検索しても表示されない。


### ✔️ Expected Behavior

Double-clicking does not launch the update screen twice, but only once.
And it updates normally.

---

ダブルクリックしてもアップデート画面が二重起動しないで、一つだけ起動する。
そして、正常にアップデートされる。

### ❌ Actual Behavior

_No response_

### Other Software

Windows11
Repository: svelte
Issue: An element that uses the animate directive must be the immediate child of a keyed each block
Labels: transition/animation

### Describe the problem

The animate directive is only allowed to an immediate child of a keyed each block.
```svelte
{#each todos.filter(t => !t.done) as todo (todo.id)}
	<label animate:flip>{todo.description}</label>
{/each}
```

As soon as the child might become more complex, the child element might be wrapped in its own component. That breaks the animate directive with the well known error message.

```svelte
{#each todos.filter(t => !t.done) as todo (todo.id)}
	<Todo {todo} />
{/each}
```

So from a developer experience perspective, this should be possible as well because inside that component the first element is technically still an immediate child of that each block.

I prepared two REPLs.

1. Without child component https://svelte.dev/repl/e1c1f2459ed74d96a9de082c0be01741?version=3.46.3
2. With child component, animate directive not working https://svelte.dev/repl/b4a879ed63b64d2baaebd023d2209cc0?version=3.46.3



### Describe the proposed solution

I can't fix this myself as the animate directive is resolved within the compiler I'm not so familiar with, yet.

1. Proposed solutions is that the element in the component is recognized correctly as immediate child of the each block.

```svelte
{#each todos.filter(t => !t.done) as todo (todo.id)}
	<Todo {todo} />
{/each}
```

And in Todo.svelte
```svelte
	<script>
		export let todo;
	</script>
	<label animate:flip>{todo.description}</label>
```

2. Or allow the animate directive on Components instead of elements.

```svelte
{#each todos.filter(t => !t.done) as todo (todo.id)}
	<Todo {todo} animate:flip={{element}} bind:element/>
{/each}
```

And in Todo.svelte
```svelte
	<script>
		export let todo;
		export let element;
	</script>
	<label bind:this={element}>{todo.description}</label>
```


### Alternatives considered

Alternatives are quite tough.
As I will also use `in:receive` and `out:send` crossfade transitions, I could try to identify the remaining items of the each loop by myself and put an animation on them.

### Importance

would make my life easier
Repository: rust
Issue: rustdoc: improve word break opportunities for narrow screens
Labels: T-rustdoc,A-rustdoc-ui

On narrow screens our method signatures often wrap horribly, like this example that wraps right in the middle of a `->` return arrow:

![image](https://user-images.githubusercontent.com/220205/151934131-cd55399e-464d-4f66-9711-63caf55c32fb.png)

To fix that specific issue, we can wrap return arrows in a `<span>` and style that span with `white-space: nowrap`. There's a similar issue where the browser will break `&[T]` between the `&` and the `[`. We should use the same trick there to prevent breaking.

Also, the browser will _never_ consider a parenthesis wedged between two words to be a word break opportunity. For instance, in `fn foo(bar: Baz)`, the browser will never break between `(` and `bar`. That's actually one of our optimal break locations; it's where rustfmt would break the word. We can tell the browser that's an available option by inserting a `<wbr>` tag.

Also, when we do have to break up a signature, we'd prefer to keep each parameter name on the same line as its type if possible (again, mimicking rustfmt style). We can achieve this by inserting an `&nbsp;` between parameter names and types. For instance `bar:&nbsp;Baz`. We should also use `&nbsp;` as the space between `mut` and `Bar` in `&mut Bar`. Note that this may be a little hard because that space is added by print_with_space, and the output of print_with_space is used in both HTML and non-HTML contexts.
Repository: vscode
Issue: Consider using a stronger style when doing unicode highlights in a diff region
Labels: polish,diff-editor,unicode-highlight

We could emphasize unicode highlights more strongly when they occur in diff regions:
![image](https://user-images.githubusercontent.com/5047891/151942997-1f094ba5-1f9b-4ade-bf16-d0cb65fae5f2.png)
Repository: create-react-app
Issue: Directory structure/hierarchy in create-react-app needs UPDATE
Labels: issue: proposal,needs triage

I have created pull request #11874.
Kindly review it.

### Problem
The directory hierarchy is outdated and I mentioned in my pull request #11874 the newer structure.
Kindly review and merge it if it seems fine to you or close it.