sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: material-ui
Issue: Cannot use MUI's styleProps pattern to pass variants to styled() in TypeScript projects
Labels: docs,typescript,package: system

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯

When using `styled()` to create styled components we need some way to pass things like `variant` props to the styles.

MUI's own internal code handles this by adding a `styleProps` prop and using that in styles. i.e. `styleProps={{variant}}` and then `styleProps.variant === 'foo'` in the style code.

However this does not work in projects written in TypeScript. `CreateMUIStyled` gets the props that are permitted from the component/tag you are forwarding props to. As a result the created component does not accept any prop other than the component's own props. So all styled-only props (styleProps, variant, etc...) are type errors.

## Expected Behavior 🤔

There should be some way to pass style props like variant to components made with `styled()` in a type safe way.

One possibility could be officially codifying the `styleProps` pattern and adding a `defaultStyleProps` to styled's options. Just like `CreateMUIStyled` infers props from the component/tag the type could be written in a way that `styleProp`'s type would be inferred by the type of the `defaultStyleProps` you pass.

## Steps to Reproduce 🕹

[![Edit cranky-bogdan-khxyt](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/cranky-bogdan-khxyt?fontsize=14&hidenavigation=1&theme=dark)

## Your Environment 🌎

<!--
  Run `npx @material-ui/envinfo` and post the results.
  If you encounter issues with TypeScript please include the used tsconfig.
-->
<details>
  <summary>`npx @material-ui/envinfo`</summary>
  
```

  System:
    OS: Linux 5.10 Ubuntu 20.10 (Groovy Gorilla)
  Binaries:
    Node: 16.5.0 - ~/.nvm/versions/node/v16.5.0/bin/node
    Yarn: 1.22.5 - /mnt/c/Program Files (x86)/Yarn/bin/yarn
    npm: 7.19.1 - ~/.nvm/versions/node/v16.5.0/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @emotion/react: ^11.4.0 => 11.4.0 
    @emotion/styled: ^11.3.0 => 11.3.0 
    @material-ui/core: ^5.0.0-beta.2 => 5.0.0-beta.2 
    @material-ui/icons: ^5.0.0-beta.1 => 5.0.0-beta.1 
    @material-ui/lab: ^5.0.0-alpha.41 => 5.0.0-alpha.41 
    @material-ui/private-theming:  5.0.0-beta.2 
    @material-ui/styled-engine:  5.0.0-beta.1 
    @material-ui/styles: ^5.0.0-beta.2 => 5.0.0-beta.2 
    @material-ui/system:  5.0.0-beta.2 
    @material-ui/types:  6.0.1 
    @material-ui/unstyled:  5.0.0-alpha.41 
    @material-ui/utils: ^5.0.0-beta.1 => 5.0.0-beta.1 
    @types/react: ^17.0.15 => 17.0.15 
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 
    styled-components:  5.2.1 
    typescript: ~4.2.0 => 4.2.4 

```
</details>
Repository: opencv
Issue: Win32 window shouldn't unconditionally intercept keys
Labels: category: highgui-gui,RFC,platform: win32

Currently, Win32 window objects [automatically and unconditionally intercept key codes for `Ctrl+C` and `Ctrl+S`](https://github.com/opencv/opencv/blob/85dde8a800fdb8c4b92bd9088174079cc5a4d416/modules/highgui/src/window_w32.cpp#L2224). That's a nice default, but the developers should be able to inhibit this behavior.

I'm developing a Python mini-app which has to save its own files, and `Ctrl+S` is such a standard key combination for saving data that it makes it really awkward, counter-intuitive, and error-prone to have to implement a different key combination for saving. `Ctrl+C` would also be useful for interrupting execution (if you want to interrupt the process running in the console you press `Ctrl+C`, but if you happen to have the window on top you end up copying to clipboard with the same key combination).

I think this could be implemented relatively easily by allowing for one or two more options for the flags in [`cv::namedWindow()`](https://docs.opencv.org/4.5.2/d7/dfc/group__highgui.html#ga5afdf8410934fd099df85c75b2e0888b), but I'm not a cpp developer, and I don't want to mess things up.
Repository: pytorch
Issue: [feature request] `torch.switch` (to mirror `lax.switch`) and `torch.cond` - with jax arithmetic coder as a case study
Labels: module: nn,triaged,needs research

Out of curiosity, what features are currently missing in PyTorch that make Jax a better choice for arithmetic coders in https://github.com/facebookresearch/NeuralCompression/blob/e1702923c97cc6c00cd8af4db2eb59f587c09e44/neuralcompression/entropy_coders/jax_arithemetic_coder.py ?

Related: https://github.com/pytorch/pytorch/issues/50688 https://github.com/pytorch/ao/issues/292 ?

cc @albanD @mruberry @jbschlosser
Repository: deno
Issue: Slow message passing between main and worker (4x slower than Node)
Labels: perf,feat,web

For a basic ping-pong like sending and receiving in succession 100_000 messages, Node is taking 1s and Deno is taking 4s for me. I was not expecting that much difference. Here is basically the content of `worker.mjs`:
```js
// deno_worker.mjs
self.onmessage = (msg) => {
  self.postMessage(msg.data);
};
```
And here is the content of `main.mjs`:
```js
// deno_main.mjs
let msgCount = 100000;
console.log("Sending", msgCount, " messages ...");

let worker = new Worker(new URL("./deno_worker.mjs", import.meta.url).href, {
  type: "module",
});

worker.onmessage = (msg) => {
  if (msg.data >= msgCount) {
    worker.terminate();
    Deno.exit();
  } else {
    worker.postMessage(msg.data + 1);
  }
};

worker.postMessage(0);
```

You can find [in that gist](https://gist.github.com/mpizenberg/f95c7c84288973b8055388a95bc7ed56) the exact files I'm using. I'm running the deno code and the node code with respectively:
```sh
time deno run --allow-read deno_main.mjs
time node node_main.mjs
```

My system:
- archlinux, kernel 5.13.4
- node v14.15.5
- deno 1.12.1
Repository: rust
Issue: Improve Vec::extend(repeat(once)) error output
Labels: A-diagnostics,T-compiler

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9bcb7aee0de0df58f05d8154a14ff96f

```rust
    let mut buffer: Vec<u8> = vec![];
    buffer.extend(
        std::iter::repeat(
            std::iter::once(0)  
        )
        .take(10)
    );
```

The current output is:

```
error[E0277]: the trait bound `Vec<u8>: Extend<std::iter::Once<{integer}>>` is not satisfied
 --> src/lib.rs:3:12
  |
3 |     buffer.extend(
  |            ^^^^^^ the trait `Extend<std::iter::Once<{integer}>>` is not implemented for `Vec<u8>`
  |
  = help: the following implementations were found:
            <Vec<T, A> as Extend<&'a T>>
            <Vec<T, A> as Extend<T>>
```


Not sure what Ideally the output should look like, maybe somehow detect the "once" here is not necessary and suggest removing it. The output is the same on nightly
Repository: create-react-app
Issue: Testing app was created with testing packages as regular dependencies
Labels: stale,needs triage,issue: bug report

I just installed and run the `create-react-app` package and it created the `package.json` file of the following contents:

```
{
  "name": "tcplugins-frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "4.0.3",
    "web-vitals": "^1.0.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

```

The issue is that it didn't put development packages like Jest to the dev dependencies but in production dependencies. Why so?
Repository: flutter
Issue: `Title` widget should have nullable `color`
Labels: framework,c: proposal,a: null-safety,P3,team-framework,triaged-framework

The [Title widget](https://api.flutter.dev/flutter/widgets/Title-class.html) currently requires a non-null `color` property.

As of https://github.com/flutter/engine/pull/26626 it's possible to pass a null value to `SystemChrome.setApplicationSwitcherDescription`, so the property can be made nullable.

On web especially, users might want to set a `Title` on every page, but it's annoying always having to provide a `color`.

I'm working on a PR for this.
Repository: pytorch
Issue: [Meta] Change default branch name to `main` for repos in `pytorch` project
Labels: module: bootcamp,triaged,module: infra

## Instructions:
This task can be done on a non-GPU computer and requires the actor to have internal access to these repos. 

Choose a repository from the list you'd like to tackle (assign yourself to the issue so there are no conflicts), and for that repository:
1. Verify that the repo is still active. If you suspect it is stale, please comment on this issue and tag @pytorch/pytorch-dev-infra to confirm. If it is determined to be stale, you should archive the repo entirely and not bother with the following steps.
2. Clone, fork, and checkout the repository to your local device for development. Follow the contributing instructions from the repo, if any.
3. Go through the repository and search for `master`. Replace instances with `main` or something more proper, as `master` will go away now. When you are done, put up a pull request and tag @pytorch/pytorch-dev-infra for review. Example: https://github.com/pytorch/ci-hud/pull/85. 
4. Link the PR to the issue you would resolve by adding a `Fixes #issue_num` in your PR body.
5. Go to the internal page of settings for the repo (can be done with bunnylol on a Meta computer `bunnylol oss pytorch/<reponame>`) and click to the `Branches` setting under `Policy and Security`. There should be a **Rename Default Branch** setting where you can rename the default branch! 
6. Rename master to main and merge your PR! 

## Repos:
According to [get_public_repos.py](https://gist.github.com/malfet/aefe35f9f644805af476ec73cc64503b)
 - [ ] #71806
 - [x] #71844
 - [ ] #71843
 - [ ] #71842
 - [ ] #71841
 - [ ] #71840
 - [ ] #71839
 - [ ] #71838
 - [ ] #71837
 - [ ] #71836
 - [ ] #71835
 - [ ] #71834
 - [ ] #71833
 - [ ] #71832
 - [ ] #71831
 - [ ] #71830
 - [x] #71829
 - [ ] #71828
 - [x] #71827
 - [ ] #71826
 - [ ] #71825
 - [ ] #71824
 - [ ] #71823
 - [ ] #71822
 - [ ] #71821
 - [ ] #71820
 - [ ] #71819
 - [ ] #71818
 - [ ] #71817
 - [ ] #71816
 - [ ] #71815
 - [ ] #71814
 - [ ] #71813
 - [ ] #71812
 - [x] #71811
 - [ ] #71810
  
DONE:
- [x] https://github.com/pytorch/ci-hud
- [x] https://github.com/pytorch/test-infra
- [x] https://github.com/pytorch/kineto
- [x] https://github.com/pytorch/probot
- [x] https://github.com/pytorch/audio
- [x] https://github.com/pytorch/vision
- [x] https://github.com/pytorch/text
- [x] https://github.com/pytorch/builder
- [x] https://github.com/pytorch/fairseq
- [x] https://github.com/pytorch/botorch
- [x] https://github.com/pytorch/opacus
- [x] https://github.com/pytorch/FBGEMM
- [x] https://github.com/pytorch/functorch
- [x] https://github.com/pytorch/data
- [x] https://github.com/pytorch/benchmark
- [x] https://github.com/pytorch/live
- [x] https://github.com/pytorch/ort
- [x] https://github.com/pytorch/tensorpipe
- [x] https://github.com/pytorch/hydra-torch
- [x] https://github.com/pytorch/torchx
Repository: TypeScript
Issue: unused type declaration causes totally unrelated error (Index signatures are incompatible)
Labels: Bug,Rescheduled

# Bug Report
 

### 🕗 Version & Regression Information

Getting same error on all versions I tried.

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?noUncheckedIndexedAccess=true&ts=4.3.5#code/JYOwLgpgTgZghgYwgAgEoRgHgApQ8AD2QgMhABMBnZSsKUAcwD5kBvAKGWQBI8YAuGnUYBuTsgAOfQoNz4CYgL7jkndmACeElADE9yALxtk8OIJABXALYAjaMkVj2AemfJgMZBoD2F5Am8rKwhwZDAAC2BqABtQFF8wMPCUaChvKGQAd2Bo6ORyKLgJbTgoFzcAOQB5ABUAUWQagAkASQBlRoBNbAb25Gqa5ABVNrqAEWQAQUHJgBlZ5EBeDcBGPfUtFABpSYBZFq2xgC0Go1ZkOEpyc8uLwXQAqHJMWnoQBgAaZD0dJhEHdnZyBAENFSigAiBaMgCIIOFw8JQJN4IRBKLcgelHs9GB9LLZoD9xDAiWj7pjhK8Pl8CY5-q53J4fH4AkEQokEiZgFBIYDgaU4GBgEjkN5PAADLa7fZHUVnCjICwgZnBUIRKLCkAQcqNJoNOqoVBVVDIADqLXm+UKxQgpSWqzpmm0yAle0mh2OxiunpuaHRDye5Penz0Pz+-3YVgstHQlG80QAbhB0DAABSnXgYQQAIkzHyk8iz8MRyMomYcHwIAEoxHSuLW6-WG42m02APptgB6nbbLa1kygDGsrOFngdKAA5KdC0jKCiSRj-S9A7i7FAQ0SBD7SQvsUHvr9FGP3NQQN5EudKMAGCA4DZoigwN5JHzgpAMiKwutkGO7vPM1Pizmm7zliFK7kwTBjgAdFqXA1Os1DvlI3jaFAmhfv+M6UIeoLuIqgQSPywC3hA0E1rWcGOt+vpkouOLWCuEFHsgJ5npQF5Xjed5hI+o5fj+fogYGVJQTB9YtBQJA0Je15gBY8JnHguHMgRArEaRbhNhR47LtAh5qixZxsdJnH3jxn5jl8In-DyIKKTACoIAKQoRlGKKxgmSaYIMJBkFQQi0cgABqTDJuIfBolgNRMG84jKUirKokBfo1B8-E0TuwVMOwFaCIFyAAD7yhJMBxOQYZAA)

### 💻 Code

```ts
interface Ref<Prefix extends string> {
  $ref: string;
  prefix: Prefix;
}
   
 
type FFF = { faa: number };

// if you comment this line out the error will disappear
// NOTE THIS TYPE IS NOT USED AT ALL 😱
type KAMIKADZE = { asdasdasd: Record<string, FFF>; }

declare const x: {
  responses: Record<string, number>;
  fff: Record<string, FFF>;
};

// if you comment out first declaration of `KAMIKADZE` and uncomment this one
// THE ERROR WILL disappear 😱
// type KAMIKADZE = { asdasdasd: Record<string, FFF>; }



mustResolveRef({ $ref: "", prefix: "responses" }, x);
//                                            ___^^^___
// Argument of type '{ responses: Record<string, number>; fff: Record<string, FFF>; }' is not assignable to parameter of type 'Record<"responses", Record<string, FFF>>'.
//   Types of property 'responses' are incompatible.
//     Type 'Record<string, number>' is not assignable to type 'Record<string, FFF>'.
//       Index signatures are incompatible.
//         Type 'number' is not assignable to type 'FFF'.


declare function mustResolveRef<T extends string, V>(
  ref: Ref<T>,
  components: Record<T, Record<string, V>>
): V | undefined
```

### 🙁 Actual behavior

Actual behavior is super strange. tried to express this in code comments.

### 🙂 Expected behavior

It's expected that, having some type declaration, that's not used and is not in conflict with anything, to not cause totally unrelated error.

Plus the error itself shouldn't be thrown as if I do this, all works fine:
```
const y: Pick<typeof x,"responses"> = x
mustResolveRef({ $ref: "", prefix: "responses" }, y);
```
Repository: angular
Issue: Input type is not inferred from base type
Labels: area: compiler,P4,compiler: template type-checking

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

compiler

### Is this a regression?

No

### Description

With `fullTemplateTypeCheck` enabled, input bindings are inferred as `any` type when the property is inherited from a base type in combination with `inputs` directive metadata.

```ts
class Base {
  // type inferred as "any" in template input binding
  name: string;
}

@Component({
  selector: 'hello',
  inputs: ['name']
})
export class HelloComponent extends Base {}
```

```ts
<hello [name]="3"></hello> // expect type error
```

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

https://stackblitz.com/edit/angular-ivy-tjprlj?file=src%2Fapp%2Fhello.component.ts

### Please provide the exception or error you saw

```true
Result: No type error.
Expected: Type error `Type 'number' is not assignable to type 'string'.`
```


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

```true
Angular 12.1.0
```


### Anything else?

It's possible to work around this with `ngAcceptInputType` but that's not very ergonomic. The desired behavior is for Angular to infer input types when it's not statically known (eg. mixins).
Repository: youtube-dl
Issue: Make auto sub work like on youtube
Labels: request

## Checklist

- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've searched the bugtracker for similar feature requests including closed ones


## Description

The problem: The auto sub doesn't work like on youtube. The subtitle should be "moving" every word the person has spoken, instead of a whole chunk.
How it can be fixed: For example, the person speak "Hello guys, welcome back to my channel". So the subtitle will be
```
00:00:00.000 --> 00:00:00.300
Hello

00:00:00.300 --> 00:00:00.600
Hello guys, 

00:00:00.600 --> 00:00:00.900
Hello guys, welcome

00:00:00.900 --> 00:00:01.200
Hello guys, welcome back

00:00:01.200 --> 00:00:01.500
Hello guys, welcome back to

00:00:01.500 --> 00:00:01.800
Hello guys, welcome back to my

00:00:01.800 --> 00:00:02.100
Hello guys, welcome back to my channel
```
So the subtitle "moving" every word the person has spoken
Repository: pytorch
Issue: FAIL: test_threshold (test_jit_fuser.TestFuser)
Labels: oncall: jit

pytorch/test# python -m unittest test_jit_fuser.TestFuser.test_threshold
Couldn't download test skip set, leaving all tests enabled...
F

FAIL: test_threshold (test_jit_fuser.TestFuser)

Traceback (most recent call last):
  File "/home/pytorch/test/test_jit_fuser.py", line 556, in test_threshold
    self.assertAllFused(scripted.graph_for(x))
  File "/home/pytorch/test/test_jit_fuser.py", line 49, in assertAllFused
    'got {}'.format(graph))
AssertionError: False is not true : got graph(%x.1 : Tensor):
  %26 : Double(6, strides=[1], requires_grad=0, device=cuda:0), %27 : bool = prim::TypeCheck[types=[Double(6, strides=[1], requires_grad=0, device=cuda:0)]](%x.1)
  %28 : Tensor = prim::If(%27)
    block0():
      %17 : Double(6, strides=[1], requires_grad=0, device=cuda:0) = prim::TensorExprGroup_0(%26)
      -> (%17)
    block1():
      %37 : Function = prim::Constant[name="fallback_function", fallback=1]()
      %38 : (Tensor) = prim::CallFunction(%37, %x.1)
      %39 : Tensor = prim::TupleUnpack(%38)
      -> (%39)
  return (%28)
with prim::TensorExprGroup_0 = graph(%1 : Double(6, strides=[1], requires_grad=0, device=cuda:0)):
  %8 : int = prim::Constant[value=1]()
  %11 : int = prim::Constant[value=-10]()
  %10 : int = prim::Constant[value=0]()
  %12 : Double(6, strides=[1], requires_grad=0, device=cuda:0) = aten::threshold(%1, %10, %11) # /home/pytorch/test/test_jit_fuser.py:552:19
  %9 : Double(6, strides=[1], requires_grad=0, device=cuda:0) = aten::add(%12, %1, %8) # /home/pytorch/test/test_jit_fuser.py:552:19
  %6 : Double(6, strides=[1], requires_grad=0, device=cuda:0) = aten::add(%9, %1, %8) # /home/pytorch/test/test_jit_fuser.py:552:19
  %3 : Double(6, strides=[1], requires_grad=0, device=cuda:0) = aten::add(%6, %1, %8) # /home/pytorch/test/test_jit_fuser.py:552:19
  return (%3)


----------------------------------------------------------------------
Ran 1 test in 4.262s

FAILED (failures=1)
Repository: flutter
Issue: _debugCanPerformMutations assert improvements
Labels: framework,a: quality,a: error message,P2,team-framework,triaged-framework

Right now we `assert(_debugCanPerformMutations)` in various places, notably `markNeedsLayout`. We should instead make `_debugCanPerformMutations` into some sort of validator function that throws useful error messages for each condition that would otherwise have made the assert fail. For example, I just got this:

```
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following assertion was thrown while dispatching notifications for ListViewSelectionController:
'package:flutter/src/rendering/object.dart': Failed assertion: line 1609 pos 12:
'_debugCanPerformMutations': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack:
#2      RenderObject.markNeedsLayout (package:flutter/src/rendering/object.dart:1609:12)
#3      RenderBox.markNeedsLayout (package:flutter/src/rendering/box.dart:2320:11)
...
```

...because my RenderObject was disposed at the time I called `markNeedsLayout`, but to find that out I had to instrument `_debugCanPerformMutations` to print out which condition was making it return false.
Repository: rust
Issue: Module path attribute override with nested macros doesnt work
Labels: A-attributes,C-bug

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

[Repository with the reproduction](https://github.com/Veetaha/path-nested-macro-bug-repro)

I expected to see this happen:

The code should compile without errors, because this feature was advertised in Rust 1.54 announcement and in https://github.com/rust-lang/rust/pull/83366.

Instead, this happened:

Compile error `file not found for module generated` was issued

More info in README.md of the reproduction repo

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.54.0 (a178d0322 2021-07-26)
binary: rustc
commit-hash: a178d0322ce20e33eac124758e837cbd80a6f633
commit-date: 2021-07-26
host: x86_64-unknown-linux-gnu
release: 1.54.0
LLVM version: 12.0.1
```

cc @jyn514
Repository: youtube-dl
Issue: youtube.dl download link
Labels: question

How can we get download link by running  youtube-dl  exe in command prompt

C:\Users\User\Downloads>youtube-dll http:\\Any vedio link\pp---