sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Narrower (literal) type for Function.prototype.name if function is const
Labels: Suggestion,Awaiting More Feedback

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

ES6 function name, const assertions, `as const`, function as const

## Suggestion

I would like to see the `name` property of functions to be available at compile time if the given function is a `const` expression, e.g.:

```typescript
class Test {
    public a() { console.log("Test.a"); }
    public b() { console.log("Test.b"); }
}

type FunctionWithName<N> = (...args: any[]) => any & { readonly name: N };

function replaceFunction<T, K extends keyof T>(target: T, fn: FunctionWithName<K>) {
    target[fn.name] = fn;
}

// proposed inline syntax
let testInstance = new Test();
replaceFunction(testInstance, function a() { console.log("Replacement.a"); })

// proposed "as const" syntax
const newB = function b() {
    console.log("Replacement.b");
} as const;
replaceFunction(testInstance, newB);

// example of a compile time error since "c" is not assignable to "a" | "b"
replaceFunction(testInstance, function c() { console.log("Replacement.a"); })
```

## Use Cases

My use case is a function like shown above, where I would like to have static type checking available, without having to specify the extra parameter that specifies the function name to replace, e.g. compare:

```typescript
// current syntax:
replaceFunction(testInstance, "a", function a() { /* ... */ });
// proposed syntax:
replaceFunction(testInstance, function a() { /* ... */ });
```

## Examples

```typescript
let myObject = {
    a: () => "a",
    b: () => "b"
}

// fictional "mocking" library:
// this syntax can only validate that "a" is in "myObject" through the const "a" parameter
mockingLibrary.mock(myObject, "a", function a() { return "different value" });

// proposed style, using Function.prototype.name
mockingLibrary.mock(myObject, function a() { return "different value" });
```

## 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: flutter
Issue: [engine] support fragments in PlatformViews
Labels: c: new feature,engine,a: platform-views,p: maps,package,c: proposal,P3,team-engine,triaged-engine

`PlatformView` could have a variation to enable usage of fragments.
## Use case
Google maps plugin has to do a lot of lifecycle work by hand to enable the usage of `MapsView` that relies in a lifecycle. It could be avoided if the `PlatformView` was able to use `MapFragment` or `SupportMapFragment` that already deals with the lifecycle by themselves.

Other usages are libraries that provide a fragment to integrate, but not a view.

## Proposal
Flutter could provide a variation of PlatformView that has a method `getFragment()` instead of `getView()`.

There are a few tricks here as fragments can be committed with backstack or not. But in the simples case of no backstack would already help.
Repository: flutter
Issue: DartLifecycleTest.ShuttingDownTheVMShutsDownAllIsolates is disabled due to flakiness.
Labels: a: tests,engine,P2,team-engine,triaged-engine

Sample run of failure [is here](https://cirrus-ci.com/task/5709404777742336?command=test_host#L278). It probably indicates unsafe threading during VM shutdown.
Repository: youtube-dl
Issue: Support for Sowndhaus
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 2019.07.16. 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 **2019.07.16**
- [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 song: https://sowndhaus.audio/track/10669/quotthrill-herquot-kesha-vs-michael-jackson
- Artist profile: https://sowndhaus.audio/profile/gravedanger
- Filtered artist profile: https://sowndhaus.audio/profile/gravedanger/filter/201907
- Playlist: https://sowndhaus.audio/playlist/775/fran%C3%A7ais

## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Sowndhaus is a popular website for mashup artists.
Repository: ant-design
Issue: Could span in Description List work as Grid? Auto floating to next line when the current total is larger than the number of columns
Labels: Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
First, make the concept of span constantly crossing the whole design.
Secondly, it can be useful when the value of span on each description item is calculated at run time.

### What does the proposed API look like?
```jsx
<Descriptions title="User Info" column={4}  layout="vertical">
    <Descriptions.Item span={2} label="First Row">1-0</Descriptions.Item>
    <Descriptions.Item span={1} label="First Row">1-1</Descriptions.Item>
    {/** This item will be settled in second line */}
    <Descriptions.Item span={4} label="Second Row">2-0</Descriptions.Item>
</Descriptions>
```


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: bitcoin
Issue: Assertion `setBlockIndexCandidates.count(pindex)' failed
Labels: Bug,Validation

This happened on travis as part of a pull request that only modified ATMP logic. So the assertion can likely also be hit on a clean master.

https://travis-ci.org/bitcoin/bitcoin/jobs/562128739#L4513 (in `rpc_invalidateblock.py`)
Repository: godot
Issue: High RAM usage
Labels: discussion,topic:core

**Godot version:**
<!-- Specify commit hash if non-official. -->
Godot 3.1.1 stable


**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Windows10 Pro 64bit
Intel HD graphics 4600

**Issue description:**
<!-- What happened, and what was expected. -->
On Godot version 3.0.6 stable memory usage was around stable 200-250 but in 3.1 it spiked to 700MB and even higher, i also tested 3.1 alpha versions and it seems to be already happening in Godot 3.1 Alpha1.

**Steps to reproduce:**
Create empty project and open it up.
Seems to be system/hardware specific not reproducible on all systems.

**Minimal reproduction project:**
It's literally just empty project.
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Repository: rust
Issue: primitive docs should show core/alloc/std accessibility
Labels: T-rustdoc,C-enhancement

In #61851, I tried to generate primitive docs in `core`, similar to those in `std`. My main motivation was to clearly see what `f64` methods are available in `core` alone, under `#[no_std]`, since a lot of them require `std` and `libm` support. However, I had trouble making that work because of broken documentation links between `core` and `std`-specific methods.

So I think instead, `rustdoc` could put some kind of marker on primitive methods to indicate what crate added them, so the accessibility is known. Apart from floating point, there are also a few slice methods that are only added in `alloc`. Maybe there are more that I don't know yet!
Repository: opencv
Issue: PyRotationWarper creating incorrectly sized images
Labels: category: stitching

- OpenCV = 4.1.0-dev
- Operating System / Platform => Windows 32 Bit
- Compiler => Visual Studio 2017

##### Detailed description

PyRotationWarper in 'affine' mode is incorrectly sizing the outputs. For example, suppose that the input image has shape (300,400) (neglecting channels). If the post-warp image should be scaled up by 10% to (330, 440), the output is incorrectly scaled down by 10% (for example, to 270, 360).

My current mitigation zero-pads the inputs, and the results then fit into the given shape. The amount to zero pad is determined by calling warpRoi using the inverse of the warping matrix. It seems like this step is probably intended. Mitigation code is pasted below. I am eliding the code which performs feature matching and bundle adjustment to provide the camera params.

```.py
warper = cv2.PyRotationWarper('affine', warped_image_scale)

for i in range(len(images)):
        cam, img, mask = cameras[i], images[i], masks[i]
        K = cv2.UMat(cam.K().astype(np.float32))
        R = cv2.UMat(cam.R.astype(np.float32))
        if mode == 'affine':
            scaleMat = cam.R.copy()
            scaleMat[:2,:2] = np.linalg.inv(scaleMat[:2,:2])
            scaleMat = cv2.UMat(scaleMat.astype(np.float32))
            r, c = img.shape[:2]
            newR, newC = warper.warpRoi((r,c), K, scaleMat)[2:]
            newR = newR if newR >= r else r
            newC = newC if newC >= c else c
            blank = np.zeros((newR, newC, 3)).astype(np.uint8)
            blank[:r, :c] = img
            img = blank
            maskBlank = np.zeros((newR, newC)).astype(np.uint8)
            maskBlank[:r, :c] = mask
            mask = maskBlank
        corner, warp = warper.warp(img, K, R, interpMode, borderMode)
        _, mask = warper.warp(mask, K, R, interpMode, borderMode)
```

##### Steps to reproduce

cameras, images, and masks are lists of equal length.

```.py
warper = cv2.PyRotationWarper('affine', warped_image_scale)
corners, warpImgs, warpMasks = [], [], []

    for i in range(len(images)):
        cam, img, mask = cameras[i], images[i], masks[i]
        K = cv2.UMat(cam.K().astype(np.float32))
        R = cv2.UMat(cam.R.astype(np.float32))
        corner, warp = warper.warp(img, K, R, interpMode, borderMode)
        _, mask = warper.warp(mask, K, R, interpMode, borderMode)
        warp, mask = warp.get(), mask.get()
        corners.append(corner)
        warpImgs.append(warp)
        warpMasks.append(mask)
```
Repository: youtube-dl
Issue: [Suggestion] Say which ID of a video is unavailable
Labels: 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 2019.07.16. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature 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 feature request
- [x] I've verified that I'm running youtube-dl version **2019.07.16**
- [x] I've searched the bugtracker for similar feature requests including closed ones


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

When I run the following:

    youtube-dl --get-id https://www.youtube.com/channel/UCN5xN8gIljvWYnsj06V8WbQ

or just any other youtube channel/playlist I might get an

"ERROR: This video is unavailable"

error within the results. That makes sense since some of the videos may be removed. However, I would like to find out what those video IDs are. Maybe something like the following:

"ERROR: This video is unavailable (SDvc3yf_sde)"
Repository: TypeScript
Issue: Add broccoli-typescript-compiler to user test suite
Labels: Infrastructure,Fix Available

https://github.com/tildeio/broccoli-typescript-compiler
Repository: godot
Issue: Add the argument 'backwards' in the class AnimatedSprite as a property.
Labels: enhancement,documentation

The variable 'backwards' doesn't have a getter neither a setter.

https://github.com/godotengine/godot/blob/master/scene/2d/animated_sprite.cpp#L730

Since the variable is private, right now you can't check if the current animation is playing backwards or not. So i propose adding a getter and setter to 'backwards' to solve this problem.

Also, in the documentation of AnimatedSprite (https://docs.godotengine.org/en/3.1/classes/class_animatedsprite.html#method-descriptions), it says that 'backwards' is a property, but is not present in the list of Properties (https://docs.godotengine.org/en/3.1/classes/class_animatedsprite.html#properties).
Repository: flutter
Issue: Modernizing the "Missing Material" error
Labels: framework,f: material design,from: study,P2,team-design,triaged-design

To take advantage of the new structured error API and the IDE's capability to display such errors in a concise format, we need to add necessary structure and metadata to the "Missing Material" error at https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/debug.dart#L27.

Here is what the final result could look like when the error is rendered in IntelliJ with an upcoming plugin release:

![Missing Material Error (1)](https://user-images.githubusercontent.com/348942/61754982-730ed000-ad6a-11e9-9fdd-8bb3043c0799.png)

@jacob314 and @devoncarew have the context.
Repository: vscode
Issue: [folding] Preserve folded ranges on revert
Labels: feature-request,editor-folding

Editor losing folding status, when we doing git revert changes and scroll to top of the page

![vscode2019-07-24 15-26](https://user-images.githubusercontent.com/4384874/61774890-6b166500-ae2a-11e9-9161-30552d0cfa11.gif)
Repository: godot
Issue: -Woverloaded-virtual warnings
Labels: bug,topic:core,topic:buildsystem

When adding a GCC warning `-Woverloaded-virtual` I see following warnings:

```
grep 'was hidden' build.log  | sort  | uniq
./core/os/dir_access.h:74:17: warning: 'virtual String DirAccess::get_next(bool*)' was hidden [-Woverloaded-virtual]
./core/script_language.h:170:18: warning: 'virtual Variant ScriptInstance::call(const StringName&, const Variant&, const Variant&, const Variant&, const Variant&, const Variant&)' was hidden [-Woverloaded-virtual]
./core/script_language.h:172:15: warning: 'virtual void ScriptInstance::call_multilevel(const StringName&, const Variant&, const Variant&, const Variant&, const Variant&, const Variant&)' was hidden [-Woverloaded-virtual]
./editor/plugins/abstract_polygon_2d_editor.h:132:15: warning: 'virtual void AbstractPolygon2DEditor::_action_set_polygon(int, const Variant&)' was hidden [-Woverloaded-virtual]
```

I'm also attaching full build log:
[build.txt](https://github.com/godotengine/godot/files/3425754/build.txt)

Note that the issue can cause serious issues as explained here:
https://isocpp.org/wiki/faq/strange-inheritance#hiding-rule
Repository: pytorch
Issue: Add gatherv/allgatherv primitives to support non-equal contribution
Labels: oncall: distributed,module: bootcamp,feature,triaged

## 🚀 Feature

New operations `gatherv` and `allgatherv` to support gathering tensors of different shapes.

## Motivation

This is not uncommon (e.g. different size batches) and one has to jump through hoops to get this done today. Native support means a better user experience.

## Pitch

We'll add `gatherv` and `allgatherv` functions on the base `ProcessGroup` class and provide an implementation for every backend. The Gloo and MPI backends can implement this natively. The NCCL backend has to perform the padding trick (described below) under the hood to make this work. 

## Alternatives

Currently, to do the same, you first need to establish the maximum number of elements across processes. Then you allocate a big output tensor to hold that maximum. Then you pad your local contribution, if necessary. Then you run a conventional gather/allgather. Finally you chop off the padding to get the result. All these steps 

## Additional context

See https://discuss.pytorch.org/t/mpi-gatherv-and-mpi-scatterv-feature-request-idea/50878.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528
Repository: kubernetes
Issue: Allow for more frequent etcd compaction but still long-enough history in etcd
Labels: sig/scalability,area/etcd,sig/api-machinery,kind/feature,lifecycle/frozen,sig/etcd

Currently, the etcd compaction algorithm that we use is as following:
- we store "etcd revision" from the moment of last compaction under a special key in etcd
- then periodically even N seconds/minutes we: 
  - compare to see if (local compact time) = (remote compact time)
  - if yes, we increment both local and remote compact time to "now" and do a compaction
  - if not, set local compact time to the remote one

This basically means, that for a given interval, we in etcd we store a history of length roughly between <interval, 2*interval>.

However, this is a significant issue that more frequent compaction means less history in etcd.
So for scalability and performance reasons, we would like to do compaction more frequently, but not necessary reduce amount of history in etcd.

So at the high level, I would like to be able to store a history of length roughly between <(N-1)*interval, N*interval>.

One potential option to do that would be to store last N values in "remote_compact_time", but there are probably better options to do that.

@jpbetz @jingyih @wenjiaswe @mborsz @xiang90
Repository: go
Issue: cmd/go: prune non-source files in 'go mod vendor'
Labels: NeedsInvestigation,modules

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.7 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?
I would say that the issue is kind of enhancement or feature request rather than a bug. golang/dep has an option to prune non-go files under `vendor` with a config like:
```
[prune]
  go-tests = true
  unused-packages = true
  non-go = true
```


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env

</pre></details>

### What did you do?

```
# The go mod way:

$ mkdir gomod-example
$ cd gomod-example
$ go mod init github.com/ialidzhikov/gomod-example
```

`main.go`

```go
package main

import (
	"fmt"

	"github.com/ghodss/yaml"
)

func main() {
	j := []byte(`{"name": "John", "age": 30}`)
	y, err := yaml.JSONToYAML(j)
	if err != nil {
		fmt.Printf("err: %v\n", err)
		return
	}
	fmt.Println(string(y))
	/* Output:
	name: John
	age: 30
	*/
	j2, err := yaml.YAMLToJSON(y)
	if err != nil {
		fmt.Printf("err: %v\n", err)
		return
	}
	fmt.Println(string(j2))
	/* Output:
	{"age":30,"name":"John"}
	*/
}
```


```
$ go mod vendor
$ go mod tidy
$ ls -a vendor/github.com/ghodss/yaml/
./  ../  .gitignore  .travis.yml  LICENSE  README.md  fields.go  yaml.go  yaml_go110.go
```
Ensure that non-go files as `.gitignore`, `.travis.yml` and others are added under `vendor/` and currently there is no way to clean them.

On the other hand golang/dep with `non-go = true` option:
```
$ mkdir -p $GOPATH/src/github.com/ialidzhikov/dep-example
$ cd $GOPATH/src/github.com/ialidzhikov/dep-example
$ dep init
$ dep ensure -v
$ ls -a vendor/github.com/ghodss/yaml/
./  ../  LICENSE  fields.go  yaml.go
```

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->



### What did you expect to see?



### What did you see instead?
Repository: pytorch
Issue: Error while using Libtorch + OpenCV + Qt Creator
Labels: module: cpp,triaged

I have the following configuration in the .pro file

 ```
    TEMPLATE = app
    CONFIG += console c++11
    CONFIG -= app_bundle
    CONFIG -= qt
    CONFIG += thread
    
    SOURCES += main.cpp
    
    INCLUDEPATH += /usr/local/include/opencv4
    LIBS += -L/usr/local/lib/
    LIBS += -lopencv_core
    LIBS += -lopencv_highgui
    LIBS += -lopencv_imgproc
    LIBS += -lopencv_videoio

    QMAKE_CXXFLAGS += -D_GLIBCXX_USE_CXX11_ABI=0
    
    INCLUDEPATH += /path/to/libtorch/include
    INCLUDEPATH += /path/to/libtorch/include/torch/csrc/api/include
    LIBS += -L/path/to/libtorch/lib
    LIBS += -ltorch -lc10
```

OpenCV works absolutely fine **without** "QMAKE_CXXFLAGS += -D_GLIBCXX_USE_CXX11_ABI=**0**". With this, however, I get this following errors:

![Screenshot_2019-07-24_14-35-50](https://user-images.githubusercontent.com/17313248/61799072-b6307800-ae2a-11e9-9bb3-e8b8068c8a87.png)

OpenCV works fine **with** "QMAKE_CXXFLAGS += -D_GLIBCXX_USE_CXX11_ABI=**1**" as well. But it throws a different set of errors:

![Screenshot_2019-07-24_14-38-10](https://user-images.githubusercontent.com/17313248/61799101-c183a380-ae2a-11e9-9da8-ff815f721dde.png)

Setting "QMAKE_CXXFLAGS += -D_GLIBCXX_USE_CXX11_ABI=**0**" has been recommended for Libtorch in most of the forums to avoid the errors above.

What could be a solution or some solutions to work around this?
(I am a newbie to both Libtorch and Qt Creator.)