sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: CFA failure with fallthrough clauses in switch statements
Labels: Bug

**TypeScript Version:**  master

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** 

**Code**

```ts
declare const o: { c?: 1; };
switch (0) {
  case 0:
    break;
  case o.c && o.c.valueOf():
  case o.c && o.c.valueOf():
    break;
}
```

**Expected behavior:**

pass

**Actual behavior:**

```
$ node built/local/tsc.js index.ts --strictNullChecks
index.ts:5:15 - error TS2532: Object is possibly 'undefined'.

5   case o.c && o.c.valueOf():
                ~~~
```

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> 

**Related Issues:**
Repository: pytorch
Issue: [caffe2]when i do CMAKE
Labels: caffe2

If you have a question or would like help and support, please ask at our
[forums](https://discuss.pytorch.org/).

If you are submitting a feature request, please preface the title with [feature request].
If you are submitting a bug report, please fill in the following details.

## Issue description
when i cmake caffe2:
[ 85%] Linking CXX shared module python/caffe2_pybind11_state_gpu.so
[ 85%] Built target caffe2_pybind11_state_gpu
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2#
this is my cmake-output:
[cmake_output.txt](https://github.com/pytorch/pytorch/files/1967745/cmake_output.txt)


The dir ：/build/Makefile--140 line is :
![1](https://user-images.githubusercontent.com/33169964/39530704-15e4ee8c-4e5c-11e8-9a1a-7cf37cc146a8.png)

## Code example

Please try to provide a minimal example to repro the bug.
Error messages and stack traces are also helpful.

## System Info
Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

- PyTorch or Caffe2:
- How you installed PyTorch (conda, pip, source):
- Build command you used (if compiling from source):
- OS:
- PyTorch version:3.0.0
- Python version:2.7
- CUDA/cuDNN version:8.0
- GPU models and configuration:
- GCC version (if compiling from source):
- CMake version:3.9.4
- Versions of any other relevant libraries:
Repository: bitcoin
Issue: RPC wont bind without an IP address on a non-localhost interface
Labels: RPC/REST/ZMQ

If the only interface which has an IP address and is up is lo, one of the two default rpcbinds (:: and 0.0.0.0) will fail with "libevent: getaddrinfo: address family for nodename not supported".
Repository: go
Issue: proposal: crypto/tls: implement Session IDs resumption
Labels: Proposal,Proposal-Hold,Proposal-Crypto

### What version of Go are you using (`go version`)?
go version go1.10 linux/amd64

### Does this issue reproduce with the latest release?
Yes

### What did you do?

Crypto/tls today only implements session ticket resumption described in RFC 5077. Per https://en.wikipedia.org/wiki/Comparison_of_TLS_implementations#Extensions JSSE does not support session ticket resumption, so I'm looking for a way to speed up the TLS handshake between Golang and Java applications

https://tools.ietf.org/html/rfc5246 (The Transport Layer Security (TLS) Protocol Version 1.2) describes the session resumption, also useful to speed up the TLS handshake. It is implemented by OpenSSL and JSSE. Implementation should have a public interface similar to the OpenSSL's SSL_CTX_add_session() to inject the sessions in the server cache.
Repository: angular
Issue: ExpressionChangedAfterItHasBeenCheckedError with dynamic validators in a template driven composite form control
Labels: type: bug/fix,freq2: medium,area: forms,state: confirmed,P4

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>[x] Bug report </code></pre>

## Current behavior
If you have a composite form control (think a `<my-address [formControl]="address"></my-address>` component), if the internal form has a dynamic validator (i.e. `[required]="isUSA"`), the control will throw an `ExpressionChangedAfterItHasBeenCheckedError` error when the validator (in this example, `isUSA` value) changes:

```
Error: ExpressionChangedAfterItHasBeenCheckedError: 
Expression has changed after it was checked. 
Previous value: 'ng-valid: true'. Current value: 'ng-valid: false'.
```

## Expected behavior
There to not be an `ExpressionChangedAfterItHasBeenCheckedError` error.

## Minimal reproduction of the problem with instructions
Click on the `Toggle Requiredness` button, and note in the console that there is an `ExpressionChangedAfterItHasBeenCheckedError` error. (The circular JSON error seems to be generated from StackBitz.)

Demo: https://stackblitz.com/edit/angular-d9rsnv?file=app%2Fmy-composite-control%2Fmy-composite-control.component.ts

## What is the motivation / use case for changing the behavior?
Template driven forms are easier to use, and template-driven (aka directive) validators are easier to work with and conditionally add and remove. You can do this similarly with reactive forms and you don't get this error.

## Environment

<pre><code>Angular version: 5.2.8
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [x] Firefox (desktop) version 59.0.3</code></pre>

## Other information

Note that if you change the `toggleRequiredness` method to update the validators on the control, you don't get the error (but the point of this bug is that it should work by using purely template-driven means). For example, remove the `required` attribute from the `input` in the demo link above and update the `toggleRequiredness` method to this:

```ts
  toggleRequiredness() {
    this.nameRequired = !this.nameRequired;

    const control = this.form.controls['name'];

    if (this.nameRequired) {
      control.setValidators([Validators.required]);
    } else {
      control.clearValidators();
    }

    control.updateValueAndValidity();
  }
```

Demo (with the above modification): https://stackblitz.com/edit/angular-hhgkje?file=app%2Fmy-composite-control%2Fmy-composite-control.component.ts

Alternatively, you can manually trigger `this.cdr.detectChanges();` when updating the requiredness. The argument of this bug is that this sort of behavior shouldn't be necessary with this kind of template-driven form.
Repository: TypeScript
Issue: Suggestion: Allow interface to extend conditional type
Labels: Bug,Help Wanted,Domain: Error Messages

An interface cannot currently extend a conditional type. See: ([playground link](https://www.typescriptlang.org/play/index.html#src=type%20Test%3CT%3E%20%3D%20T%20extends%20%7B%7D%20%3F%20%7B%20test%3A%20T%20%7D%20%3A%20%7B%7D%0D%0A%0D%0A%2F%2F%20Ok%3A%20type%20with%20selected%20condition%0D%0Ainterface%20I%20extends%20Test%3Cnumber%3E%20%7B%20%7D%0D%0A%0D%0A%2F%2F%20%22Error%3A%20An%20interface%20may%20only%20extend%20a%20class%20or%20another%20interface.%22%22%0D%0Ainterface%20J%3CT%3E%20extends%20Test%3CT%3E%20%7B%20%7D%0D%0A%0D%0A%2F%2F%20Ok%3A%20type%20without%20condition%0D%0Atype%20Test2%3CT%3E%20%3D%20%7B%20test%3A%20T%20%7D%0D%0Ainterface%20K%3CT%3E%20extends%20Test2%3CT%3E%20%7B%20%7D))
```typescript
type Test<T> = T extends {} ? { test: T } : {}

// Ok: type with selected condition
interface I extends Test<number> { }

// "Error: An interface may only extend a class or another interface."
interface J<T> extends Test<T> { }

// Ok: type without condition
type Test2<T> = { test: T }
interface K<T> extends Test2<T> { }
```

This example exhibits one of these problems:

* `J<T>` should be allowed to extend `Test<T>`, to make it more complete and allow conditional type things in interfaces.
--*OR*--
* The error message should be made more clear, because interfaces can obviously extend types as you can see above.
Repository: pytorch
Issue: Do not put system paths in RPATH
Labels: module: build,triaged

This is what I'm seeing today:
```
$ readelf -d /opt/conda/envs/pytorch-py3.6/lib/python3.6/site-packages/torch/_nvrtc.cpython-36m-x86_64-linux-gnu.so | grep RPATH
 0x000000000000000f (RPATH)              Library rpath: [/opt/conda/envs/pytorch-py3.6/lib:/usr/lib/x86_64-linux-gnu/:/usr/local/cuda/lib64:$ORIGIN/lib]
```

Paths `/usr/lib/x86_64-linux-gnu` and `/usr/local/cuda/lib64` were taken from the build environment, but they do not belong in RPATH since those paths are not shipped with the application. Those paths may contain versions of DT_NEEDED libraries that you do not want to use with pytorch, however RPATH has precedence over everything else, so those libraries will get picked, and there is no way around that.

For example, let's say libcublas provided in  `/usr/local/cuda/lib64` is not the version I want since it's too old, I have a newest version in `~/cuda/lib64`, but I have no way to point to it since `LD_LIBRARY_PATH` will be ignored.

Caused by: https://github.com/pytorch/pytorch/pull/3255 (for `/usr/lib/x86_64-linux-gnu`)



cc @malfet @seemethere @walterddr
Repository: rust
Issue: concat_idents cannot be used in pattern position
Labels: A-macros,T-compiler,C-feature-request,A-patterns

* The three places where an ident-returning macro can be used are patterns, types, and expressions.
* The two places where `concat_idents` can be used are types and expressions.
* **_Hmmmm._**

I looked around previous issues and PRs related to `concat_idents` and the word "pattern" never even comes up.  This seems to be an accidental omission.
Repository: pytorch
Issue: [Caffe2]Install problem
Labels: caffe2

If you have a question or would like help and support, please ask at our
[forums](https://discuss.pytorch.org/).

If you are submitting a feature request, please preface the title with [feature request].
If you are submitting a bug report, please fill in the following details.

## Issue description

I want to using detectron so I need to install caffe2

I follow the instruction from caffe2 website 
ubuntu->build from source

and when I  run make install and I got some error as below

6 errors detected in the compilation of "/tmp/tmpxft_0000e8de_00000000-20_depthwise_3x3_conv_op.compute_20.cpp1.ii".
CMake Error at caffe2_gpu_generated_depthwise_3x3_conv_op.cu.o.Release.cmake:275 (message):
  Error generating file
  /home/liujiajun/workspace/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/operators/./caffe2_gpu_generated_depthwise_3x3_conv_op.cu.o


caffe2/CMakeFiles/caffe2_gpu.dir/build.make:13397: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_depthwise_3x3_conv_op.cu.o' failed
make[2]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_depthwise_3x3_conv_op.cu.o] Error 1
CMakeFiles/Makefile2:2903: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/all' failed
make[1]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2



## System Info
Caffe2
I use anaconda virtualenv python version:2.7
OS: ubuntu 16.04
CUDA 8 Cudnn 6.0
GCC version :5.4


I search the key "DepthwiseConv2D_3*3" in issues but I can't find useful information
So Could you please give me some explanations?
Repository: flutter
Issue: Drag Box FeedBack Limit
Labels: c: new feature,framework,f: gestures,P2,team-framework,triaged-framework

Can we Set the limit or range of the Feedback of DragBox on the Screen?
Repository: electron
Issue: Implement powerMonitor 'shutdown' event for Windows
Labels: enhancement :sparkles:,platform/windows,2-0-x,semver/minor

Electron v2.0.0 introduced a new [shutdown](https://github.com/electron/electron/blob/2-0-x/docs/api/power-monitor.md#event-shutdown-linux-macos) event to `powerMonitor` -  that's currently implemented for Linux and macOS but not for Windows.

Please implement the 'shutdown' event for Windows as well.
Repository: TypeScript
Issue: JSDoc support for @yields
Labels: Suggestion,Awaiting More Feedback,Domain: JSDoc

It would be nice to be able to use the [`@yields`](http://usejsdoc.org/tags-yields.html) JSDoc tag.

We work with JS and JSDoc, but taking advantage of TSC and VSCode.
We also use the [valid-jsdoc](https://eslint.org/docs/rules/valid-jsdoc) eslint rule.

## We have:

``` javascript
/** @typedef Thing (...) */

function* walkThings() {
//... some yield here and there
}
```

## We *want to*

``` javascript
/**
 * @yields {Thing}
 */
function* walkThings() {
//... some yield here and there
}
```

## We *can't do*

``` javascript
/**
 * @returns {IterableIterator<Something>}
 */
function* walkThings() {
//... some yield here and there
}
```

Because it doesn't `return`, but `yield`s, and eslint complains about it. We can disable the rule here, but it is not the desirable scenario.
Repository: You-Dont-Know-JS
Issue: Types & Grammar - Chapter 2 : TypeError while reversing a string.
Labels: for second edition

https://github.com/getify/You-Dont-Know-JS/blob/master/types%20%26%20grammar/ch2.md#strings
There's a code in this section that tries to use the **Array.prototype.reverse** function to reverse a string.
```
Array.prototype.reverse.call( a );
// still returns a String object wrapper (see Chapter 3)
// for "foo" :(
```
The comment says that it returns a **String object wrapper**. However, running it on Chrome 66 (and maybe other browsers too) gives a **TypeError**.


![screenshot from 2018-05-03 18-21-27](https://user-images.githubusercontent.com/26036974/39577381-d5d32f18-4efe-11e8-93e0-a9399aee7ac4.png)
Repository: pytorch
Issue: feature request: support for new/future hardware accelerators
Labels: feature,triaged,shadow review

## Issue description

There are a slew of new AI hardware accelerators available that can beat the GPUs handily either in terms of raw performance or performance per Watt. There are also many new efforts in analytic and sensor fusion hardware acceleration that are optimizing tensor processor for specific tasks using specific number systems, particularly for the embedded and robotics space. 

For Pytorch to be future proof, it would be beneficial if Pytorch provides a more general purpose interface to connect to hardware acceleration alternatives.

We would like to collaborate with other researchers that are interested in AI research in Deep Reinforcement Learning that share our desire to connect Pytorch to optimized robotic brain and spine alternatives that look nothing like GPUs.



cc @ezyang
Repository: rust
Issue: Improve "private type in public interface" message
Labels: C-enhancement,A-lints,A-diagnostics,T-compiler

There seems to be an issue with detecting the `pub`-ness of types on the current nightly (EDIT: and actually stable) branch. Consider the following code:

`main.rs`:
```rust
mod hardware;

fn main() {
    hardware::do_stuff();
}
```

`hardware/mod.rs`:
```rust
mod parser;

#[derive(Debug)]
struct Hardware {
    foo: u32
}

pub fn do_stuff() {
    let hw = parser::get_hardware();
    println!("{:?}", hw);
}
```

`hardware/parser.rs`:
```rust
use super::Hardware;

pub fn get_hardware() -> Hardware {
    Hardware { foo: 5 }
}
```

There are no public types in the  `hardware` module that are exposed in any way. Yet, I get this error from the compiler:

```
[rustc]
private type `hardware::Hardware` in public interface

can't leak private type
```

[Play Link](https://play.rust-lang.org/?gist=62c7b418185a8e91f51361f536b506c2&version=nightly&mode=debug)
Repository: go
Issue: cmd/go: test mixes stderr and stdout
Labels: NeedsInvestigation

https://github.com/golang/go/commit/7badae85f20f1bce4cc344f9202447618d45d414 appears to have made `go test` mix stderr and stdout from tests, which has made go 1.10 a regression for CockroachDB's benchmarks. 
This issue is related to https://github.com/golang/go/issues/18010 :
Not only is the benchmark output not swallowed, but stderr and stdout are now mixed, so, if our binary produces logs (on stderr, as ours does), it's now impossible to see the benchmark results or use tools like `benchstat`.
In particular, I believe `benchstat` fails to work because the mixing of stderr and stdout doesn't even use line buffering - so the benchmark measurements lines are mixed with log lines and `benchstat` can't recognize them any more.

I generally concur with the folks on #18010 arguing that the swallowing/not swallowing of output is inconsistent (and there's no control over it as far as I can tell). Additionally, now the mixing of stdout and stderr is really a problem. The argument for not doing anything about `go test -bench` not swallowing output was that "we should at least preserve existing behavior as much as possible", but it would appear that existing behavior was changed in a quite significant way by this mixing. So I would kindly ask for the swallowing decision to be re-evaluated.

### What version of Go are you using (`go version`)?

go version go1.10 darwin/amd64

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?
OS X/ amd64


cc @benesch
Repository: flutter
Issue: Centralized location for test file output
Labels: a: tests,tool,P3,team-tool,triaged-tool

If we had the notion of a test output folder, tests would have the flexibility to not only write to stdout and stderr, but to write more helpful info, like the contents of adb logs, screenshots, etc.

### Proposal

During `flutter test`, we have The Flutter tool create a temp folder before running any tests.  For each test in the suite, the test harness will create a subfolder dedicated to that test and set the path of that subfolder into an environment variable (e.g. `TEST_OUTPUT_DIR`) before spawning the test.

When each test is done running, if it did not output anything into its folder, the test harness will delete the empty directory.  When all tests are done running, if none of the tests wrote any output files, it'll delete the temp directory.

If any files were written during any of the tests, the Flutter tool will keep the temp directory intact and print a message to the caller that "test outputs are available at ..."
Repository: vscode
Issue: VSCode opens URL without user's permission
Labels: under-discussion

- VSCode Version: today's "insider build" (May 3, 2018)
- OS Version: macOS

Steps to Reproduce:

1. download today's insider build (May 3, 2018)
2. run it

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: ?

-----------

VSCode will open a URL and will pass some data to Microsoft's servers via GET parameters (I didn't catch what they were, the page immediately redirected to another one) without asking the user for permission to do so.
Repository: vue
Issue: warn if $set is used on a property that already exist
Labels: feature request,good first issue,has PR

### Version
2.5.16

### Reproduction link
[https://codepen.io/JJPandari/pen/gzLVBq?editors=1010](https://codepen.io/JJPandari/pen/gzLVBq?editors=1010)

### Steps to reproduce
See the codepen snippet. Follow the comment there to change the vm's data and see what happens.

### What is expected?
Even if the prop already exists, using `set` still makes it reactive, thus trigger view update.

### What is actually happening?
Using `set` later doesn't update the view.

---
Related source code: https://github.com/vuejs/vue/blob/3eb37acf98e2d9737de897ebe7bdb7e9576bcc21/src/core/observer/index.js#L192 I think most users would expect `set` to make the prop reactive whenever it's used. I initially opened [an issue for the api doc](https://github.com/vuejs/vuejs.org/issues/1601) because it wasn't clear (for me) about this. But the comment in the source code is.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: opencv
Issue: [RFC] switch for LTO friendliness
Labels: RFC

<!--
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).

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 => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => master
- Operating System / Platform =>MS Windows (Linux bundles with distros)
- Compiler =>MSVC or GNU

##### Detailed description

<!-- your description -->

I'm using `opencv` heavily in my own open-source project. Given the shared object size after exported symbols, it's better to link it into multiple result shared objects than ship it linked shared.

I'd like to conditionalize code with runtime dispatching that LTO can't prune. However, such a locally-maintained patchset is bound to get out of date and provide a great maintainership trouble.

Would you consider accepting such a patchset provided it's as clean and non-intrusive as possible? It's plenty of work and I prefer to ask up front.

The modules I use are:

- core
- calib3d
- imgproc
- videoio

At this moment some things are non-optimal, e.g. statically linking to `highgui` increases shared object size even if the `highgui` header isn't included to begin with.

An example of a change is `#ifdef`-conditionalizing functions dispatching of strings, to exclude unused algorithms, then `#else`'ing them with a function dispatching on a compile-time-constant parameter using partial specialization. This way unused algorithms can be pruned.

##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->

Static link with LTO, including pruning unused symbols. For example, the original `aruco` utils are 14-16 MB in size when linking against all `opencv` libraries.

Again, I'm willing to do the work myself (and iterate upon review, of course).