sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: deno
Issue: Unhandled rejections in workers should not fire an `error` event on the `Worker` object
Labels: bug,web

The HTML spec defines steps for reporting runtime script errors (with the `error` event) and unhandled promise rejections (with the `unhandledrejection` event). Both mechanisms are fairly similar, but they differ on what happens when an error or rejection happens inside a dedicated worker and is not caught by the corresponding event. Unhandled promise rejections will simply be reported to the console, as they would in a window agent, and never make it outside of the worker – while script errors will fire an `error` event to the corresponding `Worker` object in the parent agent.

Deno doesn't (yet?) implement the `unhandledrejection` event, and an unhandled rejection on the main thread will kill the process. However, an unhandled rejection in a worker will instead fire an `error` event on the corresponding `Worker` object – which shouldn't happen per the spec. Arguably the process should be killed, as it would if it happened on the main thread.

This is causing some worker tests to hang forever in #12222.

-----------------

Here's a test to compare the behavior in Deno and in browsers.

```js
// main.js
const worker = new Worker(new URL("./worker.js", import.meta.url), {type: "module"});

worker.addEventListener("error", () => {
    console.log("worker.onerror in main thread");
});

window.addEventListener("error", () => {
    console.log("window.onerror in main thread");
});

window.addEventListener("unhandledrejection", () => {
    console.log("window.onunhandledrejection in main thread");
});
```

```js
// worker.js
self.addEventListener("error", () => {
    console.log("self.onerror in worker");
});

self.addEventListener("unhandledrejection", () => {
    console.log("self.onunhandledrejection in worker");
});

(async () => {
    throw new Error("Error");
})();
```

All browsers fire the `unhandledrejection` event inside the worker, report the error, and don't fire any event in the main thread:
![image](https://user-images.githubusercontent.com/8225977/134781239-147a58c0-1bba-4379-8a53-77752a18af5f.png)

While Deno will report the error inside the worker, fire the `error` event on the main thread's `worker` object, and then die because the error wasn't handled:
![image](https://user-images.githubusercontent.com/8225977/134781325-bce2e8ec-06ea-4fe0-8bc1-6d1c4250483c.png)

(This screenshot uses Deno canary – 1.14.1 would panic because of #11342.)
Repository: rust
Issue: Cannot infer type for [], but only when serde_json is used (?)
Labels: T-lang,T-compiler,A-inference

```rust
extern crate serde_json; // Code works fine if you remove this line.

fn main() {
    Vec::<u8>::new() == [];
}
```

That produces:

```
error[E0282]: type annotations needed
 --> src/main.rs:4:25
  |
4 |     Vec::<u8>::new() == [];
  |                         ^^ cannot infer type
```

Somehow, referencing `serde_json` makes rustc unable to infer some type here. This happens on both the current stable and nightly versions of Rust.
Repository: godot
Issue: Error when Export decimal -  C#
Labels: bug,needs testing,topic:dotnet

### Godot version

v3.4.beta5.mono.official [dd0ee4872]

### System information

Debian 11 - C#

### Issue description

I have this error in terminal/output tab

```
E 0:00:00.763   _get_member_export: Unknown exported member type: 'DesertEdge.Entities.Stat.AttackPerSecond'.
  <C++ Source>  modules/mono/csharp_script.cpp:2574 @ _get_member_export()

```

The line at the error refer is:


 ```
       [Export]
        [Size("4.2")]
        public decimal AttackPerSecond { get; set; }
```

where `[Size("4.2")]` is my custom attribute.
The custom attribute is necessary to define size's table field in database.


### Steps to reproduce

Just use decimal as type then export it I guess.
I'm not sure but I think is a regression. Edit.: Same error in v3.3.3.stable.mono.official [b973f997f]

### Minimal reproduction project

NA
Repository: pytorch
Issue: [JIT] allow annotation with `nn.Module` for documentation purposes.
Labels: oncall: jit

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

It would be great if `jit.script` would support jitting classes that are annotated like:

```python
class MyModule(nn.Module)
    submodule: nn.Module
    """This submodules purpose is to do X."""
    
    def __init__(self, **submodule_kwargs):
        super().__init__()
        self.submodule = SubModule( **submodule_kwargs)
```

## Motivation

1. Without this, it is annoying to properly document `nn.Modules` that incorporate submodules.
2. It plays a role when using `mypy` for type-checking. Ideally, all important class attributes should be documented with attribute docstring and type-hint in the class body.

## Pitch

Ideally, `jit.script` should be smart enough to not stumble over such simple issues. Maybe jit.script could just auto-ignore the type hints on all attributes that it doesn't understand and possibly print a warning instead?

## Alternatives

Provide a way to tell `jit` to ignore a type hint in the class body.

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->
Repository: angular
Issue: docs: Reactive Forms Child Components (Nested Forms)
Labels: help wanted,area: forms,P3

### Description

Please describe how to use child components with Reactive Forms in the documentation here:
https://angular.io/guide/reactive-forms

Should we pass a form group to a child component, and if so, how can we pass a form group to a child component and get the updated value changes in the parent and also maintain validation and other Reactive Forms features for example? Also can the solution be used for child reactive form components multiple levels deep? Do we have to pass the values of the nested forms into the submit function?

Here's a relevant tutorial, though I don't know if it follows best practices:
https://blog.profanis.me/blog/reactive-forms-in-parent-child-components

Relevant Stackoverflow question here: 
https://stackoverflow.com/questions/40458739/two-way-binding-in-reactive-forms
https://stackoverflow.com/questions/49117956/angular5-how-to-submit-nested-reactive-form

Thank you!

### What is the affected URL?

https://angular.io/guide/reactive-forms

### Please provide the steps to reproduce the issue

_No response_

### Please provide the expected behavior vs the actual behavior you encountered

_No response_

### Please provide a screenshot if possible

_No response_

### Please provide the exception or error you saw

_No response_

### Is this a browser-specific issue? If so, please specify the device, browser, and version.

_No response_
Repository: pytorch
Issue: [BUG] ConvTranspose with out_channels=1 
Labels: module: convolution,triaged

https://github.com/pytorch/pytorch/blob/1c8949c51ac425c3e4fef57e296784bea576afdc/torch/nn/modules/conv.py#L85

If ConvTranpose has groups = number of output channels of ungrouped convtranspose then out_channels=1 and this line fails.
It should be out_channels > 1 and out_channels % groups != 0
I believe the same is true for in_channels check just above.
Repository: three.js
Issue: BufferGeometry loss translate when toJSON
Labels: Bug,Needs Investigation

```
var boxGeo = THREE.BoxGeometry(5,5,5);
boxGeo.translate(10, 20, 10);
boxGeo.toJSON()
```
Repository: deno
Issue: Long strings crash typescript import but not javascript import
Labels: bug,tsc

If I import a file with long strings, it can crash if the same file is Typescript, whereas the Javascript equivalent works fine

```
const longstring = "r".repeat(100000000)
await  Deno.writeTextFile("./foo.js",`export default '{x: "${longstring}" }'`)
await  Deno.writeTextFile("./foo.ts",`export default '{x: "${longstring}" }'`)
```

then `import "./foo.js"` works but `import "./foo.ts"` crashes deno:

```
deno
Deno 1.14.1
exit using ctrl+d or close()
> import "./foo.js"
Module {
  default: "{x: rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr..."
}
```

```
deno 
Deno 1.14.1
exit using ctrl+d or close()
> import "./foo.ts"
Check file:///Users/dan/foo.ts

<--- Last few GCs --->

[36469:0x1301c8000]    19015 ms: Scavenge 1389.3 (1417.1) -> 1388.7 (1421.6) MB, 8.0 / 0.0 ms  (average mu = 0.220, current mu = 0.195) allocation failure 
[36469:0x1301c8000]    19024 ms: Scavenge 1391.8 (1421.6) -> 1390.4 (1422.3) MB, 5.8 / 0.0 ms  (average mu = 0.220, current mu = 0.195) allocation failure 
[36469:0x1301c8000]    19034 ms: Scavenge 1392.5 (1422.3) -> 1391.4 (1424.1) MB, 7.4 / 0.0 ms  (average mu = 0.220, current mu = 0.195) allocation failure 


<--- JS stacktrace --->


#
# Fatal javascript OOM in Ineffective mark-compacts near heap limit
#

[1]    36469 trace trap  deno
```
Repository: TypeScript
Issue: Parameter contextually typed from rest parameters loses possibility of undefined
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

function parameter contextual contextually rest undefined

### 🕗 Version & Regression Information

3.3.3333, 4.5.0-dev.20210925

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

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 _N/A_

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?noUncheckedIndexedAccess=true&ts=4.4.2#code/C4TwDgpgBAYgrgOwMZQLxQBQDocEMBOA5gM4BcUCcAtgEYT4DaAugJRoB8UAbgPYCWAEwBQQgPSioAeQDSQpDwTFgUAGaIk5eMjSYChNqk4BvIVDNR5ingBsIWaz0IY9WYDxh8AHhAEYAzCwsANxCAL4iasgYwUA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
type Func = (...args: number[]) => void

const func: Func = (arg) => {
    console.log(arg.toFixed(3));
}

func();
```

### 🙁 Actual behavior

(Under `strict: true`, and also `noUncheckedIndexedAccess: true` as a bonus)

The type of `arg` is inferred as `number` although `undefined` could flow in.

### 🙂 Expected behavior

The type of `arg` should be `number | undefined`.

### ⛰️ Context

Related: #45972 

I was thinking of a simpler setting and found that handling of normal rest parameters isn't perfect. These two are not the same issue given that this one doesn't result in a compile error.
Repository: godot
Issue: Wrong number of args for set_cell in TileMap for Call Method Track Key
Labels: bug,topic:core,topic:2d

### Godot version

v3.3.3.stable mono

### System information

Windows 10

### Issue description

When choosing the method set_cell of TileMap for a Call Method Track the max amount of args given are 5 while the real method has 7
![image](https://user-images.githubusercontent.com/32604428/134795600-8ead4f05-c60f-4027-ad75-e5a1f1c5969f.png)

From the official docs
https://docs.godotengine.org/en/stable/classes/class_tilemap.html#class-tilemap-method-set-cell
> void set_cell ( int x, int y, int tile, bool flip_x=false, bool flip_y=false, bool transpose=false, Vector2 autotile_coord=Vector2( 0, 0 ) )

![image](https://user-images.githubusercontent.com/32604428/134795663-dc5efad0-1d1f-4571-84a3-1f7eb831669c.png)
E 0:00:16.665   _animation_process_animation: Condition "s > 5" is true. Continuing.
  <C++ Source>  scene/animation/animation_player.cpp:552 @ _animation_process_animation()


### Steps to reproduce

In a new animation create a Call Method Track for a TileMap, add a new key for the method set_cell

### Minimal reproduction project

[ set_cell in TileMap.zip](https://github.com/godotengine/godot/files/7230852/set_cell.in.TileMap.zip)
Repository: pytorch
Issue: C10dProcessGroupSerialization.test_process_group_as_module_member is flaky
Labels: oncall: distributed,triaged

## 🐛 Bug

Flaked on https://github.com/pytorch/pytorch/pull/65173/checks?check_run_id=3711047525 which doesn't appear to be related. Stacktrace - 

```
  test_process_group_as_module_member (__main__.C10dProcessGroupSerialization) ... ERROR (0.007s)
Traceback (most recent call last):
  File "test/run_test.py", line 1030, in <module>
    main()
  File "test/run_test.py", line 1008, in main
    raise RuntimeError(err_message)
RuntimeError: distributed/test_jit_c10d failed! Received signal: SIGSEGV
+ cleanup
+ retcode=1
+ set +x
```

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @gcramer23
Repository: godot
Issue: Advanced Import Settings: Adjusting size values by dragging mouse is broken
Labels: bug,topic:editor,confirmed,topic:3d

### Godot version

4.0 dev (c7f67dacc)

### System information

Arch Linux, Mesa/RADV 21.2.1, Gnome 40.4 (Wayland)

### Issue description

Hello,

I'm trying to generate a simple static collision shape (Box shape) in the Advanced Import Settings:

![grafik](https://user-images.githubusercontent.com/7927471/134797491-d01638c9-8901-40ad-ac49-70f82c0e22b1.png)

However, I can not comfortably adjust the size values by dragging the mouse, since it's really laggy and I have to click again after each small increment. I think the Mesh preview viewport might be stealing the focus here. This problem does not exist in other places, e.g. the inspector. Tabbing to the next input field is also not possible, but that might be a different issue.

### Steps to reproduce

1. Open Advanced Import Settings and enable e.g. generate Physics
2. Select Body Type "Static" and Shape Type "Box"
3. Try to adjust the Size value of the Primitive by dragging in the input field

### Minimal reproduction project

_No response_
Repository: rust
Issue: E0446 Doesn't Trigger For Types In Private Modules
Labels: A-lints,A-diagnostics,T-compiler

Declaring a public type and a public function in a private module, and then publicly reexporting the function doesn't trigger the E0446 error on using private types in public interfaces.

```rust
mod module {
  pub struct Private; // This isn't available outside of the crate because the module it is in is private.
  
  pub fn public() -> Private {Private} // This is available outside of the crate...
}

pub use module::public; // ...because of this reexport here.
```

I expected to see the E0446 error, because the above code is semantically equivalent to this code, from a downstream crate's point of view.
```rust
struct Private;

pub fn public() -> Private {Private} // error[E0446]: private type `Private2` in public interface
```

### Meta
This bug occurs both on Rust version `rustc 1.56.0-nightly (3d0774d0d 2021-08-18)` and version `rustc 1.54.0 (a178d0322 2021-07-26)`.
Repository: rust
Issue: Possible false positive “temporary value dropped while borrowed” error
Labels: A-diagnostics,A-lifetimes,A-borrow-checker,T-compiler,D-newcomer-roadblock,A-variance

I tried this code:

```rust
use std::collections::HashSet;

fn main() {
    let mut set = HashSet::from([("abc", 4)]);

    set.remove(&(String::from("abc").as_str(), 4)); // ERROR: temporary value dropped while borrowed.
    set.remove(&(String::from("abc").as_str(), 4)); // OK.
}
```

I expected to see this happen: The code compiles successfully.

Instead, this happened: I got the follow error:

```text
error[E0716]: temporary value dropped while borrowed
 --> src/main.rs:6:18
  |
6 |     set.remove(&(String::from("abc").as_str(), 4)); // ERROR: temporary value dropped while borrowed.
  |                  ^^^^^^^^^^^^^^^^^^^              - temporary value is freed at the end of this statement
  |                  |
  |                  creates a temporary which is freed while still in use
7 |     set.remove(&(String::from("abc").as_str(), 4)); // OK.
  |     --- borrow later used here
  |
  = note: consider using a `let` binding to create a longer lived value

For more information about this error, try `rustc --explain E0716`.
error: could not compile `scratch` due to previous error
```

### Meta

`rustc --version --verbose`:

```
rustc 1.57.0-nightly (addb4da68 2021-09-25)
binary: rustc
commit-hash: addb4da686a97da46159f0123cb6cdc2ce3d7fdb
commit-date: 2021-09-25
host: x86_64-unknown-linux-gnu
release: 1.57.0-nightly
LLVM version: 13.0.0
```
Repository: node
Issue: Zlib: brotli compression is much slower than gzip
Labels: zlib,performance

### Version

16.10.0

### Platform

OSX, Linux (CentOS 8)

### Subsystem

zlib

### What steps will reproduce the bug?

Full test suite: https://github.com/timotejroiko/zlib-benchmark (not authored by my team, but is comprehensive and reaches the same conclusion).

### How often does it reproduce? Is there a required condition?

Always

### What is the expected behavior?

Brotli compression with zlib should be on par with gzip

### What do you see instead?

Brotli compression is much slower than gzip

### Additional information

We have replicated this issue on live production systems where we use zlib to perform over-the-air compression of static files. The (proprietary) code checks the `accept-encoding` header on client requests, and compresses accordingly (using default zlib settings).

The system originally prioritised brotli over gzip since the former is more efficient, however, we noticed a massive spike in CPU usage when doing so. After switching priority to gzip, CPU usage was at a minimum - for the same files and general load conditions.

We do not know if this is expected, but the discrepancy in performance is so large that it effectively disqualifies brotli for a large number of use cases involving high workloads.
Repository: PowerToys
Issue: [Fancy Zones] Configurable layout flash time
Labels: Idea-Enhancement,FancyZones-Settings,Product-FancyZones

### Description of the new feature / enhancement

When using layout keyboard shortcuts we have the option to flash the layout that highlights the selected layout's zones. I find this very useful but the duration for which the zones are displayed can be too long once you get used to it. It would be great to be able to have an extra configuration setting alongside the check to enable zone flashing that defines the milliseconds for the flash duration. The default can be what we currently have but the user can adapt this.

### Scenario when this would be used?

When using layout keyboard shortcuts with enabled zone flashing. The goal is to get a visual confirmation of the activated layout but that is less disruptive to your workflow.

### Supporting information

_No response_
Repository: flutter
Issue: Translucent FloatingActionButton get's a persistent highlight when clicked/touched
Labels: c: regression,framework,f: material design,has reproducible steps,P3,found in release: 2.5,found in release: 2.6,team-design,triaged-design

<!-- 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
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->
This problem did not occur until Flutter Ver.2.2.3. This happens in v.2.5.0 and v2.5.1.

1. Create a new Flutter project in Android Studio.
2. Set the FloatingActionButton to be translucent.
    example:
```dart
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add_sharp),
        backgroundColor: Color.fromARGB(110, 0x30, 0xe0, 0xa0),
        foregroundColor: Color.fromARGB(200, 255, 255, 255),
        elevation: 3.0,
        mini: true,
      )
```

**Expected results:** <!-- what did you want to see? -->
The display returns to the original when you stop touching the button.

**Actual results:** <!-- what did you see? -->
The display may not return to its original state even if you stop touching the button.
If you don't do setState (), it won't return for sure.

<details>
</details>
Repository: TypeScript
Issue: No constituent of type 'Function | (T & Function)' is callable.
Labels: Bug,Help Wanted,Effort: Difficult,Domain: Error Messages

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

generic function union-type call-signatures

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is a crash
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about Generics
- I was unable to test this on prior versions because _______

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.5.0-dev.20210926#code/C4TwDgpgBAKhDOwoF4oB4YD4AUAzAdgFyxQA+UAYgK74DGwAlgPb4CUKmUAbkwwCYBuAFC0WiKMATBiccajxsOUAN5CoUAE4RgVDfgngITXFAIpkqAOS4a9ZvktQA-KfzZ2xfFQA234QF8BIA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
type Test = <T>(fn: T | Function) => void;
const test: Test = (fn) => {
  return typeof fn === 'function' ? fn() : null;
};
// This expression is not callable.
// No constituent of type 'Function | (T & Function)' is callable.
```

### 🙁 Actual behavior

Compiler throw error:
This expression is not callable.
  Not all constituents of type 'Function | (T & Function)' are callable.

<!-- What happened, and why it was wrong -->

### 🙂 Expected behavior

Compile success

because both 'Function | (T & Function)' are callable.

<!-- What you expected to happen instead, and why -->