sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: spec: allow conversion between return types and structs
Labels: LanguageChange,Proposal,dotdotdot,LanguageChangeReview

This comes from a conversation in  #32941

The goal of this proposal is to allow easy conversion from a function return to a struct with the same field types and order.

This would allow to more easily pass a function result to a channel, without having to manually create temporary variables and filing them up in a struct before it is sent thorough a channel.

Example :
```go
type Pair struct {
    i int
    s string
}

func F() (int, string) { ... }
func G() chan {
    Pair c := make(chan Pair) 
    go func() { c <- Pair(F()) }() 
    return c 
}
```

Like converting between structs, tags should be ignored
Repository: pytorch
Issue: Port `fmod` operator from the TH code to Aten
Labels: module: cuda,module: cpu,triaged,module: porting,better-engineering

`fmod` is the point-wise math operator so porting if from the TH code to Aten (and TensorIterator) expected to be easy. Such migration will help to clean up the code, simplify dispatch as well as provide immediate 2-3x operator performance gain.

Porting guide: https://github.com/pytorch/pytorch/wiki/TH-to-ATen-porting-guide

Example PR with porting of the adaptive_avg_pool2d: https://github.com/pytorch/pytorch/pull/14714

How to use TensorIterator: https://github.com/pytorch/pytorch/wiki/How-to-use-TensorIterator
Repository: rust
Issue: tool tidy should error on unused error codes 
Labels: C-enhancement,T-bootstrap

In `librustc_typeck` the error code `E0074` is unused, that is, this error is never emitted. 

The `tidy` tool should detect this and error when this happens.
Repository: node
Issue: fs.access throws permission error while checking W_OK on writable dir
Labels: fs

* **Version**: `v10.16.0` (also happening on `v12.6.0`)
* **Platform**: `18.6.0 Darwin Kernel Version 18.6.0` (also happening on  `4.15.0-54-generic Ubuntu`)
* **Subsystem**: `fs`

I'm experiencing a rather unexpected behaviour when trying `fs.access` on a directory that's also an NFS shared mount point. The check for `fs.constants.W_OK` throws `Error: EACCES: permission denied, access '/mnt/test/nfs'` even though the directory is writable and permissions seem to be correct for the user running the `node` script process.

Below is a reproduction of what I'm seeing.

```js
const os = require('os');
const path = require('path');
const fs = require('fs');

// Path to the mount directory
const MOUNT_PATH = '/mnt/test/nfs';

const filePath = path.join(MOUNT_PATH, 'foo.txt');

// Write a file
fs.writeFileSync(filePath, 'Hello world!'); // Passes OK

// Read a file
const contents = fs.readFileSync(filePath); // Passes OK
console.log(contents.toString('utf-8')); // 'Hello World!'

// Get stats
os.userInfo();
/*
{
  uid: 431,
  gid: 433,
  username: 'test',
  homedir: '/home/test',
  shell: '/sbin/nologin'
}
*/

fs.stat(MOUNT_PATH, console.log);
/*
> null Stats {
  dev: 52,
  mode: 16895, <- '0777' octal
  nlink: 1,
  uid: 431, <- Correct uid
  gid: 433, <- Correct gid
  rdev: 0,
  blksize: 4096,
  ino: 263,
  size: 184,
  blocks: 0,
  atimeMs: 1562948571578.2288,
  mtimeMs: 1562897414354.1873,
  ctimeMs: 1562897414354.1873,
  birthtimeMs: 0,
  atime: 2019-07-12T16:22:51.578Z,
  mtime: 2019-07-12T02:10:14.354Z,
  ctime: 2019-07-12T02:10:14.354Z,
  birthtime: 1970-01-01T00:00:00.000Z
}
*/


// Test permissions
fs.access(MOUNT_PATH, fs.constants.R_OK, console.error); // Passes OK
fs.access(MOUNT_PATH, fs.constants.W_OK, console.error); 
/* 
 [Error: EACCES: permission denied, access '/mnt/test/nfs'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'access',
  path: '/mnt/test/nfs'
*/
```

This **does not happen on any other directory outside the NFS share**. I stumbled upon the exception when writing a very simple health checker script to test the mount availability for a running web service.

Am I missing something? What's the catch here? Thanks in advance.
Repository: TypeScript
Issue: Allow '--noEmit' to override  'emitDeclarationOnly' from config.
Labels: Suggestion,Awaiting More Feedback

## Search Terms

- TS5053
- emitDeclarationOnly

## Suggestion

Using `"emitDeclarationOnly": true` in your `tsconfig.json` prevents you to do typechecking only runs as running `tsc --noEmit` will throw the following error.

```bash
error TS5053: Option 'emitDeclarationOnly' cannot be specified with option 'noEmit'.
```

And the CLI does not look like to have any flag to bypass the error (eg. something like `--noEmitDeclarationOnly`).

I don't see a reason why a `noEmit` cli flag would not take precedence over the `emitDeclarationOnly` from the tsconfig.

## Use Cases

With a project with a `tsconfig.json` set with `emitDeclarationOnly` and using another compiler like babel to produce the built javascript code, you want to be able to both:

- Compile declaration files (running `tsc`)
- Perform typechecking as a test stage (eg. travis) (running `tsc --noEmit`). Especially since you do not use TypeScript to compile (so a build could pass with typings errors).



## Examples

https://github.com/mgcrea/node-influx-syslog

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: flutter
Issue: Get rid of FlushType::kSingle (we don't need to enum even)
Labels: team,engine,P2,team-engine,triaged-engine

Concurrent message loops lie outside of the task runner framework now. We don't need single flush types.
Repository: go
Issue: x/website: show current Go version next to download button on homepage
Labels: NeedsFix

The previous website design had a string with the current version. As part of my workflow, I used to check the website to see if a new version was released, at the same time I was checking if new interesting blog posts were available.

Seems like the new website removed that version string.

Could you please put it back?

Thanks!
Repository: pytorch
Issue: TensorImpl de-virtualization
Labels: high priority,module: dependency bug,module: internals,triaged,quansight-nack

## Motivation
We want to de-virtualize TensorImpl methods as much as possible, to achieve performance gain for common Tensor methods such as `numel()` / `sizes()` / `dim()`.

## Concerns
XLA relies on TensorImpl methods such as `numel()` / `sizes()` / `dim()` being virtual, so that they can have their own implementation and calculate those values lazily when requested, rather than eagerly when a size change event happens.


## Proposal
1. To support XLA's use case, we should add virtual methods such as `virtual_numel()` / `virtual_sizes()` / `virtual_dim()` to OpaqueTensorImpl, and in TensorImpl we should add conditional branching in `numel()` / `sizes()` / `dim()` to call the opaque virtual methods when the TensorImpl is OpaqueTensorImpl. (We should run benchmarks such as JIT LSTM to make sure adding conditional branching and de-virtualizing `numel()` / `sizes()` / `dim()` doesn't cause perf regression for our CPU / CUDA use cases.)

2. We should ask XLA to move their XLATensorImpl to OpaqueTensorImpl, and ask them to override the opaque methods for their lazy size computation.

3. We should de-virtualize TensorImpl and all of its subclasses in PyTorch core library (example PR: #20909).


cc. @gchanan @colesbury @ailzhang 


cc @ezyang @gchanan @zou3519 @jerryzh168
Repository: go
Issue: make.bash: cannot build toolchain if go.mod recursively exists in some parent directory
Labels: NeedsInvestigation,modules

Using `go1.12`. That is `GOROOT_BOOTSTRAP` is set to some Go toolchain with module support.

Steps to reproduce:
```
$ go mod init github.com/user/project
$ mkdir -p sub/sub/sub && cd sub/sub/sub
$ curl -s -L https://dl.google.com/go/go1.12.7.src.tar.gz | tar -zxf -
$ cd go/src
$ ./make.bash # this fails
Building Go cmd/dist using /usr/local/go.
Building Go toolchain1 using /usr/local/go.
go: warning: "bootstrap/cmd/..." matched no packages
go tool dist: open /tmp/blah/sub/sub/sub/go/pkg/bootstrap/bin/asm: no such file or directory
$ rm ../../../../../go.mod
$ ./make.bash # this succeeds
```

It seems odd that `./make.bash` should care whether a `go.mod` file exists in any directory above it.

\cc @bcmills
Repository: rust
Issue: Type inference of lambda arguments interferes with borrow checking
Labels: A-closures,A-borrow-checker,T-compiler,A-inference,C-bug

It looks like type inference of arguments to a lambda function somehow interferes with borrow checking.

I tried this code: ([playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6b018776f5b9055e27776a0072530c0b))

```rust
struct Bar {}

struct Foo {
    a: Bar,
}

impl Foo {
    fn one(&self) -> Option<&Bar> {
        return Some(&self.a);
    }

    fn two(&mut self) -> Option<Bar> {
        return Some(Bar {});
    }
}

fn main() {
    let mut f = Foo { a: Bar {} };

    let test = |_t| {};

    match f.one() {
        Some(a) => test(a),
        None => {}
    }

    match f.two() {
        Some(ref b) => test(b),
        None => {}
    }
}
```

## I expected to see this happen:
A successful build

## Instead, this happened:
Compilation failed with this error:
```
error[E0502]: cannot borrow `f` as mutable because it is also borrowed as immutable
  --> src/lib.rs:27:11
   |
22 |     match f.one() {
   |           - immutable borrow occurs here
...
27 |     match f.two() {
   |           ^^^^^^^ mutable borrow occurs here
28 |         Some(ref b) => test(b),
   |                        ---- immutable borrow later used here
```

Note that changing line 20 to
```rust
let test = |_t: &Bar| {};
```
results in a successful compilation ([playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9a4f487d98be2a891d86236c8551c6a1))

## Meta

`rustc --version --verbose`:
```
rustc 1.36.0 (a53f9df32 2019-07-03)
binary: rustc
commit-hash: a53f9df32fbb0b5f4382caaad8f1a46f36ea887c
commit-date: 2019-07-03
host: x86_64-pc-windows-msvc
release: 1.36.0
LLVM version: 8.0
```
Repository: go
Issue: crypto/x509/pkix: Name.String() hex-encodes string-type ExtraNames
Labels: 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.12.6 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/jrittner/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jrittner/go-workspace"
GOPROXY=""
GORACE=""
GOROOT="/home/jrittner/go"
GOTMPDIR=""
GOTOOLDIR="/home/jrittner/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-build691331496=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

I created a pkix.Name containing a custom ExtraName, and converted it to a string.

https://play.golang.org/p/1hyqwP_RTBs

### What did you expect to see?

1.2.3.4=sample,CN=foobar

### What did you see instead?

1.2.3.4=#130673616d706c65,CN=foobar

This is because Go always hex-encodes the asn.1 encoding of the value, even though RFC 2253 states that the value is supposed to just be used as its own string encoding. https://tools.ietf.org/html/rfc2253#section-2.4

> Otherwise, if the AttributeValue is of a type which has a string
   representation, the value is converted first to a UTF-8 string
   according to its syntax specification (see for example section 6 of
   [4]).

Note that OpenSSL gives the expected output when viewing a certificate or CSR with a custom name.
Repository: node
Issue: inspector.open(0, undefined, /* wait */true) won't allow communicating inspector.url()
Labels: inspector

I'd like to open the first available debugging port and wait for client to attach before I continue execution, so I do:

```js
inspector.open(0, undefined, /* wait */ true);
```

This results in a logical deadlock though: in order to get the `inspector.url()`, I need to continue execution. But execution only continues when connection is established over that exact URL I can't get. It makes me think that `inspector.open` does not really make sense with the `wait === true`.

Could this API be changed to something like below instead?

```js
inspector.open(0, undefined, true, ({url}) => {
  clientPipe.send(url);  // <-- reports url
});
// <-- blocks execution.
```

@eugeneo, @ak239
Repository: godot
Issue: Does UWP export works?
Labels: bug,topic:porting,confirmed,platform:uwp,topic:export

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
3.1.1
<!-- Specify commit hash if non-official. -->


**OS/device including version:**
Windows 10
<!-- Specify GPU model and drivers if graphics-related. -->


**Issue description:**

Seems UWP export does not work. It is generates damaged file, that I can't run.

And signtool can't sign file.
`C:\Program Files (x86)\Windows Kits\10\App Certification Kit>SignTool sign /fd SHA256 /a /f c:\key.pfx /p x D:\System\Documents\_GODOT\Export\UWP\green_pixel.appx
Done Adding Additional Store
SignTool Error: This file format cannot be signed because it is not recognized.
SignTool Error: An error occurred while attempting to sign: D:\System\Documents\_GODOT\Export\UWP\green_pixel.appx

Number of errors: 1`


**Steps to reproduce:**
Try to export to UWP and run.

**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Repository: godot
Issue: dict2inst does not work on classes with _init parameters
Labels: bug,topic:gdscript,confirmed,crash

**Godot version:**
Godot Engine v3.1.1.stable.official

**Issue description:**
`dict2inst` does not work on classes with `_init` parameters.  A simple fix is to manually initialize the object after it has been created with `.new()`

**Steps to reproduce:**
Create a scene with an external(not built in script). Then run the scene with this in the script:
```gdscript
extends Node2D

class A:
	var value 
	func _init(val):
		self.value = val
		
class B:
	var value
	func init(val):
		self.value = val

func serializeA():
	var inst = A.new(1)
	var instDict = inst2dict(inst)
	var inst2 = dict2inst(instDict)
	print("A was serialized and deserialize succesfully")

func serializeB():
	var inst = B.new()
	B.init(1)
	var instDict = inst2dict(inst)
	var inst2 = dict2inst(instDict)
	print("B was serialized and deserialize succesfully")

func _ready():
	serializeA() # this will crash the program
	serializeB() # this runs fine
```
```
Repository: rust
Issue: libstd initialization should check that target-features enabled at compile-time are enabled at run-time
Labels: T-libs-api,C-feature-request

libstd initialization should, at least in debug builds, and probably always, do check for all target-features for which `cfg!(target_feature = "feature")` returns true, that the feature is indeed actually enabled at run-time, e.g., by checking that `is_{target_arch}_feature_detected!("feature")` returns true. 

If this check fails, the behavior is undefined, in quiet a serious way, and we should panic with a nice error message explaining the situation, instead of letting the binary continue its hopeless execution.
Repository: TypeScript
Issue: Property decorator documentation is inaccurate?
Labels: Docs

From the [official docs](https://www.typescriptlang.org/docs/handbook/decorators.html#property-decorators) about property decorators:

"The return value is ignored too."

But the following example returns a new descriptor, and it works fine:

```ts
class Greeter {
  @logProperty
  greeting;
}

function logProperty(target, key): any {
    var value;

    var getter = function() {
      console.log('getter');
      return value;
    };

    var setter = function(newVal) {
      value = newVal;
    };

    return {
      get: getter,
      set: setter,
      enumerable: true,
      configurable: true
    };
}

const g = new Greeter();
const b = g.greeting;
```
Repository: pytorch
Issue: [feature request] Log-determinant for symmetric positive definite matrices
Labels: triaged,has workaround,module: linear algebra,function request

## 🚀 Feature

As of now, one cannot leverage the positive-definitiveness of a matrix when computing log-determinants. The current `torch.logdet` works for general square matrices and thus uses LU in forward and SVD in backward.  

For SPD matrices it can be implemented more efficiently via a Cholesky decomposition in forward and its inverse in backward.  The latter can be computed very efficiently via `torch.cholesky_inverse` (note that its batch variant is not implemented yet: https://github.com/pytorch/pytorch/issues/7500).

CC @vishwakftw 

cc @vincentqb @vishwakftw @jianyuh @nikitaved @pearu @mruberry @heitorschueroff
Repository: flutter
Issue: RefreshIndicator cannot be canceled on Android
Labels: framework,f: material design,a: quality,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-design,triaged-design

At first, this seems like it could be a duplicate of #9690, however, the actual issue is only mentioned in [this comment](https://github.com/flutter/flutter/issues/9690#issuecomment-347550626).

The user **should be able** to change their mind and push the refresh indicator back up, as can be seen here (native Android app):

![](https://media.giphy.com/media/Zb61dEsjQPQkccMHtk/giphy.gif)

In Flutter, however, the refresh indicator gets pushed back up together with the scrollable content.

![](https://media.giphy.com/media/XEsmn2DHt6aOrDd6B5/giphy.gif)

There is an *even bigger* problem that occurs when the `ListView` content does not require any scrolling, i.e. if it is smaller than the viewport: the overscroll glow takes less dragging than it takes to push the refresh indicator back, which makes it **impossible** to cancel the refresh indicator, which clearly is a bug. And the fact that the refresh indicator *can be partially* pushed back in that case shows that the fact that the refresh indicator gets pushed back with the scrollable content is clearly another bug.  

![](https://media.giphy.com/media/QXVLoi8NNEnMNhYEcm/giphy.gif)

[Here is a Gist](https://gist.github.com/creativecreatorormaybenot/4df2b87ce7ce1d6f82648003098daf67) with the code used for these illustrations.

It suprises me that this has not been fixed for over two years even though it was added to milestones back then.
Repository: godot
Issue: add_keyword_color in textedit does not works using symbols ([ < > ] ....)
Labels: bug,confirmed,topic:gui

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
3.1


**OS/device including version:**
Windows 10 64 Bits


**Issue description:**
using command add_keyword_color from textEdit does not works if you use symbols


**Steps to reproduce:**


**Minimal reproduction project:**
```gdscript
var textEdit = $textEdit # node text edit
textEdit.add_keyword_color("[", Color(1,1,0,1)) # Does not works
textEdit.add_keyword_color("<", Color(0,1,1,1)) # Does not works
textEdit.add_keyword_color("A", Color(1,1,0,1)) # This works
textEdit.add_keyword_color("8", Color(1,1,0,1)) # This works
```
Repository: TypeScript
Issue: Union not narrowed with `typeof x.y` as a discriminant
Labels: Bug,Help Wanted,Effort: Moderate

<!-- 🚨 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.6.0-dev.20190713

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** `TS2339`, `union type object`, `union type property does not exist`
And github suggestions while I was writing the title.

**Code**
```ts
type Test = {
    someKey: false
} | {
    someKey: {
        someKeyInside?: number
    },
    someKeyThatExistOnlyIfOtherKeyIsNotFalse: string;
};

declare const test: Test;

if (typeof test.someKey === 'object') {
    console.log(test.someKeyThatExistOnlyIfOtherKeyIsNotFalse);
}
```

**Expected behavior:**
String in `someKeyThatExistOnlyIfOtherKeyIsNotFalse` should be logged

**Actual behavior:**
```
error TS2339: Property 'someKeyThatExistOnlyIfSomeKeyIsNotFalse' does not exist on type 'Test2'.
  Property 'someKeyThatExistOnlyIfSomeKeyIsNotFalse' does not exist on type '{ someKey: false; }'.

29     console.log(test2.someKeyThatExistOnlyIfSomeKeyIsNotFalse); // TS2339: Property 'someKeyThatExistOnlyIfSomeKeyIsNotFalse' does not exist on type '{ someKey: false; }'.
```

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
https://www.typescriptlang.org/play/index.html#code/C4TwDgpgBAKhDOwCMUC8UDeAoKurwHsBbCAaQhAC4oAzAQwBt4IsBfKAH0xz0JPKrc8w-MTIUAkgDt4ASwAmEalICuRAEYQATj1ysANLtH8KMABZ1gAUQAesxAHkpDEBJoPgZ7QInwAcgTAAGKMzNSIWrJSAOYA3GzxWIoAxgx0WtDJBDLAUMAIyNRwiEiJsjRQABT5JQB0fOIgAJRCeFkyBAwQtQwE0dUFSPViAuaWtvbATi5uHl5aPv6BIUwQTbFQAPSbUA6kAIRsWFigkLAFAExorbgNAtT0q2ycN8aN1NgieNuwXlDZLn+Umg8nKNG0ECkyWgNC0xDy4GgxWQ+jePhkCkydCkUE0UBUUkUNCiEHkQLRFCMwjukgxigA-Mo1JodMIDEYaSAxtY7I5nK53J5vJIlsFQkp8MBIjF4qxEik0hkoO1EHlLkVLmUKtVEQQKjVgBdhiYQGhUOgAOQEdQAKwgyWAFpanza2UIXR6fQGiCNnO5Ez5M0F80WATFq3WWx2MAAyhcAMzxgCc1AACnDIFpQFALX6LDzJtMBXNha5RStmBaoPICAgoFJAlAILzctkEWcLRgKYJHswNqwLbU2EA

Take a look at `type Test1`. The only one difference from `type Test2` is `someKeyInside` should be always defined.

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
-
Repository: opencv
Issue: Feature request: Still image capture with dshow/msmf
Labels: feature,priority: low,category: videoio(camera),platform: win32

OpenCV-Python 4.1
Windows 7 64 Bit

The videocapture module currently only supports framegrabbing with the dshow/media foundation api's. Both api's support taking still images with a 'still image pin' [Dshow](https://docs.microsoft.com/en-us/windows/win32/directshow/capturing-an-image-from-a-still-image-pin) or 'takephoto' instruction [MediaFoundation](https://docs.microsoft.com/en-us/windows/win32/api/mfcaptureengine/nf-mfcaptureengine-imfcaptureengine-takephoto) This enables certain webcams (like the surface book pro camera) to take images with much higher resolution (8 MP). 

Would it be possible to include this in a future-version of the videocapture module?