sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: FormControl incorrectly accepts another FormControl as value
Labels: area: forms,state: confirmed,P2,forms: strictly typed

### Which @angular/* package(s) are the source of the bug?

forms

### Is this a regression?

No

### Description

With typed forms, it is possible to accidentally assign a FormControl to the value of another FormControl. This results in the value of the latter FormControl to be `[Object object]`. The typed forms should guard against accidents like this, but a `new FormControl<string>(new FormControl<string>(''))` gets the type of `FormControl<string>`.

I'd expect that either a FormControl cannot be used to be the value of another FormControl, producing a compile error, or that the value of the inner FormControl is copied into the outer FormControl, producing a correct value.

### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-ivy-wbqh9l?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.module.ts

### Please provide the exception or error you saw

```true
The value becomes [Object object].
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 14.1.0
Node: 16.13.1
Package Manager: npm 8.1.4 
OS: win32 x64

Angular: 14.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1401.0
@angular-devkit/build-angular   14.1.0
@angular-devkit/core            14.1.0
@angular-devkit/schematics      14.1.0
@angular/cdk                    14.0.3
@angular/material               14.0.3
@schematics/angular             14.1.0
ng-packagr                      14.0.2
rxjs                            7.5.5
typescript                      4.7.4
webpack                         5.73.0
```


### Anything else?

_No response_
Repository: rust
Issue: rustdoc links point to function headers instead of the whole function starting from Rust 1.51
Labels: T-rustdoc,P-low,regression-from-stable-to-stable,C-bug

Original, before 1.51: https://doc.rust-lang.org/1.50.0/std/primitive.array.html#method.map points to https://doc.rust-lang.org/1.50.0/src/core/array/mod.rs.html#428-464

Regression, starting from 1.51: https://doc.rust-lang.org/1.51.0/std/primitive.array.html#method.map points to https://doc.rust-lang.org/1.51.0/src/core/array/mod.rs.html#429-431

I expected to see this happen: line numbers should cover the whole function

Instead, this happened: line numbers cover only the header of a function.


However, it's not stable. Sometimes, it points to the header only: 
* https://doc.rust-lang.org/src/core/bool.rs.html#37-40

Sometimes, to the first line of the header:
* https://doc.rust-lang.org/src/alloc/string.rs.html#1702

Sometimes, to the whole function: 
* https://doc.rust-lang.org/src/std/path.rs.html#2087-2094
* https://doc.rust-lang.org/src/std/thread/scoped.rs.html#129-159

https://github.com/rust-lang/rust/blob/master/RELEASES.md#rustdoc-4

### Version it worked on

It most recently worked on: 1.50

### Version with regression

`rustc --version --verbose`:
```
rustc 1.62.0 (a8314ef7d 2022-06-27)
binary: rustc
commit-hash: a8314ef7d0ec7b75c336af2c9857bfaf43002bfc
commit-date: 2022-06-27
host: x86_64-unknown-linux-gnu
release: 1.62.0
LLVM version: 14.0.5
```


<!--
If you know when this regression occurred, please add a line like below, replacing `{channel}` with one of stable, beta, or nightly.

@rustbot modify labels: +regression-from-stable-to-{channel} -regression-untriaged
-->
Repository: pytorch
Issue: torch.bitwise_xor argument 'other' documentation wrong
Labels: module: docs,triaged

### 📚 The doc issue


The type of argument ('input' and 'other')  written on the document is the integral or boolean tensor. That is to say, parameters ('input' and 'other') must be a tensor. However, I found that when parameter 'other' is bool or number, this api also works.

```import torch
arg_1 = torch.randint(0,2,[3], dtype=torch.bool)
arg_2 = True
res = torch.bitwise_xor(arg_1,arg_2,)

import torch
arg_1 = torch.randint(-512,1024,[3], dtype=torch.int64)
arg_2 = 10
res = torch.bitwise_xor(arg_1,arg_2)
```

The parameter 'other' on above code works well on bool and int type data. 


### Suggest a potential alternative/fix

It would be better if the document could write as this: other(Tensor, bool, int) – the second input .

cc @svekars @holly1238
Repository: rust
Issue: rustdoc doesn't save filtered crate for search
Labels: T-rustdoc,C-bug,A-rustdoc-search

Originally:
* go to https://doc.rust-lang.org/1.59.0/std/index.html
* select "std" among search scope
* search for "exists", for example
* we can see that the results are from the "std" crate only
* go to the result https://doc.rust-lang.org/1.59.0/std/path/struct.Path.html#method.exists
* try to search again from there
* we can see the results only from the "std" crate


Starting from 1.60:
* https://doc.rust-lang.org/1.60.0/std/
* search for "exists"
* select "std" in the "Results for exists in" field
* the results are from "std"
* go to the result https://doc.rust-lang.org/1.60.0/std/path/struct.Path.html#method.exists
* try to search again from there
* we can see that the results are from "All crates" again.

I expected to see this happen: the search filter should persist.

Instead, this happened: the search filter resets every time we go to the result.

### Version it worked on

It most recently worked on: 1.59

### Version with regression

`rustc --version --verbose`:
```
rustc 1.62.0 (a8314ef7d 2022-06-27)
binary: rustc
commit-hash: a8314ef7d0ec7b75c336af2c9857bfaf43002bfc
commit-date: 2022-06-27
host: x86_64-unknown-linux-gnu
release: 1.62.0
LLVM version: 14.0.5
```
Repository: PowerToys
Issue: [PowerToys Run] Add the possibility to add some PATH to search for programs
Labels: Idea-Enhancement,Product-PowerToys Run,Needs-Triage

### Description of the new feature / enhancement

Currently the **Program** plugin only searches for _installed_ programs.

But I also use _portable applications_ that are not "installed". They are, for example, in C:\TOOLS.

It would be great to have the possibility to add some PATH to serach (recursively in sub folders) for programs in these PATH. This would allow to find these _portable applications_.

### Scenario when this would be used?

This would allow to find and run these _portable applications_ which are not _installed_.

### Supporting information

_No response_
Repository: PowerToys
Issue: [FancyZones] Windows don't change size/position when changing layout in multi-monitor mode
Labels: Issue-Bug,Product-FancyZones

Hi, the issue is not fixed in current 0.61.1. Still, I managed to have it working if I disable the fancyzone parameter that authorizes the zones to cover multiple screens ("Autoriser les zones à s'étendre sur plusieurs moniteurs").
=> 
- if parameter is enabled, the windows do not snap to zones when changing layout
- If parameter is disabled, the windows snap to zones when changing layout

_Originally posted by @vinste in https://github.com/microsoft/PowerToys/issues/18679#issuecomment-1207836140_
Repository: vscode
Issue: Merge Editor: Diff Both Inputs Against Each Other
Labels: feature-request,merge-editor

Currently, we just look at the diffs between input1 and base and input2 and base.
However, if input1 and input2 caused the same edit relative to base, we should be smarter.

By default, git uses the conflict style `merge`, which diffs the changes against each other and accepts the longest common substring.

Our implementation matches gits `diff3` conflict style, which does not move common lines out of conflicts.

Related: #155965

---

create a new branch **conflict**
new and commit a file **merge_conflict_test.go**, with **Name: "n1"**

```go
// branch conflict
package main

import (
	"github.com/gin-gonic/gin"
)

func Foo1(c *gin.Context) {
	s1 := s{
		ID:        111,
		Condition: "c1",
		Check:     true,
		Name:      "n1" // diff from master
	}
}

func Foo2(c *gin.Context) {
	line1 := "line1"
	line2 := "line2"
	line3 := "line3"
	line4 := "line4"
	line5 := "line5"
	line6 := "line6"
}

func Foo3(c *gin.Context) {
	s3 := s{
		ID:        123,
		Condition: "c3",
		Check:     true,
		Name:      "n3" // diff from master
	}
}
```

back to **master**, also new file **merge_conflict_test.go**, without **Name: "n1"**

```go
// branch master
package main

import (
	"github.com/gin-gonic/gin"
)

func Foo1(c *gin.Context) {
	s1 := s{
		ID:        111,
		Condition: "c1",
		Check:     true,
	}
}

func Foo2(c *gin.Context) {
	line1 := "line1"
	line2 := "line2"
	line3 := "line3"
	line4 := "line4"
	line5 := "line5"
	line6 := "line6"
}

func Foo3(c *gin.Context) {
	s3 := s{
		ID:        123,
		Condition: "c3",
		Check:     true,
	}
}
```

commit, then goto **conflict**, rebase **master**
![image](https://user-images.githubusercontent.com/49579559/183375450-354e68a2-65a4-486c-96cc-92f0cfee1705.png)

with **"git.mergeEditor": false** on
![image](https://user-images.githubusercontent.com/49579559/183375628-08cb452d-e311-4947-97a7-e053fffd7915.png)

3 way merge editor:
![image](https://user-images.githubusercontent.com/49579559/183375945-38e9a3f1-0f3c-4b65-8c1e-be1acaf6270b.png)

_Originally posted by @Void-King in https://github.com/microsoft/vscode/issues/157469#issuecomment-1207839032_
Repository: godot
Issue: Rename folder dialog box sometimes appears when creating a new scene in FileSystem
Labels: bug,topic:editor,usability

### Godot version

3.5.stable

### System information

MacOS, M1 Max

### Issue description

Occasionally, when right clicking a folder in FileSystem and adding a New Scene, after naming the new scene, a dialog box pops up prompting a rename of the parent folder.

### Steps to reproduce

- Have a folder in the FileSystem
- Right click and select New Scene
- Name the scene and confirm by pressing Enter
- Sometimes the Rename folder dialog opens

### Minimal reproduction project

_No response_
Repository: angular
Issue: Using ?. in template does not narrow type in *ngIf directive
Labels: area: compiler,P3,compiler: template type-checking

### Which @angular/* package(s) are the source of the bug?

compiler, core, language-service

### Is this a regression?

No

### Description

with strict mode on for TypeScript

```
  "compilerOptions": {
    "strict": true,
    ...
``` 

```
export type AccessibleValue<T> =
  | { isAccessible: true; value: T }
  | {
      isAccessible: false;
      value: null;
    };
```
evaluates to string correctly in typescript
```
 if (this.testValue.accessible?.isAccessible) {
      this.stringOnlyToTest = this.testValue.accessible.value; 
    }
```
but in the template, it throws 
```
Argument of type 'string | null' is not assignable to parameter of type 'string'.
Type 'null' is not assignable to type 'string'.
```
```
<p *ngIf="testValue.accessible?.isAccessible">
{{ testValue.accessible.value | stringOnlyPipe }} <span></span> 
</p>
```

### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-ivy-gpknqn?file=src/app/app.component.ts

### Please provide the exception or error you saw

```true
Argument of type 'string | null' is not assignable to parameter of type 'string'.
Type 'null' is not assignable to type 'string'.
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 14.1.1
Node: 14.16.0
Package Manager: npm 6.14.11
OS: win32 x64

Angular: 14.1.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1401.1
@angular-devkit/build-angular   14.1.1
@angular-devkit/core            14.1.1
@angular-devkit/schematics      14.1.1
@schematics/angular             14.1.1
rxjs                            7.5.6
typescript                      4.6.4
```


### Anything else?

I'm pretty sure there are actually more problems with regards to `?.` operator in templates and will try to provide as many as I am able to find while fixing the project I work on currently
Repository: neovim
Issue: Provide hooks to override io.stdin/io.stdout/io.stderr
Labels: enhancement,io,lua

### Feature already in Vim?

No

### Feature description

Currently when io.read() is called, it returns `nil Resource temporarily unavailable 11`. But I expect it can call some function to read from user input.

Though I can override this function with something else, this hacky. The best way to do is from the C side, which is up to neovim. 

So I think it would be better if there's some kind of hooks in neovim to resolve this problem.
Repository: react
Issue: Bug: Eslint hooks returned by factory functions not linted
Labels: Status: Unconfirmed,Component: ESLint Rules

React version: *

## Steps To Reproduce

> **See my draft PR** with failing tests 👉  #25066.

Given the following code:

```ts
// Factory function for creating hooks
function createHooks() {
  return {
    foo: {
      useQuery: () => {
        data: 'foo.useQuery'
      },
    }
  };
}
const hooks = createHooks();

export const MyComponent = () => {
  if (Math.random() < 0.5) {
    return null;
  }
  // ❌ This should fail the linter
  const query = hooks.foo.useQuery();

  return <>{query.data}</>;
}
```


## The current behavior

The linting does not catch that the `hooks.foo.useQuery()` is used conditionally.


## The expected behavior


The linting should catch that the `hooks.foo.useQuery()` is used conditionally.


## Failing tests / link to code

**See my draft PR** with failing tests 👉  #25066.

I've highlighted areas and things that are up for discussions around this.

## Additional context

### Partial workaround

If the object returned is **not** a deep getter, it's possible to `PascalCase` it and do it like this:

```ts

// Factory function for creating hooks
function createHooks() {
  return {
    useFoo: () => {
      data: 'foo.useQuery'
  };
}
const Hooks = createHooks();

export const MyComponent = () => {
  if (Math.random() < 0.5) {
    return null;
  }
  // ✅ This will fail the linter
  const query = Hooks.useFoo();

  return <>{query.data}</>;
}
```

### It's okay if hooks can be called outside of React-components

https://github.com/facebook/react/issues/25065#issuecomment-1242767909


### Background

I'm the creator of [tRPC](https://github.com/trpc/trpc) where we use the following pattern for users to create the root hooks:

```ts
// Initialization of the typesafe tRPC hooks
export const trpc = createReactQueryHooks<AppRouter>();

// MyComponent.tsx
export function MyComponent() {
  const query = trpc.useQuery(['post.byId', { id: '1' }])

  return <pre>{JSON.stringify(query.data ?? null, null, 4)}</pre>
}
```

In the coming version of tRPC, we are planning on have an API that looks like the below, which also won't be caught.

```ts
export function MyComponent() {
  const query = trpc.post.byId.useQury({ id: '1'});

  return <pre>{JSON.stringify(query.data ?? null, null, 4)}</pre>
}
```
Repository: transformers
Issue: [Summary] Regarding memory issue in tests
Labels: WIP,bug

### Description

This is a short summary of the memory issue in our tests


### The following tests definitely have memory issues
- PyTorch (increase ~`15 MB` each call):
  - test_torch_fx
  - test_torch_fx_output_loss
- TensorFlow:
  - test_xla_fit 
  - test_xla_generate_fast (increase ~`100 MB` each call)
  - test_xla_generate_slow
  - test_xla_mode
  - test_onnx_runtime_optimize  (increase ~`8 MB` each call)
  - test_dataset_conversion (increase ~`0.2 M`B each call)

- **Flax**:
  - **Almost all test methods have memory issue!**
  -  [The CircleCI job run page](https://app.circleci.com/pipelines/github/huggingface/transformers/45317/workflows/5bcb8b8a-776c-4c58-ad99-cf2700304c05/jobs/528556/resources) demonstrates this issue too

### Some tests are also suspicious, but need more investigations.

- For example, the test `test_graph_mode` have the following memory *difference* in consecutive runs (in KB): 
    ```
    [936.0, 520.0, 260.0, 520.0, 0.0, 0.0, 260.0, 520.0, 0.0, 0.0, 260.0, 0.0, 0.0, 0.0, 260.0, 260.0, 260.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
    ```
    (not always increase, but it continues to happen)

- For `test_saved_model_creation_extended` (in KB):
    ```
    [144436.0, -104552.0, 1280.0, -103908.0, -1536.0, 177868.0, -33572.0, 20240.0, 170852.0, -51704.0, -8448.0, 59904.0, -48128.0, 2440.0, 34856.0, 3068.0, -3420.0, -36864.0, -6756.0, 36136.0, -2048.0, -17400.0, -4608.0, -25896.0, 4096.0, 1024.0, 22344.0, 25784.0, -256.0]
    ```
    (sometimes some amount of memory is released, but still leaks in the long run?)

### Pytest itself will accumulate some memory usage as tests continue to run.

This is just my hypothesis: sometimes I see an increase of a few KB after a sequence of runs without leak.

### Possible actions to take

- (It's probably worth it to fix this issue for a few tests mentioned above to gain some experience):
  - In this case, we can only focus on `non-slow` tests 

- **[Not to go]** There is a `pytest` plugin `pytest-forked` to run each test in a forked subprocess. But it doesn't work well with TensorFlow and Flax (some tests will hang forever). I will provide some details in the comments.

- We can try to run the tests per model in each CircleCI job steps. However, the output on job run pages will be a bit noisy, but we can have an extra step to print the test failures in a cleaner way.
Repository: neovim
Issue: Custom winblend-function
Labels: enhancement,ui

### Feature already in Vim?

No

### Feature description

Couldn't there be a custom winblend function that could take the winblend value, background and foreground, do some custom processing and spits out background and foreground value, just like shaders. This has high potentials, such as nvim 
- watermark behind the text,
- shader effects.
- A lot of customizations
Repository: flutter
Issue: [video_player] Support for Embedded Captions
Labels: c: new feature,a: accessibility,p: video_player,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

For accessibility, video_player should be able to support Embedded/Closed Captioning, specifically the CEA-608/EIA-608/CTA-708.

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

At current implementation, video_player does not support or detect CEA-608 captions. Testing out with [ExoPlayer's demo application](https://exoplayer.dev/demo-application.html) at 2.18.0 the captions are getting recognized and toggleable. 

Changing the implementation to use StyledPlayerView works well. An example package would be [video_360](https://pub.dev/packages/video_360) with some modifications to not display in a 360 video format.

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching something showing what you are imagining:
      * images
      * videos
      * code samples

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: flutter
Issue: [Web Driver Test] Allow Flutter Drive (for Web) to load chrome extension
Labels: a: tests,tool,t: flutter driver,platform-web,c: proposal,P2,team-web,triaged-web

Currently, Flutter Web's integration test doesn't allow any flag to add Chrome extension to load up in the tests. This blocks me from testing the Flutter Web to work with some chrome extension such as MetaMask. (e.g. I need to run Flutter Web to connect MetaMask wallet extension.)

## Proposal
Ideally, `flutter drive` should have another flag `--load-extension` to load a chrome extension.

Ex:
```
flutter drive -d web-server --web-port 7357 --browser-name chrome --driver test_driver/integration_test.dart --target integration_test/hocho_test.dart --no-headless --load-extension=debug_extension/metamask
```
Repository: godot
Issue: When i try to test my game it shows a white screen (Im on Linux)
Labels: topic:core,needs testing

### Godot version

3.2.3.stable.custom_build

### System information

Google ChromeOS version 103.0.5060.132 (Official Build)(32-bit)

### Issue description

When i try to run my game and test it, it shows a white screen idk what to do 
![1659974120142164727688007254681](https://user-images.githubusercontent.com/110842157/183460709-7b5efc60-2257-4e02-a04f-fec4aaaf06b5.jpg)


### Steps to reproduce

.

### Minimal reproduction project

_No response_
Repository: rust
Issue: Associated consts in traits interact weirdly with type inference
Labels: A-trait-system,A-associated-items,T-compiler,A-inference,C-bug,T-types

I tried this code ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=243aeffbf1d5aac05edbcbc5ba488d1a)):

```rust
use std::marker::PhantomData;

struct IsSend<T>(PhantomData<T>);
struct TaggedBool<T>(bool, PhantomData<T>);

trait Helper<T> {
    const VALUE: TaggedBool<T>;
}

impl<T, U> Helper<T> for U {
    const VALUE: TaggedBool<T> = TaggedBool(false, PhantomData);
}

impl<T: Send> IsSend<T> {
    const VALUE: TaggedBool<T> = TaggedBool(true, PhantomData);
}

impl<T> IsSend<T> {
    const fn new(_: &T) -> Self {
        Self(PhantomData)
    }
}

const IS_SEND_PTR: bool = {
    // Some value we want to check
    let to_check: *const () = &();
    let mut _checker = IsSend::new(&to_check);
    let tb = IsSend::VALUE;
    // this works:
    // let tb = IsSend::<*const ()>::VALUE;
    _checker.0 = tb.1;
    tb.0
};

fn main() {
    assert!(!IS_SEND_PTR);
}
```

I expected this to compile and pass the assertion. 
Instead, this happened: compiler successfuly inferred type for `tb`, but for some reason didn’t use the associated constant from trait:

```
error[[E0277]](https://doc.rust-lang.org/stable/error-index.html#E0277): `*const ()` cannot be sent between threads safely
  --> src/main.rs:28:14
   |
28 |     let tb = IsSend::VALUE;
   |              ^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
   |
   = help: the trait `Send` is not implemented for `*const ()`
note: required by a bound in `IsSend::<T>::VALUE`
  --> src/main.rs:14:9
   |
14 | impl<T: Send> IsSend<T> {
   |         ^^^^ required by this bound in `IsSend::<T>::VALUE`
15 |     const VALUE: TaggedBool<T> = TaggedBool(true, PhantomData);
   |           ----- required by a bound in this
```

### Meta

Replicates on stable, beta and nightly on playground (v1.62.1, v1.63.0-beta9 and 1.65.0-nightly (2022-08-07 d394408fb38c4de61f76) respectively).