sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: Problem with nested ControlValueAccessor and Validation
Labels: area: forms,state: confirmed,forms: validators,P3

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

forms

### Is this a regression?

No

### Description

In Reactive Forms, if you have two or more nested custom form components that implement ControlValueAccessor and Validator, the outer one doesn't update its validation status until you make a change in the inner component.

It seems the validation runs initially only once from the outer component to the inner one, so if the inner component initially is invalid the outer doesn't know anything until the next validation cycle.

In the example provided, initially "user-data" is invalid, so "complex-form" should be also invalid, but as you can see it updates its status once you start typing in the input fields.

<img width="719" alt="status" src="https://user-images.githubusercontent.com/43267825/125175018-bd90ed80-e1c9-11eb-867d-7233349e3ef1.png">


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

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

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in

```true
Angular 12.0.5
```


### Anything else?

_No response_
Repository: rust
Issue: rustdoc: When rendering const values, show ADTs in addition to primitives.
Labels: T-rustdoc,C-enhancement,A-rustdoc-ui

When rustdoc renders a `const` item, it will print the actual (evaluated) value for primitives. For example, https://doc.rust-lang.org/std/i32/constant.MAX.html:


![const_val](https://user-images.githubusercontent.com/1408859/125175711-c5d23400-e19b-11eb-9c9e-cdbd84bcbf6b.png)

It would be useful to do the same for ADT values (structs, enums, and unions). For example:

```rust
struct Foo { val: bool }
const fn make_foo() { Foo { val: true } }`
const FOO: Foo = make_foo()
```

would print something like:

```
Foo {
    val: true
}
```

on the page for `FOO`.

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"Stupremee"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: terminal
Issue: Memory leak and other issues when saving settings
Labels: Help Wanted,Issue-Bug,Product-Terminal,Priority-1,Area-SettingsUI,External-Blocked-WinUI3

### Windows Terminal version (or Windows build number)

1.8.1521.0 (also observed on source build 2021-07-11)

### Other Software

_No response_

### Steps to reproduce

Open the settings dialog and spam click save. No option needs to be changed.


Video: 13 seconds in, the settings could not be reloaded from file (not sure if it is not loading or file corruption).
https://user-images.githubusercontent.com/2277504/125179830-a31f3a00-e1f2-11eb-8b6f-6f6aa07896c5.mp4



### Expected Behavior

Memory stays roughly the same, settings file can be loaded after saving, main UI does not extend past its borders.

### Actual Behavior

Memory grows and is not reclaimed, settings file can sometimes not be loaded after saving, UI grows past its borders during reloading.

(Second and third only discovered after deciding to record a video for the memory leak)

Not sure if you want separate tracking issues for these, let me know.
Repository: terminal
Issue: Reduce virtual function usage to mitigate performance penalty due to CFG
Labels: Issue-Feature,Area-Performance,Product-Conpty,Product-Terminal

### What is CFG?

[Control Flow Guard (CFG)](https://docs.microsoft.com/en-us/windows/win32/secbp/control-flow-guard) is MSVC/Win32 feature that can combat memory exploits & vulnerabilities. I found this accidentally when I was exploring the performance bottleneck in #10564. I found that even if I replace the entire `GetPatternId` with `return 0`, that call is still very expensive. Then I realized it's not about what's inside the call, it's about the call *itself*. For every virtual function call, the compiler will insert the following instruction before the call:

```asm
call __guard_dispatch_icall_fptr, [SomeMethod]
```

This will then leads to several extra instructions before calling the actual method.

### Disabling CFG

CFG can be disabled in the system setting (restart required). With CFG disabled system-wide, the `call __guard_dispatch_icall_fptr` will simple return quickly without the extra instructions.

CFG can also be disabled in compiler option `(/guard:cf)`. I failed to actually disable this in WT for some reason. I suppose with the option disabled, no `__guard_dispatch_icall_fptr` will be inserted any more.

### Proposed solution

OK here's my refurbished plan;

1. Remove all render related methods in `IRenderEngine` and replace them with a single method `PaintFrame(IRenderData *pData)` (#10615)
1. Replace `InvalidateSomething` methods in `IRenderEngine` with `TriggerSomething` to give the actual engine more control & reduce the coupling with `renderer.cpp`.
1. Let's see what we can do for the left methods.

CC @DHowett @miniksa @zadjii-msft @lhecker for discussion.
Repository: terminal
Issue: Run SVG files through a normalizer
Labels: Help Wanted,Product-Terminal,Issue-Task,Area-CodeHealth

There is inconsistency between the various SVGs the project uses.

Per https://github.com/microsoft/terminal/pull/9226#pullrequestreview-594682229

> We should probably run these through an SVG normalizer.

There may be other `.svg` files elsewhere in the project, but some are found here:

https://github.com/microsoft/terminal/tree/main/res/terminal

I have no normalizer to suggest.
Repository: rust
Issue: Tracking Issue for Iterator::try_reduce (feature iterator_try_reduce)
Labels: T-libs-api,C-tracking-issue

Feature gate: `#![feature(iterator_try_reduce)]`

This is a tracking issue for adding a `try_reduce` method to the `Iterator`trait. There is `fold`and `try_fold` but only `reduce`. It's possible for users to use `try_fold` directly but it's also possible to use `fold` directly instead of `reduce`. I reason that if `reduce` exists that a fallible `try_reduce` should also exist to encourage the safe handling of errors.

I use the `Try` trait as suggested by @sinkuu [here](https://github.com/rust-lang/rust/pull/63177#issuecomment-517117865) for a similar feature.

### Steps / History

- [x] Implementation: #87054
- [ ] Final comment period (FCP)
- [ ] Stabilization PR


### Unresolved Questions

- None yet.
Repository: TypeScript
Issue: Allow non-readonly properties to be used in aliased conditional expressions
Labels: Suggestion,Awaiting More Feedback

# Suggestion

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

## 🔍 Search Terms

aliased conditional expressions condition control flow readonly property

## ⭐ Suggestion
Some beta feedback. I was excited to try out TypeScript 4.4 because it provided [control flow analysis of aliased conditions](https://devblogs.microsoft.com/typescript/announcing-typescript-4-4-beta/#cfa-aliased-conditions) but was disappointed to learn that it only works for `readonly` properties [as mentioned in the implementation PR](https://github.com/microsoft/TypeScript/pull/44730#issuecomment-868703811). I get the justification; unfortunately, I don’t use `readonly` because I don’t think the weak immutability guarantees which the modifier provides are worth the syntax noise or annoying assignability errors.

## 📃 Motivating Example
I digress. Limiting control flow analysis to readonly properties makes code like the following not work, which I would argue is somewhat surprising.

```ts
interface A {
  prop: string | undefined;
}

declare const a: A;
// this works
if (a.prop !== undefined) {
	const b: string = a.prop;
	console.log(b);
}

const hasProp = a.prop !== undefined;
// this errors
if (hasProp) {
	const b: string = a.prop;
	console.log(b);
}
```

## 💻 Use Cases

I just want to write code which can take advantage of aliased property checks without having to use the TypeScript’s `readonly` modifier.

Maybe we could assume some basic things about JavaScript object properties for the sake of developer experience. For instance, we could assume that non-getter property test aliases are safe to use in control flow analysis so long as the property is not directly reassigned.

In any case, I think adding this caveat to blog posts and all marketing copy describing the feature would be wise, because I will likely not be the last person to be confused by this limitation, and many TypeScript features are only documented in release notes.
Repository: pytorch
Issue: Adding 'differentiable' section to each function docstring
Labels: module: docs,module: autograd,triaged

## 🚀 Feature

Adding 'differentiable' section to each function docstring.

## Motivation

Many times I find my self wonder if specific function is differentiable or not. It can also be the place to describe other autograd issues, for example: 
- Differentiable withe respect to which one of the inputs.
- Twice differentiable.  
- Any related issues.

## Pitch

Each function docstring contain 'Differentiable' section



cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7 @brianjo @mruberry
Repository: create-react-app
Issue: Specify a list of packages in SKIP_PREFLIGHT_CHECK instead of using a boolean
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

Sometimes, I would like to skip preflight check for specific dependencies. Dev dependencies such as `eslint` to not represent a major risk to skip during preflight. This is handy in monorepos where you have a global `eslint` config at the root of your project.

### Describe the solution you'd like

Support a comma-separated list of package names in the `SKIP_PREFLIGHT_CHECK` variable:

```
SKIP_PREFLIGHT_CHECK=eslint,...
```

### Describe alternatives you've considered

Right now I either set or uninstall dependencies in parent project.

```
SKIP_PREFLIGHT_CHECK=true
```

<!--
### Additional context
-->
Repository: pytorch
Issue: Buggy page with overlapped tabs
Labels: module: docs,triaged

## 🐛 Bug

The page of [this link](https://pytorch.org/vision/0.8/_modules/torchvision/models/resnet.html) seems have bugs on tab settings - on my computer the "Models" and "Tools & Libraries" tabs are overlapped with the main content.

## To Reproduce

Steps to reproduce the behavior:

Open the link above in Safari or Chrome.

OS: MacOS, Big Sur


cc @brianjo @mruberry
Repository: TypeScript
Issue: Two way assignability condition with generic params is not working as expected
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

assignability, ternary, conditions, generics

<!--
  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 the behavior in every version I tried

### ⏯ 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.3.5#code/C4TwDgpgBAcgrgWwEYQE4EkBmBRAHsCAOwBMBnAHgBUAaKAVQD4oBeKSqCfIs+qAfl6cCJUm35RCiFKigAuKKWCoAloQDmchUtVqA3AChMcQgGNgygPaEomcgHEGACgCUUAN76oUE1cVRc8vDIaFh4wmT2tA4sUACMBgC+QA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
type NumberIfExtends<T, U> = T extends U ? U extends T ? number : string : string;
function f<G>() {
  const x: NumberIfExtends<G, G> = 1;
}
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->
The value 1 is not assignable to variable x, with the following error: `Type 'number' is not assignable to type 'NumberIfExtends<G, G>'.`

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->
This should be assignable, since the the value passed to both T and U generic params is the same. 

Please note the following very similar examples, that works without errors. 
This is to show this is a minimal reproduction, and that the different do not justify the error:
```ts
type NumberIfExtends<T, U> = T extends U ? U extends T ? number : string : string;
const x: NumberIfExtends<'some type', 'some type'> = 1; // if I pass an explicit type (Not a generic)
```

```ts
type NumberIfExtends<T, U> = T extends U ? number : string; // if I use the condition in only one way. 
function f<G>() {
  const x: NumberIfExtends<G, G> = 1;
}
```

```ts
function f<G>(): void {
  const x: G extends G ? G extends G ? number : string : string = 1; // if I define the type without an alias. This is not always possible if instead of defining a variable I would be passing the value to a function who defines its own type
}
```
Repository: pytorch
Issue: MemoryError with pip Install even with --no-cache-dir option
Labels: module: binaries,triaged

16 GB Empty space in the disk.  Does it take much longer than that ?

Similar to [#25164](https://github.com/pytorch/pytorch/issues/25164) ?


```
Collecting torch<2.0.0,>=1.4.0 (from lm-scorer)
  Downloading https://files.pythonhosted.org/packages/a1/1f/a372f2e9f0a54fc479fcee3ac072f8cd5091054e9d7293dd4372338e5277/torch-1.9.0-cp36-cp36m-manylinux1_x86_64.whl (831.4MB)
    100% |################################| 831.4MB 62.0MB/
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 346, in run
    requirement_set.prepare_files(finder)
  File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 381, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 623, in _prepare_file
    session=self.session, hashes=hashes)
  File "/usr/lib/python3.6/site-packages/pip/download.py", line 821, in unpack_url
    hashes=hashes
  File "/usr/lib/python3.6/site-packages/pip/download.py", line 663, in unpack_http_url
    unpack_file(from_path, location, content_type, link)
  File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 609, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 498, in unzip_file
    data = zip.read(name)
  File "/usr/lib64/python3.6/zipfile.py", line 1338, in read
    return fp.read()
  File "/usr/lib64/python3.6/zipfile.py", line 858, in read
    buf += self._read1(self.MAX_N)
  File "/usr/lib64/python3.6/zipfile.py", line 948, in _read1
    data = self._decompressor.decompress(data, n)
MemoryError
```

cc @ezyang @seemethere @malfet @walterddr
Repository: PowerToys
Issue: [Feature Request] Smarter Startup Apps...
Labels: Idea-New PowerToy

Is there a way to have a smarter way of utilising applications that start with Windows?

I use my PC for both work and non-work purposes, and while I do my day job, having Slack and Teams and some other work related items start when Windows starts is a useful way of getting into a working day.

...however, on a Saturday/ Sunday/ outside of working hours those are the exact kind of apps I don't want to see!

Is there a PowerToy implementation that could be used for managing _if_ a startup app should execute based on some rules? 

i.e. a working day rule which could look something like this:

``
if {current Day} is with the {range} (Monday to Friday for example)
and {current Time} is within my {working day} (0900 to 1700), including an {offset} (+/- 1 hour either side)
then start the {app}.
```
Repository: TypeScript
Issue: should allow type predicates when `isType(badInput as any)`
Labels: Suggestion,Awaiting More Feedback

# 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.
-->

### 🕗 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 changed between versions ______ and _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- 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.
-->
https://www.typescriptlang.org/play?#code/LAKAZgrgdgxgLgSwPZQAQIM4EEBOOCGAngBQJQAOEcAXKvlIQNoC6qAPqlBALYBGApjgCUtMpTjoMdBi1ABvUAEgc-OBBxo4OCP1ABfUKAA2q1L3wATAJIUqtDFrIBzANyGQCMKlLY8RYubWthL4UvSEQkLySoE24gB0AFZIZMQA5GlRIAYgoAD0eagAAnAYALQITlBIKqCe3pi4BCSxwZHRIIqtCcmpGVk5QA

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
function isArray(input: any[] | number): input is any[]
{
	return true
}

let badInput: string;

if (isArray(badInput as any))
{
	badInput.join('')
}

// @ts-ignore
if (isArray(badInput))
{
	badInput.join('')
}
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->

![image](https://user-images.githubusercontent.com/167966/125197807-bcc38e80-e291-11eb-9763-db4db5e784f1.png)


### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->

badInput should know as array when use `as any`

```ts
if (isArray(badInput as any))
{
	badInput.join('')
}
```
Repository: PowerToys
Issue: Power Rename - Option - Enumerate Items - Duplicates Only
Labels: Idea-Enhancement,Product-PowerRename

### Description of the new feature / enhancement

Add a sub-options to the Enumerate Items option:

Duplicates Only - If item names end up being duplicated by the renaming process, the Enumeration will be applied only to the duplicated items in the renaming sequence and reset back to 1 at the start of each sequence of duplicated names.  For example - foo.txt, foo.txt, foo.txt, foobar.txt, foobar.txt, foobar.txt - becomes foo(1) .txt, foo(2).txt, foo(3).txt, foobar(1).txt, foobar(2).txt, foobar(3).txt

### Scenario when this would be used?

Duplicates Only - would be used where the Actor wants only resulting duplicate file names to be enumerated to differentiating between them, without having to number every file being renamed.  Resetting the number count to one at the start of each sequence of duplicated names will have the added benefit of avoiding the enumeration reaching a high number count where large numbers of files are renamed.

### Supporting information

As part of a task of maintaining 30,000 or so photographic images that over time have been renamed in various ways, I wanted to standardise the naming of them to reflect the initials of the person who owns each photograph and it's creation date and time.  I wanted each name to be unique, but during the preview of renaming the files with I noted there where many duplicated names because the $YYYY$MM$DD$hh$mm$ss$fff sequence had a zero $fff component (000).  I wanted to use enumeration but this meant all files would be enumerated which was unnecessary, when all I really needed was unique file names, as opposed to a large list of sequentially numbered items.
Repository: node
Issue: execFileSync() causes different behaviour for some software
Labels: child_process

### Version

v14.17.2

### Platform

Linux SRV01 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

### Subsystem

child_process

### What steps will reproduce the bug?

I'll use an example where this goes wrong.

1. Compile [`test.c`](https://gist.github.com/0x2b00b1e5/367630379248098a8a6ed16226997a51) for your own platform
2. Create a file, the length doesn't matter.
3. Run the compiled binary using `./bin the_file` with your favorite shell. Observe as it prints the size
4. Run the compiled binary using `child_process.execFileSync("./bin", "the_file");`. Observe as it prints the size.



### How often does it reproduce? Is there a required condition?
So far only when I run it as a script (`node app.js`)

### What is the expected behavior?

Both output the same length.

### What do you see instead?

When executed with execSync, the calculated length is always 0.

### Additional information

_No response_
Repository: godot
Issue: AnimatedSprite.playing and .frame returns Nil.
Labels: bug,confirmed,topic:animation

### Godot version

3.3.2.stable.oficial

### System information

Windows 10, GLES3, NVIDIA GeForce GT 540M, graphics driver version 23.21.13.9135, Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz

### Issue description

Accessing AnimatedSprite.playing and AnimatedSprite.playing can return Nil. In a certain situation changing AnimatedSprite animation suspends the program.
![issue](https://user-images.githubusercontent.com/84321760/125203532-02279200-e279-11eb-896f-aaf9cbbf32e7.png)




### Steps to reproduce

I have included a minimal reproduction project. When running project, it breaks, and shows error: cannot convert Nil to String, at line: push_warning($AnimatedSprite.playing).
After deleting the line, project breaks, and shows the same error at line: push_warning($AnimatedSprite.frame)
After deleting both lines, project suspends while executing.

### Minimal reproduction project

[AnimatedSprite_returns_Nil.zip](https://github.com/godotengine/godot/files/6797296/AnimatedSprite_returns_Nil.zip)