sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: prettify complex type display (for generic-heavy types)
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms

https://github.com/microsoft/TypeScript/labels/Domain%3A%20Type%20Display
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion

give indentations + line-changes on type representation. User config for this might be an option.

## Examples

suppose I have some generic-heavy function `someFunc` that returns 

```
const a = someFunc();
// typeof a = RootGeneric<GenericA, GenericB<number, SubGenericB_A<number> ...
//  full type not shown 😭 
```

A better output can be:

```
// typeof a = 
RootGeneric<
    GenericA, 
    GenericB<
        number, 
        SubGenericB_A<number> ...
```

more things:

+ editors can implement "expand(+)" buttons ? \
   (collapsed-tree-view)

<!-- Show how this would be used and what the behavior would be -->

## Checklist

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, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: material-ui
Issue: [material-ui][docs] Document the correct way to extend a component
Labels: docs,typescript

We are using Material-UI as the base of a project, but are running in to issues extending components

```
import { Link, LinkProps } from "@material-ui/core";

export const HnLink = Link;
```
Works fine

```
import { Link, LinkProps } from "@material-ui/core";

export const HnLink: React.FC<LinkProps> = props => {
  // Some extra functionality
  return <Link {...props} />
}
```

Does not accept `component` and `to` props, resulting in TypeScript errors.
```
Type '{ to: string; component: typeof Link; }' is not assignable to type 'IntrinsicAttributes & AnchorHTMLAttributes<HTMLAnchorElement> & Pick<OverrideProps<TypographyTypeMap<{}, "span">, "span">, "ref" | ... 262 more ... | "variantMapping"> & { ...; } & CommonProps<...> & Pick<...> & { ...; }'.
  Property 'to' does not exist on type 'IntrinsicAttributes & AnchorHTMLAttributes<HTMLAnchorElement> & Pick<OverrideProps<TypographyTypeMap<{}, "span">, "span">, "ref" | ... 262 more ... | "variantMapping"> & { ...; } & CommonProps<...> & Pick<...> & { ...; }'.ts(2322)
```


The same is true of Tabs, wherein wrapping Tabs in our own component causes onChange to not be accepted
```
Type '(event: ChangeEvent<{}>, value: number) => void' is not assignable to type '((event: ChangeEvent<{}>, value: any) => void) & ((event: FormEvent<HTMLButtonElement>) => void)'.
  Type '(event: ChangeEvent<{}>, value: number) => void' is not assignable to type '(event: FormEvent<HTMLButtonElement>) => void'.ts(2322)
```
As also seen here: https://github.com/mui-org/material-ui/issues/17454


Is there a 'correct' way to wrap a Material-UI component that can alleviate typing issues?
Repository: rust
Issue: false positive "trait already implemented" (E0371)
Labels: A-trait-system,T-compiler,C-bug

While investigating #68564, I found a real bug.


https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=c959b9e4ee176c4430586425307787ec

```rust
pub trait Fold<T: ?Sized> {
    fn fold(&mut self, node: T) -> T;
}

struct A;
struct B;

impl Fold<A> for dyn Fold<B> {}
```
It results in an error even on stable.

`Fold<A>` and `Fold<B>` is treated as a separate trait (#68564) while resolving, but treated as a same trait while verifying impl blocks.



```
   Compiling playground v0.0.1 (/playground)
error[E0371]: the object type `(dyn Fold<B> + 'static)` automatically implements the trait `Fold`
  --> src/lib.rs:11:1
   |
11 | impl Fold<A> for dyn Fold<B> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Fold<B> + 'static)` automatically implements trait `Fold`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0371`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.
```
Repository: pytorch
Issue: Documentation is not loaded by IDEs
Labels: module: docs,triaged

## 🐛 Bug

The documentation of torch functions (e.g. `torch.sort`, `torch.max`) and the class `torch.Tensor` is not loaded by common IDEs as PyCharm and Visual Studio Code.
The documentation of other modules (e.g. `torch.nn`, `torch.optim`) is loaded correctly.

The problem seems to be related to dynamic documentation which is not supported by IDEs (static docs are not inserted in `torch.__init__.pyi`). The (dynamic) documentation is loaded correctly in python consoles only.
Please see the related PyCharm issue.


## To Reproduce

Steps to reproduce the behavior:

1. Create a new Python project with PyCharm or Visual Studio Code
1. Import torch
1. Start typing a torch function or a tensor method (e.g. `torch.sort`, `torch.ones', 'torch.ones().max`). An empty documentation popup will be opened.
The same behavior occurs with keyboard shortcuts (PyCharm: `Ctrl+Q`, Visual Studio Code: `Ctrl+K, Ctrl+I`)

## Expected behavior

Static documentation should be available for every torch module to support documentation loading by IDEs.

## Environment

 - PyTorch Version (e.g., 1.0): 1.2.0, 1.3.1, 1.4.0
 - OS (e.g., Linux): Windows and Linux
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source):
 - Python version: 3.6
 - CUDA/cuDNN version: 10
 - GPU models and configuration: 1080Ti
 - Any other relevant information: PyCharm 2019.3.2, Visual Studio Code 1.41.1

## Additional context

Related PyCharm issue: [https://youtrack.jetbrains.com/issue/PY-40262](https://youtrack.jetbrains.com/issue/PY-40262)
Repository: rust
Issue: 'Referencing function in another module` error when compiling for target wasm32-unknown-emscripten (debug mode)
Labels: A-LLVM,T-compiler,O-wasm,C-bug,O-emscripten

I'm trying to compile a Rust project that depends on the [`byte-slice-cast`](https://crates.io/crates/byte-slice-cast) crate, but I'm encountering a strange error. The same error pops up if having [`block-padding`](https://crates.io/crates/block-padding) as a dependency. You can find all the details in this issue: https://github.com/sdroege/byte-slice-cast/issues/13. As mentioned there, this only happens when compiling in debug mode, while release builds succeed.

Some info about the environment:
`rustc 1.40.0 (73528e339 2019-12-16)`
`emcc (Emscripten gcc/clang-like replacement) 1.39.1 ((unknown revision))`
Repository: excalidraw
Issue: Figure out a way to merge scene serializers
Labels: refactor

As discussed in https://github.com/excalidraw/excalidraw/pull/583#issuecomment-579734116, currently we use different scene serializers when storing to `localStorage`, and when saving to backend or JSON (file).

This means there is potential for unintended divergence, such as when we decide to persist additional state keys and forget to modify both serializers. Note that there's already a divergence: when storing to `localStorage`, we don't store `version` which we do in the other cases.

At the same time, we cannot simply use the same serializer, because we don't want to store the exact the same state (such as scroll position, etc.) in every situation.

Thus, we should figure out a way to mitigate (or minimize) the potential for unintended divergence ()

The helpers in question are:

- [`saveToLocalStorage()`](https://github.com/excalidraw/excalidraw/blob/82717bcedad3f9aa5860513dcf3994372a9073fc/src/scene/data.ts#L301) - when storing to `localStorage`.
- [`serializeAsJSON()`](https://github.com/excalidraw/excalidraw/blob/82717bcedad3f9aa5860513dcf3994372a9073fc/src/scene/data.ts#L29) - for everything else.
   
One way is to use a single API, but supply a list of keys to *omit* (i.e. using a blacklist, which will minimize the likelihood of omitting keys added in the future).
Repository: TypeScript
Issue: SkipLibCheck fails to work in multi-project set-up
Labels: Needs Investigation

**TypeScript Version:**  3.8. Beta

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
skiplibcheck

**Steps to reproduce**
1. Extract the attached zip file to a folder and open `repro.sln` in Visual Studio (I'm using 2019)
2. Expand the `npm` folder on project B and install the missing `@azure/storage-blob` package.
3. Rebuild the solution.

**Expected behavior:**
No build errors.

**Actual behavior:**
2 errors:
> error TS2740: Build:Type 'Buffer' is missing the following properties...
> error TS2345: Build:Argument of type 'ErrnoException' is not assignable...

**Explanation**
We want have a custom definition for NodeJS. The npm package imported in Project B also has its own (incomplete) definition. So, we've added `skiplibcheck` to all the projects.

Project B builds fine by itself.

Project C references some NodeJS types. Project C also builds fine by itself.

Project A references types from both B and C.

When attempting to build A, we get the error above. **But** the error is for project C.

Basically, when building Project A, the `skiplibcheck` option is being ignored and the incomplete NodeJS definition from the imported package is being used.

**Further Observations**
Curiously, if file `A/foo/bar.ts` is moved to `A/bar.ts` (and the imports amended) the build compiles fine.

**Attachment**
[Repro.zip](https://github.com/microsoft/TypeScript/files/4128129/Repro.zip)
Repository: material-ui
Issue: [system] Support new props with variants
Labels: new feature,waiting for 👍,package: system

Hi,
is this possible extend `PaperClassKey` and `PaperProps` with custom values?

I would like to get something like this:
```jsx
export const theme = createMuiTheme({
    overrides: {
        MuiPaper: {
            dark: {
                backgroundColor: COLORS.BLACK,
            },
            light: {
                backgroundColor: COLORS.WHITE,
            },
        },
    },
});
```
And using the component would look like this:
```
<Paper filled="dark" />
```
Repository: flutter
Issue: Framework classes should be able to take pictures instead of images
Labels: c: new feature,framework,P3,team-framework,triaged-framework

For example, https://api.flutter.dev/flutter/painting/BoxDecoration-class.html takes a `DecorationImage`, which expect to get a `ImageProvider` so that it can use `drawImage`.

But a user may want to paint a vector graphic as the decoration, which would be more suitable for `drawPicture` - or, alternatively, something like `drawPath`.

It would be nice if we could find a way to make things like `BoxDecoration` etc. to handle painting vector graphics.
Repository: TypeScript
Issue: Type bug: using mapped type (Partial) & this type & lookup type
Labels: Needs Investigation,Rescheduled

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  nightly

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** mapped type, Partial, this, lookup type

**Code**

```ts
class A {
  state = { foo: "foo", bar: 42 };

  something(): Partial<A["state"]> {
    return { foo: "changed" }; // works
  }
}

class B {
  state = { foo: "foo", bar: 42 };

  something(): Partial<this["state"]> {
    return { foo: "changed" }; // fails
  }
}

class C {
  state = { foo: "foo", bar: 42 };

  something(): Partial<this["state"]> {
    return { foo: "changed", bar: 123 }; // works
  }
}
```

**Expected behavior:**

Should type check.

**Actual behavior:**

```
Type '{ foo: "changed"; }' is not assignable to type 'Partial<this["state"]>'.(2322)
```

**Playground Link:** [Example](http://www.typescriptlang.org/play/?ts=3.8.0-dev.20200128&ssl=15&ssc=2&pln=9&pc=1#code/MYGwhgzhAECC0G8BQ1oQC5nQU2gXkWgDMB7EgLmgCJSSqAaaAIzACdKAWAJmgF8BuJCjQkAttnQALAJYA7AOYAKAJSUACm3TSwIADywA2lQxZsVALoA+RMNSsJAV1azCtSlWCSwC7ABMqfPzQAPTB0ADuJKwA1hDCvEgJSKCQMABCNqgmOPiuZO60DMxsnDwCQlliEjIKKuqa2npS0hBG2WZWmajQ9uhOLgjE+dSe3vJ+AQIhYURg0iBxqAlJKVDQAMJd7bmDbtSFjCzs0NyBFSLizbWq0BqsWjq6za3GmDgW1sjdPY7OeRQjLw+fyHErQACMXAAzIFphEorF4okgA)

**Related Issues:** Tried searching for `Partial this`, did not find anything related.
Repository: go
Issue: cmd/go: support POSIX jobserver
Labels: NeedsInvestigation,FeatureRequest

The automatic parallelism in `cmd/go` is wonderful when the command is used interactively. However, it interacts poorly when another build system is driving `cmd/go`. The driving build system cannot safely start multiple Go builds without overloading the system, and it cannot detect when a Go build is doing very little work so it should start other work.

GNU make has an elegant solution for this, the "jobserver." It is much simpler than the name suggests:

> On POSIX systems the jobserver is implemented as a simple UNIX pipe. The pipe will be pre-loaded with one single-character token for each available job. To obtain an extra slot you must read a single character from the jobserver pipe; to release a slot you must write a single character back into the jobserver pipe.

https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html

I would like to propose that `cmd/go` parses the environment variable `MAKEFLAGS` for `--jobserver-auth=R,W`, and if it finds valid FDs `R` and `W` then it uses tokens from the pipe to control its parallelism. This will make `cmd/go` play nicely with GNU make and other build systems that use the jobserver, like redo.
Repository: opencv
Issue: NaN comparison fails on certain image sizes
Labels: bug,priority: low,category: core,RFC

##### System information (version)

- OpenCV => 4.1.1
- Operating System / Platform => Ubuntu 18.04
- Compiler => Clang 9


##### Detailed description

Certain sizes of images fail when comparing for NaNs

##### Steps to reproduce

```.cpp
#include <opencv2/core.hpp>

int count_NaNs_in_image(int rows, int cols) {
    cv::Mat1f test(rows, cols);
    test.setTo(std::numeric_limits<float>::quiet_NaN());
    cv::Mat1b is_nan = test != test;
    return cv::countNonZero(is_nan);
}

int main() {
  assert(16 == count_NaNs_in_image(4, 4)); // succeeds
  assert(44 == count_NaNs_in_image(4, 11)); // fails with 12 NaNs found instead of 44?

  return 0;
}
```

##### Workaround

Invert the comparison, ie

```.cpp
int count_not_not_nans_in_image(int rows, int cols) {
    cv::Mat1f test(rows, cols);
    test.setTo(std::numeric_limits<float>::quiet_NaN());
    cv::Mat1b is_not_nan = test == test;
    return cv::countNonZero(255 - is_not_nan);
}
```
Repository: vscode
Issue: Call Hierarchy view doesn't show number of callers
Labels: feature-request,callhierarchy

- VSCode Version: 1.42 Insiders
- OS Version: Windows 10

Found while testing #89386

Would be nice to know how many callers, perhaps in the title bar. Something like "X Callers of 'Area'".

![image](https://user-images.githubusercontent.com/12818376/73386904-82745600-4284-11ea-9a1a-52bf813849a3.png)
Repository: angular
Issue: Styles from external components are included outside the scope of a shadow DOM component
Labels: type: bug/fix,freq1: low,area: core,state: has PR,core: CSS encapsulation,P3

# 🐞 bug report

### Affected Package

The issue is caused by package `@angular/platform-browser`

### Is this a regression?

No

### Description

When deploying an Angular component with `encapsulation: ViewEncapsulation.ShadowDom`, everything regarding the component should be kept inside the `#shadow-root`. This includes all stylings.

#### Actual behavior

1. Styles added by `styleUrls` or `styles` in the `@Component` decorator are added to the `#shadow-root` ✔️ 
2. Styles coming from external components like @angular/material are added to the `#shadow-root` ✔️ 
3. Styles coming from external components are *also* added to document's `<head>` outside of the `#shadow-root` ❌ 

#### Expected behavior

Only 1. and 2. should happen.

#### Root cause analysis

As far as I can see, this is caused by the `ShadowDomRenderer` using the `DomSharedStylesHost` which adds `_doc.head` to its list of known `_hostNodes` in the constructor:
https://github.com/angular/angular/blob/d43187f7ef7e841d84ecf594e8e515a9d534daaa/packages/platform-browser/src/dom/shared_styles_host.ts#L39

## 🔬 Minimal Reproduction

https://stackblitz.com/edit/angular-material-shadowdom-styles

In the `<head>` section there are `<style>` tags of Material components, which should only be inside the shadow DOM.

## 🌍  Your Environment

**Angular Version:**
<pre><code>
Angular CLI: 8.3.23
Node: 12.7.0
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.23
@angular-devkit/build-angular     0.803.23
@angular-devkit/build-optimizer   0.803.23
@angular-devkit/build-webpack     0.803.23
@angular-devkit/core              8.3.23
@angular-devkit/schematics        8.3.23
@angular/cdk                      8.2.3
@angular/cli                      8.3.23
@angular/material                 8.2.3
@ngtools/webpack                  8.3.23
@schematics/angular               8.3.23
@schematics/update                0.803.23
rxjs                              6.4.0
typescript                        3.5.3
webpack                           4.39.2
</code></pre>
Repository: flutter
Issue: ButtonThemeData does not allow changing elevation, even through subclassing.
Labels: framework,f: material design,c: proposal,P3,team-design,triaged-design

I'm building my second production app with Flutter, and one of our major goals with this project is to use more of the pre-built `material` widgets and existing theming capabilities. With our first app, most of the buttons are a `FlatButton` with a background color set. To adhere to our current goals, I want to replace those with `RaisedButton`, since `FlatButton` is defined as _not_ having a background color.

The issue we have at hand is this: if we use `FlatButton`, we cannot override the button color (`getButtonColor`), and if we use `RaisedButton`, we cannot override the elevation (`getElevation`), because neither are data-driven (they rely entirely on the incoming button's `Type` for internal logic) and in `theme_data.dart:337` Flutter rebuilds the button theme using the built-in `ButtonThemeData` type, so using an overriden `getButtonColor` or `getElevation` does not work as expected.

I'd rather this issue not turn into a discussion of _why_ I want a "raised" button to have an elevation of zero. That said, I'm open to any solution that results in:

- Using the built-in `material` Widgets as much as possible.
- Having access to a button with 0 elevation and a filled background.
Repository: vscode
Issue: aggregate Bug/Feature Requests *in editor* for more accurate community upvoting
Labels: question-discussion

Currently, feature requests need to receive 20 upvotes within 60 days to be officially added to the Backlog.  

This means that users who frequently browse open issues on GitHub will have a disproportionately large impact on which features are adopted.  

Users of VSCode who _don't_ come here won't even know that voting system exists, so the **upvote stats will be skewed.**

VSCode is committed to being the most accessible editor on the planet, and one component of that should be making _influencing its development_ accessible to everyone who uses the editor, not just those adept-at or inclined-to browse GitHub issues.  

-- Edited to separate the problem, above, from solution ideas, below, since the main thing I want to highlight is the problem of excluding some users from contributing to develop the editor. -- 

Thanks for considering!
Repository: pytorch
Issue: Comments Separating Class Methods from Different Classes in C++ Files
Labels: triaged,better-engineering

## 🚀 Feature
Throughout the PyTorch Distributed codebase (and PyTorch as a whole), a single C++ file may have member functions from several different classes. `process_group_agent.cpp` separates these with a simple one-line comment. This could be a good practice to standardize across the codebase for easier readability.

For Example:
```
//////////////////////////////  Work  /////////////////////////////////////

void ProcessGroup::Work::abort() {...}

bool ProcessGroup::Work::wait() {...}

//////////////////////////  ProcessGroup  /////////////////////////////////

ProcessGroup::ProcessGroup(int rank, int size) {...}

ProcessGroup::~ProcessGroup() {...}
```
Repository: pytorch
Issue: Implement Backend-Agnostic RPC functionality in RpcAgent
Labels: triaged,better-engineering,module: rpc

## 🚀 Feature
`ProcessGroupAgent` contains functionality that makes more sense in the `RpcAgent`. Moving general-purpose RPC functionality to the parent class will make for better abstractions in the RPC C++ codebase and ensures core functionality would be available for future communication backends.

## Motivation
In particular, the `futureTimeoutThread_` in ProcessGroupAgent, which cleans up timed out RPC's, the atomic variable `rpcRunning_`, and data structures to track stale RPC's such as the `futureTimeouts_` map are better implemented in a backend-agnostic fashion in `RpcAgent`. This will allow better integration with new features such as RPC Retries and will not need to be re-implemented for each new backend.


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528 @jjlilley @osalpekar
Repository: godot
Issue: Android debugging via USB switches screen 3.2
Labels: bug,topic:editor

**Godot version:**
3.2
**OS/device including version:**
Mac OS 14.6/Android 10
**Issue description:**
When I debug my 2d game on my android phone via USB, the tab sometimes randomly switches between 2d and script
**Steps to reproduce:**
Debug game on android via USB, go to different tabs and scenes in the editor. It will randomly switch back between 2d and the script tabs
**Minimal reproduction project:**