sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: net/url: add FromFilePath and ToFilePath
Labels: Proposal,FeatureRequest,Proposal-Hold

In the course of investigating #27698, I learned that the conversion between URLs and file paths on Windows is rather non-trivial. (See also #6027.)

According to https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/, a file path beginning with a UNC prefix should use the UNC hostname as the “host” part of the URL, with only two leading slashes, whereas a file path beginning with a drive letter should omit the “host” part and prepend a slash to the remainder of the path.

Once you know those rules, the implementation in each direction is only about ten lines of code, but it's easy to get wrong (for example, by neglecting the possibility of a UNC prefix) if you haven't thought about it in depth.

I propose that we add two functions to the `net/url` package to make these cases more discoverable, with the following signatures:

```go
// ToFilePath converts a URL with scheme "file" to an absolute file path.
// It returns a non-nil error if the URL does not have the scheme "file" or
// the resulting path is not well-formed.
func ToFilePath(u *URL) (string, error) {
	[…]
}

// FromFilePath converts an absolute file path to a URL.
func FromFilePath(path string) (*URL, error) {
	[…]
}
```

CC @alexbrainman
Repository: pytorch
Issue: [JIT] kwarg with default doesn't work for class instantiation
Labels: oncall: jit,triaged,jit-backlog

```
import torch
from typing import List, Optional, Dict

@torch.jit.script
class Series(object):
    def __init__(self, floats : Optional[List[float]] = None, ints : Optional[List[int]] = None):
        self.floats = torch.jit.annotate(Optional[List[float]], floats)
        self.ints = torch.jit.annotate(Optional[List[int]], ints)


@torch.jit.script
def foo(df : Dict[str, Series]) -> Dict[str, Series]:
    df['bar'] = Series(ints=[5, 6])
    return df

print(foo.code)

print(foo({'col1': Series(floats=[3.0, 4.0]), 'col2': Series(ints=[3, 4])}))
```

```
RuntimeError: 

for operator __init__(ClassType<Series> self, float[]? floats, int[]? ints) -> None:
argument floats not provided.
at dataframe.py:13:17
@torch.jit.script
def foo(df : Dict[str, Series]) -> Dict[str, Series]:
    df['bar'] = Series(ints=[5, 6])
                ~~~~~~ <--- HERE
    return df
:
at dataframe.py:13:17
@torch.jit.script
def foo(df : Dict[str, Series]) -> Dict[str, Series]:
    df['bar'] = Series(ints=[5, 6])
                ~~~~~~ <--- HERE
    return df
```

cc @suo
Repository: TypeScript
Issue: Type Guard Issue with Array.prototype.fill, Array Constructor
Labels: Suggestion,Awaiting More Feedback

## Typegurd Issue with Array.prototype.fill, Array Constructor
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.5.1

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
- Array.prototype.fill
- fill
- ArrayConstructor
- array implicit any

**Code**

```ts
const foo: number[] = new Array(3).fill("foo"); // accepted
```

**Actual behavior:**
This code above is accepted because `new Array(3)` returns `any[]`, and so `fill("foo")` returns `any[]`.

I know giving type explicitly to Array like
```ts
const foo: number[] = new Array<number>(3).fill("foo"); // error
```
would work, but I believe the compiler should reject the first one. (This is TypeScript.)


**Expected behavior:**

**Option A. Array.prototype.fill returns narrow type**
replace declaration of `Array.fill` in `lib.es2015.core.d.ts` like `fill<S extends T>(value: S, start?: number, end?: number): S[];`, then
```ts
const foo: number[] = new Array(3).fill("foo");
// error: "Type 'string[]' is not assignable to type 'number[]'."
// because `fill` is resolved as `fill<string>(value: string, .....): string[]`

const bar = new Array(3).fill(0); // `bar` is resolved as `number[]`
bar.fill("bar"); // error: "Type '"bar"' is not assignable to type 'number'."

const baz: (number|string)[] = new Array(3).fill(0); // accepted.
baz.fill("baz"); // accepted.
```


**Option B. Array Constructor never return implicit any**
The problem is that Array constructor returns `any[]` implicitly. The first code is accepted even with `--strict` or any other options. It means we always have to care about "Array constructor returns `any[]`".

Something like #26188 could solve this issue.


**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
https://www.typescriptlang.org/play/#src=const%20foo%3A%20number%5B%5D%20%3D%20new%20Array(3).fill(%22foo%22)%3B

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
#29604
Repository: youtube-dl
Issue: Site Support Request: abema.tv
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.05.20. 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])
-->

- [✓ ] I'm reporting a new site support request
- [✓] I've verified that I'm running youtube-dl version **2019.05.20**
- [✓ ] I've checked that all provided URLs are alive and playable in a browser
- [✓ ] I've checked that none of provided URLs violate any copyrights
- [✓ ] 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.
-->

- Live: https://abema.tv/now-on-air/abema-news
- video: https://abema.tv/video


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

It is not need login.
It is japanese famous live site.
Repository: vscode
Issue: [json] Override/disable json-schema for package.json
Labels: feature-request,json

I would like to override the default json-schema used by VSCode on some files with my own json-schema (example: VSCode use a json-schema for the Node's "package.json", but I want to be able to override it), like when configuring any other json-schema in settings.json:
```
//settings.json - currently this doesn't work and VSCode keep applying the Node's package.json json-schema
"json.schemas": [{
	"fileMatch": ["*/package.json"],
	"url": "./schemas/package.json"
}]
```

Reason is: I'm working on a project where there's a file called "package.json" which is not related to Node: it's something completely different and internal to the project, and it's not even in the root directory, but I can't rename it and VSCode wrongly use the Node's json-schema and everything become an error.
Repository: TypeScript
Issue: Add a code action to implement (overwritten) method from base class
Labels: Suggestion,In Discussion

## Search Terms
implement, inherited, method

## Suggestion

When implementing a method that is defined in a class's base class or in external type declarations, it would be helpful if we didn't have to type out the method signature that is already known to TypeScript.

## Use Cases

Overwriting methods in inherited classes. Here's an example for implementing a custom `winston` transport.
![grafik](https://user-images.githubusercontent.com/17641229/59016323-4d247f00-8841-11e9-9b64-3695ef45d3d9.png)
TypeScript knows the method signature, but I have to type it out manually, potentially making a mistake along the way.

## Examples

```ts
import * as Transport from "winston-transport";

export class SpyTransport extends Transport {
	log| // cursor here!
}
```
VSCode should offer a code action _implement method "log" from base class "Transport"_. After invoking it, the code should look like this:
```ts
import * as Transport from "winston-transport";

export class SpyTransport extends Transport {
	public log(info: any, next: () => void): any {
		throw new Error("not implemented!");
	}
}
```

For reference, the type declarations look as follows:
```ts
declare class TransportStream extends stream.Writable {
  public format?: logform.Format;
  public level?: string;
  public silent?: boolean;
  public handleExceptions?: boolean;

  constructor(opts?: TransportStream.TransportStreamOptions);

  public log?(info: any, next: () => void): any;
  public logv?(info: any, next: () => void): any;
  public close?(): void;
}
```

## 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: scrcpy
Issue: screen not update randomly on osx
Labels: display,sdl

screen just not update after some time, and would restore randomly, too. and keyboard / mouse event still works.
Repository: godot
Issue: Avoid performance discrepancies in the running project depending on the currently opened scene and tab in the editor
Labels: enhancement,discussion,topic:editor


**Godot version:**
Godot Engine 3.1.1

**OS/device including version:**
Windows 7 x64bit
8 GB Ram
GTX 980

**Issue description:**
Godot Editor can't handle complex level
as you can see in this video :
https://youtu.be/gWLli5CBhCQ

Here is a small level for our Game , almost everything in this level is a scripted scene , Trees are scenes , Rocks are scenes , Floor are scenes ... etc , this will give is the full control of everything for example making the Trees Destroyable or Light poles turn the lights off if they get Hit .. etc
____

1- Running the game when i'm in 3D mode in the Editor in the same level that contain many instances you will see that the FPS is about 160 FPS
2- Running the game when i'm in Script mode in the Editor in the same level that contain many instances you will see that the FPS is about 193 FPS
3- Running the game when i create an Empty scene that contain nothing and switch to Script mode in the Editor you will see that the FPS is about 243 FPS

and Godot Editor will get Laggy after running the game several times.. make the FPS Drop more and more ... in this case i need to Export the game , Close Godot and Run the Game to get the Full FPS - About 260 FPS
Repository: TypeScript
Issue: Incorrect union type inference for conjunction with strictNullChecks disabled
Labels: Bug

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.4.5

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** union type inference conjunction strictNullChecks

**Code**

```ts
function fn(x: number) {
  return x && 'a'
}
```

**Expected behavior:**
Return type of `fn` should be `0 | 'a'`

**Actual behavior:**
Return type of `fn` is `'' | 'a'` if `strictNullChecks` is disabled

This is causing me an issue with this specific bit of code, where I'm checking `window` so my code runs both on the browser and on the client:

```ts
function fn(x: number): OrientationType | undefined {
  return window && (window.outerWidth > window.outerHeight ? 'landscape-primary' : 'portrait-primary')
}
```

I can replace the conjunction with a conditional expression, and I know that if `strictNullChecks` is disabled I should have a fallback for the return value but I'm posting here for the sake of trying to understand if this is working as intended. It also feels weird that my example compiles with `strictNullChecks` enabled but doesn't compile when it's disabled.

**Playground Link:** https://www.typescriptlang.org/play/#src=function%20fn(x%3A%20number)%3A%20OrientationType%20%7C%20undefined%20%7B%0D%0A%20%20return%20window%20%26%26%20(window.outerWidth%20%3E%20window.outerHeight%20%3F%20'landscape-primary'%20%3A%20'portrait-primary')%0D%0A%7D

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: rust
Issue: Consider changing the way unevaluated constants are printed
Labels: C-enhancement,A-diagnostics,T-compiler,A-const-eval,A-const-generics

cc https://github.com/rust-lang/rust/pull/60742#discussion_r288742080

Right now when we encounter a `ConstValue::Unevaluated` during pretty printing, we fall back to printing the constant's source code or `_` if that also fails. Alternative options are:

* try to eagerly evaluate (and fall back to one of the following)
* always print `_`
* print something like `{{unevaluated: {}}}` where `{}` is the source code
* print just `{unevaluated}` (seems useless for users, so maybe not a good idea)
Repository: pytorch
Issue: RuntimeError: cublas runtime error 
Labels: triaged,module: cublas

RuntimeError: cublas runtime error : the GPU program failed to execute at /pytorch/aten/src/THC/THCBlas.cu:411
My GPU is 2080ti,CUDA 10.0
How can I slove the problem?Thank you.
Repository: terminal
Issue: [Spec Proposal] Changes to Colortool commandline switches
Labels: Issue-Feature,Product-Colortool,Needs-Tag-Fix

In my opinion, the current command line switches are a bit confusing since there are multiple ways to have it not do the default action of writing the color scheme to the current console (I think -x is a little different from that, at least based on my reading).  I think it would be better for there to be no default behavior, each switch should do its thing and nothing more, and the user can combine switches to combine behaviors. (i.e. remove the -b switch, add a switch that applies to the current console, then change the code so -x and -t aren't mutually exclusive with -d and the new switch for current console).

_Originally posted by @DJackman123 in https://github.com/microsoft/terminal/pull/1052#issuecomment-499147982_
Repository: flutter
Issue: Automatically set Dart SDK constraints when using flutter create
Labels: tool,dependency: dart,P2,team-tool,triaged-tool

Currently we hardcode the Dart SDK constraints in our `flutter create` templates, e.g.:

https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/app/pubspec.yaml.tmpl#L22

We should automatically make the lower bound be the current Dart version.
Repository: vscode
Issue: Quickpick loses active item if items are updated
Labels: bug,quick-pick

I tried to make a quickpick that only showed the `detail` line for the selected item to save space:

```ts
st quickPick = vs.window.createQuickPick<PickableDevice>();
quickPick.busy = true;
quickPick.items = devices;
quickPick.placeholder = "Select a device to use";

// Show detail line only when selected.
quickPick.onDidChangeActive((active) => {
	quickPick.items.forEach((d) => d.detail = undefined);
	active.forEach((d) => d.detail = d.expandedDetail);
	quickPick.items = [...quickPick.items];
});
```

However when the `items` collection is replaced (which is required to redraw the list), the active items is reset to the top item in the list. Since the items are the exact same objects in the array, it seems like this could persist?
Repository: terminal
Issue: Per project docs
Labels: Issue-Docs,Product-Meta,Area-CodeHealth

I'd like to see documentation per VS project, similar to that in `doc/ORGANIZATION.md`, or to `abstract` comment on files. It could contain:
- responsibilities
- target platforms (standalone window app / embeded control / server / api)
- used frameworks (`pure c++`/ `.NET Framework` / `.NET Standard` / `c++/cli` / `winapi` / `winrt` / `wpf` / `winforms` / rendering lib)
- its place in the "stack"
- target (native exe / dll / source only)

This'd make contibuting much easier, but I'm affraid that's subject to frequent changes
Repository: flutter
Issue: [Request] DraggableScrollableSheet should show an AppBar when on full-screen 
Labels: c: new feature,framework,f: material design,f: scrolling,P3,team-design,triaged-design

## Use case

As stated in [Material Design guidelines](https://material.io/design/components/sheets-bottom.html#standard-bottom-sheet):

> When full-screen, bottom sheets can be internally scrolled to reveal additional content. A toolbar should be used to provide a collapse or close affordance to exit this view.

> Include a close affordance in a full-height modal bottom sheet to dismiss the sheet.

## Proposal

Add a new optional parameter where you can add a custom `AppBar`.

- If none is provided, it will apear as it is right now.
- If provided (and `maxChildSize` is set to `1.0`), when the user drags the `DraggableScrollableSheet` to the top, the provided `AppBar` will appear over the `DraggableScrollableSheet`. When the `AppBar` is shown, the user shouldn't be able to dismiss the `DraggableScrollableSheet` by dragging it to the bottom.

Video showing behavior [here](https://storage.googleapis.com/spec-host-backup/mio-design%2Fassets%2F1mYYvVz_dCIx0bRyY_VV4hOs9709f1ESb%2Fmodal-behavior-dismissal-close.mp4).

cc/ @dnfield
Repository: pytorch
Issue: Not obvious how to install torchvision with PyTorch source build
Labels: triaged,module: vision

Previously, it used to be possible to build PyTorch from source, and then `pip install torchvision` and get torchvision available. Now that torchvision is binary distributions, this no longer works; to make matters worse, it explodes in non-obvious ways.

When I had an existing install of torchvision 0.3.0, I got this error:

```
ImportError: /scratch/ezyang/pytorch-tmp-env/lib/python3.7/site-packages/torchvision/_C.cpython-37m-x86_64-linux-gnu.so: u
ndefined symbol: _ZN3c106Device8validateEv
```

I reinstalled torchvision with `pip install torchvision`. Then I got this error:

```
  File "/scratch/ezyang/pytorch-tmp-env/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 2, in <module>
    from torchvision import _C
ImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory
```

(I'm on a CUDA 10 system).

In the end, I cloned torchvision and built/installed it from source.
Repository: bitcoin
Issue: listrecievedbyaddress with include_empty not filtering out "send" side of address book
Labels: Bug,Wallet

I noticed if you call listreceivedbyaddress with true for incude_empty it was skipping the cross-reference against mapTally. The skip causes the entire address book (including "send" purpose) to be included in the results erroneously. There should be a "if purpose not 'send' then include results".

Code would be inserted here:

https://github.com/bitcoin/bitcoin/blob/master/src/wallet/rpcwallet.cpp#L1122

something like:
```
        if(item_it->second.purpose == "send")
            continue;
```
Repository: vscode
Issue: Save Side Bar layouts per Workspace
Labels: feature-request,layout

When I open a one of my workspaces it consists of all short (few letters) filenames and then another I open has some very long filenames. Is there a way currently to save the positioning of that column? I switch back and forth all day.
If not I thought that (simple sounding) idea might be considered to be added to saved settings for the saved workspace. 
Thanks for listening and your consideration and or help.
Note: I tried to find a setting or reference but seem unable. Please forgive me if I missed it.


<!-- Describe the feature you'd like. -->