sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Identation rules are broken
Labels: bug,verification-found,editor-autoindent

- VSCode Version: v1.26.1
- OS Version: macOS 10.13.5

I think I've had the following problems since the very first version of VSC I tried.

### Problem 1

![up](https://user-images.githubusercontent.com/1812093/44618558-91c5c780-a878-11e8-9721-022a87a45b59.gif)

1. Have [Todo+](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-todo-plus) installed and create a new "todo" document with the same content as mine.
2. Move the line up.
3. Undo.
4. Move the line up.
5. We get 2 different results for doing the same thing.

### Problem 2 

![down](https://user-images.githubusercontent.com/1812093/44618582-1b759500-a879-11e8-8b48-28882a0bc20d.gif)

1. Have [Todo+](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-todo-plus) installed and create a new "todo" document with the same content as mine.
2. Move the line down.
3. Undo.
4. Move the line down.
5. We get 2 different results for doing the same thing.

### Problem 3

In both the gifs above the indentation for a line gets decreased, my understanding is that this is governed by the [`indentationRules.decreaseIndentPattern`](https://github.com/fabiospampinato/vscode-todo-plus/blob/master/src/utils/init.ts/#L38-L38) setting, which in my extension is set to `/(?=a)b/gm`, a regex that can never match any string, why are those lines' indentations decreased then?
Repository: go
Issue: testing: tiny benchmark with StopTimer runs forever
Labels: NeedsInvestigation

From at least Go 1,4 onward,

```
$ go version
go version devel +e03220a594 Sat Aug 25 02:39:49 2018 +0000 linux/amd64
$
```

If we run a tiny benchmark (count++) and use StopTimer() for initialization (count = 0) then the benchmark runs for a very long time, perhaps forever. 

```
$ cat tiny_test.go
package main

import (
	"testing"
)

var count int64

func BenchmarkTiny(b *testing.B) {
	for n := 0; n < b.N; n++ {
		b.StopTimer()
		count = 0
		b.StartTimer()
		count++
	}
}
$
```

```
$ go test tiny_test.go -bench=.
goos: linux
goarch: amd64
BenchmarkTiny-4   	^Csignal: interrupt
FAIL	command-line-arguments	143.633s
$
```

If we comment out StopTimer() (//b.StopTimer()) then the benchmark quickly runs to completion.

```
$ cat tiny_test.go
package main

import (
	"testing"
)

var count int64

func BenchmarkTiny(b *testing.B) {
	for n := 0; n < b.N; n++ {
		// b.StopTimer()
		count = 0
		b.StartTimer()
		count++
	}
}
$
```

```
$ go test tiny_test.go -bench=.
goos: linux
goarch: amd64
BenchmarkTiny-4   	1000000000	         2.15 ns/op
PASS
ok  	command-line-arguments	2.374s
$ 
```
Repository: go
Issue: doc: cmd/go: some module docs are on swtch.com, not golang.org
Labels: Documentation,NeedsFix,modules

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?

golang.org today
### Does this issue reproduce with the latest release?

yes
### What operating system and processor architecture are you using (`go env`)?

I don't think it matters

### What did you do?

went to golang.org
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.


### What did you expect to see?

Documentation for the go programming language to be hosted on golang.org

### What did you see instead?

Documentation for go modules hosted on swtch.com
Repository: rust
Issue: Captureless closures can still codegen to `fn call(&self)` / `fn call_mut(&mut self)`.
Labels: C-enhancement,A-codegen,T-compiler,WG-llvm

Despite them being ZSTs and `Copy`, which would allow `Fn` / `FnMut` impls on top of `FnOnce`.

This small example:
```rust
fn foo(f: impl FnOnce()) { f() }
pub fn test() {
    // Not passed directly in call to avoid inferring `closure` to `FnOnce`.
    let closure = || {};
    foo(closure);
}
```
will cause a `ClosureOnceShim` to be generated, which takes the ZST closure, borrows it, and passes it to the actual closure "function", that has been inferred to be `Fn` (I think?).

While correct, it's an extra function between the caller and the closure, and there's a potential risk of LLVM doing not-that-nice (e.g. inlining-related) things (and mergefunc might not work here).

This seems tricky to fix, since parts of the compiler *assume* that e.g. a closure implements `FnMut` if it can be called with a mutable reference to its environment, and if it implements `FnMut` *and not* `Fn`, then its "codegen'd function" *must* have a `FnMut::call_mut` signature.

cc @rust-lang/wg-codegen
Repository: flutter
Issue: Add arrows to assets-for-api-docs utils
Labels: c: new feature,team,framework,d: api docs,a: assets,P3,team-framework,triaged-framework
Repository: flutter
Issue: Make it easier to run diagrams in assets-for-api-docs with hot reload
Labels: a: tests,team,framework,d: api docs,P2,team-framework,triaged-framework

Could be just adding a blank flutter project that makes it easy to runApp(<diagram>)
Repository: vscode
Issue: Feature Request: Hotkey Support for QuickInputButton
Labels: feature-request,quick-pick

<!-- Please search existing issues to avoid creating duplicates. -->
Issue Type: **Feature Request**
<!-- Describe the feature you'd like. -->

As an extension developer I want to assign a hotkey to a custom [QuickInputButton](https://code.visualstudio.com/docs/extensionAPI/vscode-api#QuickInputButton), that is active/enabled when the [InputBox](https://code.visualstudio.com/docs/extensionAPI/vscode-api#InputBox) or [QuickPick<T>](https://code.visualstudio.com/docs/extensionAPI/vscode-api#QuickPick%3CT%3E) is shown. This would enhance navigating through multi step input forms a lot. It should have similar behaviour like the [QuickInputButtons.Back](https://code.visualstudio.com/docs/extensionAPI/vscode-api#QuickInputButtons) button which is by default assigned to <kbd>Alt</kbd> + <kbd>&larr;</kbd>.  Further I want to allow the extension user to assign his/her preferred hotkey to that button, too. Therefore maybe "some link" to the `keybindings.json` would be applicable.
Repository: rust
Issue: Option as_ref  compilation error when implementing cause method for Error trait
Labels: A-trait-system,T-compiler

Hi, I'm new to rust and this looks like a possible bug to me. I implemented my own error type (focus on the cause method implementation in Error trait):
```
#[derive(Debug)]
pub struct MyError<T: Error>
{
    description: String,
    cause: Option<T>
}

impl <T: Error> fmt::Display for MyError<T> {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description)
    }
}

impl <T: Error> MyError<T> {
    pub fn new(description: String, cause: Option<T>) -> MyError<T> {
        MyError{description, cause}
    }
}

impl <T: Error> Error for MyError<T> {
    fn description(&self) -> &str {
        self.description.as_str()
    }

    fn cause(&self) -> Option<&Error> {
        // doesn't work
        //self.cause.as_ref()
        //does work
        match self.cause {
            None => None,
            Some(ref e)=> Some(e)
        }
    }
}
```

This code seems to work correctly but when I use the commented `self.cause.as_ref()` instead of the match clause I'm getting following compilation error:

```
error[E0308]: mismatched types
  --> src\lib.rs:72:9
   |
72 |         self.cause.as_ref()
   |         ^^^^^^^^^^^^^^^^^^^ expected trait std::error::Error, found type parameter
   |
   = note: expected type `std::option::Option<&std::error::Error>`
              found type `std::option::Option<&T>`
```

I would normally expect it to work because the working match I use as workaround is pretty much the same as the underlying implementation of [as_ref() in Option](https://github.com/rust-lang/rust/blob/master/src/libcore/option.rs#L245). 

## Meta
λ rustc --version --verbose
rustc 1.28.0 (9634041f0 2018-07-30)
binary: rustc
commit-hash: 9634041f0e8c0f3191d2867311276f19d0a42564
commit-date: 2018-07-30
host: x86_64-pc-windows-msvc
release: 1.28.0
LLVM version: 6.0
Repository: godot
Issue: Default Contextual Help keyboard shortcut doesn't work due to conflicts with macOS keyboard handling
Labels: bug,platform:macos,topic:editor,confirmed

**Godot version:**
3.0.6


**OS/device including version:**
macOS High Sierra 10.13.6


**Issue description:**
The keyboard shortcut `Shift+Alt+Space` doesn't display contextual help. Instead the editor inserts a non-breaking space as if `Alt+Space` was pressed without the `Shift`

Contextual Help works when selected from the menu.


**Steps to reproduce:**
1. open script editor
2. press `Shift+Alt+Space`

**Minimal reproduction project:**
N/A
Repository: go
Issue: cmd/compile: mipsle: running error  SIGILL: illegal instruction
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
go version go1.11 linux/amd64

### Does this issue reproduce with the latest release?
yes

### What operating system and processor architecture are you using (`go env`)?
build on :  amd64 linux, 
runing on:  Linux OpenWrt 4.4.14 #1 Mon May 29 15:04:41 UTC 2017 mips GNU/Linux

### What did you do?

file from:
https://github.com/eclipse/paho.mqtt.golang/tree/master/cmd/simple/main.go
build command:
`env   GOOS=linux GOARCH=mipsle  GOMIPS=softfloat    go build   -ldflags "-s -w" `

runing on openwrt system,32 bit os. router. 
MT7620A 16M   ROM,  128M RAM

```
root@OpenWrt:~# ./simple 
SIGILL: illegal instruction
PC=0x13ebac m=0 sigcode=128

goroutine 1 [running, locked to thread]:
math/big.init()
	/usr/local/go/src/math/big/sqrt.go:10 +0xbc fp=0xc22780 sp=0xc22770 pc=0x13ebac
crypto/elliptic.init()
	<autogenerated>:1 +0x88 fp=0xc22784 sp=0xc22780 pc=0x14b150
crypto/ecdsa.init()
	<autogenerated>:1 +0x98 fp=0xc22798 sp=0xc22784 pc=0x15bd60
crypto/tls.init()
	<autogenerated>:1 +0x90 fp=0xc227b4 sp=0xc22798 pc=0x1b0568
github.com/eclipse/paho%2emqtt%2egolang.init()
	<autogenerated>:1 +0xc0 fp=0xc227c8 sp=0xc227b4 pc=0x237eb4
main.init()
	<autogenerated>:1 +0xa0 fp=0xc227cc sp=0xc227c8 pc=0x239400
runtime.main()
	/usr/local/go/src/runtime/proc.go:189 +0x1f8 fp=0xc227ec sp=0xc227cc pc=0x431dc
runtime.goexit()
	/usr/local/go/src/runtime/asm_mipsx.s:660 +0x4 fp=0xc227ec sp=0xc227ec pc=0x76b70

r0   0x0	r1   0x2
r2   0x1	r3   0x1
r4   0x8ece6c	r5   0x1
r6   0x4	r7   0x54
r8   0x27a0e0	r9   0x2f2e46
r10  0x8	r11  0x0
r12  0x51	r13  0x1f
r14  0x1	r15  0x52
r16  0x0	r17  0x80000000
r18  0xff	r19  0x6fa46804
r20  0xc0c288	r21  0xc0c288
r22  0x2c1508	r23  0x2f0000
r24  0x2	r25  0x0
r26  0x0	r27  0x0
r28  0xfffff000	r29  0xc22770
r30  0xc000e0	r31  0x13eba8
pc   0x13ebac	link 0x13eba8
lo   0x0	hi   0x0
```
Repository: flutter
Issue: ModalRoute / ModalBarrier customization
Labels: c: new feature,framework,f: routes,P2,team-framework,triaged-framework

Currently, `ModalRoute`s created using `showDialog` or `showGeneralDialog` do not allow full customization of the underlying `ModalBarrier`. 

It’s only possible to change the background color, however I’d like full control over the animated widget in order to build my own. For example, a customer requested to apply Gaussian blur to the barrier.

The current solution involves creating the barrier myself and not using the neat routing system.

So the same way that `showGeneralRoute` has a `PageBuilder` Parameter, it could gain a `BarrierBuilder`.
Repository: rust
Issue: Two-phase borrows don't allow mutably splitting an array based on its length
Labels: P-medium,T-compiler,A-NLL,NLL-complete,A-array

```rust
#![feature(nll)]
fn main() {
    let mut x = [1, 2];
    x.split_at_mut(x.len() / 2);
}
```

```
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
 --> src/main.rs:4:20
  |
4 |     x.split_at_mut(x.len() / 2);
  |     ---------------^-----------
  |     |              |
  |     |              immutable borrow occurs here
  |     mutable borrow occurs here
  |     borrow later used here
```

---

1.30.0-nightly (2018-08-24 d41f21f11a249ad78990)

/cc @nikomatsakis @pnkfelix
Repository: rust
Issue: `pub use serde::*` doesn't show traits in `cargo doc`
Labels: T-rustdoc,E-needs-test,C-bug

This is somewhat weird, but on https://konradborowski.gitlab.io/serde-feature-hack/serde_feature_hack/index.html, I don't see traits like `Serialize`, even if they should be here, and there is no note of re-export either. On https://docs.rs/serde-feature-hack/0.1.0/serde_feature_hack/, it shows a re-export, so this appears to be a regression.

The code:

```rust
extern crate serde;
pub use serde::*;
```
Repository: godot
Issue: Built-in Array types don't open in a new inspector if their name is added to the "Resource Types To Open In New Inspector" editor setting
Labels: bug,topic:editor

**Godot version:**
v3.1.dev.calinou.5df9109


**OS/device including version:**
Windows 10 Home v1803


**Issue description:**
Any of the built-in array types (Array or Pool\*Array) do not open in a new inspector, even if the "Open Resources In New Inspector" option is checked, and even if the array types are added to "Resource Types To Open In New Inspector".

Not being able to open them in a new inspector window prevents me from using "Copy Params" and "Paste Params" on the Array types. This means that, if for example I need to copy over a array of integers, I currently have to do it by hand. That can get tedious quick.


**Steps to reproduce:**
1. Set the inspector to always use a new inspector window.
2. Create a script that exports an Array or any of the Pool\*Array types.
3. Click on them in the inspector and notice that they don't open in a new inspector window.

**Minimal reproduction project:**
Should be pretty easy to check, just chuck any of the lines from this into a script:
```gdscript
export(Array) var array
export(PoolByteArray) var bytes
export(PoolColorArray) var colors
export(PoolIntArray) var ints
export(PoolRealArray) var reals
export(PoolStringArray) var strings
export(PoolVector2Array) var vector2s
export(PoolVector3Array) var vector3s
```
And then try to open them in a new inspector window.
Repository: rust
Issue: Rustc hangs during llvm codegen when referencing a [large] array with std::ptr::read_volatile
Labels: A-LLVM,T-compiler

This issue has been repro'd on stable and nightly on Windows, OSX, and Linux:

```
cargo 1.28.0 (96a2c7d16 2018-07-13)
release: 1.28.0
commit-hash: 96a2c7d16249cb47c61c887fc95ca8be60e7ef0a
commit-date: 2018-07-13

cargo 1.29.0-nightly (6a7672ef5 2018-08-14)
release: 1.29.0
commit-hash: 6a7672ef5344c1bb570610f2574250fbee932355
commit-date: 2018-08-14
```

Code:

```
fn main() {
    let x = [0u8; 128 * 128 * 4];
    let _y = unsafe { std::ptr::read_volatile(&x) };
}
```

Thanks to @talchas for the minimal repro. I believe they were able to repro it without `_volatile` as well.
Repository: opencv
Issue: Feature request: Allow a PR contributor to restart specific-platform build
Labels: category: infrastructure

In case of unexpected platform failure, we usually perform `commit --amend` to restart the tests, but this affects all the platforms.
Cannot you provide a way, say a button inside each cell of a row belonging to owned PRs, to restart specific builds? I guess the admins has such facility, but why not to provide that to the contributors as well?

BTW: Is there any guide for the whole list of build platforms specific-names (e.g. `ocllinux`, `win32`) that we can utilize inside `force_builders`? For example, how to turn `Win64 MSVS2017` on?
Repository: TypeScript
Issue: Add API to query if SourceFile originated from typeRoots lookup
Labels: Suggestion,In Discussion,API

This proposes to add an API `Program#isSourceFileFromTypeRoots` that is similar to `Program#isSourceFileFromExternalLibrary` but for `typeRoots`.

Currently the only way to determine if a SourceFile comes from `typeRoots` is to use `ts.getEffectiveTypeRoots` and check if a given `SourceFile#fileName` starts with any of the paths.

That works if there are no symlinks. With symlinks one needs to use `realpath` on all of the `typeRoots` before comparing to `fileName` as that is already a realpath.
And even that doesn't cover cases where a subdirectory (like `node_modules/@types/foo`) or an individual file (`node_modules/@types/foo/index.d.ts`) is a symlink.

Related: https://github.com/fimbullinter/wotan/issues/387
Repository: rust
Issue: Experiment with a "(type) pattern pre-compiler" in rustc::ty::_match.
Labels: C-enhancement,T-compiler,A-inference

Instead of zipping two trees and using the same unification procedure as the rest of inference, the "pattern" type could be turned into linear "instruction stream" for a matcher ("interpreter"), to walk the type "tree", first to check that the type actually matches and *then* to unify variables (if any).

E.g for. `Result<Vec<$0>, io::Error>`, it would check the `Result`, `Vec` and `io::Error` heads, and for `($0, $0)` it could equate the pair elements, *before* unifying a type with `$0`, in both cases.

This could also apply to Chalk, but I'm less familiar with its internal representation.
cc @nikomatsakis @sunjay
Repository: puppeteer
Issue: Print Screen Dialog is not caught by page.on("dialog")
Labels: feature,upstream,chromium

![image](https://user-images.githubusercontent.com/14265482/44673665-d4f77600-a9f1-11e8-8db5-5bfaa75fa290.png)

**Expected Result**
The console should log the dialog's message and type (in this case: the "print screen" dialog). I wanted to programmatically dismiss the print screen dialog.

**What happens instead?**
Nothing happens

**Environment:**
Puppeteer version: 1.7.0
Platform / OS version: Mac OSX Version 10.13.6
Node.js version: 10.7.0

**Code** 
page = await browser.newPage();
page.on("dialog", async dialog => {
   console.log("the dialog message is", dialog.message());
   console.log("the dialog type is", dialog.type());
   await dialog.dismiss();
});

await page.waitFor('.print-text'); //this clicks an element and opens up the print screen in google chrome
await page.click('.print-text');
Repository: rust
Issue: Missed unused import in 2018 edition when importing a crate
Labels: C-enhancement,A-lints,T-compiler,A-edition-2018

Code like this:

```rust
fn main() {
    test1::foo();
    test2::foo();
}

mod test1 {
    use std;
    
    pub fn foo() {
        std::mem::drop(3);
    }
}

mod test2 {
    use std;
    
    pub fn foo() {
        std::println!("x");
    }
}
```

[when compiled](https://play.rust-lang.org/?gist=b78735ca06dda3b786c653f9ca3edbdf&version=nightly&mode=debug&edition=2018) yields no warnings currently. In theory, though, both imports of `std` are unused due to the 2018 crate prelude!
Repository: godot
Issue: Newly created built-in GDScript can point to existing script or back to discarded built-in script.
Labels: bug,topic:editor,confirmed

Working from Godot 3.1, 64-bit Windows, 8/27/2018

## Update - Animated GIF
Points to existing script with similar name, until toggling the built-in option button.  Then points to the same built-in script over and over.

![ezgif com-video-to-gif 8](https://user-images.githubusercontent.com/13004169/50061006-04e6a700-01a4-11e9-856b-35f4eec077a5.gif)


Have been noticing that using built-in scripts have been having a terrible time of pointing back to some other script, instead of making a new script.  And the only way to fix this is to manually clear it, and then forcefully close a certain unnamed script in the script editor.

Steps to reproduce.  (From a new project)

1. Set empty/unsaved scene's root node.  Then attach a script and choose "Built-in Script".
![godot master_2018-08-27_21-29-04](https://user-images.githubusercontent.com/13004169/44678653-8f629980-aa41-11e8-921b-d7b2232b80dc.png)

2. Type some code that isn't the default generated script.  (Otherwise it won't be obvious what is happens next.)

![godot master_2018-08-27_21-30-22](https://user-images.githubusercontent.com/13004169/44678763-d05aae00-aa41-11e8-841e-d9e9c9d62c03.png)

3. Close that scene without saving it.

![godot master_2018-08-27_21-30-33](https://user-images.githubusercontent.com/13004169/44678773-d8b2e900-aa41-11e8-874f-213ea250f359.png)

4. In the empty tab, start again, by setting up a root node, then add another "Built-in Script".
![godot master_2018-08-27_21-30-59](https://user-images.githubusercontent.com/13004169/44678853-04ce6a00-aa42-11e8-9f0c-30fab90a6b3a.png)

![godot master_2018-08-27_21-31-25](https://user-images.githubusercontent.com/13004169/44678865-10ba2c00-aa42-11e8-94af-d922d6102966.png)

5. Now your new built-in script seems to be that unnamed ghost script floating about.

![godot master_2018-08-27_21-31-38](https://user-images.githubusercontent.com/13004169/44678903-33e4db80-aa42-11e8-94df-6eb1013a326c.png)

6. After carrying on like this, each new one you try is going to do this, until something is done to get rid of this unnamed script.

![godot master_2018-08-27_21-32-12](https://user-images.githubusercontent.com/13004169/44678949-4fe87d00-aa42-11e8-9db9-5cf7d8cef7bc.png)


Perhaps worse still.

If you have a typo and mangle the name of what the script `extends`, you'll get stuck with a message like below.  Then anytime you try to add a new script in the hopes of quickly cleaning it up by overwriting it, it will not allow it, and have a disabled Create button.  Even with an external script option.

It takes a fair bit of manual clearing and cleaning up to rectify it.

![godot master_2018-08-27_18-49-19](https://user-images.githubusercontent.com/13004169/44679093-a9e94280-aa42-11e8-859e-3fe12c6d78be.png)
Repository: flutter
Issue: Suggestion: Add stream bindable constructors to allow widgets to automatically update
Labels: c: new feature,framework,P2,team-framework,triaged-framework

Using a `bloc` pattern in combination with `StreamBuilder` results in a responsive UI, but the builder code ends up being all over the place. What if we had a new constructor on some widgets, such as `Text` that could have this function internally.

`const Text.bound(this.stream, ...);`

It could work similar to how this Widget is structured:

``` dart
import 'dart:async';
import 'package:flutter/material.dart';

class BoundText extends StatelessWidget {
  BoundText(
    this.stream, {
    this.style,
  });

  final Stream<dynamic> stream;
  final TextStyle style;

  @override
  Widget build(BuildContext context) {
    return StreamBuilder(
      stream: stream,
      builder: (content, snapshot) {
        return Text(snapshot.data.toString(), style: style);
      },
    );
  }
}
```