sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: Disparity between CUDA and core morphology APIs
Labels: category: imgproc,RFC

##### System information (version)
<!-- Example
- OpenCV => 4.2
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
-->

- OpenCV => 4.4.0-dev
- Operating System / Platform => macOS 10.15.6
- Compiler => gcc 6.5.0

##### Detailed description

The core API provides `cv::getStructuringElement()` and `cv::morphologyEx()`. However the CUDA module provides `cv::cuda::createMorphologyFilter()` which seems to be an API that was removed from core.

Could this disparity be resolved so that code is more easily ported between CPU/OpenCL and CUDA?

##### Issue submission checklist

 - [x] I report the issue, it's not a question
   <!--
   OpenCV team works with answers.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [x] I checked the problem with documentation, FAQ, open issues,
       answers.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://answers.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [x] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [x] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archite to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->
Repository: opencv
Issue: Why is there no cv::mulAdd() ?
Labels: feature

Considering the performance of fma instructions, why is there no cv::mulAdd() function in OpenCV ?
convertTo() is an option thanks to alpha and beta parameters, but does not support cv::Mat/cv::Scalar operands, while functions of the family of cv::add() do
Repository: pytorch
Issue: install path can set prefix install dir 
Labels: module: build,triaged

python3 ./tools/build_libtorch.py the install dir can not set by user

~/pytorch/tools/setup_helpers/cmake.py
install_dir = os.path.join(base_dir, "torch")
cmake__options = {
            'CMAKE_INSTALL_PREFIX': install_dir,
        }
Can not manual assign install dir.  It always install to torch

python3 ./tools/build_libtorch.py  [assign install-dir] is better

(~/pytorch/scripts/build_android.sh will install to  ~/pytorch/build_android/install)


cc @malfet
Repository: godot
Issue: Tilemap - unexpected high memory usage per Tile
Labels: discussion,topic:core

### **Godot version:**
- 3.2.2 (stable) - 64 Bit Windows Client

### **OS/device including version:**
- Windows 10 (64 Bit)

### **Issue description:**
In case of big Tilemaps the memory usage (static) is getting unexpected high (i. e. 2k x 2k = 700 MiB).
This is a problem especially for big maps based on procedural generation.

It seems that the memory allocation per Tile is at **~180 Bytes**.

Based on the Tilemap code, I'm not sure where this overhead is coming from, as the cell data should only allocate the following structure.

```
struct {
	int32_t id : 24;
	bool flip_h : 1;
	bool flip_v : 1;
	bool transpose : 1;
	int16_t autotile_coord_x : 16;
	int16_t autotile_coord_y : 16;
};
```

I assume also the PosKey should be relevant per Tile.

```
struct {
	int16_t x;
	int16_t y;
};
```

So basically it should only require uint32_t + uint64_t = **12 Byte** ... I totally understand that the Tilemap itself has some overhead and also the Quadrants need some memory allocation, but it seems like there is something wrong.

### **Steps to reproduce:**
Just create a new 2D project and add a Tilemap + Tileset and fill it with a double loop for 2k x 2k or use the attached project.

### **Minimal reproduction project:**
[Tilemap_MEM-per-Tile.zip](https://github.com/godotengine/godot/files/4956409/Tilemap_MEM-per-Tile.zip)
Repository: flutter
Issue: Utilize new ImageDescriptor logic to allow for aspect ratio maintaining ResizeImages
Labels: framework,a: images,P2,team-framework,triaged-framework

See https://github.com/flutter/flutter/issues/59578

See https://github.com/flutter/engine/pull/19537

It is now possible for the framework to reason about the dimensions of the image before decoding. This should be reflected in ResizeImage so that aspect ratio can be maintained when resizing an image, particularly images coming from sources that may not be in the developer's control (e.g. a network image).
Repository: electron
Issue: [Discussion] Documentation misses examples for electron remote and non-main process executions for Node 12
Labels: discussion

Hi everyone,

I read a lot about the main/renderer processes in Electron and for my problem it seems neither of them is the right place for my heavy I/O based task, so I am considering to use an **additional** helper process. Is that correct? AFAIU, I can either put my I/O operations to the main process or use an additional process (which is the preferred way if possible).

A lot of examples about this remote modules are outdated though, especially often is referenced the deprecated [electron-remote](https://github.com/electron-userland/electron-remote) module. I found of course the electron remote page, but to me it seems this focuses only on the IPC mechanisms between the renderer and the main process. I miss references/examples how to spawn an additional process. Am I missing something here, or could this issue report be used to improve the docs in this regard.

I use Electron 9.1.0 and Node 12.8.0. LTS.
Repository: pytorch
Issue: bitwise_or / bitwise_and /... reductions across dim (+ multidim / keepdim for consistency)
Labels: triaged,enhancement

This is useful for aggregating a final binary representation of some tensor (when every dim corresponds to some nibbles, so the reduced dimension in this usecase is small, up to 8 (for uint8) or up to 64 (for int64)) and that in the best case, sequential block reads could be leveraged

Same for logical_or / logical_and / logical_xor

My current workaround: collect four 2-bit nibbles with torch.sum instead of torch.bitwise_or
Repository: rust
Issue: Provide suggestion when argument that should be a closure is any other type
Labels: C-enhancement,A-diagnostics,A-closures,T-compiler,A-suggestion-diagnostics,D-papercut

Given

```rust
fn foo() -> Result<(), ()> {
    Ok(bar().map_err(())?)
}
```

[we currently emit](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=450e191d7a7e171f1e616993d03bcf9b)

```
error[E0277]: expected a `std::ops::FnOnce<((),)>` closure, found `()`
 --> src/main.rs:2:22
  |
2 |     Ok(bar().map_err(())?)
  |                      ^^ expected an `FnOnce<((),)>` closure, found `()`
  |
  = help: the trait `std::ops::FnOnce<((),)>` is not implemented for `()`
```

We already keep track of whether we're pointing at an argument.When the expectation is of a closure we should probably provide a suggestion along the lines of

```
error[E0277]: expected a `std::ops::FnOnce<((),)>` closure, found `()`
 --> src/main.rs:2:22
  |
2 |     Ok(bar().map_err(())?)
  |                      ^^ expected an `FnOnce<((),)>` closure, found `()`
  |
help: provide a closure instead:
  |
2 |     Ok(bar().map_err(|_| ())?)
  |                      ^^^^
```

_Taken from https://www.reddit.com/r/rust/comments/hv657u/question_mark_usage/_
Repository: flutter
Issue: ForwardingGestureRecognizer blocked by other gesture recognizers on iOS
Labels: platform-ios,engine,a: platform-views,P3,a: plugins,team-ios,triaged-ios

If there is a gesture recognizer on the platform view, which implements `- (BOOL)gestureRecognizer:(UIGestureRecognizer*)gestureRecognizer
    shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer*)otherGestureRecognizer` and returns YES, the ForwardingGestureRecognizer will be blocked, which broke the pointer event sequence that sent to the `FlutterViewController`.

One of the issues that is related to this failure is with WKWebView

>The WKDeferringGestureRecognizer(Webkit Internal API) in the WKWebView seems to be the one that is blocking the ForwardingGestureRecognizer in the flutter engine.
>https://github.com/WebKit/webkit/blame/master/Source/WebKit/UIProcess/ios/WKDeferringGestureRecognizer.mm
>This is a new gesture recognizer that was added about 7 months ago.

related to https://github.com/flutter/flutter/issues/53490
Repository: godot
Issue: Unlimited error reporting for CSharp project
Labels: topic:editor,topic:dotnet

**Godot version:**
3.2.2 (stable) - 64 Bit Windows Client

**OS/device including version:**
Windows 10 (64 Bit)



**Issue description:**
my.cs The script has been deleted, but errors are always reported, and the same error is still displayed when the project is rebuilt.
I think there is a problem with the support for CSharp, even the official sample code can not be passed.
If I can't compile a game with Csharp, why should I use it?
I've installed mono 6.10
Please pay attention to this issue, it has seriously affected the mood of creation.
thank you!

Example:
![5c04e8f2b211931306fcbde072380cd790238dee++](https://user-images.githubusercontent.com/45537496/88121488-68467f80-cbf8-11ea-9f17-a12d13a41b5c.png)

 
Steps to reproduce:


Minimal reproduction project:
Repository: go
Issue: proposal: x/text: add replace package
Labels: Proposal

The `bytes`, `strings`, and `regexp` packages provide functions for replacing text in strings and byte slices. These only operate on strings and byte slices that are in memory. I propose a new `golang.org/x/text/replace` package which implements `golang.org/x/text/transform.Transformer`'s for replacing text. These would enable doing text replacements on `io.Reader`s. 

prototype: https://github.com/icholy/replace
Repository: flutter
Issue: Advise user to add Flutter SDK, app project, pub cache, etc to antivirus allowlist
Labels: tool,a: accessibility,a: first hour,customer: product,a: annoyance,a: triage improvements,P2,team-tool,triaged-tool

Antivirus apps have been known to delete/disable/make un-executable different subcomponents of Flutter.  Warn the user when common manifestations of this happen.

- `FileSystemException: Failed to set file modification time` https://github.com/flutter/flutter/issues/47134#issuecomment-617848767
- `FileSystemException: Cannot create file, Access is denied` when copying app template from SDK to new project. https://github.com/flutter/flutter/issues/36746
- `FileSystemException: Deletion failed, The process cannot access the file because it is being used by another process` https://github.com/flutter/flutter/issues/25197
- `CreateProcessW failed 5 Access is denied.` https://github.com/flutter/flutter/issues/23058
- Unable to find/run "adb" https://github.com/flutter/flutter/issues/61763#issuecomment-660909042
https://github.com/flutter/flutter/blob/859fce9010895ce5bcdb913a8373b5b1a194a1fb/packages/flutter_tools/lib/src/android/android_device_discovery.dart#L61
https://github.com/flutter/flutter/blob/859fce9010895ce5bcdb913a8373b5b1a194a1fb/packages/flutter_tools/lib/src/android/android_device_discovery.dart#L64
- Missing executables,  `ArgumentError: Invalid argument(s): Cannot find executable for`, `ProcessException: The system cannot find the file specified`
  - sdkmanager https://github.com/flutter/flutter/issues/56628 https://github.com/flutter/flutter/issues/9954
  - gradlew https://github.com/flutter/flutter/issues/56628 https://github.com/flutter/flutter/issues/53790#issuecomment-647125472 **No. 3 crash on stable**
  - dart https://github.com/flutter/flutter/issues/50273#issuecomment-584493105
  - gen_snapshot https://github.com/flutter/flutter/issues/16008

### Suggestions
- Output warning to add `path/to/Flutter/sdk`, `path/to/project`, pub cache, Android SDK, etc to their anti-virus whitelist.
[dart:io has a similar error.](https://github.com/dart-lang/pub/blob/03b7f9a5a27f46bf554f2a3bdef965e7354c69b0/lib/src/io.dart#L358-L360)
- Add note to https://flutter.dev/docs/get-started/install ?  Probably not a blanket "turn off anti-virus" but something like if you have not whitelisted your Flutter SDK and Flutter projects, your anti-virus may cause certain issues.
Repository: godot
Issue: Inconsistent base class detection
Labels: bug,topic:gdscript,confirmed

<!-- Please search existing issues for potential duplicates before filing yours:	
https://github.com/godotengine/godot/issues?q=is%3Aissue	
-->

**Godot version:**
3.2 branch commit 7b4b83e9dcb91b44b39e8cc87df3ddecdb29b689


**OS/device including version:**
Arch Linux


**Issue description:**
Attempting to add custom nodes using `class_name` and `tool` has inconsistent behavior -- some scripts seem to extend `Reference` as the base class when this is not the case.

Before following the steps to reproduce this issue, note that `grid_background/grid_background.gd` in the attached project extends `TextureRect`. Also `grid_background/grid_texture.gd` extends `ImageTexture`, but for some reason both are sometimes detected to extend `Reference`.


**Steps to reproduce:**
1. Open `project.godot` and check out the original `_global_script_classes`:
```
_global_script_classes=[ {
"base": "Reference",
"class": "GridBackground",
"language": "GDScript",
"path": "res://grid_background/grid_background.gd"
}, {
"base": "Reference",
"class": "GridTexture",
"language": "GDScript",
"path": "res://grid_background/grid_texture.gd"
} ]
```
2. Open the Godot Editor with `godot -e`, and when it finishes loading close it. There's a chance `GridBackground` and `GridTexture` still extend `Reference` according to `project.godot`, but if you look at their script they do not. This is the case I'm referring to -- you have reproduced the issue.
3. On the other hand, if `project.godot` do not show `Reference` as the base classes, try the following.
4. Rename `grid_background` folder to `test1` for example.
5. Open and close the Godot Editor.
6. Check `project.godot` -> `GridTexture` and `GridBackground` now "extend" `Reference` at least according to that file.
7. Reopening the project several times does not help in detecting the base class correctly either.

**Minimal reproduction project:**
[InconsistentBaseClassDetection.zip](https://github.com/godotengine/godot/files/4957483/InconsistentBaseClassDetection.zip)
Repository: godot
Issue: [Bullet] Raycasts sometimes go through convex shapes and hit the far side when BT_USE_DOUBLE_PRECISION is enabled.
Labels: bug,topic:thirdparty,topic:physics

<!-- Please search existing issues for potential duplicates before filing yours:	
https://github.com/godotengine/godot/issues?q=is%3Aissue	
-->

**Godot version:** 3.2.2.rc.custom_build.d69b856a4
<!-- Specify commit hash if using non-official build. -->


**OS/device including version:** Windows 8.1
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->


**Issue description:**
Had precision issues with bullet collision detection, so I compiled with BT_USE_DOUBLE_PRECISION defined.  That improved the kinematic collision issues, but made raycasts sometimes go through the front surface of convex collision.  I also created an issue on the bullet github in case it's an issue with the library: https://github.com/bulletphysics/bullet3/issues/2949

![image](https://user-images.githubusercontent.com/7751182/88128079-2fc88680-cba3-11ea-8a30-94b09a8cb5f8.png)
Here the raycast is coming from the right and goes through the convex collision.  Green line points to collision location.  Cyan line is the normal.

With double precision disabled:
![image](https://user-images.githubusercontent.com/7751182/88128177-5981ad80-cba3-11ea-8245-9ceb83124bfe.png)


**Steps to reproduce:**
Define BT_USE_DOUBLE_PRECISION in scons, compile, and try raycasting against a convex shape (can be as simple as a box, but not an actual "box shape" shape) from different angles.  Some will go through.
`env_base.Append(CPPDEFINES=["BT_USE_DOUBLE_PRECISION"])` in SConstruct file.

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[Test Double Precision Raycast.zip](https://github.com/godotengine/godot/files/4957613/Test.Double.Precision.Raycast.zip)

Here's a build of the engine with double precision enabled:
[godot.windows.opt.tools.32_double_precision_bullet.zip](https://github.com/godotengine/godot/files/4957620/godot.windows.opt.tools.32_double_precision_bullet.zip)
Repository: rust
Issue: Performance regression from Rust 1.37 to 1.38 when using unreachable_unchecked
Labels: A-LLVM,I-slow,A-codegen,E-needs-test,P-medium,T-compiler,regression-from-stable-to-stable,I-heavy

I tried this code when looking at the issue #73015.

```rust
use std::num::FpCategory;

fn conv(input: usize) -> FpCategory {
    match input {
        0b10000000 | 0b00000001 => FpCategory::Infinite,
        0b01000000 | 0b00000010 => FpCategory::Normal,
        0b00100000 | 0b00000100 => FpCategory::Subnormal,
        0b00010000 | 0b00001000 => FpCategory::Zero,
        0b100000000 | 0b1000000000 => FpCategory::Nan,
        _ => unsafe  { std::hint::unreachable_unchecked() },
    }
}

pub fn test(input: usize) -> bool {
    conv(input) == FpCategory::Zero
}
```

I expect all other match arms to be optimised out, so basically the code would be equivalent to
```rust
pub fn test(input: usize) -> bool {
    match input {
        0b00010000 | 0b00001000 => true
        _ => false,
    }
}
```
or maybe even
```rust
pub fn test(input: usize) -> bool {
    input & 0b00011000 != 0
}
```

On Rust 1.37 it is quite optimised but a huge chunk of code is generated for 1.38. Interestingly, if the unreachable_unchecked is replaced with a value such as `FpCategory::Nan`, `test` could still be optimised.

@rustbot modify labels: +I-slow +I-heavy +T-compiler +A-codegen
Repository: rust
Issue: Remove `NtIdent` hack for regressed crates
Labels: T-compiler,C-future-incompatibility,A-proc-macros,A-proc-macro-back-compat

## What is this issue?

If you're a crate author who's been linked here, this issue tracks removing a backwards-compatibility hack in Rust.

Rust has a longstanding issue https://github.com/rust-lang/rust/issues/43081, which causes procedural macros to lose location and hygiene information (known as a "Span") under certain circumstances. Recently, pull request https://github.com/rust-lang/rust/pull/73084 was merged, which makes progress towards resolving https://github.com/rust-lang/rust/issues/43081.

Unfortunately, older versions of certain procedural macro crates (such as `proc-macro-hack v0.5.15` and `js-sys v0.3.39`) cannot handle the changes in input caused by the Rust bugfix. To allow these crates to continue to compile, a backward-compatibility hack was added to adjust the input passed to `proc-macro-hack` and `js-sys` specifically.

Eventually, we would like to remove this backwards-compatibility hack, since the compiler should not have hard-coded exceptions for certain crates. However, removing this hack will break any crates that depend on affected versions of `proc-macro-hack` or `js-sys`.

To ensure that your crate continues to work, you'll want to ensure that your `Cargo.lock` references `proc-macro-hack` v0.5.16 or above, and `js-sys` v0.3.40 or above. This can be done by running `cargo update -p proc-macro-hack` and `cargo update -p js-sys`. If you maintain a library crate (without a `Cargo.lock`, no action is needed on your part).

### Internal compiler details


In https://github.com/rust-lang/rust/pull/73084#issuecomment-652613950, I added a hack to change the behavior of `NtIdent`s passed to certain proc-macros. This was done by special-casing certain identifiers, and should be eventually be removed in favor of a proper solution.

If we decide to always wrap single identifiers in `None`-delimited groups, then we will need to wait until enough of the ecosystem has bumped `proc-macro-hack` and `wasm-bindgen`, to avoid breaking a large number of crates.

Crater run: https://crater-reports.s3.amazonaws.com/pr-73084-1/index.html
Triage: https://hackmd.io/O7icbSylRP6uVZyAQ9EDeA
Repository: rust
Issue: Error message suggests using `&` and `mut` when matching on fields behind a `&mut`, rather than `&mut` or `ref mut`
Labels: T-compiler,C-bug,A-suggestion-diagnostics,D-invalid-suggestion

When compiling this code, which attempts to match a field behind a mutable reference against a moving pattern:

```rust
struct S {
    field: Option<String>,
}

fn f(arg: &mut S) {
    match arg.field {
        Some(s) => s.push('a'),
        None => {}
    }
}

fn main() {
    let mut s = S {
        field: Some("a".to_owned()),
    };
    f(&mut s);
    println!("{:?}", s.field);
}
```

Here's the compiler message:

```rust
error[E0507]: cannot move out of `arg.field.0` which is behind a mutable reference
 --> src/main.rs:6:11
  |
6 |     match arg.field {
  |           ^^^^^^^^^ help: consider borrowing here: `&arg.field`
7 |         Some(s) => s.push('a'),
  |              -
  |              |
  |              data moved here
  |              move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait

error[E0596]: cannot borrow `s` as mutable, as it is not declared as mutable
 --> src/main.rs:7:20
  |
7 |         Some(s) => s.push('a'),
  |              -     ^ cannot borrow as mutable
  |              |
  |              help: consider changing this to be mutable: `mut s`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0507, E0596.
For more information about an error, try `rustc --explain E0507`.
error: could not compile `playground`.
```

([Stable 1.45.0](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c7740d44dfb8ff005578978dd8f61ec3)) ([Beta 1.46.0-beta.1](https://play.rust-lang.org/?version=beta&mode=debug&edition=2018&gist=05caf9c901ad9d056770967c01501acb)) ([Nightly 1.47.0-nightly](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=a7169a290b80cd1a0d3bd096e9fc0723))

However, applying the suggestions results in:

```rust
fn f(arg: &mut S) {
    match &arg.field {
        Some(mut s) => s.push('a'),
        None => {}
    }
}
```

which doesn't work either.

(Related post on the Rust Programming Language Forum: [Having trouble using Struct Option var](https://users.rust-lang.org/t/having-trouble-using-struct-option-var/46198))
Repository: go
Issue: x/tools/gopls: support gomvpkg as a command
Labels: Thinking,FeatureRequest,gopls,Tools

See https://pkg.go.dev/golang.org/x/tools/cmd/gomvpkg?tab=doc.