sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Declaration emit incorrectly prints uninstantiated generic type
Labels: Bug,Domain: Declaration Emit,Rescheduled

# Bug Report

I have a type with an unused generic type parameter.\*
This type annotates an **optional parameter property** in the constructor of a class.
Starting with Version 4.2.X of TypeScript, this class is incorrectly transpiled, so that TS code using the transpiled sources (.d.ts) does not transpile anymore.
The error was:
```
error TS2304: Cannot find name 'T'
```

No wonder it cannot be found, it was not in the original code (please see the minimal example below).

During my investigation I found that this issue occurs, when these prerequisites are met:
1. The given type has an unused generic parameter.
1. The given type represents a union type.
1. You have a class with a constructor argument using the given type.
1. The constructor argument is a parameter property.
1. The constructor argument is optional.

This list might not be complete or exact.

*\* (Tried something. Didn't work. Postponed it, but left the parameter for later use.)*
### 🔎 Search Terms

generics, transpilation, missing parameter

### 🕗 Version & Regression Information

- This changed between versions 4.1.X and 4.2.X

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?target=5#code/C4TwDgpgBAQgTgewNYQHYBVwQDzoHxQC8UA5AIYlQA+pARiQNwCwAUKwMYA2ZAzj1AFkQAYW58oAb1ZQZUdglQ9gcAK7tgCOAAo4EMgBMFnEFDJwA5gH4AXLEQoMWbGVQg8ASkkBfVj5ZA)

### 💻 Code

Before transpilation:
```ts
type BrokenType<T> = 'a' | 'b';

class MyClass {
    constructor(readonly arg?: BrokenType<any>) {}
}
```

After transpilation
```ts
declare type BrokenType<T> = 'a' | 'b';
declare class MyClass {
    readonly arg?: BrokenType<T> | undefined;
    constructor(arg?: BrokenType<T> | undefined); // <----- T should be any
}
```

### 🙁 Actual behavior

The code is transpiled to contain the generic parameter name, instead of the actual type that was passed as argument.

### 🙂 Expected behavior

I would expect the result to contain the original type as specified in the original code. The generic parameter is not known when consuming the type. This worked before version 4.2.X.
Repository: flutter
Issue: ReorderableList and ReorderableListView should have built-in dragTarget props
Labels: c: new feature,framework,f: material design,f: scrolling,c: proposal,P3,team-design,triaged-design

## Use case

Eg: Kanban like board, we can drag item from a column to another at specific position (index). 

My current workaround is to wrap ReorderableList with dragTarget. I use ListTile as the child widgets, I wrap the listTile with Draggable and then the trailing icon with `ReorderableDragStartListener`. This allow both reorder item inside the ReorderableList and drag into another ReorderableList. This solve the conflict whether i want to reorder or drag it ouside.
However when i drop into a ReorderableList as dragTarget, i can only insert at fixed index  (eg: index 0) to not lose track of the item in case the list is longer. This is mostly useful on desktop and web.

## Proposal

1. ReorderableList and ReorderableListView should have built-in dragTarget props so  `onAcceptWithDetails` and `onAccept` can work with the ReorderableList internal to track the index and reorder it accordingly.

    Looking at the source code Reorderable list internally check the offset via the item index. Hence it should be able do the 
    opposite internally, when combined with DragTargetDetails we should be able to get the index of the item above and 
    below current drop position, so we can insert the dragged item at the index it was dropped.

2. Allow ReorderableList items to be drag and reorder without the needs to additional listener on the outside.
Repository: flutter
Issue: [linux] Allow configuring lib/ and data/ locations
Labels: c: new feature,engine,platform-linux,a: desktop,P3,team-linux,triaged-linux

Is there a way to change the default storage for the `data` and `lib` folders in the bundle created by ```flutter build linux --release```?
Just Asking... 
My issue is that when am packaging the app for Debian it is against the Debian policies to put these(`data` and `lib`) folders in the `/bin` directory.
Any help will be appreciated thanks!
Repository: pytorch
Issue: Turn on -Winfinite-recursion in OSS CI
Labels: module: build,triaged,better-engineering

This is Werror on many fbcode builds and it is very useful and rarely has false positives.

cc @malfet @seemethere @walterddr
Repository: godot
Issue: Web Editor crashes on clicking Play/F5
Labels: bug,platform:web,topic:editor

### Godot version

Web Editor v3.3.2

### System information

Windows 10

### Issue description

I am getting the errors displayed below on every project I have tried to run from the Web Editor.

I tried switching between GLES2 & 3 with the same outcome.

Edge v91.0.864.54

![image](https://user-images.githubusercontent.com/1558027/123318221-9a411f80-d4f4-11eb-80ca-00f73d95d6c6.png)


### Steps to reproduce

In theory, create a project in the version of Edge given above, then try to run it.

### Minimal reproduction project

_No response_
Repository: go
Issue: cmd/go: warn if 'go install' is called on a non-main package pattern in module mode
Labels: NeedsFix,GoCommand,modules

This issue is a companion to proposal #41696, brought to my attention via https://stackoverflow.com/q/64462190.

In module mode, non-`main` packages lack an install target, and `go install` for such packages is equivalent to `go build` (compare #46911).

As such, a call to `go install` with a pattern containing *only* non-`main` packages is at best confusing: at best, the user has conflated `go install` with `go build`, and at worst, they are trying to install a binary but have named a corresponding library instead.

The latter case crops up surprisingly frequently. For example, the library `golang.org/x/tools/imports` is easily confused with the executable `golang.org/x/tools/cmd/goimports`, and the library `github.com/gobuffalo/buffalo` is easily confused with the executable `github.com/gobuffalo/buffalo/buffalo`.

I don't think we need to actually _remove_ the ability to call `go install` on a non-`main` package, but we should at least log something to clear up the user's likely confusion.

CC @jayconrod @matloob
Repository: youtube-dl
Issue: nzonscreen.com
Labels: site-support-request

<!--

######################################################################
  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:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.06.06. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://www.nzonscreen.com/title/old-mans-beard-must-go-1989


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Plays OK in Firefox.  youtube-dl fails with "Unsupported URL"
Repository: svelte
Issue: svelte(a11y-label-has-associated-control) shows incorrectly when using if-statements
Labels: bug,compiler

**Describe the bug**
The warning `A11y: A form label must be associated with a control.` shows up even if the label has an associated input inside it, when if-statements are used. Example:
```svelte
<!-- A11y: A form label must be associated with a control. -->
<label>
    {#if true}
        <input type="text">
    {/if}
</label>

<!-- No warning -->
<label>
    <input type="text">
</label>
```

**To Reproduce**
https://svelte.dev/repl/ab0b74aea51c44f382d2378257406a66?version=3.38.3

**Expected behavior**
No warning as long as every branch is guaranteed to have a form control.

This also goes for more complicated statements like:
```svelte
<label>
    {#if condition1}
        <input type="text">
    {:else if condition2}
        <textarea></textarea>
    {:else}
        <select></select>
    {/if}
</label>
```

**Information about your Svelte project:**
npmPackages:
    rollup: ^2.3.4 => 2.46.0
    svelte: ^3.0.0 => 3.38.1

**Severity**
Given the first workaround (below), not very severe. Minor inconvience. If I couldn't disable the warning it would've been near unbearable to code with it since the warning is on every single line of the label element (which wraps everything).

That being said, when ignoring the warning it does open up to actually making mistakes by having some branch of the if-statement not including a form control.

**Workarounds**
1. Ignore it with a comment
    ```svelte
    <!-- svelte-ignore a11y-label-has-associated-control -->
    <label>
        {#if true}
            <input type="text">
        {/if}
    </label>
    ```

2. If you only have one control (or all of them share the same id)
    ```svelte
    <label for="myControl">
        {#if true}
            <input type="text" id="myControl">
        {/if}
    </label>
    ```
Repository: godot
Issue: Sprite3D AABB is always zero
Labels: enhancement,topic:core,topic:3d

### Godot version

3.3.2 stable

### System information

Windows 10 64 bits GLES3

### Issue description

`VisualInstance.get_aabb()` is supposed to provide bounds of any node that inherits from it. `Sprite3D` does have a size, but its `get_aabb()` function does not account for it, and in fact it returns an AABB with all dimensions and offset set to zero. I expected to obtain the same you would obtain with a MeshInstance having a QuadMesh of the same size for example (which returns ` -0.25, -0.25, 0 - 0.5, 0.5, 0`)

Context: one of my plugins allows to instance scenes by dragging over colliders, and uses the AABB to estimate how much space they take. This causes distances to be largely under-estimated and too many scenes get painted.

### Steps to reproduce

1) Create a `Sprite3D`
2) Assign a texture
3) Write a script that calls `get_aabb()` on the sprite3d and prints it
4) Run the game: observe the returned AABB is ` 0, 0, 0 - 0, 0, 0`

### Minimal reproduction project

[Sprite3DAABB.zip](https://github.com/godotengine/godot/files/6712154/Sprite3DAABB.zip)
Repository: vscode
Issue: Command to change the state of a markdown cell
Labels: feature-request,notebook-markdown,notebook-liveshare

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->


I am working on Live Share notebooks support and we currently do not have a way to sync the state of markdown cells. As you can see in the gif, the actual text of the markdown cell is synced, but we need to be able to detect when a user clicks the checkmark to "Stop editing cell" and when they click the pencil to "Edit cell". That way, we can sync the state and also the contents. 

![mardown-cell](https://user-images.githubusercontent.com/22576531/123337170-ad0b2280-d4fb-11eb-8c62-d3c9df0adcf2.gif)
Repository: go
Issue: x/pkgsite: support @branch for branch names other than "master" and "main"
Labels: NeedsFix,pkgsite

Splitting off from https://github.com/golang/go/issues/41312#issuecomment-737469687:

> We're still open to a contribution for supporting non-master and non-main branch names.

That issue is originally about supporting default branches, like git's HEAD. This issue is separate; it's about supporting specific branch names that exist in VCS. Presumably this should be easier to implement, as the module proxy already supports listing the versions for any VCS branch.

cc @jba @julieqiu
Repository: excalidraw
Issue: Adding option to paste tabular data as a rough table
Labels: enhancement,good first issue

Hey! Was thinking It would be nice to have an option to paste tabular data as a table instead of a chart.

Something like this

![image](https://user-images.githubusercontent.com/21282919/123338332-09336e00-d51f-11eb-9163-17840eaa7b4f.png)
Repository: flutter
Issue: Container clipBehavior not working
Labels: framework,f: material design,has reproducible steps,found in release: 2.2,team-design,triaged-design

On flutter dart pad:
```
import 'package:flutter/material.dart';

final Color darkBlue = Color.fromARGB(255, 18, 32, 47);

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue),
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: MyWidget(),
        ),
      ),
    );
  }
}

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      color:Colors.orange,
      child: Container(
              height: 100,
              width: 100,
              clipBehavior: Clip.antiAlias,
              // margin: EdgeInsets.symmetric(horizontal: 20),
              padding: EdgeInsets.symmetric(vertical: 12),
              alignment: Alignment.center,
              decoration: BoxDecoration(
                color: Colors.blue,
                borderRadius: BorderRadius.circular(20),
              ),
        ),
    );
  }
}
```

Anti alias clip behavior is not working
Repository: terminal
Issue: DxRenderer should eat "concealed" text
Labels: Help Wanted,Area-Rendering,Product-Terminal,Issue-Task

# Description of the new feature/enhancement

Invisible text is generally rendered as text with a foreground color equal to the background color. This can be repro'd as a part of https://github.com/jdebp/terminal-tests/tree/master/PowerShell).

This makes it _not_ look invisible, however, because we apply the acrylic texture to the background, but not the foreground.

# Proposed technical implementation details (optional)

Just make the renderer _not_ render the invisible text. Ignore it completely.
Repository: transformers
Issue: Generate text until condition
Labels: WIP

Is there a simple way to have the model generate text until a condition is met? I'm interested in data memorization and want to prompt the model with some tokens from the training data and then have it generate text until it makes a mistake (aka deviates from the training data). The naive approach with a while loop has significant overhead, and I was wondering if there was something smarter I can be doing.
Repository: flutter
Issue: [flutter_plugin_tools] Refactor tests code related to https
Labels: p: tooling,package,team-ecosystem,P2,triaged-ecosystem

There are many tests in plugin_tools mocks the http client in a similar way, like https://github.com/flutter/plugins/blob/master/script/tool/test/publish_plugin_command_test.dart#L644-L673
, we should refactor them to be reused.
Repository: rust
Issue: borrowck error does not suggest missing await
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: [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=32e093c0bcec94c89f98d948a8b3b2c4)

```rust
async fn foo(x: &u32) -> u32 {
    *x
}

async fn bar() {
    let mut x = 3;
    let y = foo(&x);
    x += 4;
    drop(y);
}

fn main() { }
```

The current output is:

```
error[E0506]: cannot assign to `x` because it is borrowed
 --> src/main.rs:8:5
  |
7 |     let y = foo(&x);
  |                 -- borrow of `x` occurs here
8 |     x += 4;
  |     ^^^^^^ assignment to borrowed `x` occurs here
9 |     drop(y);
  |          - borrow later used here

error: aborting due to previous error
```

It took me a while to realize the problem is that you need `foo(&x).await`
Repository: youtube-dl
Issue: How can I use the "--playlist-start" command to read the url in txt
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

When youtube-dl reads txt as url input, --playlist-start is invalid. Is there any alternative? I also tried --download-archive, but I think this is not very suitable for me. When reading txt, --download-archive will not be skipped automatically, thank you
Repository: flutter
Issue: Adding signed URL token to the end of video player requests (HLS format, cloudfront)
Labels: c: new feature,p: video_player,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

Any way to append tokens to each and every request the player makes when playing HLS format? I'm using signed URLs from cloudfront (e.g. https://abc.cloudfront.net/filepath.ext?Policy=xyz...) and it requires the token at the end of each request (the m3u8 as well as the ts files). The same token is valid for every manifest and segment file per video. Let me know if there is already a simply way to accomplish this that I'm missing.

If I were using videoJs it might be:
```
    videojs.Hls.xhr.beforeRequest = function (options) {
      options.uri = `${options.uri}${videojs.getAllPlayers()[0].options().token}`;
      return options;
};
```
Repository: storybook
Issue: v6.4.0-alpha.0 swallows errors
Labels: bug,core,canvas

**Describe the bug**

storybook quietly fails without surfacing errors in `.stories.tsx` files.

**To Reproduce**

```
import {
  storiesOf,
} from '@storybook/react';
import React from 'react';
import * as templates from '../templates';

for (const [name, template] of Object.entries(templates)) {
  // `storiesOf` is currently the only way (even though marked as "legacy") to generate dynamic stories.
  // It is the only way currently possible and they are not planning to remove it until there is a replacement.
  // https://github.com/storybookjs/storybook/issues/9828#issuecomment-781387767
  const subject = storiesOf('Templates/' + name);

  throw new Error('OK');
}

```

**Additional context**

I would expect to see some reference to error "OK".

However, build just completes without any errors:

```
info => Using cached manager
webpack built preview 56918557f0342b18a688 in 7818ms
╭───────────────────────────────────────────────────╮
│                                                   │
│   Storybook 6.4.0-alpha.0 started                 │
│   8.05 s for preview                              │
│                                                   │
│    Local:            http://localhost:6006/       │
│    On your network:  http://192.168.4.40:6006/    │
│                                                   │
╰───────────────────────────────────────────────────╯


```
Repository: react
Issue: [DevTools Bug] Children cannot be added or removed during a reorder operation.
Labels: Type: Bug,Status: Unconfirmed,Component: Developer Tools

### Website or app

https://github.com/Alice-in-korea/chrome_bug_report.git

### Repro steps

1. Click next day button or prev day button
2. Normally there are only three column for three days but you can see the fragment of other column with error message.

### How often does this bug happen?

Every time

### DevTools package (automated)

react-devtools-extensions

### DevTools version (automated)

4.13.5-0ae5290b54

### Error message (automated)

Children cannot be added or removed during a reorder operation.

### Error call stack (automated)

```text
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:21301:41
    at bridge_Bridge.emit (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19286:22)
    at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19446:12
    at listener (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37413:39)
```


### Error component stack (automated)

_No response_

### GitHub query string (automated)

```text
https://api.github.com/search/issues?q=Children cannot be added or removed during a reorder operation. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react
```
Repository: flutter
Issue: API to CreateDirectoryRecursively in fml
Labels: c: new feature,engine,c: proposal,P3,team-engine,triaged-engine

From discussion in #85267

There isn't an easy and reliable way to do `Directory.createSync(recursive: true)` in the Flutter Engine API, which led us to use a workaround in Dart instead.

The best I could come up with: https://github.com/chingjun/engine/commit/1c615549dd7b658e7451a44c0ad687414edb58c6