sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/go: define error codes and use them to describe errors.
Labels: NeedsInvestigation,GoCommand

Go command, particularly, `go list` and `go mod download`, now serves as the canonical way to retrieve information about modules and packages. Programs and libraries that need to understand how Go handles build and interprets source code are supposed to invoke the command and interpret the command's output. For example, `golang.org/x/tools/go/packages`  depends on invocation of `go list`, and we expect some module proxies to utilize `go mod download` or `go list`.

Go command provides -json and other flags to output in a structured form to ease the result parsing. But, handling error cases programmatically is still difficult. To be useful like a library, Go command line tool output should allow programs to distinguish different failure cases (invalid arguments, failed precondition, resource unavailability (network, tool, disk, ...) , permission issue, ...).

Currently,

* Command line exit code: Go command exits with a non-zero exit code for "some" error cases (often 1). But this exit code doesn't carry enough information. Depending on the exit code or error messages from a command line anyway is not a reliable way.

* Error/Err fields, as in `-json` or `go list  -e -f` results, provide some error details, but they are "string" types. Parsing and depending on the message is not reliable or scalable.

<pre>
$ go mod download -json golang.org/x/foo@v1.0.1
{
	"Path": "golang.org/x/foo",
	"Version": "v1.0.1",
	"Error": "unrecognized import path \"golang.org/x/foo\" (parse https://golang.org/x/foo?go-get=1: no go-import meta tags ())"
}
$ go mod download -json golang.org/x/text@v0.3.7
go: finding golang.org/x/text v0.3.7
{
	"Path": "golang.org/x/text",
	"Version": "v0.3.7",
	"Error": "unknown revision v0.3.7"
}
</pre>

One option is that we define a set of status codes (like https://github.com/grpc/grpc/blob/master/doc/statuscodes.md or like HTTP, JSON error codes) 
and use that to describe the kind of the error.

(sidenote: I wished Go2 error proposals also covered encoding/decoding of the error types and root causes but it seems that was not discussed.)

Moreover, we also need to fix the Go command to report the root cause of the error accurately.
For example, I ran the following example while I had not network access. Even though the root cause of the failure is the (temporary) network issue, the error message is not distinguishable from what Go returns when the module does not exists.
<pre>
$ go list -m --versions --json -e golang.org/x/text
{
        "Path": "golang.org/x/text",
        "Error": {
                "Err": "module \"golang.org/x/text\" is not a known dependency"
        }
}
</pre>
I am happy to file a separate issue about misleading error messages if there is no existing open issue yet.

@jayconrod @bcmills 
@katiehockman @heschik @ianthehat
Repository: pytorch
Issue: Give clearer guidance about multithreading in PyTorch, and how to disable it
Labels: module: docs,triaged,module: multithreading

e.g. https://github.com/pytorch/pytorch/issues/16894

There's a lot of people asking about this, but no canonical source of information about it.

cc @jlin27 @mruberry
Repository: godot
Issue: Android in app purchase : can not save item that purchased and using iap.consume("pid")
Labels: bug,platform:android,topic:thirdparty

**Godot version:**
<!-- Specify commit hash if non-official. -->
Godot 3.1 beta 3

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Android

**Issue description:**
<!-- What happened, and what was expected. -->
I am using `logcat | grep godot` to checking the output.
+++
If using `iap.purchase("pid1")` and return ` godot   : purchase_success : pid1`.
But when I exit game then comeback, it's not return `has_purchased : pid1` as I expect.
+++
If I set `iap.set_auto_consume(false)` at the beginning of the game, my purchased item return `has_purchased : pid1` after I exit the game.
So if my game has both Consumables and Non-Consumables, how can I save my items purchased.
+++
I try to test `iap.consume("pid1")` (replace my source code `iap.purchase("pid1")`), but it's not return anything.
**Steps to reproduce:**
1/ Set up IAP and set purchase button:
a.
`iap.sku_details_query(["pid1"])`
`iap.connect("has_purchased",self,"iap_has_purchased")`
`iap.request_purchased()`
`#iap.set_auto_consume(false)`
....
`func iap_has_purchased(item_name):`
`print("iap_has_purchased :: " + str(item_name))`
b.
`func _on_NoAds_pressed() -> void:`
`iap.purchase("pid1")`
`#iap.consume("pid1")`
`iap.connect("purchase_success",self,"iap_purchase_success")`
`iap.connect("consume_success",self,"on_consume_success")`

2/ Remove comment `iap.set_auto_consume(false)`

3/ Comment `#iap.set_auto_consume(false)` and `#iap.purchase("pid1")`
Remove comment `iap.consume("pid1")`
=> not return anything.
**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Repository: go
Issue: cmd/go:  'go list -m -json' in an empty directory returns cryptic output
Labels: NeedsFix,modules

<pre>
$ go version
go version devel +56c9f8e8cf linux/amd64

$ cd $(mktemp -d)
$ GO111MODULE=on go list -m -json 
{
	"Path": "command-line-arguments",
	"Main": true
}
</pre>
Repository: flutter
Issue: Pass the --observatory-port flags in intent to FlutterActivityDelegate
Labels: c: new feature,tool,engine,customer: dream (g3),P2,team-engine,triaged-engine

Internal: b/362786296

Dream is asking for us to make the observatory port part of the args that we parse out of the intent that a FlutterActivityDelegate receives, so that they can wait to ensure that observatory is initialized before attempting to startup, and they can use the port for debugging the embedded FlutterView.

Obviously, since Intents can be made by any applications, there are some security issues that would need to be addressed.
Repository: vue
Issue: Provide way to destroy app in SSR
Labels: feature request

### What problem does this feature solve?

This issue is related to: https://github.com/vuejs/vue-router/issues/2606
Providing a way to destroy the app or mark the SSR request as complete (maybe on `$ssrContext`) is a potential fix to this problem, though maybe not the best one.

To recap:
A memory leak happens when the `router-view` is programmed to appear conditionally, and the component matching the view has a `beforeRouteEnter` guard and a callback is passed to it's `next(...)` method (e.g. `next(vm => {})`).

This will cause `vue-router` to poll every 16ms until the `router-view` materializes.

In a typical SSR application an instance of the app is created per request, which means the `router-view` will never appear, causing infinitely recursing poll methods.

### What does the proposed API look like?
A potential fix to this would be to detect when the app is destroyed in `vue-router`'s `poll` method, and allow the user to destroy the app that they created in `entry-server.js`.

A simplified example:
```javascript
export default context => {
  return new Promise((resolve, reject) => {
    const { app, router } = createApp(context)

    const { url } = context

    router.push(url)

    router.onReady(() => {
      resolve(app)
    }, reject)
  }).then(destroyApp)
}
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: storybook
Issue: Anchor tags within preview panel not working
Labels: bug,ui,core

Apologies if this isn't a bug or there's standard way to solve it, I couldn't find it. 

**Describe the bug**
An anchor tag within a page in the preview panel iframe doesn't take you to that position within the page, but reloads the top iframe with the page content.

**To Reproduce**
Steps to reproduce the behavior:
- Create a story within the preview panel, and add a link like <a href="#about">About</a>
- Add a target for that link further down the page`<a id="about"></a>`

**Expected behavior**
When clicking the "About" link it would take you to the target (i.e. scroll down to the appropriate spot).

Result: it reloads the page in to the top frame.
Repository: go
Issue: cmd/go: misleading error for a version following the module directive in go.mod
Labels: NeedsFix,modules

A module can not declare its own version in go.mod even though
* this is a basic need, not everyone gets its code through a git dump
* the json structure outputted by "go mod edit -fmt -json" clearly provides for it, and
* the error message reafirms a version should be possible

`module test/dummy v0.0.1`

````
go: errors parsing go.mod:
go.mod:1: usage: module module/path [version]
```
Repository: rust
Issue: Expose raw Stdout/err/in
Labels: T-libs-api,C-feature-request

Currently there is not easy/obvious way to get an unbuffered Stdout/err/in. The types do [exist in stdio](https://github.com/rust-lang/rust/blob/master/src/libstd/io/stdio.rs#L23), however they are not public for reasons not noted.

For example these types would be useful for CLI applications that write a lot of data at once without it getting unnecessarily flushed.

One can use platform specific extensions such as `from_raw_fd` on unix, and `from _raw_handle` on windows as a workaround.
Repository: rust
Issue: Tracking issue for #[ffi_const]
Labels: A-FFI,T-lang,B-unstable,C-tracking-issue,S-tracking-needs-summary,T-opsem

Annotates an extern C function with C [`const`](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes) attribute. 

https://doc.rust-lang.org/beta/unstable-book/language-features/ffi-const.html
Repository: rust
Issue: Tracking issue for #[ffi_pure]
Labels: A-FFI,T-lang,B-unstable,C-tracking-issue,S-tracking-needs-summary,T-opsem

Annotates an extern C function with C [`pure`](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes) attribute.
Repository: TypeScript
Issue: Improve typings of Array.map when called on tuples
Labels: Needs Investigation,Fix Available,Rescheduled

## Search Terms

- Array.map
- map tuple

## Suggestion

Using Array.map on a tuple should return a tuple instead of an array. In one of my projects I could achieve that using

```typescript
declare interface Array<T> {
    map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): { [K in keyof this]: U };
}
```
I haven't encountered any negative side effects.

## Use Cases

This can be useful when you want to use tuples as a fixed length array.

## Examples

```typescript
type Vec3D = [number, number, number];
let vec: Vec3D = [1, 2, 3];
let scaledVec: Vec3D = vec.map(x => 2 * x);
```

This is currently an error:
https://www.typescriptlang.org/play/#src=type%20Vec3D%20%3D%20%5Bnumber%2C%20number%2C%20number%5D%3B%0D%0Alet%20vec%3A%20Vec3D%20%3D%20%5B1%2C%202%2C%203%5D%3B%0D%0Alet%20scaledVec%3A%20Vec3D%20%3D%20vec.map(x%20%3D%3E%202%20*%20x)%3B

But with the proposed change it would not be an error:
https://www.typescriptlang.org/play/#src=declare%20interface%20Array%3CT%3E%20%7B%0D%0A%20%20%20%20map%3CU%3E(callbackfn%3A%20(value%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20U%2C%20thisArg%3F%3A%20any)%3A%20%7B%20%5BK%20in%20keyof%20this%5D%3A%20U%20%7D%3B%0D%0A%7D%0D%0A%0D%0Atype%20Vec3D%20%3D%20%5Bnumber%2C%20number%2C%20number%5D%3B%0D%0Alet%20vec%3A%20Vec3D%20%3D%20%5B1%2C%202%2C%203%5D%3B%0D%0Alet%20scaledVec%3A%20Vec3D%20%3D%20vec.map(x%20%3D%3E%202%20*%20x)%3B

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code (At least I think so...)
* [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: create-react-app
Issue: CRA2 doesn't work with reflect-metadata package
Labels: tag: underlying tools

<!--
  PLEASE READ THE FIRST SECTION :-)
-->

### Is this a bug report?

Yes


### Did you try recovering your dependencies?


No


### Which terms did you search for in User Guide?

None


### Environment

```bash
Environment Info:

  System:
    OS: Linux 4.4 Ubuntu 14.04.5 LTS, Trusty Tahr
    CPU: x64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz
  Binaries:
    Node: 9.11.2 - /usr/local/bin/node
    Yarn: 1.6.0 - ~/.yarn/bin/yarn
    npm: 5.6.0 - ~/.npm-global/bin/npm
  Browsers:
    Chrome: 71.0.3578.98
    Firefox: 64.0
  npmPackages:
    @types/react: ^16.8.2 => 16.8.2 
    @types/react-dom: ^16.8.0 => 16.8.0 
    react: ^16.8.1 => 16.8.1 
    react-dom: ^16.8.1 => 16.8.1 
    react-scripts: 2.1.3 => 2.1.3 
  npmGlobalPackages:
    create-react-app: 1.5.2
```


### Steps to Reproduce

Just follow the steps from the `Reproducible Demo` part and open console in browser.

### Expected Behavior

Browsers console should print `someProperty type: Number`.

### Actual Behavior

It prints `couldn't get the type :(`.

### Reproducible Demo

```bash
git clone git@github.com:elderapo/cra2-reflect-metadata-bug.git
cd cra2-reflect-metadata-bug
yarn
yarn start
```

### The problem

I think the problem is that babel completely strips out TS types before compilation process which makes it impossible for `reflect-metadata` package to do its work.
Repository: vue
Issue: Custom error message from prop validator
Labels: feature request

### What problem does this feature solve?
Currently, if a custom validator fails, we get a console error log saying `Invalid prop: custom validator check failed for prop 'email'` which is not helpful if you're using a third-party component. The only way to find out what failed is to jump into the source code of the component and try to understand what does this custom validator do. If the custom validator can provide a custom message that immensely changes developer experience e.g. Instead of `Invalid prop: custom validator check failed for prop 'email'`, it can say, `Invalid prop: the prop 'email' should be a valid GMail address.`

### What does the proposed API look like?
No change in API signature only behavior of `validator` function. If a validator function throws an error, use it as a custom message for prop validation. Also, allow `{{name}}` interpolation in error message. So the `email` can be defined as:

``` js
...
  props: {
    email: {
      validator(value) {
        if (!value.endsWith('@gmail.com')) throw new Error('the prop '{{name}}' should be a valid GMail address.')
        return true
     }
   }
...
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: rust
Issue: rpath is incorrect when crate links against compiler libraries
Labels: T-compiler,C-bug,A-miri

When compiling something like [Miri](https://github.com/solson/miri/) that links against librustc and other compiler libraries, even with `rpath = true` in my `Cargo.toml`, the resulting binary does not work without `LD_LIBRARY_PATH`:
```
$ target/release/miri
target/release/miri: error while loading shared libraries: librustc_driver-e8ad12ee87dce48b.so: cannot open shared object file: No such file or directory
```
Looking at the bianary, I noticed a RUNPATH and no RPATH and learned that RPATH got deprecated in favor of RUNPATH:
```
$ readelf -d target/release/miri | egrep 'R(UN)?PATH'
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../../../../rustc.2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/r/src/rust/miri/lib/rustlib/x86_64-unknown-linux-gnu/lib]
```

However, after some research, two things strike me about this:
* First of all, the number of "../" is wrong -- there is one too much. Starting at the directory containing the binary (`~/src/rust/miri/target/release`), going up 4 times leads to `~/src`, while the `rustc.2` directory is at `~/src/rust/rustc.2`.
* ~~Second, according to [this](https://stackoverflow.com/questions/6324131/rpath-origin-not-having-desired-effect), the binary needs to have the `ORIGIN` flag set for `$ORIGIN` to actually work, and that flag is not set:~~ I verified this locally and that flag does not seem to be needed.

    ```
    $ readelf -d target/release/miri | egrep -i flag
     0x000000000000001e (FLAGS)              BIND_NOW
     0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
    ```

I am also really surprised that it encodes the path to the sysroot as relative to the binary, but the path to other libs compiled in the same crate as absolute to the binary. Shouldn't it rather be the other way around?
Repository: godot
Issue: [2D physics] Random flipping of sprite when rotated.
Labels: bug,topic:core,topic:physics

**Godot version:**
3.1 beta3.

**OS/device including version:**
Linux 64-bit. Unlikely to be different under another OS.

**Issue description:**
The player sprite uses a `Raycast2D` to detect the angle of the floor underneath it (`PlayerPivot`). It also has this code:

(to disable when in the air):
```
	if ($PlayerPivot.enabled):	# If in the air and the pivot/floor edge detectors are enabled, disable them.
		$PlayerPivot.enabled = false
		$FloorEdgeLeft.enabled = false
		$FloorEdgeRight.enabled = false
		rotation = 0			# Avoid the player character being at odd angles when in the air and returning to the ground.
```

(to enable when on the floor, and check/change rotation angle):
```
	if (!$"PlayerPivot".enabled):	# If on the ground and the pivot/floor edge detectors are not enabled, enable them.
		$"PlayerPivot".enabled = true
		$"FloorEdgeLeft".enabled = true
		$"FloorEdgeRight".enabled = true
	else:							# Make sure the player is angled to the ground.
		ground_normal = $"PlayerPivot".get_collision_normal ()
		ground_angle = (floor_normal.angle_to (ground_normal))
		rotation = (rotation if player_speed < 0.05 else ground_angle)
```

This usually works as expected - the player sprite "follows" the angle of the floor underneath it. But sometimes, for reasons not entirely clear, sometimes the sprite will flip (usually by 90 degrees, but I've noticed other angles too). It seems to do this especially when having stopped mid-way on a slope and started to run up or down it, or running off the end of a slope and landing on a higher platform. This appears to be completely at random and is not reliably reproducible as far as I have determined.

I am looking at using the collision info for the player sprite's collision shape directly instead of a Raycast, but I'm not sure if I'd still run into the same problem. I'm also not 100% sure this isn't my error.

**Minimal reproduction project:**
https://github.com/Sslaxx/Sonic_Outbreak/commit/1ab26ed73835894d1dbacf4396320cba91f04855 (https://github.com/Sslaxx/Sonic_Outbreak/tree/godot_sonic_engine)
Repository: puppeteer
Issue: The `page.setCookie` method should also accept raw cookies
Labels: feature,confirmed

<!--
STEP 1: Are you in the right place?

- For general technical questions or "how to" guidance, please search StackOverflow for questions tagged "puppeteer" or create a new post.

https://stackoverflow.com/questions/tagged/puppeteer

- For issues or feature requests related to the DevTools Protocol (https://chromedevtools.github.io/devtools-protocol/), file an issue there:

https://github.com/ChromeDevTools/devtools-protocol/issues/new.

- Problem in Headless Chrome? File an issue against Chromium's issue tracker:

https://bugs.chromium.org/p/chromium/issues/entry?components=Internals%3EHeadless&blocking=705916

For issues, feature requests, or setup troubles with Puppeteer, file an issue right here!
-->

### Steps to reproduce

**Tell us about your environment:**

* Puppeteer version: 1.12.2
* Platform / OS version: macOS 10.14.3
* URLs (if applicable):
* Node.js version: 10.15.0

**What steps will reproduce the problem?**

```js
await page.setCookie('foo=bar');
```

**What is the expected result?**

It works.


**What happens instead?**

It doesn't.

---

Not being able to set raw cookies is very inconvenient. There are multiple situations where it would be useful:

1. Copy-pasting cookies from DevTools.
2. Accepting cookies as user input in a command-line tool.
3. Getting cookies from a server request, for example in Express where you read the cookie header, and then pass them to Puppeteer.

Yes, I could find an npm package for this, but the ones I found are not very good (`tough-cookie` included). I also think it's such a basic thing that a big percentage of Puppeteer users will need, that it should be supported by Puppeteer natively.
Repository: terminal
Issue: Ambiguous width character in CJK environment
Labels: Issue-Feature,Area-Rendering,Product-Conpty

The operation in the English environment is perfect. However, the behavior in the CJK environment is unstable.
Type ☆, (\b), ☆, (\b), ☆ ... , because the sequence is insufficient, the character shifts one cell to the right.

![c__windows_system32_cmd](https://user-images.githubusercontent.com/44701315/52535751-7a7e8600-2d95-11e9-8714-16ddd776488f.gif)

I thought that it was my mistake, I tried drawing by querying the cursor position, but it could not be solved.
Do you have any corrections?
Repository: godot
Issue: Area2D duplicate signal when changing CollisionPolygon2D Polygon property
Labels: bug,confirmed,documentation,topic:physics

**Godot version:**
3.1 Beta 3


**OS/device including version:**
Windows 10 Pro


**Issue description:**
I'm trying to create dynamic 2d water, with damping and dispersion physics in the water surface. The water has Area2D with CollisionPolygon2D to detect RigidBody2D collision to calculate speed and apply force in a surface vertice. But the CollisionPolygon2D has the same poygon as the body (note: the water body and surface is drawed, not using a Polygon2D), so every frame is changing. But when a body enter the water, duplicate the "splash" function, but when the Collision is not changed, the "splash" function is called once.

OBS: I already tried using _physics_process(delta) function in instead of _process(delta) function to change the polygon, but the signal output more.


**Steps to reproduce:**
1. Create a Area2D;
2. Create a CollisionPolygon2D as child;
3. In a script, every frame change the 'polygon' property of the CollisionPolygon2D;
4. Connect the 'body_entered' signal to the script;
5. To analyse the output, put a print function on the signal;
6. Put a RigidBody2D (or other body falling to the Area2D) on the scene;
7. Run the scene.

**Minimal reproduction project:**
[collision duplication.zip](https://github.com/godotengine/godot/files/2849081/collision.duplication.zip)
Repository: create-react-app
Issue: Enhance CLI validation
Labels: issue: proposal,tag: enhancement

### Is this a bug report?
No, we've reverted #6080, but want to continue this work in the near future.

### Steps to Reproduce
Create an application using `npx create-react-app option1 option2 option3`. A project called `option1` is created, and other arguments are ignored without user feedback.

### Expected Behavior
When creating an application with `npx create-react-app [options]`, I should be warned if an option doesn't exist or is invalid.

### Actual Behavior
When creating an application with `npx create-react-app [options]`, I can pass in non-existent arguments.