sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: Add option to specify view providers when dynamically creating components
Labels: area: forms

### Which @angular/* package(s) are relevant/related to the feature request?

core

### Description

Let's say our component has a child directive with dependency decorated by `@Host`. And we want to specify its provider.

You can do that in the compile time using `viewProviders` option in `@Component` decorator. But, currently, there is no way to do it programmatically.

i.e. when that component is created dynamically by `ViewContainerRef.createComponent()` method, you can only specify providers using `injector` option in `Injector.create()` method. But those providers will not be applied to that directive.

Here is [live example](https://stackblitz.com/edit/angular-ivy-eygesl?file=src/app/app.component.ts). Take a closer look at providers and console output.

When `providers` array is used, factory is not called because search stops on `<input>` component (ngModel uses `@Host` and `@Optional` decorators): 
```ts
@Component({
  selector: 'app-provider-form',
  template: '<input name="username" [(ngModel)]="username" />',
  providers: [{provide: ControlContainer, useFactory: () => {console.log('provider factory')}}],
})
export class ProviderestFormComponent  {
  username: string;
}
```

But when `viewProviders` array is used factory is called:
```ts
@Component({
  selector: 'app-view-provider-form',
  template: '<input name="username" [(ngModel)]="username" />',
  viewProviders: [{provide: ControlContainer, useFactory: () => {console.log('view provider factory')}}],
})
export class ViewProviderFormComponent  {
  username: string;
}
```

So it would be really convenient to be able to specify this when form is created dynamically. Otherwise there is no easy way to bind parent ngForm directive and child ngModels.

Related issues: https://github.com/angular/angular/issues/47580 , https://github.com/angular/angular/issues/34780

### Proposed solution

Add `viewInjector` option to ViewContainerRef.createComponent() options. Or maybe add `viewProviders` key to `Injector.create()`.

### Alternatives considered

n/a
Repository: rust
Issue: [ER] Sub-optimal allocation of simple zeroed Vec of arrays
Labels: A-LLVM,I-slow,T-compiler,A-array

I expect the two diffent functions to be compiled to the same asm:

```rust
const N: usize = 1_000_000;
pub fn foo1() -> Vec<[u32; N]> {
    vec![[0; N]; 3]
}
pub fn foo2() -> Vec<u32> {
    vec![0; N * 3]
}
```

But they aren't, and this slows down code:

```asm
foo1:
        push    r14
        push    rbx
        push    rax
        mov     r14, rdi
        mov     edi, 12000000
        mov     esi, 4
        call    qword ptr [rip + __rust_alloc@GOTPCREL]
        test    rax, rax
        je      .LBB0_1
        mov     rbx, rax
        mov     edx, 12000000
        mov     rdi, rax
        xor     esi, esi
        call    qword ptr [rip + memset@GOTPCREL]
        mov     qword ptr [r14], rbx
        vmovddup        xmm0, qword ptr [rip + .LCPI0_0]
        vmovups xmmword ptr [r14 + 8], xmm0
        mov     rax, r14
        add     rsp, 8
        pop     rbx
        pop     r14
        ret
.LBB0_1:
        mov     edi, 12000000
        mov     esi, 4
        call    qword ptr [rip + alloc::alloc::handle_alloc_error@GOTPCREL]
        ud2


foo2:
        push    rbx
        mov     rbx, rdi
        mov     edi, 12000000
        mov     esi, 4
        call    qword ptr [rip + __rust_alloc_zeroed@GOTPCREL]
        test    rax, rax
        je      .LBB1_1
        mov     qword ptr [rbx], rax
        vmovddup        xmm0, qword ptr [rip + .LCPI1_0]
        vmovups xmmword ptr [rbx + 8], xmm0
        mov     rax, rbx
        pop     rbx
        ret
.LBB1_1:
        mov     edi, 12000000
        mov     esi, 4
        call    qword ptr [rip + alloc::alloc::handle_alloc_error@GOTPCREL]
        ud2
```

Using (and using aggressive compilation flags):

```
rustc 1.67.0-nightly (70f8737b2 2022-11-23)
binary: rustc
commit-hash: 70f8737b2f5d3bf7d6b784fad00b663b7ff9feda
commit-date: 2022-11-23
host: x86_64-pc-windows-gnu
release: 1.67.0-nightly
LLVM version: 15.0.4
```

It's a small difference but I can see it in my benchmarks. Fixing this problem is sufficiently important because Vec is used everywhere in most of the Rust ecosystem. So even small Vec improvements are worth having.

Currently as a workaround to reduce the number of heap allocation you can use something like:

```rust
let mut buf = vec![0_u32; N * 3];
let ([x1, x2, x3], []) = buf.as_chunks_mut::<N>() else { panic!() };
```
Repository: godot
Issue: Improper collision detection at edges of trimesh collision shapes
Labels: bug,confirmed,topic:physics,topic:3d

### Godot version

4.0 Beta 6

### System information

Windows 10; Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz 2.30 GHz

### Issue description

Collision shapes have do not properly detect the collision normal of things they collide with when the collision occurred along an "edge". The edge is the line that connects two faces. The attached sample project shows the most extreme example of this (where the shape literally passes straight through because of the improper normal detection, but this has implications for all projects with all shapes. For example, when walking up a slope that is this shape, when the bottom of the corner of my square collision hull touches the line, the normals are briefly different. This isn't a huge issue for my character controller since it uses several move_and_collides() and the shape is much larger than the pill in this example, but it still causes a quick hiccup of velocity since the player thinks they are hitting a wall for a brief second while touching this line.

https://user-images.githubusercontent.com/23440295/203867419-f7a5f2dd-88e1-4896-aa90-7555871e6964.mp4

**Increasing the physics tick rate to 240 solves this issue. It's a sloppy solution since the people don't advise you increase physics FPS that much.**



### Steps to reproduce

1. Download the project
2. Enable visible collision shapes
3. Click play
4. Watch as the middle pill projectile falls straight through the floor.

(Remember that this is just an easy to demonstrate example. This happens with all shapes and all physics objects. move_and_collide() itself doesn't return the proper surface normals. That's just chaos waiting to happen...)

### Minimal reproduction project

[FailedCollisionAtEdge.zip](https://github.com/godotengine/godot/files/10087454/FailedCollisionAtEdge.zip)
Repository: angular
Issue: [i18n] support i18n-localiza in template expression.
Labels: area: i18n

### Which @angular/* package(s) are relevant/related to the feature request?

compiler, localize

### Description

example:
```angular
<span> {{ nikename ?? 'ano' }} </span>
```

for now to support i18n, I should rewrite those code:
```angular
<span> {{ nickname ?? $$ANO }} </span>
```
```ts
class MyComponent {
  readonly $$ANO = $localiza`:@@ANO:ano`;
}
```

or like:
```angular
<span>
  <ng-container *ngIf="nickname;else Str">{{nickname}}</ng-container>
  <ng-template #Str><ng-container i18n="@@ANO">ano</ng-container></ng-template>
<span>
```

### Proposed solution


```angular
<span> {{ nikename ?? $localiza(':@@ANO:ano') }} </span>
```

> after read the source code. I think inject an function for template is better choose then pipe.

those code will compile to on [consts]():

```ts
$localiza.trans[":@@ANO:ano"] = $localiza`:@@ANO:ano`
```
#### Tips
1. `$localize` only support string literal.
   > eg: `$localize(str_var)` is no support, suppose use variable, why not `` str_var = $localize`text`  ``
2. `$localize` only support one argument.
   > suppose transform code:
   >
   > ```ts
   > $localize(':@@MY_INTRO:my name is ', username, ', I\'m ', age ,' years old.')
   > ```
   >
   > to
   >
   > ```ts
   > $localize`:@@MY_INTRO:my name is \${name}， I'm ${age} years old.`;
   > ```
   >
   > consider using `html` would get better readability and maintainability:
   >
   > ```html
   > <ng-container i18n="@@MY_INTRO">
   >   my name is {{name}}, I'm {{age}} years old.
   > </ng-container>
   > ```

### Alternatives considered

_noop_

> For now. I'm trying to make those code work in my project by hacking the source code. I hope someone could give me better suggest.

### Relational link

- https://github.com/angular/angular/pull/39122
- https://github.com/angular/angular/issues/35563#issuecomment-840027460
Repository: ant-design
Issue: 5.0 Component Token Request
Labels: 🗣 Discussion,💡 Feature Request,Inactive

In 5.0 and later versions, we provide component token for users to customize component style more easily. However, considering the risk of breaking change, we will add component tokens which are necessary for theming little by little.

Any request of component token is welcomed to discuss here. We will make it better in later versions.

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: rust
Issue: Unexpected type inference around unsized coercion
Labels: A-trait-system,C-bug,A-coercions,T-types

<!--
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.
-->

I tried this code:

```rust
use std::any::Any;
use std::rc::Rc;

fn main() {
    let x = Rc::new(42i32);
    f(Rc::clone(&x));
}
 
fn f(_: Rc<dyn Any>) {}
```

I expected to see this happen:
Line 6 to infer
```rust
f(Rc::<i32>::clone(&x));
```
and compile successfully.

Instead, this happened:
```
error[[E0308]](https://doc.rust-lang.org/stable/error-index.html#E0308): mismatched types
 --> src/main.rs:6:17
  |
6 |     f(Rc::clone(&x));
  |       --------- ^^ expected trait object `dyn Any`, found `i32`
  |       |
  |       arguments to this function are incorrect
  |
  = note: expected reference `&Rc<dyn Any>`
             found reference `&Rc<i32>`
note: associated function defined here
```

Changing line 6 to
```rust
f(Rc::<i32>::clone(&x));
```
works as expected, leading me to believe that the current behavior is inferring
```rust
f(Rc::<dyn Any>::clone(&x));
```
(which gives the same error).

Also of note is that moving `x` rather that borrowing works as expected, e.g.
```rust
fn id<T: ?Sized>(x: Rc<T>) -> Rc<T> {
  x
}
f(id(x));
```
Presumably, the difference is that
```rust
f(id::<dyn Any>(x));
```
works fine by coercing `x` before the call to `id`, whereas `&Rc<i32>` can't be coerced to `&Rc<dyn Any>`, so the coercion must happen after the call to `Rc::clone`, which doesn't play well with type inference.

### Meta
<!--
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.
-->

`rustc --version --verbose`:
```
rustc 1.65.0 (897e37553 2022-11-02)
binary: rustc
commit-hash: 897e37553bba8b42751c67658967889d11ecd120
commit-date: 2022-11-02
host: x86_64-pc-windows-msvc
release: 1.65.0
LLVM version: 15.0.0
```

</p>
</details>
Repository: flutter
Issue: Add GoRouter maybePop
Labels: c: new feature,package,c: proposal,P3,p: go_router,team-go_router,triaged-go_router

## Use case
Navigator have [maybePop](https://api.flutter.dev/flutter/widgets/NavigatorState/maybePop.html). I think it would be better if GoRouter also have maybePop or something similar. Atm it only has canPop and pop, and you have to use both to achieve something similar to maybePop.
```dart
final goRouter = GoRouter.of(context);
if (goRouter.canPop()) {
  goRouter.pop();
}
```

## Proposal
Add maybePop
```dart
GoRouter.of(context).maybePop();
```
Repository: godot
Issue: Mesh.surface_get_arrays() will fail with no error but interrupt the execution in gdscript.
Labels: bug,topic:gdscript,topic:rendering

### Godot version

4.0 Beta 6

### System information

macOS v13.0

### Issue description

Here is the demo code.

```gdscript
for si in mesh.mesh.get_surface_count():
    var surfaceArray = mesh.mesh.surface_get_arrays(si)
```

The second line will fail and interrupt execution with no error message, it takes me huge time to find out what goes wrong.

### Steps to reproduce

Load this model at runtime via GLTFDocument.

[shu.glb.zip](https://github.com/godotengine/godot/files/10088397/shu.glb.zip)

```gdscript
var gltf_doc = GLTFDocument.new()
var gltf_state = GLTFState.new()
var err = gltf_doc.append_from_file(file, gltf_state)
```

### Minimal reproduction project

N/A
Repository: godot
Issue: [4.0] When Bone2Ds rotate, the Polygon2Ds bound rotate wrongly
Labels: topic:rendering,topic:editor,documentation,topic:2d

### Godot version

v4.0.beta6.official [7f8ecffa5]

### System information

Ubuntu 22.04.1 LTS,GeForce RTX 2060 Mobile,TU106M,Vulkan

### Issue description

When Bone2Ds rotate, the Polygon2Ds bound rotate wrongly.
In 3.5.1 everything is ok, but in 4.0 beta6 the problem appear.

I doubt that the rotation base is wrongly. Beacuse if the polygons' transform is not (0,0), their rotation line is not the same circle with bone2D.

![3 5 1](https://user-images.githubusercontent.com/88229072/203904423-3192fd9c-82e1-4341-8169-c8d64563db3c.gif)

Godot 3.5.1

![4 0](https://user-images.githubusercontent.com/88229072/203904439-92977292-27e1-4fec-98a2-a163a025086b.gif)

Godot 4.0 beta6

### Steps to reproduce

1. Open reproduction project in Godot 3.5.1, rotate the bone2d
2. Open reproduction project in Godot 4.0 beta6, rotate the bone2d

### Minimal reproduction project

[StickManFightingDeemo3.5.1.zip](https://github.com/godotengine/godot/files/10088709/StickManFightingDeemo3.5.1.zip)
[StickManFightingDeemo4.0beta6.zip](https://github.com/godotengine/godot/files/10088710/StickManFightingDeemo4.0beta6.zip)
Repository: hello-algo
Issue: Code Transpilation to multiple progamming languages (Help Wanted)
Labels: code

> [!TIP]
> We seek help translating the code from Python/Java to other programming languages.
> Feel free to contribute in programming languages not listed here, such as **PHP, R. Ruby, Kotlin**, etc.

## Contributing Guideline

- **Select a reference language:** Python or Java are the preferred reference languages since their codebase has been thoroughly tested.
- **Maintain code consistency:** Align your code structure, naming conventions, and comments with those in the reference language to minimize discrepancies.
- **Test the code:** Ensure your code produces the same output as the reference code. Recommend utilizing tools like [Diffchecker](https://www.diffchecker.com/text-compare/) to compare the outputs.
- **Format the code**: Before opening the pull request, check your code formatting against existing chapters for consistent indentation, comment style, and naming conventions. Standard code formatting tools are recommended.
- Please ensure that a pull request(PR) covers at most one chapter for better maintainability. PR examples:
    - #632
    - #681
    - #696

## Code Reviewers

If you have extensive programming experience and are interested in reviewing code, please reach out via WeChat at `krahets-jyd` . We thank all code reviewers on the landing page and of this project.

| Language        | Reviewer      |
| --------------- | ------------- |
| Java            | @krahets      |
| C++             |               |
| Python          | @krahets      |
| Go #222         | @Reanon       |
| JavaScript #120 | @justin-tse   |
| TypeScript #121 | @justin-tse   |
| C#              | @hpstory      |
| C #425          | @Gonglja      |
| Swift           | @nuomi1       |
| Rust            | @night-cruise, @rongyi  |
| Ruby            | @khoaxuantu |
| Dart            | @gvenusleo    |
| Kotlin         |  @curtishd       |
| Zig             | @coderonion      |
Repository: deno
Issue: Suggestion: Support WebCodecs API
Labels: web,suggestion

Hi!

Just wanted to put a suggestion out there for the possible inclusion of the relatively new [WebCodecs API](https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API) within Deno (currently supported in Chromium). 

This API offers Video, Audio and Image codecs and primarily works on Frames of `UInt8Array` (decoupled from anything DOM related). The image codecs in particular are quite appealing and may allow Deno to perform common image operations when used in tandem with WebGPU (without the requirement of native imaging dependencies), as well as allowing Deno to carry out video transcoding tasks (often requiring one to integrate with ffmpeg)

For consideration
Repository: stable-diffusion-webui
Issue: [Feature Request]: "Successor of the extension" 
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 ?

In the event that an extension is no longer updated, etc., users who have installed the extension will be notified of the existence of a successor fork and will be assisted in replacing it.


### Proposed workflow

1. Check to see if it has been abandoned by the currently implemented extensions index when user click `Check Update`
2. Inform users of successor extensions based on the registered information.

### Additional information

cf. #4953
Currently, a fork of the extension and the old one can coexist.
If possible, it would be good to determine if it is a fork and notify the user.
Repository: vscode
Issue: Go to Symbol in Editor doesn't auto fill symbol which current cursor locate in editor
Labels: feature-request,editor-symbols,quick-open

steps:

1. open a ts file
2. select a word
3. `cmd + shift + p`, input `Go to Symbol in Editor`, enter
4. not auto fill the selected word

![image](https://user-images.githubusercontent.com/41773861/203936859-589e1915-0cc9-4801-9b9b-261968ab0de2.png)

```
Version: 1.73.1 (Universal)
Commit: 6261075646f055b99068d3688932416f2346dd3b
Date: 2022-11-09T02:08:38.961Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 22.1.0
Sandboxed: No
```
Repository: rust
Issue: Incremental Compile Bug On Moved Imports
Labels: A-resolve,T-compiler,A-incr-comp,C-bug,S-needs-repro

<!--
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.
-->

Whilst working on https://github.com/apache/arrow-rs I keep running into issues where incremental compilation gets confused by types that have been moved from one crate within the workspace to another.

I'm not really sure how to come up with a reproducer, as it seems to rely on stale state from previous builds that I can't find a way to reproduce. However, @carols10cents recommended I file an issue to at least alert you guys that something isn't quite right :sweat_smile: 

An example error would be

```
$ cargo check
    Checking arrow-array v27.0.0 (/home/raphael/repos/external/arrow-rs/arrow-array)

error[E0432]: unresolved imports `arrow_schema::DECIMAL128_MAX_PRECISION`, `arrow_schema::DECIMAL128_MAX_SCALE`, `arrow_schema::DECIMAL256_MAX_PRECISION`, `arrow_schema::DECIMAL256_MAX_SCALE`, `arrow_schema::DECIMAL_DEFAULT_SCALE`
  --> arrow-array/src/types.rs:26:51
   |
26 |     ArrowError, DataType, IntervalUnit, TimeUnit, DECIMAL128_MAX_PRECISION,
   |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^ no `DECIMAL128_MAX_PRECISION` in the root
27 |     DECIMAL128_MAX_SCALE, DECIMAL256_MAX_PRECISION, DECIMAL256_MAX_SCALE,
   |     ^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^ no `DECIMAL256_MAX_SCALE` in the root
   |     |                     |
   |     |                     no `DECIMAL256_MAX_PRECISION` in the root
   |     no `DECIMAL128_MAX_SCALE` in the root
28 |     DECIMAL_DEFAULT_SCALE,
   |     ^^^^^^^^^^^^^^^^^^^^^ no `DECIMAL_DEFAULT_SCALE` in the root
```

Related to https://github.com/apache/arrow-rs/pull/3177

And goes away with a `cargo clean`.

Edit: Interestingly it didn't appear to recompile any of the dependent crates, such as arrow-data, despite the fact they have changed... Perhaps this is a cargo bug??

### Meta
<!--
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.
-->

`rustc --version --verbose`:
```
rustc 1.65.0 (897e37553 2022-11-02)
binary: rustc
commit-hash: 897e37553bba8b42751c67658967889d11ecd120
commit-date: 2022-11-02
host: x86_64-unknown-linux-gnu
release: 1.65.0
LLVM version: 15.0.0
```
Repository: PowerToys
Issue: Keyboard Manager - Key remapping RDP
Labels: Needs-Triage

### Description of the new feature / enhancement

Get key remaps to work through RDP, like with VMware Horizon client.

### Scenario when this would be used?

As of right now i have remaps of keys that I use in Windows and I want to have the same keybinds when I use VMwares RDP.

### Supporting information

_No response_
Repository: rust
Issue: Codegen metadata documentation is not exhaustive
Labels: A-docs

### Location

https://doc.rust-lang.org/rustc/codegen-options/index.html#metadata

### Summary

Current `rustc -Cmetadata` argument documentation:

> This option allows you to control the metadata used for symbol mangling. This takes a space-separated list of strings. Mangled symbols will incorporate a hash of the metadata. This may be used, for example, to differentiate symbols between two different versions of the same crate being linked.

I feel it is not evident what is the expected behavior. I'm not talking about how the metadata is used to differentiate symbols, but what are the expected arguments.

Other non-documented rules, which are clear by looking at the code in charge
of generating a stable crate id (`compiler/rustc_span/src/def_id.rs`)

Metadata is a list of values. The order of such values does not matter.
So `one two` and `two one` are equivalent

Metadata values can be added with a single -Cmetadata option, which takes
a value of space-separated values.

Metadata values can also be added by multiple -Cmetadata options.

Every distinct -C metadata value is only incorporated once

A single metadata "ab" has a different meaning than two separated "a" "b"

So these are equivalent:

```
-Cmetadata=one -Cmetadata=two
-Cmetadata="one two"
-Cmetadata="two one"
-Cmetadata="one two one"
```

But these are not:

```
-Cmetadata="onetwo"
-Cmetadata="one,two"
```
Repository: pytorch
Issue: `positive_semidefinite` constraint fails on CUDA 11.7
Labels: module: distributions,triaged,module: linear algebra

### 🐛 Describe the bug

Using PyTorch 1.12.1 with CUDA 11.7 I'm seeing a test failure in `test_constraints`.

The issue can be reproduced by: 

```
$ python -c 'import torch; print(torch.distributions.constraints.positive_semidefinite.check(torch.cuda.DoubleTensor([[1., 2], [2., 4]])))'
tensor(False, device='cuda:0')
```

The CPU version works:
```
$ python -c 'import torch; print(torch.distributions.constraints.positive_semidefinite.check(torch.DoubleTensor([[1., 2], [2., 4]])))'
tensor(True)
```

I further traced this down to the use of CUSolver for `syevd`:
```
$ python -c 'import torch; print(torch.linalg.eigvalsh(torch.cuda.DoubleTensor([[1., 2], [2., 4]])))'
tensor([-4.1211e-34,  5.0000e+00], device='cuda:0', dtype=torch.float64)
```

The correct result (on CPU and WolframAlpha) is `tensor([0., 5.], dtype=torch.float64)`

In a[ related issue](https://github.com/pytorch/pytorch/issues/41688#issuecomment-661633369) @vishwakftw wrote 

> I believe this is not an actual issue.

but as for such checks this seems to be an example where it is an issue, so I'd request to review this.

### Versions

PyTorch 1.12.1
CUDA 11.7

cc @fritzo @neerajprad @alicanb @nikitaved @jianyuh @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano