sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Add new moduleResolution option: `yarn-pnp`
Labels: Suggestion,Awaiting More Feedback

## Search Terms

yarn pnp plug'n'play plug 

## Suggestion

Yarn has released a new feature for using modules without having a `node_modules` directory present: plug'n'play. Some community tooling is available for customizing the TypeScript compilerHost so that it can use plug'n'play modules, but this does not work for users of `tsc`. 

My suggestion is to add a new `"moduleResolution": "yarnpnp"` option.

## Use Cases / Examples

I want to be able to use yarn plug-n-play in my typescript projects. My projects are typically yarn monorepos where common libraries are basic node packages using `tsc` for compilation. This would allow the basic projects to continue using `tsc`, but with an alternative module resolution scheme.

Some community tooling has been created here for augmenting the CompileHost with a slightly updated moduleResolution strategy, but using it in basic projects would probably require a forked `tsc`.

https://github.com/arcanis/ts-pnp

## 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. new expression-level syntax)
Repository: godot
Issue: InputEvent's device id is always 0
Labels: bug,discussion,topic:porting,documentation,topic:input


**Godot version:** 3.0.5stable & 3.1alpha (13eaded)


**OS/device including version:** Linux 4.18.16
<!-- Specify GPU model and drivers if graphics-related. -->


**Issue description:** The event’s device ID is always set to 0, was hoping to detect what keyboard or mouse was creating the InputEvent from in "func _input(event):..."
<!-- What happened, and what was expected. -->


**Steps to reproduce:** Add a script to a node and and have it access the InputEvents "device" property.




**Minimal reproduction project:**[InputEvents device id is always 0.zip](https://github.com/godotengine/godot/files/2539757/InputEvents.device.id.is.always.0.zip)
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Repository: TypeScript
Issue: Re-export class as part of a different namespace
Labels: Suggestion,In Discussion

This is similar to https://github.com/Microsoft/TypeScript/issues/4529, but that issue was closed before it got any real traction.

Setup:

````ts
// panel.ts
export class Panel {
    constructor() {}
}

export namespace Panel {
    export enum GridLineTypeFlags {
        NONE = 0x00
    }

    export enum NormalizationType {
        NONE,
        SEPARATE_AXIS
    }
}
export default Panel;
````
````ts
// panoramicpanel.ts
export class PanoramicPanel {
    constructor() {}
    public toString(): string {
        return 'PanoramicPanel';
    }
}
````
In the `serieschart.ts` file I'm trying to export the `PanoramicPanel` class in the same way as I'm exporting the `Panel` class and namespace, so both can be accessed in my application code as `new SeriesChart.PanoramicPanel()` and as a type.

The only way I found to make this work is the following, where using the `import export` syntax gives an error.  Is there a reason why there would be an error?

(And because we have a lot of code which depends on the structure of this module, we unfortunately can not get rid of the namespaces.)

````ts
// serieschart.ts
import { Panel as PanelType } from './panel';
import { PanoramicPanel as PanoramicPanelType} from './panoramicpanel';

class SeriesChart {

}

namespace SeriesChart {
    export import Panel = PanelType;

    // export import PanoramicPanel = PanoramicPanelType; <- Error: PanoramicPanelType only refers to a type but is used as a namespace here
    // export { PanoramicPanelType as PanoramicPanel} <- Error: Export declarations are not permitted in namespace

    // this works, but is very counter intuitive
    export type PanoramicPanel = PanoramicPanelType;
    export const PanoramicPanel = PanoramicPanelType;
}
export default SeriesChart;
````
Repository: pytorch
Issue: [jit] restrict promotion of single-element arguments to lists
Labels: oncall: jit

We had a bug where a `len(Tensor t)` call in script was getting dispatched to `aten::len(Tensor[] t)`. We fixed it by adding single-element version, but there's no reason we should be promoting the tensor to a singleton list.

The argument promotion should only happen for integers, and only for certain ops like `aten::zeros`.
Repository: TypeScript
Issue: Broken IndexedDB event typings in 3.1.5
Labels: Bug,Domain: lib.d.ts

<!-- 🚨 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.1.5

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
indexedDB

**Code**

```ts
let dbreq = indexedDB.open('test', 1);

dbreq.onsuccess = function (evt) {
    let database = evt.target.result;
}
```

**Expected behavior:**
`evt.target.result` should be an IDBDatabase

**Actual behavior:**
TS2339: Property 'result' does not exist on type 'EventTarget'.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
http://www.typescriptlang.org/play/index.html#src=let%20dbreq%20%3D%20indexedDB.open('test'%2C%201)%3B%0D%0A%0D%0Adbreq.onsuccess%20%3D%20function%20(evt)%20%7B%0D%0A%20%20%20%20let%20database%20%3D%20evt.target.result%3B%0D%0A%7D

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
This is caused by the updates resulting from https://github.com/Microsoft/TypeScript/issues/25547

It works if you add a cast:

```ts
let dbreq = indexedDB.open('test', 1);

dbreq.onsuccess = function (evt) {
    let database = (evt.target as IDBOpenDBRequest).result;
}
```
Repository: create-react-app
Issue: Extended configs appear to not be fixed
Labels: issue: typescript

https://github.com/facebook/create-react-app/issues/5645#issuecomment-435201019
Repository: TypeScript
Issue: Strict type-checking on a per-file basis "@ts-strict"
Labels: Suggestion,In Discussion

## Search Terms

strict per file

## Suggestion

Currently in the process of converting a moderate-sized javascript project to typescript.  Would love to be able to enable strict type-checks on a per-file basis.

## Use Cases

Enabling strict mode for the entire project is a daunting task that presents a barrier to adoption (and using typescript without strict mode turned on is like locking the doors on a convertible....it's probably better than nothing, but it's not gonna keep you safe).

## Examples

```
//@ts-strict
```

## 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. new expression-level syntax)
Repository: pytorch
Issue: How to do inference with float16 (or half) in caffe2?
Labels: caffe2

I cannot find any resource about running inference with float16. There is resnet.py for training with float16, but no information is provided for inference with float16.

Any help?
Thank you
Repository: go
Issue: runtime: unknown pc during parallel benchmarks
Labels: NeedsInvestigation,compiler/runtime

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?

go1.11.1 linux/arm64

### Does this issue reproduce with the latest release?

yes

### What operating system and processor architecture are you using (`go env`)?

I'm using archlinux installed into a chroot on a chromebook, which is arm64.

### What did you do?

This error is quite easy for me to reproduce, but difficult to pin down a small test-case for it. 

The following will cause the error, but requires a redis server to be running in order to do so:

```
curl https://gist.githubusercontent.com/mediocregopher/5b365a3dfedb58dfff5e7dc973dee480/raw/761d04ae1ebd44f2d806aa33bad16dde38d8e401/panic_test.go > panic_test.go
go get -u github.com/mediocregopher/radix.v3
go test -v -run xxx -bench Panic -benchmem
```

### What did you expect to see?

Both the `panicking` and `not-panicking` benchmarks to complete successfully.

### What did you see instead?

If I run that with `CGO_ENABLED=1` the runtime panics with an `unknown pc` error: 
[with_cgo.txt](https://github.com/golang/go/files/2540666/with_cgo.txt)


If I run it with `CGO_ENABLED=0` it panics with an `unexpected fault address`: [without_cgo.txt](https://github.com/golang/go/files/2540661/without_cgo.txt)

Either way it seems the panicking is happening within the benchmark package, not my own, though I'm not able to find a reproducible test case without using my own code.
Repository: pytorch
Issue: Caffe2 missing headers in docker/conda
Labels: caffe2

## 🐛 Bug

The conda environment that is part of the docker image is missing a bunch of headers

## To Reproduce

Steps to reproduce the behavior:

1. Create a docker image using the steps on the readme.
1. Try to include #include <caffe2/core/predictor.h>

```
/workspace/src/main.cpp:9:35: fatal error: caffe2/core/predictor.h: No such file or directory
compilation terminated.
```

## Expected behavior

I expect the header files to be present.

## Environment

```
PyTorch version: 1.0.0a0+4fe8ca7
Is debug build: No
CUDA used to build PyTorch: 9.0.176

OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.0.176
GPU models and configuration: GPU 0: GeForce GTX 960M
Nvidia driver version: 410.66
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.3.1
/usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a

Versions of relevant libraries:
[pip] numpy (1.15.3)
[pip] torch (1.0.0a0+4fe8ca7)
[pip] torchvision (0.2.1)
[conda] magma-cuda90              2.3.0                         1    pytorch
[conda] torch                     1.0.0a0+4fe8ca7           <pip>
[conda] torchvision               0.2.1                     <pip>
```

 - Any other relevant information: Running in a docker container

## Additional context
Other headers are similarly missing. For example caffe2/threadpool/Threadpool.h
Repository: go
Issue: x/build/kubernetes/gke: investigate if viable to get 4 tests to run on builders again
Labels: Builders,NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.11.1 linux/amd64
</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>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/dmitshur/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/dmitshur/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build290116553=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->

I ran `go test golang.org/x/build/...` on GCE.

Note this doesn't happen in other environments, because those tests get skipped on non-GCE. E.g., here's verbose test output on my Mac:

```
$ go test -v golang.org/x/build/kubernetes/gke
=== RUN   TestNewClient
--- SKIP: TestNewClient (0.05s)
    gke_test.go:119: not on GCE; skipping
=== RUN   TestDialPod
--- SKIP: TestDialPod (0.00s)
    gke_test.go:119: not on GCE; skipping
=== RUN   TestDialService
--- SKIP: TestDialService (0.00s)
    gke_test.go:119: not on GCE; skipping
=== RUN   TestGetNodes
--- SKIP: TestGetNodes (0.00s)
    gke_test.go:119: not on GCE; skipping
PASS
ok  	golang.org/x/build/kubernetes/gke	0.103s
```

### What did you expect to see?

All tests to pass.

### What did you see instead?

```
--- FAIL: TestNewClient (0.67s)
    gke_test.go:154: x509 client key pair could not be generated: tls: failed to find any PEM data in certificate input
--- FAIL: TestDialPod (0.60s)
    gke_test.go:154: x509 client key pair could not be generated: tls: failed to find any PEM data in certificate input
--- FAIL: TestDialService (0.60s)
    gke_test.go:154: x509 client key pair could not be generated: tls: failed to find any PEM data in certificate input
--- FAIL: TestGetNodes (0.59s)
    gke_test.go:154: x509 client key pair could not be generated: tls: failed to find any PEM data in certificate input
FAIL
FAIL    golang.org/x/build/kubernetes/gke       2.519s
```
Repository: TypeScript
Issue: AudioWorkletProcessor type definition is missing
Labels: Bug,Help Wanted,Domain: lib.d.ts

<!-- 🚨 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.2.0-dev.201xxxxx

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** AudioWorkletProcessor

You guys have type definitions for AudioWorkletNode and such but missed the definition for AudioWorkletProcessor as per: https://webaudio.github.io/web-audio-api/#audioworkletprocessor

This is what I have for now:

```typescript
interface AudioWorkletProcessor {
    readonly port: MessagePort;
    process(inputs: Float32Array[][], outputs: Float32Array[][], parameters: Map<string, Float32Array>): void;
}

declare var AudioWorkletProcessor: {
    prototype: AudioWorkletProcessor;
    new(options?: AudioWorkletNodeOptions): AudioWorkletProcessor;
}
```

Cheers
Repository: go
Issue: os: add test for Windows Dedup volumes
Labels: Testing,help wanted,OS-Windows,Builders,FeatureRequest,new-builder

In recent CL 143578, I was going to remove some code that I thought did nothing. My change would have made all files on Windows Dedup volumes ( https://docs.microsoft.com/en-us/windows-server/storage/data-deduplication/overview ) look like symlinks.

Luckily @kolyshkin pointed my mistake ( https://github.com/golang/go/issues/22579#issuecomment-428381201 ). I built Windows instance on Gogle Cloud with extra disk attached as D: drive and with Dedup option on, to test my CL.

I wonder, if we can have one of our Windows builders have small extra disk with Dedup on. Then we could write some appropriate tests that run on that builder.

/cc @bradfitz @johnsonj

Alex
Repository: opencv
Issue: Persistence refactoring: CUDA code is broken
Labels: bug,priority: low,category: build/install,category: gpu/cuda (contrib)

[Build](http://pullrequest.opencv.org/buildbot/builders/master-contrib_cuda-lin64/builds/36).

relates #13011
Repository: TypeScript
Issue: Parser API: Expose a Method to Determine Whether a Numeric Literal is of Certain Flag
Labels: Suggestion,In Discussion,API

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms

Parser API numericLiteralFlags numeric literal flag 

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion

Currently the parser API apparently does not expose `numericLiteralFlags` for determining whether the original source is written using features such as binary or octal literal.

I have to do this to determine whether the original source was written using ECMAScript 2015 numeric literal:

```ts
    if (TypeScript.isNumericLiteral(node)) {
        let bitflag = node['numericLiteralFlags'];
        if (bitflag) {
            if (bitflag & (1 << 8)) {
                // internal flag: Octal
                // https://github.com/Microsoft/TypeScript/blob/a4a1bed88bdcb160eff032790f05629f9fa955b4/src/compiler/types.ts#L1659
                return true;
            }
            if (bitflag & (1 << 7)) {
                // internal flag: Binary
                // https://github.com/Microsoft/TypeScript/blob/a4a1bed88bdcb160eff032790f05629f9fa955b4/src/compiler/types.ts#L1658
                return true;
            }
        }
    }
```

AFAIK this is the only way to check it since `node.text` evaluates to the string representation of the base 10 number...

## Use Cases

I need this 'internal' API to write [a parser for helping determine whether a JS file is compatible with syntax of certain ECMAScript version](https://github.com/ryanelian/instapack/blob/terser/src/SyntaxLevelChecker.test.ts). For example: Can this script run in ES5 environments?

`node_modules` may contain packages not distributed in ES5, which can cause minification error when being minified with minifier not capable of handling ES5, or worse, ninja runtime error. (I want to parse packages / libraries with TypeScript API, then transpile them only when necessary for fast build. Rather than transpiling everything)

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

## Examples

<!-- Show how this would be used and what the behavior would be -->

Simple proposed API:

```
isES2015OctalNumericLiteral(node)
isES2015BinaryNumericLiteral(node)
```

## 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. new expression-level syntax)
Repository: opencv
Issue: python: gen2.py generates constructors for abstract interfaces 
Labels: bug,category: python bindings,effort: ∞

- OpenCV => 3.4 / master (probably all 3.x versions)
- Operating System / Platform => Windows 64 Bit
- Compiler => python3.5, opencv3.4.3 (from pip here)

##### Detailed description
we *should* use `XXX_create()` functions, but folks will try to use `XXX()` instead , 
leading to cryptic errors:

```
>>> img = np.array((2,2),np.uint8) # a dummy img, just for demo purpose
>>> o = cv2.ORB()                  # this should not be possible, but it is !
>>> o                              # it is a valid instance 
<ORB 0000000603D44F90>
>>> o.detect(img)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Incorrect type of self (must be 'Feature2D' or its derivative)
>>> type(o)                        # python thinks, everything is ok here ;(
<class 'cv2.ORB'>
>>> isinstance(o, cv2.Feature2D)   # same delusion
True
>>>
>>> s = cv2.xfeatures2d.SIFT()     # proper error.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'cv2.xfeatures2d' has no attribute 'SIFT'
>>> s = cv2.xfeatures2d_SIFT()     # but uhhh !
>>> s.detect(img)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Incorrect type of self (must be 'Feature2D' or its derivative)
>>> 
>>> c = cv2.CLAHE()                # here, too !
>>> c.apply(img)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Incorrect type of self (must be 'CLAHE' or its derivative)

```
Repository: godot
Issue: Godot cut bottom of last item until show scroll
Labels: bug,topic:editor,confirmed

**Godot version:**
3.1 0e27af2


**OS/device including version:**
Windows 10


**Issue description:**
When window has a little smaller height than all elements need, Godot cut a some of pixels at the last item instead show scroll.

**Steps to reproduce:**
![jfile](https://user-images.githubusercontent.com/41945903/70703950-6109db80-1cd1-11ea-83ef-2983e2bf695c.gif)
Repository: pytorch
Issue: [feature request] Singular values and spectral norm for convolutional layers 
Labels: module: convolution,triaged,module: linear algebra,module: fft,function request

Google Brain open-sourced a simple impl based on FFT: https://github.com/brain-research/conv-sv/blob/master/conv2d_singular_values.py ([paper](https://arxiv.org/abs/1805.10408))

It could be a nice addition to SpectralNorm or for debugging in general

cc @mruberry @peterbell10 @vincentqb @vishwakftw @jianyuh @nikitaved @pearu @SsnL
Repository: kubernetes
Issue: Disable cpu quota(use only cpuset) for pod Guaranteed
Labels: kind/bug,priority/backlog,sig/node,triage/accepted

<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:

Disable cpu quota when we use cpuset for guaranteed pods.

**Why is this needed**:

For now, kubelet default adds cpu quota and share for all cases when `cpuCFSQuota` is open, even if *cpuset* will be set in guaranteed pod case. 

However, this kind of use(cpuset with quota) may sometimes bring us cpu throttle time which we don't expect.

My question is why not make a `if` statement when we add cpuQuota config, if it's *guaranteed* case, just set `cpuQuota=-1`?

```
	if m.cpuCFSQuota {
		// if cpuLimit.Amount is nil, then the appropriate default value is returned
		// to allow full usage of cpu resource.
		cpuQuota, cpuPeriod := milliCPUToQuota(cpuLimit.MilliValue())
		lc.Resources.CpuQuota = cpuQuota
		lc.Resources.CpuPeriod = cpuPeriod
	}
``` 



<!-- DO NOT EDIT BELOW THIS LINE -->
/kind feature