sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Can't Build Pytorch0.4.1 From Source
Labels: module: build,triaged

I am trying to build Pytorch0.4.1 from the source on my Ubuntu18.04 desktop PC. The environment details are as follows,

- OS: Ubuntu 18.04
- GPU: RTX 2080 Supper
- CUDA: 10.2
- Anaconda Environment with Python 3.6

I used the following commands to install Pytorch from source,
1. conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi
2. conda install -c pytorch magma-cuda102
3. git clone --recursive https://github.com/pytorch/pytorch
4. cd pytorch
5. git checkout v0.4.1
6. git submodule sync
7. git submodule update --init --recursive
8. export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
9. python setup.py install

I am getting the following error
CMakeFiles/Makefile2:923: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/all' failed
make[1]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Failed to run 'bash tools/build_pytorch_libs.sh --use-cuda --use-nnpack nccl caffe2 nanopb libshm gloo THD c10d'

Any workaround? Thanks


cc @malfet
Repository: neovim
Issue: E173 (n more file(s) to edit) seems like an erroneous "error"
Labels: enhancement,ux

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`: NVIM v0.4.3
- `vim -u DEFAULTS` (version: ) behaves differently? No.
- Operating system/version: Ubuntu 18.04
- Terminal name/version: # GNOME Terminal 3.28.2 using VTE 0.52.2 +GNUTLS -PCRE2

### Steps to reproduce using `nvim -u NORC`

nvim -u NORC file-1.html file2.json

If you quit without visiting the second buffer, Neovim gives you this error:

![Screenshot from 2020-05-09 09-28-20](https://user-images.githubusercontent.com/1170326/81475036-7b3fdb00-91d7-11ea-85ed-2697d66bd586.png)

It's not that that file has unsaved changes, it simply hasn't been visited yet, and that hardly seems like a reason to throw an error.

### Actual behaviour

It throws an error.

### Expected behaviour

It not to throw an error unless I have unsaved changes.

### Note

I realize it's likely the buffers that haven't been visited, have also not been loaded, and so there's no way to know if they have unsaved changes (but if you haven't visited, how can there be changes?). I'm not sure of the best solution here. I'm just reporting the part I got hung up on repeatedly for years.

I added 

```
" Avoid E173 (n more file(s) to edit)
if argc() > 1
 silent blast " load last buffer
 silent bfirst " switch back to the first
endif
```

To my init.vim to solve it, but recently that's been creating syntax issues. Changing buffers in init.vim seems to be a bad practice too.
Repository: go
Issue: x/net/webdav: FileSystem interface should include CopyFile
Labels: NeedsInvestigation

WebDAV requires support for the `COPY` method (defined in [RFC 2518 section 8.8](https://tools.ietf.org/html/rfc2518#section-8.8)). Go's WebDAV server implementation in `golang.org/x/net/webdav` implements it, however [the current implementation](https://github.com/golang/net/blob/7e3656a0809f6f95abd88ac65313578f80b00df2/webdav/file.go#L654) simply calls `FileSystem.OpenFile` on the source and destination and uses `io.Copy` to pipe the content.

While this is fine in some cases, I really think that the user should be able to override / implement this by adding a `CopyFile` method to the `FileSystem` interface. Two major reasons I see:

- The current implementation is inefficient on filesystems that support copy-on-write.
- The current implementation is inefficient on remote filesystems (effectively, it will pull a file locally and send it back).
Repository: TypeScript
Issue: Assigning array values by index treats Array<A> | Array<B> as Array<A | B>
Labels: Suggestion,In Discussion

<!-- 🚨 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 the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  4.0.0-dev.201xxxxx
reproducible starting from at least 3.3.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**  discriminated unions, distributive 

**Code**

```ts
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.

function main() {
    var a: (number[] | string[])  = []; 
    a[0] = 3;
    a[1] = "xxx";
}
```

**Expected behavior:**
 error TS2322: Type '"xxx"' is not assignable to type 'number'.

**Actual behavior:**
All is compiled without warnings or errors.
Keep in mind that this works as expected:
```typescript
var a: (number[] | string[])  = [3, "xxx"]; // Not OK as it should be 
```

Thus, depending on how exactly we're initialising the array, behaviour differs. 
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
https://www.typescriptlang.org/play?ts=4.0.0-dev.20200508#code/C4TwDgpgBAggTnAcgVwLYGVhygXigOzQCMI4BtAXSgB8oBnLAS3wHNKBuAKE4DNl8AxsEYB7fFFQBDZgAoAlFADenKKqgA3SdkkAuKDMKoS5KrQZxmbCgtxQOUFWslkADFTwBmLmqjOAjO5QAEQAHmFBXAC+nEA

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: pytorch
Issue: Why no `torch.randperm_like`?
Labels: triaged,enhancement,module: tensor creation

## ❓ Questions and Help

I am looking at various tensor generators in the `torch` module and I've noticed, that `torch.randperm` seems to miss a `randperm_like` alternative, although it supports all the necessary flags (`dtype`, `device` and `layout`).

I want to permute the elements of a tensor `a` along an axis, using an index tensor generated with `randperm`. This tensor `a` might be a cuda tensor. Does it make any sense to generate the indexing tensor on the cuda device as well or should I generate the index permutation on the cpu?
Repository: rust
Issue: Weird nonsesnical 'one type is more general than the other' error
Labels: A-diagnostics,A-lifetimes,C-bug,D-terse

Getting mismatched types error despite exactly the same types. Works when called from some areas of project, fails from other areas.

I tried this code:
https://github.com/AS207960/whois-email, function send_mail in client.rs, called from sender.rs line 161.

I expected to see this happen: Works as if called from main.rs line 101

Instead, this happened: 
```rust
error[E0308]: mismatched types
   --> src/main.rs:104:5
    |
104 |     tokio::task::spawn(async {
    |     ^^^^^^^^^^^^^^^^^^ one type is more general than the other
    |
    = note: expected type `std::ops::FnOnce<(&trust_dns_proto::rr::rdata::mx::MX,)>`
               found type `std::ops::FnOnce<(&trust_dns_proto::rr::rdata::mx::MX,)>`
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.44.0-nightly (dbf8b6bf1 2020-04-19)
binary: rustc
commit-hash: dbf8b6bf116c7bece2987ff4bd2792f008a6ee77
commit-date: 2020-04-19
host: x86_64-unknown-linux-gnu
release: 1.44.0-nightly
LLVM version: 9.0
```
Repository: godot
Issue: Node2D.visible Value Set Incorrectly When Not Using Setter Function
Labels: bug,topic:gdscript

**Godot version:**
3.2.1 Stable

**OS/device including version:**
KDE Neon 5.18/Intel Atom x7-8700

**Issue description:**
Behavior differs on `Node2D.visible` when setting using `Node2D.visible` versus using the setter function `Node2D.set_visible(boolean)`.

```
prints(unit.qInfo.visible, unit.tile.is_visible(unit.player.game.thisPlayer))

unit.qInfo.visible = unit.tile.is_visible(unit.player.game.thisPlayer)
prints(unit.qInfo.visible, unit.tile.is_visible(unit.player.game.thisPlayer))

unit.qInfo.set_visible(unit.tile.is_visible(unit.player.game.thisPlayer))
prints(unit.qInfo.visible, unit.tile.is_visible(unit.player.game.thisPlayer))

```
**Output:**
True True
False True
True True

`unit.qInfo` extends `Node2D` while `unit.tile` extends `Node`. The `is_visible(int)` method on the `unit.tile` script returns a boolean value.

This game is multi-threaded and a second thread is running in the backround when the above code is called, however, it is not called from the background thread, the background thread does not access or modify `unit.qInfo` at any time. At the time the above code is executed the backround thread is idle due to a call to `Semaphore.wait()`.

`unit.qInfo.visible` is also set from `_ready()` in the `Unit` script, which extends `Spatial`, without using the setter function and that works. The background thread is also idle at that time. The code above is called from `Unit._process(float)`.

At no point does the background thread modify the values of any variables associated with `unit`, `unit.qInfo` or `unit.tile`. It does access some information from `unit` and `unit.tile`, but not while the above code is called.

Moreover the output from the above code is always the same. In the above code snippet calling `unit.qInfo.set_visible()` always works while using `unit.qInfo.visible` never works.

**Steps to reproduce:**
Unclear
Repository: PowerToys
Issue: [FancyZones] Zone activation using right click to drag
Labels: Idea-Enhancement,FancyZones-Dragging&UI,Product-FancyZones

I know there is a "hold shift or any non-primary mouse while dragging" feature.
But could it be possible to just have Right click dragging to enable zones?

Thanks
Repository: pytorch
Issue: IndexError reports the wrong dimension when fancy indexing
Labels: module: error checking,triaged

## 🐛 Bug

When using fancing indexing (i.e. indexing one tensor via another tensor), such that the index tensor has indices that are large enough to cause an `IndexError`, then the dimension reported in the error message is always 0, regardless of what the problematic dimension actually is.

## To Reproduce

```python
import torch
x = torch.rand(3, 5)
i = torch.tensor([6])
x[:, i]
# IndexError: index 6 is out of bounds for dimension 0 with size 5
```

## Expected behavior

Should instead read "dimension 1" in the error message above.

## Environment

 - PyTorch Version (e.g., 1.0): 1.5
 - OS (e.g., Linux): Linux
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Python version: 3.7.7

## Additional context

Taking `i = torch.tensor(6)` in the above code example gives the correct error message. This only seems to occur when `i.ndimension() >= 1`.
Repository: TypeScript
Issue: Maps are not properly displayed on typescript playground
Labels: Bug

This issue isn't related to the typescript compiler but to the playground present on typescript.org, which, according to #2246 and #17677, implements an instance of monaco-editor. I've opened this issue in this repository instead of the monaco-editor one because it seems that the problem is caused by the extensions to monaco-editor that have been added to build the playground. Feel free to close this issue if I'm mistaken.

**TypeScript Version:**  3.8.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
`Map console.log playground`

**Expected behavior:**
The standard representation of the Map object `Map { 1 => 32 }` is printed on the `console.log` call.

**Actual behavior:**
An empty object `{}` is printed on the `console.log` call.

<!-- Did you find other bugs that looked similar? -->
**Related Issues:**
There's [an stackoverflow question](https://stackoverflow.com/questions/45571101/how-can-i-display-a-javascript-es6-map-object-in-console) from 2017 which complains about the same behaviour on a repl.it environment

**Code**
```ts
let m = new Map<number,number>()
m.set(1,32)
console.log(m)
```



<details><summary><b>Output</b></summary>

```ts
"use strict";
let m = new Map();
m.set(1, 32);
console.log(m);

```


</details>


<details><summary><b>Compiler Options</b></summary>

```json
{
  "compilerOptions": {
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "strictBindCallApply": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "alwaysStrict": true,
    "esModuleInterop": true,
    "declaration": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "moduleResolution": 2,
    "target": "ES2017",
    "jsx": "React",
    "module": "ESNext"
  }
}
```


</details>

**Playground Link:** [Provided](https://www.typescriptlang.org/play?#code/DYUwLgBAthC8EDsQHcIFkCGAHAPAgrlAEYgBOANAcWQHwAUAlAFBQB0AzuHQIzkDMAJmYBjAPYJ2o0K2CiA5nSgMgA)
Repository: flutter
Issue: [tool_crash] ArgumentError: Invalid argument(s): Invalid type for "path": null
Labels: c: crash,tool,P2,team-tool,triaged-tool

## Command
```
flutter create sample1
```

## Steps to Reproduce
1. ...
2. ...
3. ...

## Logs
ArgumentError: Invalid argument(s): Invalid type for "path": null
```
#0      FileSystem.getPath (package:file/src/interface/file_system.dart:162:7)
#1      LocalFileSystem.directory (package:file/src/backends/local/local_file_system.dart:25:41)
#2      ForwardingFileSystem.directory (package:file/src/forwarding/forwarding_file_system.dart:23:49)
#3      _templateImageDirectory (package:flutter_tools/src/template.dart:256:21)
<asynchronous suspension>
#4      Template.fromName (package:flutter_tools/src/template.dart:63:38)
#5      CreateCommand._renderTemplate (package:flutter_tools/src/commands/create.dart:629:46)
#6      CreateCommand._generateApp (package:flutter_tools/src/commands/create.dart:543:29)
#7      CreateCommand.runCommand (package:flutter_tools/src/commands/create.dart:380:37)
#8      _rootRunUnary (dart:async/zone.dart:1192:38)
#9      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#10     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#12     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#13     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#14     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#15     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#16     FlutterProject.organizationNames (package:flutter_tools/src/project.dart)
#17     _rootRunUnary (dart:async/zone.dart:1192:38)
#18     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
```
```
[✓] Flutter (Channel stable, v1.17.0, on Microsoft Windows [Version 6.3.9600], locale en-IN)
    • Flutter version 1.17.0 at C:\flutter
    • Framework revision e6b34c2b5c (7 days ago), 2020-05-02 11:39:18 -0700
    • Engine revision 540786dd51
    • Dart version 2.8.1

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\admin\AppData\Local\Android\sdk
    • Platform android-R, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[✓] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[✓] VS Code (version 1.45.0)
    • VS Code at C:\Users\admin\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.10.1

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.0 (API 24) (emulator)

• No issues found!

```

## Flutter Application Metadata
No pubspec in working directory.
Repository: flutter
Issue: Background Clipping in Dismissible
Labels: framework,f: material design,a: quality,has reproducible steps,P2,found in release: 3.3,workaround available,found in release: 3.7,team-design,triaged-design

## Issue

Below is a partially dragged `Dismissible` widget.

![clip_photo](https://user-images.githubusercontent.com/32540050/81491059-0eead780-92bc-11ea-80df-cd690d432e56.jpg)

As seen in the image, the background is clipped without regard for the rounded border of the card.

## Code to Reproduce

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp(
      home: Center(
        child: Dismissible(
          key: UniqueKey(),
          background: Container(
            decoration: ShapeDecoration(
              color: Colors.red,
              shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
            ),
          ),
          secondaryBackground: Container(
            decoration: ShapeDecoration(
              color: Colors.green,
              shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
            ),
          ),
          child: Card(
            margin: EdgeInsets.zero,
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
            child: const Padding(
              padding: EdgeInsets.all(8),
              child: Text('Hello, world!'),
            ),
          ),
        ),
      ),
    ),
  );
}
```

```
[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.15.3 19D76, locale en-SG)
    • Flutter version 1.17.0 at /usr/local/Caskroom/flutter/1.2.1/flutter
    • Framework revision e6b34c2b5c (9 days ago), 2020-05-02 11:39:18 -0700
    • Engine revision 540786dd51
    • Dart version 2.8.1
```

## Background

In https://stackoverflow.com/questions/57542470/how-to-fix-this-dismissible-widget-border, the accepted answer proposes a workaround:
```dart
Stack(
  overflow: Overflow.clip,
  children: <Widget>[
    MyBackgroundWidget(), // instead of background
    Dismissible(
      child: MyForegroundWidget(),
      // no background
    )
  ],
);
```
This, however, is just a workaround and it does not work with `secondaryBackground`.

Currently, the code responsible in `lib/src/widgets/dismissible.dart` looks like this:
```dart
if (background != null) {
  content = Stack(children: <Widget>[
    if (!_moveAnimation.isDismissed)
      Positioned.fill(
        child: ClipRect(
          clipper: _DismissibleClipper(
            axis: _directionIsXAxis ? Axis.horizontal : Axis.vertical,
            moveAnimation: _moveAnimation,
          ),
          child: background,
        ),
      ),
    content,
  ]);
}
```
Is there some way we can go about this other than with `ClipRect`?
Repository: pytorch
Issue: missing dependency `protobuf` for caffe2
Labels: module: build,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
```pytb
$> python -c "from caffe2.python import core" 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\circleci\project\conda\lib\site-packages\caffe2\python\__init__.py", line 2, in <module>
    from caffe2.proto import caffe2_pb2
  File "C:\Users\circleci\project\conda\lib\site-packages\caffe2\proto\__init__.py", line 11, in <module>
    from caffe2.proto import caffe2_pb2, metanet_pb2, torch_pb2
  File "C:\Users\circleci\project\conda\lib\site-packages\caffe2\proto\caffe2_pb2.py", line 5, in <module>
    from google.protobuf.internal import enum_type_wrapper
ModuleNotFoundError: No module named 'google'
```
Related test runs:
https://app.circleci.com/pipelines/github/peterjc123/pytorch_dll_load_smoketests/5/workflows/4acbc28f-a2c4-46c9-94a5-820697652370/jobs/11
https://app.circleci.com/pipelines/github/peterjc123/pytorch_dll_load_smoketests/5/workflows/4acbc28f-a2c4-46c9-94a5-820697652370/jobs/12
https://app.circleci.com/pipelines/github/peterjc123/pytorch_dll_load_smoketests/5/workflows/4acbc28f-a2c4-46c9-94a5-820697652370/jobs/13


## To Reproduce

Steps to reproduce the behavior:

1. `conda install -c pytorch-nightly pytorch torchvision` / `pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html`
2. `python -c "from caffe2.python import core"`

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->
Import success.

## Environment

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 Version (e.g., 1.0): master
 - OS (e.g., Linux): Windows
 - How you installed PyTorch (`conda`, `pip`, source): conda/pip
 - Build command you used (if compiling from source):
 - Python version: 3.6
 - CUDA/cuDNN version: N/A
 - GPU models and configuration: N/A
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->
@ezyang @seemethere 

cc @malfet
Repository: pytorch
Issue: RESOLVED: Disable zero-dim CUDA tensors interacting with CUDA tensors on other devices
Labels: module: bc-breaking,module: cuda,triaged,enhancement

Today in PyTorch the following program is valid:

```
import torch

a = torch.rand([], requires_grad=True, device='cuda:0')
b = torch.rand(10, requires_grad=True, device='cuda:1')

c = a * b
```

Even though `a` and `b` are on different devices they can be multiplied since `a` is a zero-dim tensor. 

This seems to violate one of PyTorch's fundamental rules: no implicit device synchronization or data movement. As such, I propose we change our behavior to throw an error when a user attempts to do this, just like if they were trying to multiple non-zero dim CUDA tensors on different devices. 

As an aside, this does not work properly in current PyTorch either, see https://github.com/pytorch/pytorch/issues/36722. The device the kernel multiply kernel launches on is determined by the first CUDA argument, `a`, so a kernel is launched on device 0 to interact with `b`, on device 1, and a copy of `a` made by TensorIterator that's also placed on device 1. On systems without p2p access enabled this will even throw a runtime error. 

cc @ngimel @ezyang @SsnL @gchanan
Repository: neovim
Issue: Add option to diff swap file
Labels: enhancement

NVIM v0.4.3

When a swap file for the file I open exists, I get offered a few actions. But the most sensible in uncertain cases is missing: Diffing the swapfile to the current file on disk. I was able to work around it with the following function, but I would expect this to be standard functionality:

```vim
command! DiffSwap call DiffAgainstFileOnDisk()
function! DiffAgainstFileOnDisk()
  :diffthis
  :vsp %
  :diffthis
endfunction
```
When the swap prompt comes I then hit `r` and run `:DiffSwap`, which will initiate a vim diff of file on disk and swapfile.