sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Improve error message for IntoIterator for arrays misuse
Labels: A-diagnostics,T-compiler

With new rustc 1.53.0 IntoIterator for arrays, I naively tried this code and the errors message looks scary and for beginners might be very hard to understand.

Given the following code: <!-- Please provide a link to play.rust-lang.org -->

```rust
fn main() {
    let vec = vec![10];
    for i in vec.iter().chain([20]){
    }
}
```
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=be232fba39739b9e22a793b1c289f440

The current output is:

```
   Compiling playground v0.0.1 (/playground)
error[E0271]: type mismatch resolving `<[{integer}; 1] as IntoIterator>::Item == &{integer}`
 --> src/main.rs:3:25
  |
3 |     for i in vec.iter().chain([20]){
  |                         ^^^^^ expected integer, found `&{integer}`

error[E0271]: type mismatch resolving `<std::array::IntoIter<{integer}, 1_usize> as Iterator>::Item == &{integer}`
 --> src/main.rs:3:14
  |
3 |     for i in vec.iter().chain([20]){
  |              ^^^^^^^^^^^^^^^^^^^^^^ expected `&{integer}`, found integer
  |
  = note: required because of the requirements on the impl of `Iterator` for `std::iter::Chain<std::slice::Iter<'_, {integer}>, std::array::IntoIter<{integer}, 1_usize>>`
  = note: required because of the requirements on the impl of `IntoIterator` for `std::iter::Chain<std::slice::Iter<'_, {integer}>, std::array::IntoIter<{integer}, 1_usize>>`
  = note: required by `into_iter`

error[E0271]: type mismatch resolving `<std::array::IntoIter<{integer}, 1_usize> as Iterator>::Item == &{integer}`
 --> src/main.rs:3:14
  |
3 |     for i in vec.iter().chain([20]){
  |              ^^^^^^^^^^^^^^^^^^^^^^ expected `&{integer}`, found integer
  |
  = note: required because of the requirements on the impl of `Iterator` for `std::iter::Chain<std::slice::Iter<'_, {integer}>, std::array::IntoIter<{integer}, 1_usize>>`
  = note: required by `std::iter::Iterator::next`

error: aborting due to 3 previous errors
```

<!-- The following is not always necessary. -->
Ideally the output should look like:

Thanks to @CAD97 for suggested output
```
error[E0271]: type mismatch resolving `<[{integer}; 1] as IntoIterator>::Item == &{integer}`
 --> src/main.rs:3:25
  |
3 |     for i in vec.iter().chain([20]) {}
  |                         ^^^^^ expected integer, found `&{integer}`
  = help: try iterating by reference instead
        for i in vec.iter().chain(&[20]) {}
                                  ^
  = help: try copying the iterated items
        for i in vec.iter().copied().chain([20]) {}
                           ^^^^^^^^^
  = help: try iterating by value instead
        for i in vec.into_iter().chain([20]) {}
                    ^^^^^^^^^^^^
```

EDIT: URLO thread https://users.rust-lang.org/t/rust-1-53-intoiterator/61350
Repository: go
Issue: x/build/cmd/coordinator: unable to add a post submit builder for non-master branch
Labels: Builders,NeedsFix

While troubleshooting #46786 we discovered an edge-case where a post submit was not initiated even thought the configuration seemed correct. @dmitshur discovered that the coordinator will not bootstrap post submit builds for builders which are not configured to run for the go repository in the master branch.

@golang/release
Repository: youtube-dl
Issue: dealing with extractor suitable() does not complete missing protocol prefix
Labels: question

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions
- Search the bugtracker for similar questions: http://yt-dl.org/search-issues
- Finally, put x into all relevant boxes (like this [x])
-->

- [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

<!--
Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient.
-->

I am using something like:
```
extractors = youtube_dl.extractor.gen_extractors()
for e in extractors:
  if e.suitable(url) and e.IE_NAME != 'generic':
    return True
return False
```
to check in advance if the link is relevant for youtube-dl. otherwise i want to use say wget. i am aware that this test is not perfect. however, while youtube-dl can add the protocol for me if it is missing, here if the url is without a http/https prefix, it will not be found by suitable().
i can do:
```
if '://' not in url:
  url = 'https://'+url
```
but i wonder why suitable is not doing it for me just as the download is doing, and what is the suggested way to add a missing prefix protocol.
Repository: TypeScript
Issue: Allow inferring return type within a type guard in conditional types
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

typeguard conditional infer

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _(bug reporting)_

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.4.0-dev.20210621#code/C4TwDgpgBAkgdgMwgJ2RAJgFXBA4gVwENl0AebSA49APigF4oAoKVqCvIkqCAD2Ahx0AZygAKMXAD26CAC4oAS0QpYcMPmABKBnWmylo5UmRQA8po3aWbWwH5x++Wqs76emdEWiLwKzdtWBTgIADcUAG4mIA)

### 💻 Code

This is simplified pretty heavily:

<!-- Please post the relevant code sample here as well-->
```ts
type InferredTypeGuard<TypeGuard> = 
    TypeGuard extends ((node: infer Input) => node is infer Output)
        ? (node: Input) => node is Output
        : never;
```

### 🙁 Actual behavior

Error on `infer Output`:

```
A type predicate's type must be assignable to its parameter's type.
  Type 'Output' is not assignable to type 'Input'.
    'Input' could be instantiated with an arbitrary type which could be unrelated to 'Output'.(2677)
```

### 🙂 Expected behavior

TypeScript should allow a conditional type to infer the `Output` type _within_ the type guard function's return type.

There's no other syntax I can find to do so, and I would have thought this would be the cleanest syntax. Not sure if bug report or feature request...
Repository: pytorch
Issue: Output of non-inplace, non-CompositeImplicitAutograd op has TensorImpl > 1 or StorageImpl use_count != 1
Labels: module: autograd,triaged

Codegen checks are being added in https://github.com/pytorch/pytorch/pull/60286 in `VariableType` to enforce that for non-inplace, non-CompositeImplicitAutograd ops the output has TensorImpl with use_count of 1, and non-view ops have output with StorageImpl use_count of 1.

Notes:
- StorageImpl tests are ordered before TensorImpl tests, so a StorageImpl failure may hide a TensorImpl failure
- If TensorImpl use_count > 1, we are always able to construct a test that would cause StorageImpl to also fail (though this test may not actually exist in the real world).

These functions return tensors with TensorImpl `use_count > 1`:
```
`_embedding_bag`, `_embedding_bag_forward_only`,
`lu_unpack`, `_cudnn_rnn_backward`
`q_per_channel_scales`, `q_per_channel_zero_points`,
```

These 'non-view' functions return tensors with StorageImpl `use_count != 1:
```
'thnn_conv2d_forward', 'slow_conv3d_forward', 'channel_shuffle',
```

Functions that return tensors with StorageImpl `use_count` != 1 (which may also have TensorImpl `use_count > 1`:
```
 `dequantize_self`, `cudnn_rnn`
```

Edit: There were more entries in these lists, but all the convolution backward failures + batch_norm failures are actually due to the use_count being equal to 0 (i.e., the returned tensor is undefined) from the output mask. This should be expected, so in these cases (all cases) we should just relax the test to test for `use_count <= 1 `

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: godot
Issue: Grid and gizmos are counted in the information panel in 3D editor
Labels: enhancement,topic:editor,topic:3d

### Godot version

3.3.2.stable

### System information

macOS 11.4

### Issue description

Grid and gizmos are counted in various metrics in the "View Information" panel.

I understand that grid and gizmos are part of the scene in the editor, and may be hard / impossible to separate. But I think it's unexpected and a bit misleading at first glance.

Empty scene:
![empty](https://user-images.githubusercontent.com/372476/122846383-4f7aa880-d338-11eb-8ca3-711060f24f19.png)

Huge boost in vertices when the root node is selected in the empty scene:
![selected](https://user-images.githubusercontent.com/372476/122846388-50abd580-d338-11eb-9caa-cfe6160f39f2.png)


### Steps to reproduce

1. Create a 3D scene
2. Turn on the "View Information" panel

### Minimal reproduction project

_No response_
Repository: pytorch
Issue: Implement simple view methods for TensorAccessor/PackedTensorAccessor
Labels: module: bootcamp,triaged

THCDeviceTensor (the old version of PackedTensorAccessor) supports a bunch of handy utilities like transpose and view (and some more exotic ones like downcastInner). PackedTensorAccessor, the modern replacement, doesn't support any of these. They should!
Repository: node
Issue: Run script from the console with UTF-8 with BOM
Labels: module

From Linux I make a script with shebang:

```sh
#!/bin/node

// Code...
```

But when I transformed it to UTF-8 with BOM it does not run.

```sh
line 1: ���#!/bin/node: No such file or directory
```

Seeing this I just realized that it is a problem of the terminal and not of Node, but if I run it with Node, the problem is still.

```sh
node script.js
```

Answer in LxTerminal:

```sh
���#!/bin/node
```

Answer on Sakura:

```sh
#!/bin/node
 ^

SyntaxError: Invalid or unexpected token
    at Object.compileFunction (node:vm:353:18)
    at wrapSafe (node:internal/modules/cjs/loader:1039:15)
    at Module._compile (node:internal/modules/cjs/loader:1073:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47
```
Repository: angular
Issue: In Safari, wrapper position changes are not reflected in video in foreignObject
Labels: action: discuss,area: core,browser: safari,P3

# Bug Report

### Affected Package
The issue is caused by package @angular/core

### Is this a regression?
Sorry, I Don't know.


### Description
The issue occured in Safari.
In the case of a DOM structure  svg > g(wrapper) > foreignObject > video, g(wrapper) position changes are not reflected in video element view.


## Minimal Reproduction
If you click "Change Position" button, only the g(wrapper) element updates.
https://stackblitz.com/edit/angular-nyguy4


## Your Environment

**Angular Version:**
<pre><code>
@angular-devkit/architect       0.1200.1
@angular-devkit/build-angular   12.0.1
@angular-devkit/core            12.0.1
@angular-devkit/schematics      12.0.1
@angular/cli                    12.0.1
@angular/compiler-cli           12.0.1
@angular/flex-layout            12.0.0-beta.34
@schematics/angular             12.0.1
rxjs                            6.6.7
typescript                      4.2.4

</code></pre>

**Anything else relevant?**
Safari 13.1.3 (15609.4.1)
Repository: create-react-app
Issue: The npm start command is too slow 
Labels: needs triage,issue: bug report

Current Behavior
The npm start command is too slow it takes almost 5 min to start

Expected Behavior
It was expected to start within some seconds

Steps To Reproduce
type npm start and hit enter in Power Shell Terminal 

Environment
windows 10 home
node latest version
npm latest
Repository: create-react-app
Issue: npm start not working
Labels: stale,needs triage,issue: bug report

<!--
    Please note that your issue will be fixed much faster if you spend about
    half an hour preparing it, including the exact reproduction steps and a demo.

    If you're in a hurry or don't feel confident, it's fine to report bugs with
    less details, but this makes it less likely they'll get fixed soon.

    In either case, please use this template and fill in as many fields below as you can.

    Note that we don't provide help for webpack questions after ejecting.
    You can find webpack docs at https://webpack.js.org/.
-->

### Describe the bug

 ### npm start not working

### Did you try recovering your dependencies?
I follow all the steps but not working!! 
<!--
  Your module tree might be corrupted, and that might be causing the issues.
  Let's try to recover it. First, delete these files and folders in your project:

    * node_modules
    * package-lock.json
    * yarn.lock

  Then you need to decide which package manager you prefer to use.
  We support both npm (https://npmjs.com) and yarn (https://yarnpkg.com/).
  However, **they can't be used together in one project** so you need to pick one.

  If you decided to use npm, run this in your project directory:

    npm install -g npm@latest
    npm install

  This should fix your project.

  If you decided to use yarn, update it first (https://yarnpkg.com/en/docs/install).
  Then run in your project directory:

    yarn

  This should fix your project.

  Importantly, **if you decided to use yarn, you should never run `npm install` in the project**.
  For example, yarn users should run `yarn add <library>` instead of `npm install <library>`.
  Otherwise your project will break again.

  Have you done all these steps and still see the issue?
  Please paste the output of `npm --version` and/or `yarn --version` to confirm.
-->

 
 

### Environment

<!--
  To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required.
  This enables the maintainers quickly reproduce the issue and give feedback.

  Run the following command in your React app's folder in terminal.
  Note: The result is copied to your clipboard directly.

  `npx create-react-app --info`

  Paste the output of the command in the section below.
-->
 windows 10
"react": "^17.0.2"

 

 
 
![Screenshot (914)](https://user-images.githubusercontent.com/58542941/122885242-882c7900-d35c-11eb-9a52-8417116381d1.png)
Repository: next.js
Issue: Next 11 breaks styled-components: Prop `className` did not match
Labels: bug

### What version of Next.js are you using?

11.0.0-canary.6

### What version of Node.js are you using?

14.x

### What browser are you using?

Chrome

### What operating system are you using?

macOS

### How are you deploying your application?

next start

### Describe the Bug

After updating to Next 11, all of the projects that use `styled-components` started throwing an error. It's not component specific. Disable the first, and the second styled component fails. 

It looks like whatever styled-components uses as the seed for its hashing mechanism got busted in the new release. I'm filing it here first, as the upgrade is what broke it.

```
Warning: Prop `className` did not match. Server: "sc-enrZtP dhBosf cover" Client: "sc-gtsrHT qyzqu cover"
```

### Expected Behavior

I expect styled components to work.

### To Reproduce

Here's a [codesandbox](https://codesandbox.io/s/prop-classname-did-not-match-pkwie?file=/pages/index.js) that demonstrates even a single styled component will cause the error.

Thanks for your help!
Repository: rust
Issue: document and test the precise span that triggers edition-dependent behavior
Labels: E-needs-test,T-compiler,A-edition-2021

My hunch is that most of the edition-dependent features don't have a documented bit of text that we use to figure out what edition they are-- and that we don't have tests for that logic. We should clarify this and document the "edition span" in the Edition Migration Guide, and then make tests that check that it works correctly.
Repository: rust
Issue: Default implementation of CrateNum encoding/decoding should be disabled
Labels: C-cleanup,T-compiler

The [default implementation](https://github.com/rust-lang/rust/blob/c38111c4fb9c22a36f9a9195d1884052bb670af2/compiler/rustc_span/src/def_id.rs#L41-L53) for `CrateNum` encoding and decoding should be disabled because the numeric value of a `CrateNum` can only be meaningfully interpreted giving the specific context of decoding (which the default decoder does not have access to). We already do [something similar](https://github.com/rust-lang/rust/blob/c38111c4fb9c22a36f9a9195d1884052bb670af2/compiler/rustc_span/src/def_id.rs#L168-L178) for `DefIndex` because it helps prevent bugs where decoding *seems*  to work but really provides wrong values.

I already tried to make this change as part of https://github.com/rust-lang/rust/pull/86368 (see https://github.com/rust-lang/rust/commit/3eaeb92b96ddf2db764fc634351f211818e6e6a8) but it turns out there's still [one user of the default implementation](https://github.com/rust-lang/rust/blob/cc9610bf5af1d5c54968db0dd899595ca12307a0/compiler/rustc_interface/src/queries.rs#L407-L417) related to `-Zno-link`.
Repository: pytorch
Issue: Enable large file support
Labels: module: build,feature,triaged

## 🚀 Feature

Some dependencies (e.g. minizip) will benefit from the large file support that is enabled by defining `_LARGEFILE64_SOURCE=1`, see their respective docus.
It might be a good idea to enable this globally in the PyTorch main CMake file.

## Motivation

Especially in ML I expect large files to occur often enough that it is worth to enable their support by default. E.g. the Imagenet files, when compressed into an archive, are already really huge.


cc @malfet @seemethere @walterddr
Repository: rust
Issue: Confusing compiler error when returning a `Result<Result>` via `?`-operator
Labels: A-diagnostics,T-compiler

Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9aac41ba36103dac1f4ae20fa30c86f0

```rust
fn foo(x: Option<i32>) -> Result<(), &'static str> {
    let _ = x.ok_or_else(|| Err("nope"))?;
    Ok(())
}

fn main() {
    println!("{:?}", foo(Some(1)));
}
```

The current output is:

```
error[E0277]: `?` couldn't convert the error to `&str`
 --> src/main.rs:2:41
  |
1 | fn foo(x: Option<i32>) -> Result<(), &'static str> {
  |                           ------------------------ expected `&str` because of this
2 |     let _ = x.ok_or_else(|| Err("nope"))?;
  |                                         ^ the trait `From<Result<_, &str>>` is not implemented for `&str`
  |
  = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
  = note: required by `from`
```

Ideally the output would mention the double-`Result` wrapping ("got type `Result<Result<...>>` expected ...") and suggest removing one layer or `Result::flatten()` or similar.

It kind of does the former already if you squint but it's far from obvious ("the trait `From<Result<_, &str>>` is not implemented for `&str`").
Repository: go
Issue: x/crypto/ssh: MarshalAuthorizedKey discards comment
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
1.16
</pre>

### Does this issue reproduce with the latest release?
yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
GOHOSTARCH="amd64"
GOHOSTOS="darwin"

</pre></details>

Hello, it seems like https://github.com/golang/crypto/blob/master/ssh/keys.go#L281 will never consider writing the comment of the key so when parsing such key later on via https://github.com/golang/crypto/blob/master/ssh/keys.go#L85 the `comment` value will always be empty.
Repository: deno
Issue: Type checking in the REPL
Labels: cli,repl,suggestion

Breaking out of #1158.

Personally I'm not sure this would be useful or desired.
Repository: pytorch
Issue: [Mkldnn] has_bf16 check only works on Linux for tests
Labels: module: tests,triaged,module: mkldnn

## 🐛 Bug

Currently, if you are not on Linux, it always assumes you do not have BF16 support in the Mkldnn tests.
On Linux, it accesses /proc/cpuinfo to discover extension support.

https://github.com/pytorch/pytorch/blob/c7d8d8f92525aefc09a97009f0d92063164bcdf4/test/test_mkldnn.py#L31-L36

## Expected behavior

Other platforms, such as Windows, should also work.

## Environment

N/A

 - PyTorch Version (e.g., 1.0): 1.10
 - OS (e.g., Linux): Windows
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source): N/A
 - Python version: 3.9
 - CUDA/cuDNN version: N/A
 - GPU models and configuration: N/A
 - Any other relevant information: Intel 11th Gen

## Additional context


cc @gujinghui @PenghuiCheng @XiaobingSuper @jianyuh @VitalyFedyunin @mruberry @walterddr
Repository: flutter
Issue: [Flutter_driver]: Should check for finder==null here
Labels: framework,t: flutter driver,c: proposal,P2,team-framework,triaged-framework

https://github.com/flutter/flutter/blob/e7b7ebc066c1b2a5aa5c19f8961307427e0142a6/packages/flutter_driver/lib/src/common/handler_factory.dart#L481

When using FinderExtension the createFinder function must return Element or null. In case it return null and is used as part of the MatchFinder it will result a null no such method error on evaluate()
Repository: animate.css
Issue: Variable opacity states for fade animations
Labels: feature request,v5

**Is your feature request related to a problem? Please describe.** 
Hi, when I am using fade animations (e. g. fadeInLeft) I whould like to be able to specify the boundaries of my opacity.

**Describe the solution you'd like**
In addition to the existing CSS variables you could add variables for the opacity set by the animations.

Something like:

```
@keyframes fadeInLeft {
   from {
    opacity: var(--fade-opacity-start, 0);
    transform: translate3d(-100%, 0, 0);
  }

  to {
    opacity: var(--fade-opacity-end, 1);
    transform: translate3d(0, 0, 0);
  }
}
```

and then

```
.animated-element{
  --fade-opacity-end: 0.5;
  animation-name: fadeInLeft;
}
```


**Additional context**
Sometimes you have the situation when you don't want to fully fade an element in or out. Without this feature you can't use opacity on animated elements at all since the keyframes overwrite any opacity value during the animation.