sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Associated type behind a *mut unecessarily results in invariant subtyping
Labels: A-type-system,A-associated-items,T-lang,T-types

Consider the following code ([playpen](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a73ee6a15b31f56b93fae74c447ea628))

```rust
pub trait Data {
    type Elem;
}

pub struct ViewRepr<A>(A);

impl<'a, A> Data for ViewRepr<&'a A> {
    type Elem = A;
}

pub struct ArrayBase<D: Data> {
    ptr: *mut D::Elem,
    // ptr: *mut f32,
    d: D,
}

pub fn cast_array_view<'shorter, 'longer: 'shorter>(
    input: ArrayBase<ViewRepr<&'longer f32>>
) -> ArrayBase<ViewRepr<&'shorter f32>> {
    input
}
```

`cast_array_view` fails to compile with the first definition of `ptr`, and succeeds with the second, despite the two functions being apparently identical. 

I think the reason this is happening is most likely related to the fact that subtyping of `*mut` [pointers is invariant on the type of their parameter](https://doc.rust-lang.org/nomicon/subtyping.html#variance), and structs containing `*mut T` pointers are invariant with respect to `T`. Since `D::Elem` is being stored behind a `*mut` pointer rustc has decided that `ArrayBase` is invariant with respect to `D`, instead of `D::Elem`.

PS: Thanks to /u/Patryk27 on reddit for looking at this and pointing me in the direction of the variance docs.
Repository: flutter
Issue: Phantom margin in stack/row
Labels: framework,f: material design,has reproducible steps,P2,found in release: 3.3,found in release: 3.5,team-design,triaged-design

I am getting this strange margin in the top of the container who is in the stack. I didn't manage to remove it in any way.

## Steps to Reproduce

I made Pad reproducing my problem: https://dartpad.dev/3cff37d88cb391d15ffa13db818d5408

## Flutter doctor

```
[√] Flutter (Channel dev, v1.14.1, on Microsoft Windows [Version 10.0.18362.535], locale en-US)
    • Flutter version 1.14.1 at C:\flutter
    • Framework revision c88320458e (4 days ago), 2020-01-15 11:38:02 -0500
    • Engine revision bc41ab5139
    • Dart version 2.8.0 (build 2.8.0-dev.1.0 fe666ce592)

 
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\janko\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 35.3.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] VS Code (version 1.41.1)
    • VS Code at C:\Users\janko\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.7.1

[√] Connected device (3 available)
    • Mi 9T Pro  • 93997746   • android-arm64  • Android 10 (API 29)
    • Chrome     • chrome     • web-javascript • Google Chrome 79.0.3945.130
    • Web Server • web-server • web-javascript • Flutter Tools
```
Repository: godot
Issue: Gui styles are shrinking edges of texture
Labels: bug,topic:gui

**Godot version:**
3.2 beta 4

**OS/device including version:**
Windows 10 pro education 64 bit

**Issue description:**
styles are shrinking edges of texture on buttons when they edges should not be modified at all.
here is a picture of the edges being half the size then they should be
![image](https://user-images.githubusercontent.com/2453707/72690033-fff1d680-3acc-11ea-8282-6c2ef2ab78ef.png)

![image](https://user-images.githubusercontent.com/2453707/72690022-cd47de00-3acc-11ea-882d-8b29a5c11627.png)

what should be happening is that the edges do not shrink but instead the center does like 9 slices should.

**Steps to reproduce:**
- make a 16x16 rectangle texture with 1 pixel wide edges in a photo editing program.
- add a button and assign the texture to the default style with a margin of 1,1,1,1
- resize it smaller then the texture size
- see result


**Minimal reproduction project:**
[9Slice Style Bug.zip](https://github.com/godotengine/godot/files/4083866/9Slice.Style.Bug.zip)
Repository: TypeScript
Issue: `export as namespace` still allows access via properties in module files
Labels: Bug

**TypeScript Version:**  3.8.0-dev.20200119

**Search Terms:** export as namespace

**Code**

someModule.d.ts:

```ts
export function foo (bar: string): void;
export as namespace someModule;
```

index.ts:

```ts
import { foo } from './someModule';

someModule.foo;
window.someModule.foo;
globalThis.someModule.foo;
```

**Expected behavior:**

All of the attempts to access `someModule` as a global namespace in `index.ts` should result in compile-time errors, as `index.ts` is not a script file.

**Actual behavior:**

`window.someModule.foo` and `globalThis.someModule.foo` do NOT result in compile-time errors.

**Playground Link:** N/A (requires multiple files)

**Related Issues:** None found
Repository: pytorch
Issue: DistributedStreamSampler: support stream sampler in distributed setting
Labels: oncall: distributed,module: cpp,triaged

## 🚀 Feature

DistributedStreamSampler: support stream sampler in distributed setting

## Motivation

A new class `torch::data::samplers::DistributedStreamSampler` both works in distributed setting like `torch::data::samplers::DistributedSequentialSampler` and works with `torch::data::datasets::StreamDataset` like `torch::data::samplers::StreamSampler`.

## Pitch

works with StreamDataset in distributed setting.

## Alternatives

implement this by user

## Additional context

none


cc @yf225 @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar
Repository: godot
Issue: Tilemap world_to_map() does not get the correct tile in combination with Raycast2D
Labels: discussion

**Godot version:** 3.1 stable, 3.2 rc1

**OS/device including version:** Win7

**Issue description:**
When casting a ray onto a tilemap to detect a tile, I would expect for world_to_map() to return the Tile directly behind the ray collision point, in the direction of the ray, not on the right and below the collision point. 
But since get_collision_point() returns a point exactly between the two tiles and world_to_map() returns the tile right and below the given point, the wrong tile is returned from world_to_map():

![tileset_mining](https://user-images.githubusercontent.com/47016402/72697166-39632a00-3b3f-11ea-866b-ff9794c25910.gif)


**Steps to reproduce:**
```
extends RayCast2D

func _physics_process(delta):
	if Input.is_action_just_pressed("Mine_Left") and is_colliding():
		var target = get_collider()
		if target.is_class("TileMap"):
			var point = get_collision_point()
			var map_point = target.world_to_map(point)
			target.set_cellv(map_point, 0, false, true)
```

**Minimal reproduction project:**
[Tileset_Mining.zip](https://github.com/godotengine/godot/files/4084345/Tileset_Mining.zip)
Repository: pytorch
Issue: Is there a way to use SYSTEM_INSTALLED 3rdparty libraries?
Labels: module: build,triaged


I just wonder if there is a way to build pytorch based on my **SYSTEM** packages which are already installed, instead of building pytorch with those submodule 3rdparty libraries?

Is that possible? And how to do that with one command?

Is
```console
python setup.py build
```
preferred? Or  **cmake** is preferred?
Repository: rust
Issue: Expose `type_name()` method on Any.
Labels: T-libs-api,C-feature-request,A-intrinsics

In a similar spirit to #61533, it would be nice if the Any trait contained an auto implemented method akin to:
```rust
fn type_name(&self) -> &'static str
{
    std::any::type_name::<T>()
}
```
This way it would be a lot easier print and surface errors like accidentally trying to cast `Box<T>` to `T` because `&Box<T>` is also `&Any`.
Repository: flutter
Issue: Appbar on iphone x take too much space on top
Labels: e: device-specific,platform-ios,framework,f: material design,a: fidelity,P3,team-design,triaged-design

Using appbar on iphone especially iphone x take too much top space

Comparison: 
on left (native app - Google translate) on right (flutter app)
![E93BD8B4-CA46-44D5-BC3D-A9C3A5B95A96](https://user-images.githubusercontent.com/41800/72701943-9f71a080-3b83-11ea-8faf-dbd8fa7a83c9.png)

After debugging, i found out the culprit was appbar is using SafeArea when primary enabled. I think flutter team should update the implementation to be similar with cupertino navigationbar.

It quite annoying wasting too much space and the title doesnt look vertically centered.
Using preferredSize doesnt help much either.
Repository: flutter
Issue: [url_launcher] - PlatformException on ios 13.3 when opening a docx file
Labels: c: crash,platform-ios,p: url_launcher,package,P2,team-ios,triaged-ios

## Steps to Reproduce

Steps to reproduce:
1. install url_launcher plugin
2. try to open a url that points to an uploaded docx file somewhere
3. native view opens up and PlatformException is thrown


**Expected results:** 
No exception is thrown (maybe I can open the file also?)

**Actual results:** 
iOS opens to following view, while the lib still throws an exception:

<img width="307" alt="Screenshot 2020-01-20 at 09 37 03" src="https://user-images.githubusercontent.com/39137870/72710968-6e37a700-3b68-11ea-9191-e1f5f6c75578.png">

On ios 11 everything works just fine. I'm asking about this because we are using Sentry to report every exception that occurs, and this I think should not be an exception 

<details>
  <summary>Logs</summary>

```
flutter: Caught error: PlatformException(Error, Error while launching {{url_here}}, null)
flutter: inDebugMode
flutter: #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
#1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
<asynchronous suspension>
#2      MethodChannelUrlLauncher.launch (package:url_launcher_platform_interface/method_channel_url_launcher.dart:39:21)
#3      launch (package:url_launcher/url_launcher.dart:86:58)
<asynchronous suspension>
#4      tryOpenLink (package:{{package_name_here}}/widgets/chat_view/utils/link_tools.dart:8:11)
<asynchronous suspension>
#5      AttachmentMessage._handleLinkOpen.<anonymous closure> (package:{{package_name_here}}/widgets/chat_view/widgets/messages/attachment_message.dart:33:13)
#6      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:654:14)
#7      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:729:32)
#8      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#9      TapGestureRe<…>
```

```
Flutter doctor: 

[✓] Flutter (Channel unknown, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G2022, locale en-GB) 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Community Edition (version 2019.1.3)
[✓] VS Code (version 1.41.0)
[✓] Connected device (2 available)
```
</details>
Repository: flutter
Issue: How to get the visible bounds of widget ? 
Labels: c: new feature,framework,P3,team-framework,triaged-framework

How to get the VisibleClipBounds of Widget? 
   My requirement to get the current bounds of the widget after is moved some sort of distance using Positioning Widget. 

Example: In Windows, I will get the Graphics.VisibleClipBounds.

Why? am asking this for re-using case and to avoid to re-paint on the drawn position in view.
Repository: terminal
Issue: Default color indices set through SetConsoleScreenBufferInfoEx do not propagate to the propsheet
Labels: Product-Conhost,Issue-Bug,Area-Settings,Priority-2

# Environment

```none
Windows build number: 10.0.18363.0
```

# Steps to reproduce
1. Create a new "Windows Console Application" project.
2. Compile and run the code.
```cpp
#include <windows.h>
#include <stdio.h>

int main()
{
    HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);

    if (hStdOut == INVALID_HANDLE_VALUE)
    {
        fprintf(stderr, "GetStdHandle() failed.");
        return 1;
    }

    CONSOLE_SCREEN_BUFFER_INFOEX info = { 0 };
    info.cbSize = sizeof(info);

    if (!GetConsoleScreenBufferInfoEx(hStdOut, &info))
    {
        fprintf(stderr, "GetConsoleScreenBufferInfoEx() failed.");
        return 1;
    }

    // Set color #6 as the foreground color and color #3 as the background color.
    info.wAttributes = FOREGROUND_GREEN | FOREGROUND_RED |
                       BACKGROUND_GREEN | BACKGROUND_BLUE;

    // Set color #6 as the foreground color and color #3 as the background color.
    info.wPopupAttributes = FOREGROUND_GREEN | FOREGROUND_RED |
    			    BACKGROUND_GREEN | BACKGROUND_BLUE;

    if (!SetConsoleScreenBufferInfoEx(hStdOut, &info))
    {
        fprintf(stderr, "SetConsoleScreenBufferInfoEx() failed.");
        return 1;
    }

    return 0;
}
```
3. Open the "Properties" page.
4. Select the "Colors" tab.

# Expected behavior

Screen colors and popup colors should be consistent with the colors set through the `SetConsoleScreenBufferInfoEx` function. 

Behavior on Windows 10.0.17134.0.

![colors-expected](https://user-images.githubusercontent.com/15797194/72721218-90432080-3b8c-11ea-8921-972bc2ad0fb3.png)

# Actual behavior
Screen colors and popup colors are set to default state.

![colors-actual](https://user-images.githubusercontent.com/15797194/72716575-81a43b80-3b83-11ea-9b3d-f4f702575ec3.png)

Note that setting the color table through the `SetConsoleScreenBufferInfoEx` function works as expected.
Repository: pytorch
Issue: Segmentation fault in C++ API torch::from_blob(...).clone()
Labels: module: cpp,triaged

## 🐛 Bug

Code crashes in C++ API when torch tensor is read from specific buffer

## To Reproduce

build and run this code in release build

```c++
#include <iostream>
#include <torch/extension.h>

int main() {
    std::string buffer;
    buffer.resize((1 << 19) + 128);
    std::memset(buffer.data(), 0, buffer.size());
    size_t start_offset;
    // This would work fine
    start_offset = 1 << 10;
    // This crashes
    start_offset = (1 << 10) - 1;
    size_t element_count = 319;
    std::cerr << buffer.size() << " vs " << torch::elementSize(torch::kInt32) * element_count + start_offset;
    auto tensor = torch::from_blob(buffer.data() + start_offset, {element_count}, torch::CPU(torch::kInt32));
    tensor.clone();
}
```

```cmake
cmake_minimum_required(VERSION 3.12)
project(from_blob_sigsegv)


set(CMAKE_CXX_STANDARD 17)
set(CMAKE_PREFIX_PATH /home/alxmopo3ov/libtorch)

find_package(Torch REQUIRED)
include_directories(${TORCH_INCLUDE_DIRS})
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})

add_executable(from_blob_sigsegv main.cpp)
target_link_libraries(from_blob_sigsegv ${Python3_LIBRARIES} ${TORCH_LIBRARIES})
```

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

Don't crash

## Environment

Collecting environment information...
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Ubuntu 14.04.6 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu1~14.04~ppa1) 7.4.0
CMake version: version 3.12.2

Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip3] numpy==1.15.1
[pip3] numpydoc==0.8.0
[pip3] torch==1.4.0
[pip3] torchvision==0.2.1
[conda] blas                      1.0                         mkl  
[conda] mkl                       2019.0                      118  
[conda] mkl-service               1.1.2            py37h90e4bf4_5  
[conda] mkl_fft                   1.0.4            py37h4414c95_1  
[conda] mkl_random                1.0.1            py37h4414c95_1  
[conda] torch                     1.4.0                     <pip>
[conda] torchvision               0.2.1                     <pip>

cc @yf225
Repository: godot
Issue: You can override the new method to return a different object
Labels: discussion,topic:gdscript

**Godot version:**
3.2 RC2

**OS/device including version:**
Windows 10

**Issue description:**
You can override the new constructor method to return a different class. I cannot find anywhere that makes this clear that you can do this or whether or not you should. If your intended to be able to do this, then it should be documented, if not, then there should be an error involved.

**Steps to reproduce:**

Add the following script to a node and then run it as a scene. It should output "Item".

```
extends Node

func _ready() -> void:
	print(Test.new())

class Test extends Node:
	
	static func new():
		return Item.new()
		
	func _to_string() -> String:
		return "Test"

class Item:
	
	func _to_string() -> String:
		return "Item"
```
Repository: flutter
Issue: please include scale control option in the google_maps_flutter package
Labels: c: new feature,p: maps,package,c: proposal,team-ecosystem,P3,triaged-ecosystem
Repository: go
Issue: testing: testing Log functions do not capture timestamp
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vimalkum/.cache/go-build"
GOENV="/home/vimalkum/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/vimalkum/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
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-build339334134=/tmp/go-build -gno-record-gcc-switches"

</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
https://play.golang.org/p/525R1YDp8sB

Write a test case which calls `t.Log` or `t.Logf`
The output of these logs is generated when a test fails. If i am using a CI for testing, it makes my job much easier if i can correlate test log timestamps with other logs captured by CI


### What did you expect to see?
The `t.Log` statements should produce timestamps.


### What did you see instead?
No timestamps 

```
2020/01/20 21:15:05 GetValue called                                                                                                                  
--- FAIL: TestGetValue (0.00s)                                                                                                                                
    main_test.go:9: this is log statement                                                                                                                     
    main_test.go:11: this is error log statement                                                                                                              
    main_test.go:12: expected 100                                                                                                                             
FAIL                                                                                                                                                          
exit status 1                                                                                                                                                 
FAIL    github.com/vimalk78/test-testing        0.001s
```
Repository: opencv
Issue: Support audio in OpenCV
Labels: feature

Hello!
At the moment, OpenCV library and deep learning do not stand still. 
Already more often systems are observed where audio and video are simultaneously used for processing. 
Therefore, question arose of creating a `audioio` module.

Plan of integrate `audioio` module:

To try support ALSA (Advanced Linux Sound Architecture):
   * Read/Write audio files (for example `wav`) 
   * Support audio input/output stream (support standard devices)

Your comments are welcome!
Repository: material-ui
Issue: choice chips and filter chips as input element
Labels: new feature

Hello everyone,

I didn't find an issue for this so I though it would be good to open one.
In the material.io documentation they mention [choice chips](https://material.io/components/chips/#choice-chips) as a way of selecting a single value out of a set of values. They also mention filter chips as a way to select multiple values to filter content.

if I look at these 2 components I see a lot of similarities between them. For starters, they both output value based on a selection, by displaying the options as chips. The actual difference between them, is that the choice chips are meant for single value output, but the filter chips can output an array.

My suggestion is adding these two concepts as one material-ui component that stores it's value in an input. That way you could use it in a form to replace select elements with a short options list. But can also do your own function with the onChange on the input. By adding a prop like `multiple` it would support the filter chips concept as well as the choice chips concept.

I was planning on trying to create a PR myself, but haven't found the time yet. I belief this is a fairly simple component though that is very useful.

What do you guys think?