sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: node
Issue: Uncaught error stack trace is misformatted on some platforms
Labels: tty,errors

* **Version**: v12.9.1
* **Platform**: Windows 8.1 (6.3 Build 9600)
* **Subsystem**: console

Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors, if needed.

PR https://github.com/nodejs/node/pull/27052 introduced stack trace highlighting, but it bypasses libuv and prints the raw string. It works on Linux and on some Windows console emulators that support ANSI colors, but does not work on most Windows consoles, including the default console (cmd.exe) on Windows 8.1

As pointed out in https://github.com/nodejs/node/pull/28308#issuecomment-503790444, a possible fix is to modify `PrintErrorString()` to use `uv_write`. However, I tried different approaches, but can't get all tests to pass. I'm opening this thread so that we at least have a tracking issue for this old bug.
Repository: vscode
Issue: Convert inline comment to block comment, and vice-versa
Labels: feature-request,editor-comments

Issue Type: <b>Feature Request</b>

I have several JS lines commented out, like so:

```js
// This
// is
// a
// test
```

When I select these lines, there should be a VSC command to convert the inline comments to one block comment. So that the result is:

```js
/**
 * This
 * is
 * a
 * test
 */
```

And then the opposite can be allowed, too, so that when I select the block comment, I can run a command to convert them to several inline comments.

VS Code version: Code 1.37.1 (f06011ac164ae4dc8e753a3fe7f9549844d15e35, 2019-08-15T16:16:34.800Z)
OS version: Darwin x64 18.7.0


<!-- generated by issue reporter -->
Repository: go
Issue: x/mobile: gobind failed: exit status 2
Labels: NeedsInvestigation,mobile

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.9 linux/amd64
</pre>

### What version of Gomobile are you using (`gomobile version`)?

<pre>
$ gomobile version
gomobile version +c6da959 Fri Aug 30 20:13:51 2019 +0000 (android); androidSDK=/home/jason/Android/Sdk/platforms/android-29
</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/jason/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jason/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-build025736357=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
```
gomobile bind -target android -o v2.aar github.com/v2ray/v2ray-core
```
### What did you expect to see?
nothing (build success)


### What did you see instead?
<details><summary>Error</summary><br><pre>gomobile: /usr/local/go/bin/go build -buildmode=c-shared -o=/tmp/gomobile-work-571427279/android/src/main/jniLibs/armeabi-v7a/libgojni.so gobind failed: exit status 2
# gobind
core_android.c:380:1: error: redefinition of 'Java_core_InboundHandlerConfig_getTag'
core_android.c:306:1: note: previous definition is here
core_android.c:554:1: error: redefinition of 'Java_core_OutboundHandlerConfig_getTag'
core_android.c:480:1: note: previous definition is here
core_android.c:573:1: error: redefinition of 'Java_core_OutboundHandlerConfig_getExpire'
core_android.c:468:1: note: previous definition is here
core_android.c:588:1: error: redefinition of 'Java_core_OutboundHandlerConfig_getComment'
core_android.c:460:1: note: previous definition is here</pre></details>
Repository: TypeScript
Issue: Continuing #17110 - Given generic `W extends { x: A }` should be able to use `keyof W['x']` to index w.x
Labels: Suggestion,Experimentation Needed

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  `typescript@3.7.0-dev.20190831`

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** tagged disjoint union generic

This issue stems from a question I asked on [StackOverflow](https://stackoverflow.com/questions/56718622/generic-function-operating-on-tagged-disjoint-union-why-is-type-specification?noredirect=1#comment100017317_56718622) that @jcalz generously researched for me. I adapted his example to be a closer parallel to the example given in #17110.

**Code**

```ts
interface A { a: string; }

interface W {
    x: A
}

function foo<W1 extends W>(w: W1, k: keyof W1['x']) {
  w.x[k]; // Type 'keyof W1["x"]' cannot be used to index type 'A'.

  const x: W1['x'] = w.x; // Okay
  x[k] // Okay
}
```

**Expected behavior:**

Same as #17110. However, unlike #17110, `W['x']` is only `A` instead of `A | B | undefined`. The [explanation given](https://github.com/microsoft/TypeScript/issues/17110#issuecomment-459911913) as to why #17110 was not a bug was:

> The constraint of `keyof W1["x"]` is `keyof (A | B)`, which simplifies to `keyof A & keyof B`, which is `never` (because there are no common properties).

However, here `keyof W1['x']` is `keyof A` which is _not_ `never`.

**Actual behavior:**

Same as #17110.

**Playground Link:** http://www.typescriptlang.org/play/#code/JYOwLgpgTgZghgYwgAgILIN7LgLmQZzClAHMBuZAXwChrRJZEUB1Ta5D5ADz1WpuowAriARhgAexDIYEiQB5mARmQQukEABN8yZgD4AFAHc8ygDTIA1nksQAnhJi6lAbQDkXNwF0AlGw5GAHRcLpZeFAD0EcgAKnYADihutg5Oyi4ARFwZXm7ICHAgIBJgyABGKEL4EJrIYBLIoJpqdQlJqG6BtBwIUoTcpq4e3sgAvMhBXJHRAPKWcHbs3KFeyFHIcwv8QA

**Related Issues:** #17110
Repository: flutter
Issue: [in_app_purchase][ios] - Listener not working for items when a user is trying to re-purchase a not consumed item
Labels: platform-ios,p: in_app_purchase,package,P2,team-ios,triaged-ios

Hi, I am having problems with items that have not been consumed on iOS.

I'm not sure if the behavior is intended but my issue is as following:

1) I purchase a consumable item
2) I fake that an error happened and the item failed to be consumed
3) When I try to make a purchase for the same item I get a message from Apple that the item will be restored for free, but there is no new data in InAppPurchaseConnection.instance.purchaseUpdatedStream

I do have a solution in mind, which is to save the PurchaseDetails and re-try to consume it at a later time, but I am not 100% sure that's how this is intended to work.


## Flutter doctor
```
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/baloo/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.2

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.37.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.3.0
```
Repository: godot
Issue: TabContainer ignores `label_valign_fg`, `hseparation`, `label_valign_bg` and `top_margin` constants (fixed in `master`)
Labels: bug,confirmed,topic:gui

**Godot version:** 979e772


**Issue description:** After briefing through the source code for [`TabContainer`](https://github.com/godotengine/godot/blob/master/scene/gui/tab_container.cpp) I noticed that the `top_margin` is never taken into account. While in the editor I also noticed that the changing the custom constant didn't have any influence on the positioning. 

![image](https://user-images.githubusercontent.com/8056898/64073671-74a0b180-cca1-11e9-95fa-13df95facb84.png)
_The selected property_

**Edit:** Additionally `label_valign_fg` and `label_valign_bg` aren't used in the code
Repository: flutter
Issue: Drag n Drop functionality needs to be added in Flutter_Driver
Labels: c: new feature,framework,t: flutter driver,c: proposal,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
Drag element fuctionality in flutter_driver
<!--
     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
As Appium is depended upon flutter_driver APIs. So we required other APIs which needs to be integrated. So, for now, drag and drop functionality is not there in Flutter_Driver. We need an API through which we can drag an element to a particular position(target should be an element or x/y co-ordinate)
<!--
     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.
-->
Repository: godot
Issue: Joints slide
Labels: bug,confirmed,topic:physics

**Godot version:**
![image](https://user-images.githubusercontent.com/7307968/64075536-dbca6000-ccb9-11e9-8444-82b2304d2f06.png)

**OS/device including version:**
Windows 10 64

**Issue description:**
There is looseness in the joint that can't be removed (it's not rigid). I'm guessing this is not supposed to happen?

![2019-09-01_13-05-46](https://user-images.githubusercontent.com/7307968/64075592-627f3d00-ccba-11e9-8568-21bffbabe65e.gif)

**Minimal reproduction project:**
[physics test1.zip](https://github.com/godotengine/godot/files/3563401/physics.test1.zip)
Repository: TypeScript
Issue: Narrow length of tuples
Labels: Suggestion,In Discussion

## Search Terms
tuple length narrow

## Suggestion
Narrow the `length` property on tuple types when used as an Array.

## Use Cases
Often times a method expects an array of some particular length.  This can be expressed as `[T, T, T]` where the number of tuple items is the length of the array.  However, sometimes the length is itself generic and in order to properly constrain the type you need to type the parameter as `Array<T> & {length:L}`.  The problem with this is that if you have a tuple of length L, the compiler still assumes that the `length` is of type `number`.

It would be useful if a tuple type correctly narrowed the type of `length` to be the number of elements in the tuple.  This way you could pass a tuple into a method that expects a fixed length array without casting.

## Examples
```typescript
declare function bytesToInt(bytes: Array<number> & {length:4}): number
bytesToInt([1,2,3,4]) // currently errors, would be nice if it didn't.
bytesToInt([1,2,3,4] as Array<number> & {length:4}) // error prone and something the compiler could do for you.
```

## 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).

----

It would be super cool if TypedArrays could get this behavior, since their `length` is fixed at construction time.  I'm not sure exactly how to achieve this, so I'll leave it out of this suggestion but if it is possible for `new Uint8Array(4)` to result in a type `Uint8Array & {length:4}` that would be great.
Repository: TypeScript
Issue: Resolving hoisted `typeRoots` paths
Labels: Suggestion,Needs Proposal

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.6.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
* resolve typeRoots in parent package node_modules
* sharing tsconfig in yarn workspaces
* use hoisted tsconfig in child package

**Code**

I've set up a Lerna monorepo which uses Yarn Workspaces. Within this monorepo is a config package, which other packages depend on. This config package has `@types/node` and `@types/jest` as dependencies.

From sibling packages, the shared config is used like so:

```json
{
  "extends": "@project/config/ts.json",
  "include": ["src", "tests"],
  "compilerOptions": {
    "outDir": "lib"
  }
}
```

In the shared config, I point to the appropriate types root:

```json
{
  "compilerOptions": {
    // ...
    "typeRoots": ["node_modules/@types"]
  }
}
```

However, within the shared config package, `@types/*` have been hoisted from the local `node_modules` to the monorepo's top-level `node_modules`. This behavior is usually fine given node's resolution... but it seems the config does not resolve to its parent's `node_modules`.

**Expected behavior:**

For the specified type root to resolve to the parent's `node_modules`

**Actual behavior:**

Tests fail with messages such as `Cannot find name 'describe'. Do you need to install type definitions for a test runner? ...`

One workaround:

```json
{
  "compilerOptions": {
    // ...
    "typeRoots": ["../../node_modules/@types"]
  }
}

```

This workaround isn't very clean. Lerna & Yarn definitely pose some complexity for type root resolution. Hopefully resolving parents is considered a worthwhile modification.

Please let me know. Thank you :)
Repository: rust
Issue: #[cold] attribute does is not propagated across crates
Labels: I-slow,A-codegen,T-compiler,C-bug

Hi!

When hacking on `once_cell`, I've noticed that it is significantly faster than `lazy_static`. Digging into this, it seems like the difference is in the usage of the `#[cold]` attribute. 

Specifically, I've applied a patch which marks initialization function as `#[cold]` in lazy_static, and it indeed improved perf quite a bunch:

https://github.com/matklad/lazy-static.rs/commit/7863cc078d7d21108feacd3a26ef9801ea667457

And this is really weird, because `Once`, which powers `lazy_static`, already has the `#[cold]` attribute. Seems like it doesn't take an effect for whatever reason? 

@rustbot modify labels to: +I-slow
Repository: go
Issue: cmd/vet: incorrect printf "invalid argument index" with ... argument
Labels: help wanted,NeedsFix,Analysis

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

tip (79669dc705)

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?

darwin/amd64

### What did you do?

https://play.golang.org/p/uIeIGQWBhgB
```
package main

import (
	"fmt"
)

func main() {
	s := []interface{}{"Hello", "playground"}
	fmt.Printf("%[2]s\n", s...)
}
```

### What did you expect to see?
No vet warning.

I think this is a valid program, which prints "playground" as intended. It doesn't seem like a potential bug to me.


### What did you see instead?
```
./prog.go:9:2: Printf format has invalid argument index [2]
```
Repository: flutter
Issue: default plugin gitignore too permissive
Labels: tool,c: proposal,P2,a: plugins,team-tool,triaged-tool

I recently started developing my first plugin and hit a pretty hard to debug situation when deploying it inside the app of a customer, due to the plugin scaffold's .gitignore.

My flutter plugin bundles a precompiled .framework that contains a Resources.bundle with a bunch of icons. Concretely i'm referring to the GoogleCastSDK. [Here you can see the project.](https://github.com/mschneider/flutter_google_cast_plugin/tree/master/ios/Frameworks/GoogleCastSDK-4.4.4/GoogleCast.framework/GoogleCastUIResources.bundle/Icons)

When testing the plugin with the example app, I did not experience any issues, but once I added the plugin to my client's app as a git reference in the `pubspec.yaml` my plugin caused the app to crash with the following error messages:
```
2019-09-01 22:04:13.188048+0200 Runner[3781:1245359] Could not load the "Icons/pause_48pt" image referenced from a nib in the bundle with identifier "(null)"
```

Apparently the folder containing the Icons `Icons` was not included in the github repo due to a rule in the default `ios/.gitignore` of the flutter plugin scaffold.

The respective rule is
```
Icon?
```

I managed to fix the issue by force-adding the respective files in my own repository, effectively overriding the .gitignore rule. But because this nasty pitfall was quite difficult to debug 🤯 I thought it would be best to discuss here, why this rule was created and if it is possible to make it less restrictive.

Cheers,
Max
Repository: go
Issue: cmd/compile: does not check go:writebarrierrec for print functions
Labels: NeedsInvestigation,compiler/runtime

The runtime function `sighandler` is marked `go:nowritebarrierrec`.  It calls `print` which cmd/compile turns into calls to `printstring` and friends.  However, if I modify `printstring` to force a write barrier, no error is issued when compiling the runtime package.  If I then mark `printstring` as `go:nowritebarrierrec`, I do get an error.  My conclusion from this is that cmd/compile does not apply `go:nowritebarrierrec` to the calls generated by calling the `print` function.

I believe this is because in `(*nowritebarrierrecChecker).check` the `printstring` functions are never added to the `symToFunc` map.

CC @aclements
Repository: pytorch
Issue: The inference speed of the torch c++ dynamic library compiled manually is slower than the torch library officially provided
Labels: module: binaries,module: performance,module: cuda,triaged

## ❓ Questions and Help
I compile the torch c++ library(v1.2.0) with the command "python tools/build_libtorch.py". And then load the model of renet50 with the compiled library(batchsize=5), the speed  is  20fps. But when I load the model resnet50 with the library officially provided from the website  https://download.pytorch.org/libtorch/cu100/libtorch-shared-with-deps-1.2.0.zip, the speed is 130fps. Why is this fast?

cc @ezyang
Repository: material-ui
Issue: Togglebutton does not follow WAI-ARIA toolbar keyboard navigation principles
Labels: new feature,accessibility,component: toggle button

<!-- Provide a general summary of the issue in the Title above -->
Togglebuttons do not follow WAI-ARIA toolbar keyboard navigation principles.

<!-- Checked checkbox should look like this: [x] -->

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯
Navigation works only via (Shift +) TAB key.
https://material-ui.com/components/toggle-button/

## Expected Behavior 🤔
Navigation should be possible with arrow keys, home, end ...
See https://www.w3.org/TR/wai-aria-practices/examples/toolbar/toolbar.html
Repository: rust
Issue: Missed-optimization: extern "C" fn type calls are not nounwind
Labels: A-LLVM,I-slow,A-FFI,T-lang,T-compiler

See https://rust.godbolt.org/z/9UvEyu

```rust
#![feature(unwind_attributes)]

extern "C" { 
    #[unwind(allow)] fn foo(); 
    // fn bar();
    static bar: extern "C" fn(); 
    static mut BAR: i32;
}

struct Foo;
impl Drop for Foo {
    fn drop(&mut self) {
        unsafe { BAR = 42; }
    }
}

pub unsafe fn unwind() { 
    let x = Foo;
    foo(); 
    std::mem::forget(x);
}
pub unsafe fn nounwind() { 
    let x = Foo;
    bar(); 
    std::mem::forget(x);
}
```

When the function `extern "C" { fn bar(); }` is called, the `nounwind` function is compiled to:

```asm
example::nounwind:
        jmpq    *bar@GOTPCREL(%rip)
```

However, when the function type `static bar: extern "C" fn();` is called, this sub-optimal machine code is emitted:

```asm
example::nounwind:
        pushq   %rbx
        movq    bar@GOTPCREL(%rip), %rax
        callq   *(%rax)
        popq    %rbx
        retq
        movq    %rax, %rbx
        callq   core::ptr::real_drop_in_place
        movq    %rbx, %rdi
        callq   _Unwind_Resume@PLT
        ud2
```

This means that we can't call the large majority of C FFI functions, which cannot unwind, and all of the C++ `noexcept` functions, which cannot unwind either, from Rust function pointers efficiently.
Repository: go
Issue: cmd/compile: optimize conditional pointer assignment
Labels: Performance,NeedsDecision,compiler/runtime

### What version of Go are you using (`go version`)?
<pre>
$ go version
go version devel +d15dfdc Sun Sep 1 02:31:50 2019 +0000 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes.

### What did you do?
I compiled the following function (https://godbolt.org/z/rRkMVJ):
```go
func fn(cond bool) int {
	a := new(int)
	if cond {
		*a = 1
	} else {
		*a = 2
	}
    return *a
}
```

### What did you expect to see?
I expected that the generated instructions would be similar to https://godbolt.org/z/q0k3NT

### What did you see instead?
Instead, there are `MOV` instructions to temporary stack variables and there is no use of the `CMOV` instruction.