sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: `unused_variables` lint fires for E0005 error
Labels: C-enhancement,A-lints,A-diagnostics,T-compiler

E0005 has started issuing warnings for unused variables. It seems to just add noise, since the code is incorrect, the warning is a little misguided.

```rust
fn main() {
    let x = Some(1);
    let Some(y) = x; //~ ERROR E0005
}
```

displays:

```
error[E0005]: refutable pattern in local binding: `None` not covered
  --> E0005.rs:3:9
   |
LL |     let Some(y) = x; //~ ERROR E0005
   |         ^^^^^^^ pattern `None` not covered

warning: unused variable: `y`
  --> E0005.rs:3:14
   |
LL |     let Some(y) = x; //~ ERROR E0005
   |              ^ help: consider prefixing with an underscore: `_y`
   |
   = note: #[warn(unused_variables)] on by default
```

This started in #59050.  I can't really tell which PR in that rollup is responsible.

This is a pretty minor issue, and perhaps issuing warnings makes more sense in other cases.  Feel free to close this if it doesn't seem like an issue.
Repository: pytorch
Issue: Add a RandomBatchSampler ?
Labels: module: dataloader,triaged,enhancement

## 🚀 Feature
Shuffle samples by batch

## Motivation
I'm working on a variable length sequence classification problem and use collate_fn to padding zeros in each batch. Sorting the samples approximates the length of the samples within a batch to avoid excessive padding. So I would prefer to shuffle only by batch rather than by sample.

## Pitch

Shuffle by batch in each epoch

## Alternatives
I write a RandomBatchSampler that works well.


```
import torch
from torch.utils.data import Sampler


class RandomBatchSampler(Sampler):
    r"""Yield a mini-batch of indices with random batch order

    Arguments:
        data_source (Dataset): dataset to sample from
        batch_size (int): Size of mini-batch
        drop_last (bool): If ``True``, the sampler will drop the last batch if
            its size would be less than ``batch_size``
    """

    def __init__(self, data_source, batch_size, drop_last):

        if not isinstance(batch_size, int) or batch_size <= 0:
            raise ValueError("batch_size should be a positive integeral "
                             "value, but got batch_size={}".format(batch_size))
        if not isinstance(drop_last, bool):
            raise ValueError("drop_last should be a boolean value, but got "
                             "drop_last={}".format(drop_last))

        self.data_source = data_source
        self.batch_size = batch_size
        self.drop_last = drop_last
        self.fragment_size = len(data_source) % batch_size

    def __iter__(self):
        batch_indices = range(0, len(self.data_source) - self.fragment_size, self.batch_size)

        for batch_indices_idx in torch.randperm(len(self.data_source) // self.batch_size):
            yield list(range(batch_indices[batch_indices_idx], batch_indices[batch_indices_idx]+self.batch_size))

        if self.fragment_size > 0 and not self.drop_last:
            yield list(range(len(self.data_source) - self.fragment_size, len(self.data_source)))

    def __len__(self):
        if self.drop_last:
            return len(self.data_source) // self.batch_size
        else:
            return (len(self.data_source) + self.batch_size - 1) // self.batch_size

```

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->


cc @SsnL @VitalyFedyunin @ejguan
Repository: godot
Issue: ColorPicker metrics incorrectly scaled on HiDPI displays
Labels: enhancement,topic:editor,usability


**Godot version:**
v3.1.stable.official (also on v3.0)


**OS/device including version:**
macOS Mojave 10.14.2
MacBook Pro (Retina, 15-inch, 2015)
iMac (Retina 5K, 27-inch, 2017)


**Issue description:**
The color picker is defaced every time it's opened and it can't be used unless you open it twice in a row. Using any of the inputs closes the dialog, I guess because I am technically clicking outside the container box.

Clicking on the color picker again fixes this issue. Basically I need to open it twice every time I want to use it.

This is how it looks:

<img width="295" alt="Screen Shot 2019-03-21 at 9 28 49 PM" src="https://user-images.githubusercontent.com/905216/60373806-6b038080-99b6-11e9-9e90-d115b61703e7.png">

https://cl.ly/ddf9c480d756


**Steps to reproduce:**
Select any Node2D like a Sprite, then click on the color picker for Modulate or Self modulate.


**Additional notes:**
Both my devices have a retina display (high DPI), so it could be related to that.


**Minimal reproduction project:**
Start a new blank project and create a Node2D object.


P.S: Thanks for your hard work guys!
Repository: go
Issue: x/blog: improve modules tutorial with information on using the module
Labels: Documentation,NeedsInvestigation

There is a new [modules tutorial](https://blog.golang.org/using-go-modules) on [blog.golang.org](https://blog.golang.org/).

It shows how to create a module, add subdependencies, update subdependencies, etc. Unfortunately one important point is missing: How do I use the newly created module?

I think this is especially important because at this point that is kind of the only thing about modules that is unclear to me. How do I point from one module to another? With `replace`? Where do I put this `replace`? It's local to my machine after all, so it doesn't belong in the repository.
Repository: TypeScript
Issue: 'bigint' is not comparable to 'number' with loose equality
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 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:**  3.3.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** bigin == number not comparable loose equality

**Code**

```ts
1n == 1
```
error: 
```
This condition will always return 'false' since the types 'bigint' and 'number' have no overlap.
```
but in chrome 72.0.3626.121
```
> 1n == 1
< true
```
and in MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
![QQ截图20190322171720](https://user-images.githubusercontent.com/13982338/54812603-7152d400-4cc6-11e9-95d3-483025789a7c.png)


And similar issues
```ts
let x = [1, 2, 3]
x[1n]
```
error:
```
Type '1n' cannot be used as an index type.
```
in Chrome
```
>  let x = [1, 2, 3]
   x[1n]
<  2
```

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> 
http://www.typescriptlang.org/play/index.html#src=1n%20%3D%3D%201  
http://www.typescriptlang.org/play/index.html#src=let%20x%20%3D%20%5B1%2C%202%2C%203%5D%0D%0Ax%5B1n%5D  

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
https://github.com/Microsoft/TypeScript/issues/30655
Repository: rust
Issue: Tracking issue for Seek::{stream_len, stream_position}  (feature `seek_convenience`)
Labels: T-libs-api,B-unstable,C-tracking-issue,A-io,Libs-Tracked,Libs-Small

This is a tracking issue for `Seek::{stream_len, stream_position}`. Proposed and implemented in https://github.com/rust-lang/rust/pull/58422.

Unresolved questions:

- [ ] Override `stream_len` for `File`? (is metadata syncing a problem? [comment a](https://github.com/rust-lang/rust/pull/58422#issuecomment-472732378), [comment b](https://github.com/rust-lang/rust/pull/58422#issuecomment-472965275))
- [ ] Final names:
  - Rename to `len` and `position`? (but that's a strange signature for `len` and `position` clashes with `Cursor`
  - ...
Repository: go
Issue: x/build/cmd/gopherbot: auto-reviewers selected for WIP change
Labels: Builders,NeedsInvestigation


While working on a bugfix this week, I uploaded a CL [168818](https://go-review.googlesource.com/c/go/+/168818) and then immediately marked it "Work in Progress").

The bot went ahead and auto-assigned reviewers anyhow, which seems a little weird (the point of the WIP label is to say "I'm not quite ready to share this yet"). It would be a nicer workflow if the bot assigned reviewers when the WIP label was removed.
Repository: vue
Issue: Performance: compile default slots to functions
Labels: improvement

### What problem does this feature solve?
The original v-slot implementation was not available in `this.$slots`, but that was added in 2.6.4. Scoped slots reduce unnecessary re-renders with nested slots, so this change would hopefully provide a performance improvement for component libraries. 

### What does the proposed API look like?
`<foo>default slot</foo>`

should output

```js
_c('foo',{scopedSlots:_u([{key:"default",fn:function(){return [_v("default slot")]},proxy:true}])})
```

Equivalent to `<foo v-slot>default slot</foo>`

---

Note #9580 could be a problem if lots of people rely on that behaviour. 

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: vue
Issue: Equivalent for this.$listeners for native events?
Labels: feature request

### What problem does this feature solve?
Imagine a wrapper component where you need to pass events to a child component. This is possible for non native events using `this.$listeners`, but it strips out native events. It would be good if we had something like `this.$nativeListeners` so that we can pass native events down to child components as well.

 In the meantime, Is there a workaround to pass events to child components?

### What does the proposed API look like?
`this.$nativeListeners` 

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: vscode
Issue: Git - .gitignore'd files sometimes not greyed-out
Labels: bug,help wanted,git

Hi 👋

Sometimes files and folders that are in `.gitignore` and normally greyed-out just stop being greyed-out. #70099 may be related, see how in the first image in comment https://github.com/Microsoft/vscode/issues/70099#issuecomment-471596614 `node_modules` directory is not greyed out, however in the second one it is properly greyed-out again.

Here is a quick gif (I do <kbd>⌘</kbd><kbd>⇧</kbd><kbd>P</kbd> — Reload window in the middle of it):

![hello](https://user-images.githubusercontent.com/5165202/54831616-b7f6fd00-4ccb-11e9-97dc-6de8134106fe.gif)

Unfortunately, cannot reproduce 😞

- VSCode Version: 1.32.3
- OS Version: 10.14.3
Repository: kubernetes
Issue: [e2e] Decoupling cloud providers from the e2e testing framework
Labels: area/test,kind/feature,sig/testing,priority/important-longterm,lifecycle/frozen,sig/cloud-provider,area/e2e-test-framework,needs-triage

parent issue:
https://github.com/kubernetes/kubernetes/issues/75601

tests that a part of the framework and the framework as a whole should not vendor cloud provider code. we need to think of a way how to interface this and possibly plan on how to bundle the resulted test suite(s).

some steps to perform here:
- enumerate tests that import cloud provider specifics.
- possibly think of way to interface a generic provider or a generic storage driver or .... etc.
- plan what tests will move and under what structure.
- start moving the tests to a location outside of the framework.
- think of ways how the e2e.test (suite) is going to continue to work and include everything so that we don't break this with the push of button - e.g. compile and run multiple suites but still have the separation in the background.

/area test
/sig testing
/sig cloud-provider
/kind design

/assign @timothysc @andrewsykim 
cc @pohly
Repository: flutter
Issue: fromHero's createRectTween not used
Labels: framework,a: animation,f: routes,c: proposal,P2,team-framework,triaged-framework

In my application, I have a page with a hero that needs a non-standard animation. The mechanics of this are easy enough - simply add a createRectTween.  However, the page that the hero starts on can transition to any number of different pages each with their own hero.

Currently, if you set a `createRectTween` on the `to` hero, it replaces the `HeroController`'s `createRectTween`. However, the `createRectTween` on the `from` hero is completely ignored. This means that for my use-case, I need to make sure each of the pages I'm transitioning to have (an identical) `createRectTween` set.

I propose that the logic choosing the `createRectTween` to use is changed from `to ?? HeroController's` to `to ?? from ?? HeroController's`. This would allow set createRectTween once on the `from` hero and not have to worry about the `to` hero controllers at all. Existing applications that set the `to` controller's shouldn't be affected as `to`is still given priority over `from`. 

So it would only be a breaking change for the case where the `from` hero was also used as a `to` hero elsewhere already, as it would now override the HeroController's createRectTween where it didn't used to when it was treated as a `from` hero.

I can do a PR for this but I'd like a go-ahead from someone on the flutter team that it's an acceptable change first as it could be a breaking change (although hopefully for a very small number of cases).
Repository: pytorch
Issue: Port SpatialConvolutionMM and VolumetricConvolutionMM to ATen
Labels: triaged,module: porting

LARGE
Repository: go
Issue: x/tools/go/analysis/passes/nilness: no position information with error
Labels: NeedsInvestigation,Tools,Analysis

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.12
</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
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/reilly/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/reilly/league/services:/Users/reilly/go:"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gz/4ytqr0r12q1fbx8ct_w3k_880000gn/T/go-build175674008=/tmp/go-build -gno-record-gcc-switches -fno-common"

</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.
-->
Ran the nilness analyzer on this (simplified) package:
```go
package foo

import (
	"fmt"
)

func Foo() {
	var x []int
	for _, a := range x {
		fmt.Println(a)
	}
}
```


### What did you expect to see?
Ideally: a different error about how you're iterating over a nil slice
Less ideally: the same error, but with information telling me where the error is


### What did you see instead?
`-: nil dereference in index operation`

This kind of error is pretty hard to track down if I'm running the analyzer over a large codebase, because it doesn't say which file or package is failing.
Repository: rust
Issue: error: libgkrust.a(gkrust-a279530142e91ae7.gkrust.eonniity-cgu.0.rcgu.o) 0x8b0015d2867: adding range [0x4b4e7f-0x4b4ea7) which has a base that is less than the function's low PC 0x59fde0.
Labels: A-debuginfo,T-compiler,E-help-wanted,C-bug

I get this from lldb when building https://github.com/zakorgy/gecko-dev/tree/ff_66_0b6_rel_gfx-mtl with rust 1.33. The error also shows up with rust-lldb.
Repository: TypeScript
Issue: Type narrowing for awaited values
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms

promise, type narrowing, await

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion

The type narrowing that occurs inside `if` statements, should work with awaited values

Though generally speaking a type is used for values that are already

<!-- A summary of what you'd like to see added or changed -->

## Examples

```ts
type A = {
  kind: 'a'
  a: string
}

type B = {
  kind: 'b'
  b: string
}

let data: A | B

async function valueTest() {
  if ((await data.kind) === 'a') {
    // 'data' hasn't been narrowed to type 'A'
    data.a // Error
  }

  // Works fine without await
  if (data.kind === 'a') {
    data.a // Okay
  }
}
```

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: pytorch
Issue: Cleanup code in register_c10_ops.cpp
Labels: oncall: jit

This code, https://github.com/pytorch/pytorch/blame/13f03a42d2ad143341ed19a7f1e0d2c7d821ded2/torch/csrc/jit/register_c10_ops.cpp#L45, is a _huge copy/paste_ of already existing functionality that is going to make it really hard to make changes to tracing and the IR in the future. There is a TODO in the code, but I am opening this issue to track progress on cleaning it up.

Note the equivalent code in custom_operator.h, which does almost exactly the same thing, is:

```
  Node* node = nullptr;
  if (jit::tracer::isTracing()) {
    node = getTracedNode<Is...>(schema, arguments);
  }

  // Call into the actual, original, user-supplied function.
  auto return_value =
      std::forward<Implementation>(implementation)(std::get<Is>(arguments)...);

  if (jit::tracer::isTracing()) {
    jit::tracer::addOutput(node, return_value);
  }
```
Repository: pytorch
Issue: C++ inference (CPU-only) stalls in Android, and crashes on Mac/Linux
Labels: caffe2,module: android

## 🐛 Bug

I tried to deploy a Facebook detectron model (https://github.com/facebookresearch/Detectron) trained with my custom dataset (and converted to pb files) onto an Android app through JNI. In the beginning I follow the AICamera example (https://github.com/caffe2/AICamera). But apparently the prebuilt libraries in this example are old, not from the latest pytorch repo, and it does not contain detectron ops. As a result, I re-compile all libraries in pytorch using its build_android.sh script (which includes libcaffe2_detectron_ops.a), and follow the AICamera_new example (https://github.com/wangnamu/AICamera_new) to deploy to Android. It works fine to load the pb files, but upon calling predictions, it gets stuck, does not output anything, nor does it output any error messages.

The part of the code that causes the problem is:
<img width="670" alt="Screen Shot 2019-03-22 at 10 17 33 PM" src="https://user-images.githubusercontent.com/27031781/54862008-c86d9e80-4cf0-11e9-9e7e-7ab1a965d9c9.png">


Then I try to write a simple C++ code on my Mac (CPU-only) and a Linux server to do inference with detectron pb files to see if it works. I call the build_local.sh script in pytorch to build local libraries and write same lines of code on my Mac to do inference. But exactly for the same function `predictor->operator()(input_vec, &output_vec)`, I got the following errors:
<img width="746" alt="Screen Shot 2019-03-22 at 10 24 03 PM" src="https://user-images.githubusercontent.com/27031781/54862029-59dd1080-4cf1-11e9-896e-265af6a13488.png">
My understanding is that the error occurs at the convolution operator...

I guess the source of the bug is because I did not pass the data (which is an opencv image in my case) to the Tensor structure of Caffe2 successfully? But apparently there has been a drastic change to the Tensor API, and I tried hard but did not see a good example that teaches me how to pass an image data into a Tensor in C++........

Could anyone please point me a direction or reference?

## Environment

 - PyTorch Version (e.g., 1.0): pytorch 1.0, and caffe2.
 - OS (e.g., Linux):  Mac Sierra 10.12.6/ Android Studio 3.3, NDK r17.
 - How you installed PyTorch (`conda`, `pip`, source): source.
 - Build command you used (if compiling from source): scripts/build_android.sh, scripts/build_local.sh.
 - Python version: 2.7
 - CUDA/cuDNN version: No, CPU-only.
 - GPU models and configuration: N/A.
Repository: flutter
Issue: Make animation parameter in [AnimatedList.removeItem] optional
Labels: framework,a: animation,c: API break,c: proposal,P3,team-framework,triaged-framework

Hello.

It would be great if the animation parameter in [AnimatedList.deleteInsert] could be made optional, simply so we can use the [Dismissible] widget along with an [AnimatedList] without the animations overlapping each other when an item is removed by [Dismissible] and [AnimatedList.deleteInsert] is required, so no logical errors within the [AnimatedList] occurs.
Repository: node
Issue: /etc/localtime symlink handling
Labels: help wanted,i18n-api

<!--
Thank you for reporting a possible bug in Node.js.

Please fill in as much of the template below as you can.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify the affected core module name

If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you can.
-->

* **Version**: v11.7.0
* **Platform**: Linux gallium 4.19.25 1-NixOS SMP PREEMPT Sat Feb 23 08:07:27 UTC 2019 x86_64 GNU/Linux
* **Subsystem**:

<!-- Please provide more details below this comment. -->

Node has trouble figuring out the timezone if /etc/localtime is an indirect symlink. Here's some examples in the REPL

```
> Date()
'Sun Mar 24 2019 01:42:40 GMT+1000 (GMT+10:00)'    # Wrong, it's GMT+11 in Sydney right now
> new Date().toLocaleString()
'3/24/2019, 1:42:55 AM'                            # Similarly to above
> Intl.DateTimeFormat().resolvedOptions().timeZone
undefined
```

Even worse, in electron:

```
> new Date().toLocaleString()
VM575:1 Uncaught RangeError: Unsupported time zone specified undefined
    at new DateTimeFormat (native)
    at Date.toLocaleString (native)
    at <anonymous>:1:12
```

This is the cause of FreeTubeApp/FreeTube#233. It might also be the cause of ValveSoftware/steam-for-linux#5609 and flathub/im.riot.Riot#32.
Repository: vscode
Issue: Enabled Text-Highlighting and Copying in Playground
Labels: feature-request,interactive-playground

Enabled Text-Highlighting and Copying of documentation in Playground (_not_ talking about code samples)

VS Code version: Code 1.32.3 (a3db5be, 2019-03-14T23:43:35.476Z)
OS version: Windows_NT x64 10.0.17763