sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Investigate Asynchronous File IO
Labels: Suggestion,In Discussion,Domain: Performance,Experimentation Needed

@amcasey has some ideas for speeding up IO times by making our read/write calls asynchronous. This issue tracks that and should be the place to document the outcome of the investigation.

Also related: https://github.com/microsoft/TypeScript/issues/1857, https://github.com/microsoft/TypeScript/issues/16607, https://github.com/microsoft/TypeScript/issues/29100
Repository: flutter
Issue: Enable platform view tests with the Metal backend enabled.
Labels: a: tests,c: new feature,platform-ios,engine,a: platform-views,c: proposal,P3,team-ios,triaged-ios
Repository: TypeScript
Issue: Provide passive `extendedDiagnostics` feedback on PRs
Labels: Suggestion,Infrastructure

@amcasey had suggested that we provide performance feedback for changes, similar to what we do on DefinitelyTyped. This could be a part of the standard CI process, where @typescript-bot provides the output of `tsc -p src/compiler` as a comment and compares it against a baseline.
Repository: TypeScript
Issue: Optimize constructing type nodes from types
Labels: Bug,Help Wanted,Domain: Performance

_Originally posted by @weswigham in https://github.com/microsoft/TypeScript/issues/34119#issuecomment-545640573_

> Yep, looking at the traces I see pretty much all the time spent in `trySymbolTable` and `getAliasForSymbolInContainer`, which are workers user for calculating visible symbol chains. The whole process is uncached and quite naive right now (it's _pretty much_ the same as it was since TS 1.8, but we rely on it more and more). It has been on my backlog as something that needs to be rewritten with a better more cacheable structure for perf.

> There's _also_ a fair chunk of time spent in GC and in path component-related operations that might also need some optimization - I'm guessing the large number of import types we manufacture require a large number of path calculations which end up making a lot of garbage - some caching may be in order here.
Repository: TypeScript
Issue: Attempt to more-frequently use local aliases when printing out types
Labels: Suggestion,Needs Proposal,Domain: Type Display

When a user imports a type alias like

```ts
// ./a.ts
export type Foo = number | string | symbol;
```

We should try to print out `Foo` in error messages like in

```ts
// ./b.ts
import { Foo } from "./a.js"

let x: Foo = true;
```

and in declaration emit like in

```ts

// ./c.ts
import { Foo } from "./a.js"

function f(x: Foo) {
  return x;
}
```
Repository: bitcoin
Issue: contrib: Autogenerate bash completion
Labels: Feature,good first issue

We have a bash completion file, which needs to be updated manually: https://github.com/bitcoin/bitcoin/pull/17282#issuecomment-547020006

However, given our argparse module and RPCHelpMan, I believe it should be possible to autogenerate it with maybe a python script.

If it should be necessary to run a bitcoind instance as an http server for rpc request to auto-generate the bash completion, this could be implemented as a functional test (written in python).
Repository: go
Issue: os: file write blocks subsequent Open() with "sharing violation" in OneDrive
Labels: ExpertNeeded,OS-Windows,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.13.3 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

Windows 10, amd64 (_go env_ not available on that machine)

### What did you do?
EDIT: updated reproducer
```
package main

import ( "io/ioutil"; "time" )

func main() {
   aFile := "z35219.txt"
   for {
      err := ioutil.WriteFile(aFile, []byte("abcdefghijklmnopqrstuvwxyz"), 0600)
      if err != nil { panic(err) }
      aTmr := time.NewTimer(10*time.Second)
      for aRead := true; aRead; {
         select {
         case <-aTmr.C:
            aRead = false
         default:
            _, err := ioutil.ReadFile(aFile)
            if err != nil { panic(err) }
         }
      }
   }
}
```

### What did you expect to see?

No error; this is the case on Win7.

### What did you see instead?

On Win10:
```
panic: open z35219.txt: The process cannot access the file because
 it is being used by another process.

goroutine 1 [running]: main.main() /.../z35219.go:17 +0x10a
```

### Discussion

I see this intermittently in a real app.

EDIT: _the following is related to the initial reproducer_
I wondered whether GetFileAttributesEx() changed in Windows 10 (or 8) to disallow concurrent read access. But the above program still fails (maybe less often?) on Win10 if I patch stat() to only call CreateFile(), like so:
```
const READ_CONTROL, FILE_READ_ATTRIBUTES uint32 = 0x20000, 0x80 // from WinAPI docs
h, err = CreateFile(namep, READ_CONTROL|FILE_READ_ATTRIBUTES, FILE_SHARE_READ, nil,
                    OPEN_EXISTING, createFileAttrs, 0)
```
Those arguments are suggested here: https://stackoverflow.com/questions/52813820/createfile-fails-because-of-sharin-violation-because-some-other-os-process-is-us

Stat(): https://golang.org/src/os/stat_windows.go#L76
Open(): https://golang.org/src/syscall/syscall_windows.go#L266

@jstarks any ideas?

cc @alexbrainman @zx2c4 @bcmills 
@gopherbot add release-blocker OS-Windows
Repository: TypeScript
Issue: Investigate Delayed Go-to-Definition Behavior in Editors
Labels: Bug,Domain: Performance,Domain: Symbol Navigation

Today go-to-definition across files takes a minute in large projects when a file isn't currently opened in an editor.

```ts
// a.ts
import "./b.js" // <- jump to definition on this path

// b.ts
export function foo() {
}
```

It's not clear why this is the case when the language service is fully initialized and program loading has occured - the file path is already known (even when declaration maps are enabled). So it seems like the editor is taking a bit longer than it needs, or go-to-definition is being blocked by some other operation (which should potentially be considered lower-priority).
Repository: TypeScript
Issue: Update contributing documentation
Labels: Docs,Infrastructure

@RyanCavanaugh recently walked through `CONTRIBUTING.md` and our wiki and commented that the process is a bit old and crusty. In the interest of making things more obvious for contributors, we need to clean things up here.
Repository: rust
Issue: Cycle detected when using associated type bounds in super trait
Labels: A-diagnostics,A-trait-system,T-compiler,F-associated_type_bounds,D-confusing,D-terse,I-cycle

I don't know if this is a bug or expected behaviour. But I'm encountering the following error when compiling the following code.
```rust
#![feature(associated_type_bounds)]

trait A {
    type T;
}

trait B: A<T: B> {}
```

```rust
error[E0391]: cycle detected when computing the supertraits of `B`
 --> src/main.rs:6:15
  |
6 | trait B: A<T: B> {}
  |               ^
  |
  = note: ...which again requires computing the supertraits of `B`, completing the cycle
note: cycle used when collecting item types in top-level module
 --> src/main.rs:6:1
  |
6 | trait B: A<T: B> {}
  | ^^^^^^^^^^^^^^^^
```

But if I merge the traits `A` and `B` into the trait `C` it works.
```rust
trait C {
    type T: C;
}
```
I think the first example should work as good as the second since the trait `C` is only split into two traits `A` and `B` with same functionality.
Repository: flutter
Issue: google_sign_in plugin example should have an encrypted GoogleSignIn-Info.plist
Labels: platform-ios,p: google_sign_in,package,c: proposal,P2,team-ios,triaged-ios

Right now the Google Sign In plugin isn't adequately integration tested.

The iOS version of the example requires following the signup steps in the README or it won't work. Because we don't necessarily want everyone sharing the same GoogleService-Info.plist, we might want to write the file using Cirrus encypted data. Perhaps there's another solution that can run on non-Cirrus infrastructure.

We'll also need the EarlGrey bindings for Flutter.
Repository: flutter
Issue: 960 grid for web development
Labels: c: new feature,framework,P3,team-framework,triaged-framework

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->

Just a suggestion, if you could add a feature for displaying 960 grid for web development.
example: https://960.gs/demo.html

Something similar to debug label where it is displayed during development. Also, it would be nice if there is a possibility to align elements on those grid lines (or guide lines) by code.
Repository: neovim
Issue: view unexpectedly altered when 'winminheight' is 0
Labels: ui,bug-regression,has:bisected

 - `nvim --version`: NVIM v0.5.0-116-g4f4f5ef4f
 - `vim -u DEFAULTS` (version:  8.1 Included patches: 1-2231) behaves differently? Yes
 - Operating system/version: Ubuntu 16.04.6 LTS
 - Terminal name/version: XTerm(322)
 - `$TERM`: xterm-256color

### Steps to reproduce

Run this shell command:

    nvim -Nu NONE +'set wmh=0 | au WinEnter * wincmd _' +'sp|$' <(curl -Ls https://raw.githubusercontent.com/neovim/neovim/master/LICENSE)

Then, press `C-w w` twice.

### Actual behaviour

The view of the top window has changed. Before pressing `C-w w` twice, the topline was `252` (output of `:echo getwininfo()[0].topline`); now it's `281`.

![gif](https://user-images.githubusercontent.com/8505073/67738442-edf12200-fa0e-11e9-9414-827b38889cd6.gif)

### Expected behaviour

The view is preserved; i.e. the topline stays the same.

### Additional information

In Vim, the view is preserved:

![gif](https://user-images.githubusercontent.com/8505073/67738487-33155400-fa0f-11e9-91f6-1b52fc785ba4.gif)

---

If `'winminheight'` is set to a value different than 0, the view is preserved.

---

I searched for the keywords `winminheight` and `squash` in the commit messages of Vim patches, but couldn't find anything which seems relevant (there is [`7.4.372`](https://github.com/vim/vim/releases/tag/v7.4.372) but it's absent from the output of `./scripts/vim-patch.sh -l`).
Repository: vue
Issue: Property '$options' does not exist on type 'VueConstructor<Vue>'.
Labels: typescript

### Version
2.6.10

### Reproduction link
[https://jsfiddle.net/jafbudpk/3/#&togetherjs=HlrrSLGnsb](https://jsfiddle.net/jafbudpk/3/#&togetherjs=HlrrSLGnsb)







### Steps to reproduce
```
import Vue, { PluginFunction } from 'vue';
interface PluginOptions {}

export const Plugin: PluginFunction<PluginOptions> = function Plugin(Vue, PluginOptions): void {
  Vue.mixin({
    created() {
      this.$options.socket = 1;
    }
  });
};

```

### What is expected?
The `$option` should be already type right.

### What is actually happening?
  Property '$options' does not exist on type 'VueConstructor<Vue>'.ts(2339)

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: opencv
Issue: Segmentation fault when inheriting from openCV cpp-classes in Python 
Labels: feature,category: python bindings

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

Please:

* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.


This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 4.1.0
- Operating System / Platform => macOS 10.15
- Compiler => homebrew version
-->

- OpenCV => 4.1.0
- Operating System / Platform => macOS 10.15
- Compiler =>  homebrew

##### Detailed description

<!-- your description -->
I get a segmentation fault when calling a python class which inherits from a openCV-cpp-class (similar to the issue described here: https://github.com/microsoft/ptvsd/issues/1410). This makes extending openCV-classes in Python unreliable. I'm not even sure if it should be possible to inherit openCV classes (as superclass) in Python because the .create()-policy to instantiate a new instance will always return the pure cpp-class not the inherited python class. Instantiation without .create() (like foo = PyDerivedClass()) will lead to a TypeError (incorrect type of self ...) when trying to call the inherited cpp-methods.

All in all, it might be worth rethinking which classes etc. should have python bindings (e.g. cv2.ml_StatModel can be called in python but its pretty much useless) and/or make a note somewhere in the documentation.

##### Steps to reproduce

    ```.py
    import cv2
    class DerivedClass(cv2.ml_NormalBayesClassifier):
        def __init__(self):
            super().__init__()
    
    for i in range(3):
        foo = DerivedClass()

    ```
Repository: pytorch
Issue: torch.cuda.close request to be able to reset communications
Labels: feature,module: cuda,triaged

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
Is it possible to reinitialize communication with the cuda drivers once they have been made? At the moment, `torch.cuda.init()` calls a lazy init function which sets up communication. Is it possible to close that communication and open it again? 

## Motivation
I want to set the `CUDA_VISIBLE_DEVICES` env variable programmatically. This currently works if it is set before any calls to `torch.cuda.init`, but if any `torch.cuda` functions are called first, then the comms are open and it ignores the env variable.

<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

## Pitch

<!-- A clear and concise description of what you want to happen. -->
Perhaps a function called `torch.cuda.close()` which calls `nvmlShutdown` and resets the `_initialized` flag. Then we could make a subsequent call to `torch.cuda.init()` to reopen communications.

## Alternatives
Perhaps a way to reset the device counts based on the CUDA_VISIBLE_DEVICES environment variable.
Repository: rust
Issue: Document query modifiers
Labels: C-enhancement,P-medium,T-compiler

We should document what the [query modifiers](https://github.com/rust-lang/rust/blob/eb5ef813f0d6e3fe8edd3abb046a18f5b1a8cc48/src/librustc_macros/src/query.rs#L33-L62) mean in a more involved form than currently, ideally in rustc-guide or so, with a comment in src/librustc/query/mod.rs pointing to there.
Repository: rust
Issue: LLVM is unable to eliminate bounds checks with widening multiply
Labels: A-LLVM,I-slow,T-compiler

Demonstration:
```rust
pub fn bar(rand: u32, arr: &[u8]) -> u8 {
    let mul = rand as u64 * arr.len() as u64;
    let hi = (mul >> 32) as u32;
    arr[hi as usize]
}
```
Note that `hi` *must* be less than `arr.len()`. LLVM is unable to prove this, and inserts a bounds check on array access. Extract from the [compiled assembly](https://play.rust-lang.org/?version=nightly&mode=release&edition=2015&gist=dbcdcfad186ca1b2fce019397931e007):
```
	imulq	%rdx, %rsi
	shrq	$32, %rsi
	cmpq	%rdx, %rsi
	jae	.LBB0_2
```

Application: https://github.com/rust-random/rand/issues/592

(Note: we have multiple implementations of widening multiply [here](https://github.com/rust-random/rand/blob/master/src/distributions/utils.rs#L19).)
Repository: puppeteer
Issue: page.emulateMediaFeatures([{ name: 'hover', value: 'hover' }]) throws error
Labels: feature,upstream,good first issue,confirmed

### Steps to reproduce

**Tell us about your environment:**

* Puppeteer version: 2.0.0, Headless
* Platform / OS version: Ubuntu 18.04.3 LTS
* URLs (if applicable):
* Node.js version: v10.16.3

**What steps will reproduce the problem?**

_Please include code that reproduces the issue._

1. Create a new page:
    ```js
    const page = await browser.newPage()
    ```
2. Emulate the hover media query:
    ```js
    await page.emulateMediaFeatures([{ name: 'hover', value: 'hover' }])
    ```

**What is the expected result?**

The feature should be emulated.

**What happens instead?**

The exception `Unsupported media feature: hover` is thrown

**Context**

When running Puppeteer headlessly on Linux, the result of the following media query is `false`:
```js
window.matchMedia('(hover: hover)').matches
```
Meanwhile on a Mac, the same query returns  `true`.

I would like to test media queries in our e2e tests, and not being able to control this behavior prevents this from being possible.
Repository: flutter
Issue: in_app_purchase plugin - detecting subscription lapse client-side
Labels: d: api docs,p: in_app_purchase,package,team-ecosystem,P3,triaged-ecosystem

I'm using the in_app_purchase plugin (v0.2.2) for Flutter to implement in-app auto-renewing subscription purchasing. I'm struggling to figure out how I check if a user's existing subscription has lapsed, which could be because of:
- user has cancelled and the remaining time on the current billing period has elapsed
- user has not auto-renewed and the remaining time on the current billing period has elapsed
- payment error / in grace period

Is this supported by the plugin, and if not are there any plans to? I'm struggling to figure out which functions I could use to implement periodic checks on ios and android. Here's what I've figured out so far:

IOS:
- documentation is on [https://developer.apple.com/documentation/storekit/in-app_purchase/handling_subscriptions_billing](https://developer.apple.com/documentation/storekit/in-app_purchase/handling_subscriptions_billing)

> Your app needs to determine which content the user has access to based on the period of time their auto-renewable subscription is active. To provide the customer access to the content to which they are entitled, keep a record of the date that each piece of content is published. Read the original_purchase_date, purchase_date, and expires_date field from each receipt entry to determine the start and end dates of each subscription period

How do you get the `expires_date` field from the ios receipt using in_app_purchase? The closest thing i could find is that `PurchaseDetails` has a `PurchaseWrapper` which contains a `purchaseTime` field - but the ios docs specifically say

> Do not calculate the subscription period by adding a subscription duration to the purchase date. That approach fails to take into account the free trial period, the marketing opt-in period, and the content made available immediately after the user purchased the subscription.

Does in_app_purchase surface an `expires_date` or am I missing something?

ANDROID:
- documentation [https://developer.android.com/google/play/developer-api.html#subscriptions_api_overview](https://developer.android.com/google/play/developer-api.html#subscriptions_api_overview)

It looks like we need to use Google Play Developer API to query a particular subscription to determine if it's still valid. To do this you need:

> app package name, purchase or subscription ID, and the purchase token

How do you get the `purchaseToken` for Android? It looks like `PurchaseWrapper` contains this field, but the docs say `PurchaseWrapper` is null on Android:

```
 /// Points back to the `BillingClient`'s [PurchaseWrapper] object that generated this [PurchaseDetails] object.
  ///
  /// This is null on Android.
  final PurchaseWrapper billingClientPurchase;
```

I'm totally stuck. I don't see how this plugin can be used for subscriptions if you can't detect lapsed subscriptions. Any advice highly appreciated :)
Repository: godot
Issue: JSON fails to parse object keys other than String type
Labels: bug,topic:core,confirmed

**Godot version:**
3.2-alpha

**Issue description:**
Converting a variable to JSON with `to_json` method and back with `parse_json` doesn't work on object keys if they are not of type `String`.

**Steps to reproduce:**
```gdscript
extends Node

func _ready():
	var dict = {
		{"key_dict": true}: "value"
	}
	var json = to_json(dict)
	var parsed = parse_json(json)
	
	var key_dict = parsed.keys()[0]
	
	print("Contents: %s, type: %s" % [key_dict, typeof(key_dict)])
	assert(key_dict is Dictionary) # FAIL: got String!
```
Prints:
```
Contents: {key_dict:True}, type: 4
```
**Minimal reproduction project:**
[parse-json-key-dict.zip](https://github.com/godotengine/godot/files/3783978/parse-json-key-dict.zip)