sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: cv::Mat::convertTo(…) undesired new behavior
Labels: category: core,RFC

##### System information (version)

- OpenCV => 3.4 branch (3.4.1-dev)
- Operating System / Platform => macOS (and probably all other platforms)
- Compiler => clang (an probably all other compilers)

##### Detailed description

Among other changes in the following changeset, there are changes to the cv::Mat::convertTo(…) method which I'd like to challenge because I think the new implementation has unexpected behaviour and causes cumulative issues:

https://github.com/opencv/opencv/commit/7d19bd6c19af51be7fd21c313a3b328f4c50cd05#diff-8489f797e941deaa5e77be1f2bf82bc8R1307

This changeset adds the following block at the beginning of the cv::Mat::convertTo(…) method:
```.cpp
if( empty() )
{
    _dst.release();
    return;
}
```
That means that a call like `m.convertTo(m, CV_32F);`would deallocate the matrix `m` plus not mark it `CV_32F` nor keep its dimensions (which can initially be 0-by-C nor L-by-0) as an information. This is an issue in the following example program:

```.cpp
#include <opencv2/opencv.hpp>
#include <opencv2/features2d.hpp>
using namespace cv;
using namespace std;

int main(int argc, char *argv[])
{
    assert(argc == 2);
    
    Mat im1 = imread(argv[1], 1);
    if (im1.empty())
    {
        return -1;
    }
    
    vector<KeyPoint> keypoints1, keypoints2;
    Mat desc1, desc2;
    
    Ptr<AKAZE> akaze = AKAZE::create(AKAZE::DESCRIPTOR_MLDB);
    akaze->detectAndCompute(im1, noArray(), keypoints1, desc1);
    if (desc1.type() != CV_32F)
    {
        desc1.convertTo(desc1, CV_32F);
    }
    
    Mat im2 = im1.clone();
    akaze->detectAndCompute(im2, noArray(), keypoints2, desc2);
    if (desc2.type() != CV_32F)
    {
        desc2.convertTo(desc2, CV_32F);
    }
    
    FlannBasedMatcher descriptorMatcher;
    descriptorMatcher.add(desc1);
    descriptorMatcher.train();
    
    vector< vector<cv::DMatch> > nnmatches;
    descriptorMatcher.knnMatch(desc2, nnmatches, 2);
}
```

When passing as this program's argument the path to an image that has keypoint, no issue, however when no keypoint has been found, for example for a black image, `desc1.convertTo(desc1, CV_32F);` deallocates `desc1` plus does not mark it `CV_32F` nor keep its original dimensions, leading to a raised exception:
```
OpenCV(3.4.1-dev) Error: Unsupported format or combination of formats (> type=0
> ) in buildIndex_, file <XXX>/opencv/modules/flann/src/miniflann.cpp, line 315
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(3.4.1-dev) <XXX>/opencv/modules/flann/src/miniflann.cpp:315: error: (-210:Unsupported format or combination of formats) in function 'buildIndex_'
> type=0
> 
(lldb) 
```

I understand that this can be workaround-ed with code, however I don't this that it's a desired behaviour as it creates (sometimes hard-to-find) edge cases like the one illustrated in the code above.

If this looks like an issue to you, please also inspect the other changes that have been included in the same changeset.
Repository: godot
Issue: Snap scaling to grid
Labels: enhancement,topic:editor,usability

**Godot version:**
3.1.dev.custom_build.c80ac06


**OS/device including version:**
Elementary OS Loki


**Issue description:**
Scaling an object in 3D does not respect the grid, it respects only scaling rate settings.

**Steps to reproduce:**
I create a CSG box, and I want to scale it so that its vertices are directly on the grid. I set 
Scale Snap to 50%, and if I scale the box up, it works, the vertices stay on grid. When I scale down, though the vertices fly off grid.
![gifout](https://user-images.githubusercontent.com/1463277/41129620-a3801e62-6abb-11e8-985f-270a5a8f5047.gif)

**Minimal reproduction project:**
Just a CSG box
Repository: angular
Issue: Service Worker makes show up a "Live Broadcast" message on HTML audio player on Safari
Labels: type: bug/fix,help wanted,freq1: low,area: service-worker,browser: safari,state: needs more investigation,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>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
</code></pre>

## Current behavior
<!-- Describe how the issue manifests. -->

When playing an audio on a Safari browser (Mobile or Desktop) a "Live Broadcast" message appears on the HTML 5 audio player.

## Expected behavior
<!-- Describe what the desired behavior would be. -->

The audio must be played without the "Live Broadcast" message on the audio player.

## Minimal reproduction of the problem with instructions

Clone the example project:
`git clone https://daedmunoz@bitbucket.org/daedmunoz/angular-sw-problem.git`

- Go the the root directory of the project and:
- Run `npm install` and `ng build --prod`
- Create a Firebase Project and deploy to it doing `firebase deploy`
- Make sure to se the Firebase deployment directory as the `dist` directory generated in the angular - - build process (Firebase default deployment directory is `public`).
- Open the site in a Safari browser (on Chrome the issue does not happen).
- After pressing the play button on the audio player you should see the "Live Broadcast" message on the player.

I created a working demo so that you can reproduce see the issue :
[Firebase demo](https://angular-ng-build-safari.firebaseapp.com/)


## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->
The need to be able to:
- use the audio player and service worker together on Safari without problems, and 
- deliver a PWA.

## Environment

Angular version 6

Browser:
- [x] Safari (desktop)  latest
- [x] Safari (iOS) version 11.1
 
For Tooling issues:
- angular/cli version: 6.0.1 (it was on version 5 too)
- Node version: 8.11.1
- npm version: 5.6.0

- Platform:  Mac High Sierra 10.13.14
Repository: pytorch
Issue: [Installation]: Support conda/pip install with ppc64le(power8)
Labels: module: binaries,triaged,enhancement,module: POWER

It would be very convenient to have conda/pip supported for installing PyTorch in ppc64le (power8). For now the only possibility is to build from source. 

cc @ezyang @seemethere @malfet @walterddr
Repository: rust
Issue: Many `From` implementations are undocumented
Labels: E-easy,C-enhancement,P-medium,E-mentor,T-libs-api,A-docs

While `std::convert::From` has [very detailed high level documentation](https://doc.rust-lang.org/std/convert/trait.From.html), the implementations often lack docs on how they work and use the default "performs the conversion" boilerplate.

This at least includes all `String` methods, also, all integer conversions. Both of these can have interesting behaviour, especially in relation to each other. For example, the different allocation behaviour between `From<Box<str>>` and `From<&'a str>` is notable and hard to figure out from the source, as it goes through three layers of indirection.
Repository: kubernetes
Issue: Figure out what's the best path for delivering cloud config in nodes
Labels: sig/node,kind/feature,lifecycle/frozen,sig/cloud-provider,needs-triage

I feel that similar to how node bootstrapping and dynamic kubelet config work today, it would be nice to provide a similar mechanism for serving cloud provider config from the API server. Or maybe there is a better option.

Today we have the following options:
1. lay the extra config inside the machine (prebaked in the VM image)
2. lay the extra config inside the machine (during startup of the VM)
3. duplicate the mechanism used by bootstrapping
4. ???

None of the above is ideal:
1. the config is tied to the lifecycle of the VM image and in order to rollout an update you need to go through the whole process of image build -> image publish -> rollout. Also, this can be even worse when the cloud config includes credentials.
2. this is still tied to the lifecycle of the VM; in order to update cloud config, the VM needs to be drained, all running workloads are evicted and rescheduled elsewhere.
3. still suboptimal because we have to duplicate existing mechanics (give extra access to bootstrap kubeconfig in order to fetch the extra config, figure out a way to update kubelets when a new change needs to get delivered) but better than 1. and 2. since only a kubelet restart is involved and existing workloads are not disrupted apart from the restart.

@smarterclayton @mtaufen @jim-minter @pweil- @kubernetes/sig-node-feature-requests
Repository: flutter
Issue: Step.state should not be final
Labels: framework,f: material design,c: proposal,P3,team-design,triaged-design

Can't seem to find any documentation on how to change the state of a [Step](https://docs.flutter.io/flutter/material/Step-class.html) within a [Stepper](https://docs.flutter.io/flutter/material/Stepper-class.html).

I tried doing a simple solution like:
```dart
class EnhancedStepper extends Step {
  set stepState(StepState state) {
    this.state = state;
  }
}
```
However, because state is final I can't change it (I'm also assuming that because Step isn't a widget itself that it/it's Stepper won't know to redraw itself)

My use case is to have a button within a step that asks the user for a device permission, then greys out the button and sets Step.state to StepState.complete.

Something like:
```dart
class SetupStepper extends StatefulWidget {
  bool _granted = false;

  List<Step> _steps =[
    Step(
      title: Text("SMS Permission"),
      state: _granted ? StepState.complete : StepState.indexed,
      content: RaisedButton(
        child: Text("Request Permission")
        onPressed: _granted ? null : () async {
          bool result = await getPermission("SEND_SMS");
          if(result) {
            // This doesn't work
            setState(() {
              _granted = true;
            });
          }
        }
      )
    ),
    …
  ];
  …
}
Repository: angular
Issue: html element property and input naming conflict
Labels: area: core,core: binding & interpolation,core: inputs / outputs,type: confusing,P4


## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
</code></pre>

## Current behavior
I was using an input named title on a component. In the rendered code i had a strange tooltip on my component. 
 
The problem is that title is already defined as a property of the Element (i missed that).

<pre><code>
The HTMLElement.title property represents the title of the element,
 the text usually displayed in a 'tool tip' popup when the mouse is 
over the displayed node.
</code></pre>


## Expected behavior

Maybe nothing or if possible i compiler waring that i am reusing a html element property with my input name.

## Minimal reproduction of the problem with instructions

The simple example shows my title tooltip effect. 

https://stackblitz.com/edit/angular-1wezyh



## What is the motivation / use case for changing the behavior?

As a developer I know a lot but not all possible properties of an html element and a name conflict is possible.

## Environment

<pre><code>
Angular version: 6.0.0

Browser:
- [ x] Chrome (desktop) version XX
- [ x] Chrome (Android) version XX
- [ x] Chrome (iOS) version XX
- [ x] Firefox version XX
- [ x] Safari (desktop) version XX
- [x ] Safari (iOS) version XX
- [ x] IE version XX
- [ x] Edge version XX
 
For Tooling issues:
- Node version: XX  <!-- run `node --version` -->
- Platform:  <!-- Mac, Linux, Windows -->

Others:
<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->
</code></pre>
Repository: TypeScript
Issue: Object spread incorrectly compiles getter
Labels: Bug,ES2018

<!-- 🚨 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:**  2.9.1

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** 
object spread getter

**Code**

```ts
const A = { a: 1 };
const X = { ...A, get x() { return this.a } };
const Y = { a: A.a, get x() { return this.a } };
console.log(X.x, Y.x)
```

**Expected behavior:**
1 1

**Actual behavior:**
undefined 1

The [proposal](https://github.com/tc39/proposal-object-rest-spread/blob/master/Spread.md) says that ``get x()`` should not be called (section *Getters on the Object Initializer*).

Executing the code in Chrome (66) console produces the expected behavior.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> 
[link](https://www.typescriptlang.org/play/index.html#src=const%20A%20%3D%20%7B%20a%3A%201%20%7D%3B%0D%0Aconst%20X%20%3D%20%7B%20...A%2C%20get%20x()%20%7B%20return%20this.a%20%7D%20%7D%3B%0D%0Aconst%20Y%20%3D%20%7B%20a%3A%20A.a%2C%20get%20x()%20%7B%20return%20this.a%20%7D%20%7D%3B%0D%0Aconsole.log(X.x%2C%20Y.x)%3B)
Repository: pytorch
Issue: [feature request] MPI init_method for torch.distributed
Labels: oncall: distributed,triaged

That would be nice to have an init_method that is not socket-based, using MPI for initializing/side-channel communications. I am not talking about MPI backend (or cuda-aware MPI) here, but want to use mpi just for the init part. If we could use a custom `init_method` we could even use `mpi4py`.

## Code example

Ideally something like:

```python
            dist.init_process_group(
                backend="nccl",
                init_method='mpi://',
                world_size=self.world_size,
                rank=self.rank,
                group_name='mtorch'
            )
```

discussed [here](https://discuss.pytorch.org/t/nccl-backend-and-init-method-with-mpi/19418).

## System Info
PyTorch version: 0.4.0
Is debug build: No
CUDA used to build PyTorch: 8.0.61

OS: Ubuntu 16.04.3 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 2.7
Is CUDA available: No
CUDA runtime version: 8.0.61
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.6.0.21
/usr/lib/x86_64-linux-gnu/libcudnn_static_v6.a

Versions of relevant libraries:
[pip] numpy (1.14.3)
[pip] numpydoc (0.8.0)
[pip] torch (0.4.0)
[pip] torchvision (0.2.1)
[conda] pytorch 0.4.0 py27_cuda8.0.61_cudnn7.1.2_1 pytorch
[conda] torchvision 0.2.1 py27_1 pytorch
Repository: rust
Issue: Implementations conflict when using associated type across crates
Labels: A-diagnostics,A-associated-items,T-lang,T-compiler,C-bug

crate bar:
```rust
pub struct Bar;
pub struct BarNext;

pub trait SomeTrait {
        type Next;
}

impl SomeTrait for Bar {
        type Next = BarNext;
}
```

crate foo:
```rust
extern crate bar;

struct Foo;

struct Baz;
struct BazNext;

pub trait MyTrait<T> {
}

impl MyTrait<BazNext> for Foo {
}

// Why does this conflict with the previous impl?  It should resolve to the type BarNext
impl MyTrait<<::bar::Bar as ::bar::SomeTrait>::Next> for Foo {
}

// Using the type BarNext directly does not conflict with the first impl
// impl MyTrait<::bar::BarNext> for Foo {
// }

fn main() {
    println!("Hello, world!");
}
```

Output:
```
error[E0119]: conflicting implementations of trait `MyTrait<BazNext>` for type `Foo`:
  --> src/main.rs:15:1
   |
11 | impl MyTrait<BazNext> for Foo {
   | ----------------------------- first implementation here
...
15 | impl MyTrait<<::bar::Bar as ::bar::SomeTrait>::Next> for Foo {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Foo`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0119`.
error: Could not compile `foo`.
```

I can only reproduce this issue when using the `<Bar as SomeTrait>::Next` syntax, and only when Bar is in an external crate.  Reproduced in current stable and nightly.
Repository: TypeScript
Issue: Destructure of function parameters - Refactoring
Labels: Suggestion,Needs Proposal,Domain: Refactorings

```javascript
const calllback = event=> {
   let {target} = event;
   // code with used target
}
```

to

```javascript
const calllback = ({target})=> {
   // code with used target
}
```

Same in the opposite direction and with a more complex and deep destructure and function content.
Repository: rust
Issue: std::process:Command blocks with child.wait() and stdout "piped"
Labels: T-libs-api,A-io,A-process

Hi,

I have 2 applications that spawn a new process with stdout redirected to `Stdio::piped()`. The command is executed through `spawn()` call.

I'm waiting until process will finish through `child.wait()` interface. If the output of the command is large(several thousands lines) then the process is blocked. If I read the output of the child with some buffer then it works fine and the process doesn't block.

If the output of the command is small then the process doesn't block, I don't have to read the output through a buffer or something similar.

```rust
use std::io::Read;
use std::process::{Command, Stdio};
fn main() {
    let mut child = Command::new("ls")
        .args(&["-R", "/home/carlos/rust"]) // output of this command is several thousands lines
        //.args(&["/home/carlos/rust"])  // output of this command is only few lines
        .stdout(Stdio::piped())
        .spawn()
        .expect("Cannot be executed");


    // If I read the output of the child, then it works fine, it doesn't matter if the output is
    // big or not.

    //{
    //let mut buffer: String = String::new();
    //child.stdout.as_mut().unwrap().read_to_string(&mut buffer);
    //println!(
    //"the output is {:?}",
    //buffer
    //);
    //}

    child.wait();
    println!("Finish");
}
```
These are the number of lines and the execution time of the output command from terminal:
```
⇒  time ls -R /home/carlos/rust | wc -l
   15532
ls -G -R /home/carlos/rust  0,04s user 0,03s system 99% cpu 0,074 total
wc -l  0,00s user 0,00s system 3% cpu 0,074 total

⇒  time ls /home/carlos/rust | wc -l
      16
ls -G /home/carlos/rust  0,00s user 0,00s system 81% cpu 0,003 total
wc -l  0,00s user 0,00s system 53% cpu 0,003 total
```
I don't know which one should be the right behavior but I guess that it should be the same in both cases, the size of the output shouldn't impact on it.

In my opinion, if the output of the command is stored on the field `stdout` of the variable `child`, then the command should finish and if you want to read the output you can read it through `child.stdout`.

I guess there is a limit on the buffer size of the `child.stdout` so if the output is bigger than its default size then the application blocks until "someone" reads this buffer before fill it again. In this case you avoid to store a lot of information in memory but I don't see any reference to that in the documentation.
```
⇒  rustc --version --verbose
rustc 1.26.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-freebsd
release: 1.26.0
LLVM version: 6.0
```
Repository: godot
Issue: Scene containing CollisionShape2D throws errors when added to SceneTree asynchronically
Labels: discussion,topic:core,documentation

**Godot version:**
Godot_v3.0.3-rc3_mono_win64

**OS/device including version:**
Windows 10

**Issue description:**
Scene containing CollisionShape2D throws errors when added to SceneTree asynchronically.

```
0:00:06:0396 - Index p_index=0 out of size (shapes.size()=0)
----------
Type:Error
Description: 
Time: 0:00:06:0396
C Error: Index p_index=0 out of size (shapes.size()=0)
C Source: servers/physics_2d/collision_object_2d_sw.cpp:68
C Function: set_shape_transform

0:00:06:0403 - Index p_shape_idx=0 out of size (body->get_shape_count()=0)
----------
Type:Error
Description: 
Time: 0:00:06:0403
C Error: Index p_shape_idx=0 out of size (body->get_shape_count()=0)
C Source: servers/physics_2d/physics_2d_server_sw.cpp:701
C Function: body_set_shape_disabled

0:00:06:0411 - Index p_shape_idx=0 out of size (body->get_shape_count()=0)
----------
Type:Error
Description: 
Time: 0:00:06:0411
C Error: Index p_shape_idx=0 out of size (body->get_shape_count()=0)
C Source: servers/physics_2d/physics_2d_server_sw.cpp:710
C Function: body_set_shape_as_one_way_collision
```

When added synchronically or when added asycnchronically, but without CollisionShape2D node, everything works as expected.

**Steps to reproduce:**
Create a Loader scene with with single node containing the following code:
```CS
using System;
using System.Threading.Tasks;

using Godot;

public class Loader : Node
{
    public override void _Ready()
    {
        // Doesn't work
        this.LoadSceneAsync();

        // Works
        //this.LoadScene();
    }

    private async void LoadSceneAsync()
    {
        await Task.Run((Action)this.LoadScene);
    }

    private void LoadScene()
    {
        var scene = (PackedScene)GD.Load("res://Hero.tscn");
        var node = scene.Instance();
        this.CallDeferred(nameof(this.AddNode), node);
    }

    private void AddNode(Node node)
    {
        this.GetTree().GetRoot().AddChild(node);
    }
}
```

Create another scene res://Hero.tscn with KinematicBody2D as a root node and two child nodes Sprite and CollisionShape2D.


**Minimal reproduction project:**
[Test.zip](https://github.com/godotengine/godot/files/2087029/Test.zip)
Repository: go
Issue: cmd/go: install/build doesn't remove temporary files when aborted
Labels: NeedsInvestigation,GoCommand

Go version: go1.10 linux/amd64

I've noticed `go build` and `go install` don't remove temporary files in `/tmp/go-*` when aborted with Ctrl-C.
This is an issue with big programs (binary size ~1GB due to linking with a [huge C/C++ library](https://godoc.org/llvm.org/llvm/bindings/go/llvm)), because late in the linking process an intermediary file is created as big as the output file (probably it's the output file itself) that just stays in `/tmp` on a `tmpfs`. Aborting a few times at this stage in the build will quickly fill the RAM on a regular computer until the next reboot (or until manually removing all temporary files).

It would be nice if the Go toolchain would remove it's own temporary files when aborted.