sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: Forms: better handling of internal `onCollectionChange` callbacks
Labels: breaking changes,area: forms,P4

Form controls have internal API that allows subscribing to changes in a data collection of `FormGroup`s and `FormArray`s (when a new control is added to a collection or existing one is removed). This internal API is used inside `FormGroupDirective` to trigger DOM updates. The problem with the current API is that there is no way to append a callback or remove a particular one (for ex. a callback that belongs to a directive that is being removed). Instead, new `onCollectionChange` callback always resets existing one.

We should consider updating the logic that handles `onCollectionChange` callback to provide an ability to add and remove
particular callbacks without affecting previous callbacks, similar to what we have for `onChange` callbacks. That should help implement more granular management of the `onCollectionChange` callbacks.

Note: this change would be backwards-incompatible since some exiting code may rely on the fact that the `onCollectionChange` callback is getting rewritten. There is a PR #39685 that implements the change proposed in this ticket.
Repository: pytorch
Issue: nn.functional.interpolate backward in fp16 is extremely slow
Labels: module: performance,module: nn,module: cuda,triaged,module: half,module: interpolation

## 🐛 Bug

## To Reproduce

```python
import torch
import time
from torch.nn import functional as F
import tqdm

def forward(x):
    predictions = F.interpolate(
        x, scale_factor=4, mode="bilinear", align_corners=False
    )
    loss = predictions.mean() * 10.0
    return loss

shape = (2, 54, 192, 288)
input = torch.rand(*shape).cuda()

input = input.half()


input.requires_grad_()

for k in range(3):
    loss = forward(input)
    loss.backward()
    input.grad = None
torch.cuda.synchronize()
start = time.time()
for k in tqdm.trange(300):
    loss = forward(input)
    loss.backward()
    input.grad = None
torch.cuda.synchronize()
print(time.time() - start)
```

* Running this script on a V100, it prints 21s.
* Replace "10.0" by "0.5", it prints 3s.
* Remove "input = input.half()", it prints 1.4s.

## Environment

 - PyTorch Version (e.g., 1.0): 1.7
 - OS (e.g., Linux): linux
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source):
 - Python version: 3.8
 - CUDA/cuDNN version: cuda9.2
 - GPU models and configuration: V100

cc @ngimel @albanD @mruberry @VitalyFedyunin
Repository: rust
Issue: unreachable warning when an unreachable!() macro is called
Labels: A-lints,C-feature-request,A-control-flow

I think we should suppress warnings that unreachable!() macros are unreachable. I had some nested logic with early returns and while at the moment it could not get to the end of the function, I could predict that some changes to the logic might miss a branch and then it would get to the end of the function - I wanted to catch that future mistake with an unreaachable!() macro. If we don't warn about unreachable unreachable!'s then I think that will make rust a safer language to code in as we can code more defensively.

```
warning: unreachable statement
    --> src/<snip>.rs:1298:5
     |
1190 |                         return None;
     |                         ----------- any code following this expression is unreachable
...
1298 |     unreachable!("Case missed. Should have early returned above.");
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
```
Repository: TypeScript
Issue: Typescript async conversion should watch out for const
Labels: Bug,Domain: Refactorings

*TS Template added by @mjbvz*

**TypeScript Version**: 4.2.0-dev.20201116

**Search Terms**
- quick fix
- suggestion
- convert to async

---

```ts

	getCommands(filterUnderscoreCommands: boolean = false): Promise<string[]> {
		this._logService.trace('ExtHostCommands#getCommands', filterUnderscoreCommands);

		return this._proxy.$getCommands().then(result => {
			if (filterUnderscoreCommands) {
				result = result.filter(command => command[0] !== '_');
			}
			return result;
		});
	}

```


![recording (1)](https://user-images.githubusercontent.com/22350/99243643-41dccd80-2801-11eb-90c2-c5e8820155da.gif)
Repository: godot
Issue: Missing initialization of variables in classes/structs found by Cppcheck
Labels: bug,topic:core,topic:codestyle

**Godot version:**
4.0.dev.custom_build.dd5485142

**Issue description:**
A lot of variables(812 but some are not counted and some are false positives) aren't initialized in constructors or directly where there are created in classe like(look at non initialized `left` variable which should be nullptr): 
https://github.com/godotengine/godot/blob/90edd839d5f67d4252923a720feeef6ad0d76107/core/math/quick_hull.h#L73

which may cause(and caused before) hard to reproduce errors.


**How to fix them?**
1. Open Cppcheck report from below, open one of reports and read error  e.g. `Member variable 'FaceConnect::left' is not initialized in the constructor.` and initialize this variable with default values like
```
class HashingContext : public Reference {
	void *ctx;
        int rar;
        bool q;
public:
	HashingContext() {}
	~HashingContext();
};
```
should be changed to 
```
class HashingContext : public Reference {
	void *ctx = nullptr;
        int rar = 0;
        bool q = false;
public:
	HashingContext() {}
	~HashingContext();
};
```
not (it is harder to read)
```
class HashingContext : public Reference {
	void *ctx;
        int rar;
        bool q;
public:
	HashingContext() {
        ctx = nullptr;
        rar = 0;
        q = false;
}
	~HashingContext();
};
```
You can also move some value initialization from constructors to place where are created in structs/classes.


**Cppcheck Report**

Cppcheck report to download(remove .zip extension) - [report.7z.zip](https://github.com/godotengine/godot/files/5558689/report.7z.zip)
To view results, just open index.html file and only select at the left side `uninitMemberVar`
![Zrzut ekranu z 2020-11-18 09-46-13](https://user-images.githubusercontent.com/41945903/99506919-09fd9380-2983-11eb-9792-bdf31ea65aaf.png)


Command which I used to generate this report 
```
cppcheck -q -j8 -ithirdparty -i3rdparty -itests -itest -itoolchain -itools  --enable=all --force --output-file=cppcheck.xml --xml --xml-version=2 .;cppcheck-htmlreport --source-dir=. --title=project --file=cppcheck.xml --report-dir=report;xdg-open report/index.html
```
Repository: go
Issue: net: add Interface.InterfaceAddrs
Labels: Proposal,Proposal-Accepted

**Update, Sep 15 2021** Current proposal is https://github.com/golang/go/issues/42694 -@rsc

- - -

## Background

IPv6 has a concept of "privacy extensions" (RFC4941). When these extensions are active, a temporary IPv6 address is created, and is used for outbound connections. One this address expires, it gets the status "expired", and a new temporary IPv6 address is created.

## Reason for this proposal

At the moment, when we use `net.Interfaces()`, we can get a list of associated addresses using the `.Addrs()` method. However, there is no platform-independent way to determine if the IPv6 address are temporary or deprecated. We need to resort to running and parsing output of `ip`, `ifconfig`, and `ipconfig`. IPv6 keeps growing, so frameworks and programming languages need to support the more advanced features of IPv6 in the near future.

## Possible solutions

- Add functions like `IsTemporary()` and `isDeprecated()` to `net.IP` (similar to `isLoopback`). However, that might not be the best solution, as the temporary nature of the address is not strictly tied to the numbers of the IP address.
- Add extra functions to `net.Interface` type to determine expired and temporary addresses?
Repository: storybook
Issue: addon-controls > description column > multiline code forced to whitespace: nowrap;
Labels: help wanted,maintenance,addon: docs,block: argstable

**Describe the bug**
Impossible to describe multiline code fragment at description column with `argTypes`, it forced to `whitespace: nowrap;` by jss

**To Reproduce**
Write a story.
Describe argTypes with multiline code at description parameter.

**Expected behavior**
```
object: {
  key: value;
}
```
at description column

**Fact behavior**
```
object: { key: value; }
```
at description column

**Screenshots**
expected:
![image](https://user-images.githubusercontent.com/3120544/99518209-535cdb80-29a1-11eb-8a5f-9e84c1aa8f68.png)

fact:
![image](https://user-images.githubusercontent.com/3120544/99518131-388a6700-29a1-11eb-90d9-d72ef36b1f49.png)

**Code snippets**
```
export default {
  ...
  argTypes: {
    propName: {
      ...
      description: `some text

4 spaces does not help

    object: {
      key: value;
    }

triple backticks wont work too

\`\`\`
object: {
  key: value;
}
\`\`\`

some more text`;
      ...
    }
  }
}
```

**System**
>Environment Info:
>
>  System:
>    OS: macOS 10.15.7
>    CPU: (6) x64 Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
>  Binaries:
>    Node: 12.13.0 - /usr/local/bin/node
>    Yarn: 1.22.4 - /usr/local/bin/yarn
>    npm: 6.14.5 - /usr/local/bin/npm
>  Browsers:
>    Chrome: 86.0.4240.198
>    Firefox: 80.0.1
>    Safari: 14.0
>  npmPackages:
>    @storybook/addon-actions: ^6.1.0-rc.4 => 6.1.0-rc.4
>    @storybook/addon-controls: ^6.0.28 => 6.0.28
>    @storybook/addon-knobs: ^6.1.0-rc.4 => 6.1.0-rc.4
>    @storybook/addon-links: ^6.1.0-rc.4 => 6.1.0-rc.4
>    @storybook/addon-storysource: ^6.1.0-rc.4 => 6.1.0-rc.4
>    @storybook/addon-viewport: ^6.1.0-rc.4 => 6.1.0-rc.4
>    @storybook/addons: ^6.1.0-rc.4 => 6.1.0-rc.4
>    @storybook/cli: ^6.1.0-rc.4 => 6.1.0-rc.4
>    @storybook/preset-create-react-app: ^3.1.5 => 3.1.5
>    @storybook/react: ^6.1.0-rc.4 => 6.1.0-rc.4
>    @storybook/theming: ^6.1.0-rc.4 => 6.1.0-rc.4

**Additional context**
Maybe it is possible to add some css-modification for multiline code sections, to override `whitespace: nowrap;` or inject some styles for description cell if necessary?

**Edit**
Actually, the problem is sb's jss dont recognize `<pre><code /></pre>`
Possible solution is just add some `pre > code` jss, which will overwrite `whitespace: nowrap;` to `whitespace: pre;`

**Edit2**
Solved this with `<style />` section added into `./storybook/manager-head.html`. This works but looks hacky.
Repository: create-react-app
Issue: jest.setTimeout has no effect
Labels: needs triage,issue: bug report

### Describe the bug

When using `jest.setTimeout()` in a long-running async test, this has no effect in `create-react-app`.
When running the exact same test once in `create-react-app`, and once only using `jest` directly, the following error is thrown with `create-react-app`:
```
thrown: "Exceeded timeout of 5000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."
```
With `jest` alone, the test passes.

**This seems to be related to changes from `3.4.4` to `4.0.0`, since when running the same test against `react-scripts` version `3.4.4`, the test also passes.**

### Did you try recovering your dependencies?
Yes

### Which terms did you search for in User Guide?

`timeout`, `setTimeout` => no results

### Environment

```
Environment Info:

  current version of create-react-app: 4.0.0
  running from /Users/fm/.npm/_npx/61035/lib/node_modules/create-react-app

  System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  Binaries:
    Node: 12.19.0 - ~/.nvm/versions/node/v12.19.0/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v12.19.0/bin/npm
  Browsers:
    Chrome: 86.0.4240.198
    Edge: Not Found
    Firefox: 81.0.2
    Safari: 14.0.1
  npmPackages:
    react: 17.0.1 => 17.0.1 
    react-dom: 17.0.1 => 17.0.1 
    react-scripts: 4.0.0 => 4.0.0 
  npmGlobalPackages:
    create-react-app: Not Found
```

### Steps to reproduce

#### Jest only
1. Clone repository `issue-timeout-jest`
2. `npm install`
3. `npm run test`
(passes as expected)

#### with CRA
1. Clone repository `issue-timeout-cra`
2. `npm install`
3. `npm run test`

### Expected behavior

Test should pass:
```
Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
```

### Actual behavior

Test fails, the following error is thrown:
```
thrown: "Exceeded timeout of 5000 ms for a test.
    Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
```

### Reproducible demo

`issue-timeout-jest`: https://github.com/martinfrancois/issue-timeout-jest
`issue-timeout-cra`: https://github.com/martinfrancois/issue-timeout-cra
Repository: PowerToys
Issue: [FZ Editor] Displaying the monitors layout
Labels: FancyZones-Editor,Product-FancyZones,Priority-3

## 📝 Provide a description of the new feature

PT version: 613d1fdf2a1fc5d3055e6cc3a9c0d086d4b3d541

When using the new multi-monitor FancyZones editor #6562, the monitors should be drawn similarly to how they're drawn on the Windows 10 Display settings page. Since changing this impacts the UI perhaps it should be done after #6899 is merged.
Repository: youtube-dl
Issue: Howto convert unfinished .mp4.part to .mp4
Labels: question

## Checklist

- [x] I'm asking a question
- [x] I've looked through the README and FAQ for similar questions
- [x] I've searched the bugtracker for similar questions including closed ones


## Question

I used youtube-dl to download a livestream but accidentally turned off my power in the middle. Now I have an 1GB .mp4.part file on my disk. I already tried to open it with VLC player and repairing it with [untrunc](https://github.com/ponchio/untrunc) but it does not work. I assume youtube-dl has it's own file format the .part file written to disk. Obviously I can not just redownload because it has been a live stream I was planning to watch later.

Is there a way to convert the unfinished .mp4.part file to a .mp4 file?
Repository: TypeScript
Issue: Review the project setup experience
Labels: Suggestion,Needs Proposal,Rescheduled

Today, `tsc --init` creates a big-ol' file that is super intimidating. We try to provide comments and blocks of sections to give people a clear separation of config concerns. We also provide a link to https://aka.ms/tsconfig.json.

We also have a belief that most people don't even use `tsc --init`.

That said, there are problems, and `tsc --init` doesn't make it totally clear what the "best practices" are for starting a project. Things that are missing:

* Project layout guidance (e.g. `src`, `tsconfig` naming)
* "well known"/"blessed" flags as opposed to just ONE BIG PAGE of ALL THE FLAGS 😨
* Easy way to find the information regardless of whether a user used `tsc --init`

In short:

* Docs for tsconfig.json "getting started"
* Link to that in generated tsconfig.json
* Re-evaluate generated tsconfig content.
Repository: TypeScript
Issue: `typeof class`
Labels: Suggestion,Needs Proposal,Awaiting More Feedback

@ahejlsberg has had a few experiments to try to make it easier to describe the type of a class. Specifically:

* avoiding the awkward static/instance pattern that users need to write on anonymous object types/interface types

  ```ts
  var Thing: {
    new () => {
      instanceField: number;
    }
    staticField: string;
  }
  ```
* allowing users to describe types with class-specific characteristics (e.g. `abstract`)

The idea is to allow `typeof` to be followed by a class expression.

```ts
var Thing: typeof class Thing {
  static staticField: string;

  instanceField: number;
  constructor() {}
}
```

There are definitely some subtleties here. For example, handling loops and whether this syntax is allowed in JSDoc with a TypeScript-annotated class:

```js
/** @type { typeof class C<T> { x: T } } */
//                        ^^^    ^^^
// TypeScript type parameters and annotations
// Are these allowed?
var Thing;
```
Repository: rust
Issue: inaccurate const drop error doesn't mention #![feature(const_precise_live_drops)]
Labels: C-enhancement,A-diagnostics,A-destructors,T-compiler,A-const-eval

```rust
struct Test<T>(T);

impl<T> Test<T> {
    const fn unpack(self) -> T {
        self.0
    }
}
```

([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=47781313c3e1482de4802cbc4f56a548))

Errors:

```
   Compiling playground v0.0.1 (/playground)
error[E0493]: destructors cannot be evaluated at compile-time
 --> src/lib.rs:4:21
  |
4 |     const fn unpack(self) -> T {
  |                     ^^^^ constant functions cannot evaluate destructors
5 |         self.0
6 |     }
  |     - value is dropped here

error: aborting due to previous error

For more information about this error, try `rustc --explain E0493`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.

```

However, no destructors are actually ran, as can be seen in the MIR output:
```
fn <impl at src/lib.rs:3:1: 7:2>::unpack(_1: Test<T>) -> T {
    debug self => _1;                    // in scope 0 at src/lib.rs:4:15: 4:19
    let mut _0: T;                       // return place in scope 0 at src/lib.rs:4:24: 4:25

    bb0: {
        _0 = move (_1.0: T);             // scope 0 at src/lib.rs:5:9: 5:15
        return;                          // scope 0 at src/lib.rs:6:6: 6:6
    }
}
```

The same effect can be observed if the field access is replaced by pattern matching, either in `let` or `match`.
Repository: godot
Issue: GDScript is unable to recognise string paths from other scripts 
Labels: bug,topic:gdscript

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
3.2.3 Stable Steam

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Windows 10

**Issue description:**
<!-- What happened, and what was expected. -->
I have a simple Autoload that stores path to a scene I want to load. 

![Capture](https://user-images.githubusercontent.com/30668026/99549023-26b0c000-29b1-11eb-8ef6-0763a59d7436.PNG)

In a main scene I want to be able to load this path as packed scene using

 	onready var scene_to_load: PackedScene = preload(Autoload.scene_to_load_path)

however editor throws error: `expected string constant as "preload" argument` despite the fact that `Autoload.scene_to_load_path` is a string constant

Strangely enough adding extra line makes it work just fine even though above and this are effectively the same thing. 

	const scene_path: String = Autoload.scene_to_load_path
	onready var scene_to_load: PackedScene = preload(scene_path)


![1](https://user-images.githubusercontent.com/30668026/99549365-7a230e00-29b1-11eb-9d9e-ff4218a7d9d3.PNG)


**Steps to reproduce:**

In attached file  remove the comment in main scene and try playing it. 

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->

[SceneBug.zip](https://github.com/godotengine/godot/files/5561009/SceneBug.zip)
Repository: youtube-dl
Issue: Get YT public playlist duration/length
Labels: request

Feature request to get duration or length of public YT playlist, example:
```
youtube-dl --playlist-duration https://www.youtube.com/playlist?list=PLI_TwOrHUsI8MQNW0BvBAwwHYKgyiiiDB
```
Repository: rust
Issue: Test that rustdoc preserves color output in doctests
Labels: A-testsuite,T-rustdoc,A-doctests

The most accurate but hardest way is probably snapshot testing, like taking the image snapshot of the colors. Maybe we can just set the environment variables, and detect the colors ascii codes in standard output?

_Originally posted by @pickfire in https://github.com/rust-lang/rust/issues/74293#issuecomment-729484859_
Repository: godot
Issue: Is there a way to let the _draw() function take effect immediately?
Labels: discussion,topic:gui

I want to find a way to update the canvas immediately, but update()  will be called on idle time. I saw the code of update(), the drawn callback was added to the MessageQueue. Is there any way to implement the flush() function in MessageQueue in GDScript, or implement the callback function _update_callback()? This is the way I thought of implementing this function without modifying the source code.
Repository: three.js
Issue: Ability to cancel ongoing HTTP requests in loaders
Labels: Enhancement,Loaders

<!-- Ignoring this template may result in your feature request getting deleted -->

**Is your feature request related to a problem? Please describe.**

Currently it's not possible to cancel ongoing HTTP requests made by loaders. This can be an issue when paper.js is used in a context where users can navigate between models (e.g.: a 3D model gallery).

**Describe the solution you'd like**

An abort/cancel method on the loaders or on LoadingManager would be a great way to allow developers control to cancel requests that are no longer needed.

**Describe alternatives you've considered**

I created a local version of the loader I'm using (PLYLoader) and returned result of FileLoader on the load method. This works in my use-case as I'm not using caching or data urls however as I learned from #10712 file loader doesn't always return an XMLHTTPRequest so it's not a good generic solution. I raised PR #20703 with these changes but closed it because of aforementioned issues.

**Additional context**
Another related PR: #9600
Repository: deno
Issue: Windows 10 ARM
Labels: build,suggestion

What is the timeline for Windows 10 ARM?
Repository: pytorch
Issue: [JIT] Contained Module Attributes should be recursively compiled
Labels: oncall: jit

## 🐛 Bug

When an nn.Module is a contained in an attribute of another nn.Module, we should be recursively scripting it. 

## To Reproduce
```
import torch
from torch import nn

class M(nn.Module):
    def __init__(self):
        super(M, self).__init__()

    def forward(self, x):
        return x + 2

class N(nn.Module):
    def __init__(self):
        super(N, self).__init__()
        self.cells = (M(), M())

    def forward(self, x):
        for cell in self.cells:
            x = cell[x]
        return x

torch.jit.script(N())
```
>  'N' has no attribute 'cells' (This attribute exists on the Python module, but we failed to convert Python type: 'tuple' to a TorchScript type.):

## Expected behavior

Successfully compiles. 

Context: fb internal user recently ran into this, and it has come up another time as well. 

cc @gmagogsfm