sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: gin
Issue: [PROJECT] Future steps
Labels: help wanted

# TL;DR

- API stability and deprecation policy
- v2?

---
cc @appleboy @tboerger @nazwa @easonlin404 @thinkerou 

I'm worried on how to keep going and scale the API without breaking everything in a v2. Some people who use Gin love the new activity and features, but want Gin as it is now, somehow API stable. Others want a continuous development and deprecation of prior versions.

Because this is not JS, and there is no `package.json` pre-included, I see it's hard for beginners to understand the difference between `go get ...` and `vendor/` folder and tools.

Projects that use Gin like `drone-io` have it vendor on a version from January 2016.

I was thinking on ways of allowing API changes with deprecation notices like it's being done now in `deprecated.go`.

An idea from the jsonite contribution and the build flags:

- added to *_experimental.go
- moved to *.go
- deprecated to deprecated.go (with printf warning)
- deprecated to *_deprecated.go (for very old builds)

I would like to know your thoughts on this, not just the idea above. Thanks 😃 

PD: everyone is encouraged to participate too.
Repository: go
Issue: runtime: apply strength reduction optimizations to generic map routines
Labels: Performance,compiler/runtime

CL 57590 applied strength reduction to the key pointers in some mapfast routines. This is a reminder issue to check whether similar optimizations can fruitfully be applied to any of the generic map routines (access, assign, delete, etc.).

cc @martisch
Repository: go
Issue: runtime: improve barrier implementation layering
Labels: NeedsFix,compiler/runtime

This is a migration of some discussion in [CL 37628](https://golang.org/37628).

bulkBarrierPreWrite calls writebarrierptr_prewrite1 repeatedly. Every call to writebarrierptr_prewrite1 does some sanity checks and hops on and off the system stack. This seems silly.

@aclements wrote:

> What do you think about instead lifting some of the setup from writebarrierptr_prewrite1 (like switching to the system stack) into bulkBarrierPreWrite and just calling gcmarkwb_m directly from bulkBarrierPreWrite? Then, as a possible second step, unrolling the bulkBarrierPreWrite loop that calls gcmarkwb_m?

I wrote:

> That was my first instinct, but I wasn't sure whether for a very large bulk pre-write this might exceed the latency budget in a way that hopping back and forth off of the system stack might not.

@aclements wrote:

> bulkBarrierPreWrite is already non-preemptible, so this wouldn't be making it any worse. In fact, it would be kind of nice for it to be *obviously* non-preemptible, rather than subtly non-preemptible like it is now. :)

> This isn't great, obviously. But if we wanted to fix this (which we might have to), I think we would need to do it at the typedmemmove and friends level by breaking it up into smaller bulkBarrierPreWrite and memmove segments with a preemption point after each segment.

---

There are several TODOs here:

1. Improve the layering.
2. Figure out whether typedmemmove and friends need to break their work up into chunks to avoid long pauses.
3. Check whether loop unrolling in bulkBarrierPreWrite improves performance.
Repository: opencv
Issue: corrupt JPEG data: # extraneous bytes before marker 0x##
Labels: bug,category: videoio(camera),category: 3rdparty

##### System information (version)
- OpenCV => 3.3
- Operating System / Platform => Ubuntu 16.04.3 LTS (x86_64)
- Compiler => gcc 5.4.0 20160609

##### Detailed description
When accessing a Logitech C310 webcam with Java OpenCV 3.3 the following error message is repeatedly printed to the terminal (with varying values for number of bytes and marker)
`Corrupt JPEG data: 2 extraneous bytes before marker 0xd3`

The error message comes from 3rdparty/libjpeg/jdmarker.c
usage of JWRN_EXTRANEOUS_DATA

The problem appears to be caused by a bug with the libjpeg that ships with OpenCV. A fix is to build OpenCV with the option `WITH_JPEG` switched OFF causing OpenCV to use the platform's copy of libjpeg.

I recommend updating the instructions [here](http://docs.opencv.org/2.4/doc/tutorials/introduction/desktop_java/java_dev_intro.html)
to include `WITH_JPEG=OFF`

##### Steps to reproduce
Build OpenCV for Java and run in Linux using the settings recommended in the [Introduction to Java Development](http://docs.opencv.org/2.4/doc/tutorials/introduction/desktop_java/java_dev_intro.html)
Repository: pytorch
Issue: Counter-intuitive Patience & Cooldown of ReduceLROnPlateau
Labels: todo,module: optimizer,triaged

https://github.com/pytorch/pytorch/pull/1370 provides a LR scheduler that reduces LR when the validation metrics stops improving. 

It works like this: when ```patience=2, cooldown=0```,
``` Python 
import torch
from torch.optim.lr_scheduler import ReduceLROnPlateau
n=torch.nn.Linear(1,1)
opt = torch.optim.SGD(n.parameters(), lr=0.1)
rp = ReduceLROnPlateau(opt, patience=2, cooldown=0)
for _ in range(10):
    print(opt.param_groups[0]['lr'])
    # train_one_epoch(...)
    # metrics = validate(...)
    rp.step(metrics=0) # metrics "stops improving" after the first epoch
```

Output LR for each epoch:
```
0.1
0.1
0.1
0.1
0.01
0.01
0.01
0.001
0.001
0.001

```

when `patience=2, cooldown=1`,
```
0.1
0.1
0.1
0.1
0.01
0.01
0.01
0.01
0.001
0.001
```

IMO the two examples' outcomes should instead match `patience=3, cooldown=0` and `patience=3, cooldown=1` respectively. Any idea?

Edited: change the position of `print` 

cc @vincentqb
Repository: angular
Issue: Animation using `display` in `query` not working
Labels: type: bug/fix,area: animations,freq2: medium,P4

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre>

[See plunkr here.](https://embed.plnkr.co/8BOdpQTCzxxtSLGBWKYb/)

I'm attempting a simple animation of 2 children. It appears that using display is not working at all inside `query`. So I had to use `height:0` + `overflow:hidden` instead. (Please see the plunkr)

## Environment
<pre><code>
Angular version: 4.3.5

Browser: all
 </code></pre>
Repository: rust
Issue: Document traits from #[derive(...)]
Labels: T-rustdoc,C-feature-request

Moving here from https://github.com/rust-lang/cargo/issues/4406 on @dns2utf8's behalf:

While documenting every public function of [ThreadPool](https://github.com/rust-threadpool/rust-threadpool) I had to implement `#[derive(Clone)` manually so I would be able to add an example.

I assume `cargo doc` has a default template for the derive-able traits.
So I propose something like this:
```rust
#[derive(Clone)
/// My custom doc
/// ```
/// let my = custom.example();
/// ```
#[derive(PartialEq, Eq)
/// My custom doc for both traits
/// ```
/// let my = custom.example();
/// ```
struct CustomStruct;
```

The template would have to include something like "yield" within the code it is generating.
In this case it should generate something equal to:
```rust
impl Clone for CustomStruct {
    /// My custom doc
    /// ```
    /// let my = custom.example();
    /// ```
    fn clone(&self) -> Self { CustomStruct }
}
/* similar for the other two traits */
struct CustomStruct;
```

What do you think?
Repository: TypeScript
Issue: JSDoc function annotations not working for chain assignment
Labels: Bug,VS Code Tracked,Domain: JavaScript

From https://github.com/Microsoft/vscode/issues/33221

**TypeScript Version:**  2.5.1

**Code**
For the JS code:

```js
/**
 * @return {Number}
 */
const f = exports.z = () => ({})

const x = f();
```

**Expected behavior:**
Type of `x` is `number`

**Actual behavior:**
Type of `x` is `{ [x: string]: any}`

If you get rid of the chained assignment and instead write`const f= () => ({})`, the types work as expected
Repository: go
Issue: x/website: add support for languages other than English
Labels: Documentation,NeedsDecision

Right now the docs are only in English. There's [some support](https://github.com/golang/go/wiki/NonEnglish) for languages other than English, but the wiki page is merely a footnote.

Other projects—[like React](https://crowdin.com/project/react)—are attempting this as well. Not only does it give newcomers a (somewhat) easy way to contribute to Go, it also makes Go a more welcoming and inclusive place for non-English speakers. Obviously the English version would remain the "master" version of the docs.

Ideally, golang.org would respect the `Accept-Language` header or support some sort of `en/`, `fr/`, etc. URL path option.

I'm not sure how much of a proposal this needs to be, but it's something I'm willing to put further thought into if needed. (It's not a language change or anything, so I didn't write out a full proposal.)

Projects with their docs and/or websites in multiple languages:

- [React](https://github.com/facebook/react/issues/8063)
- Rust
- Python
- Java ([sorta](https://www.oracle.com/fr/index.html))
- PHP
- JavaScript (via MDN)
- Perl (third party)
- Ruby
- [Babel](https://medium.com/@thejameskyle/the-language-of-programming-7983b8f6910d)
- LaTeX
- Scala (like how Go currently does it, but more uniform)
- ...
Repository: go
Issue: net: Buffers makes multiple Write calls on Writers that don't implement buffersWriter
Labels: NeedsDecision,early-in-cycle

The `writev` syscall is supposed to act like a single write.  The `WriteTo` method of `net.Buffers` will make a single write syscall on writers that have the unexported `writeBuffers` method.  However, for writers that do not have such a method, it will call `Write` multiple times.  This becomes significant if you are wrapping a `*net.TCPConn` without embedding, for instance, since it has different performance characteristics with respect to [Nagle's algorithm](https://en.wikipedia.org/wiki/Nagle%27s_algorithm).  Frustratingly, since the `writeBuffers` method is unexported, there's no way for the application to know the behavior of `Buffers.WriteTo` in order to work around the issue.

Repro case: https://play.golang.org/p/rF0JRZs8z8
Repository: opencv
Issue: viz::WMesh is not documented (properly)
Labels: feature,category: documentation,category: viz

##### System information (version)
- OpenCV => 3.3
- Operating System / Platform => Ubuntu 16.04 (x86-64) with QT 5.5
- Compiler => g++ 5.4.0

##### Detailed description

The `WMesh` class is very poorly documented and there are no examples on how to use it. While it is possible to load a mesh from a file (loaded through a `Mesh` object), the [second contructor](http://docs.opencv.org/3.3.0/d2/d76/classcv_1_1viz_1_1WMesh.html#a5023e5228d28ea876415140312b24415) is not (properly) documented (e.g., both `cloud` and `polygons` have the exact same description, although one of them expects a list of `int`s). I was not able to build a working example for even a very simple mesh due to (seemingly) arbitrary assertion failures and segmentation faults while trying to figure out the parameters.

The following code does (at least) not crash, but also shows no mesh:

##### Steps to reproduce

```
#include <vector>
#include <opencv2/viz.hpp>

using namespace std;
using namespace cv;
using namespace viz;

static void AddMesh(Viz3d &visualization)
{
  WCoordinateSystem coordinate_system;
  visualization.showWidget("Coordinate system", coordinate_system);
  
  const vector<Point3d> cloud {Point3d(-1, -1, 0), Point3d(1, -1, 0), Point3d(1, 1, 0), Point3d(-1, 1, 0), Point3d(-1, -1, 0)};
  const vector<int> polygons {5, 0, 0, 0, 0, 0}; //{5, 0} yields a SIGSEV below
  const Mat colors(1, 5, CV_8UC4, Color::yellow());
  WMesh mesh(cloud, polygons, colors);
  visualization.showWidget("Mesh", mesh);
}

int main()
{
  Viz3d visualization;
  AddMesh(visualization);
  visualization.spinOnce(1, true);
  while (!visualization.wasStopped())
    visualization.spinOnce(1, true);
  return 0;
}
```

From the properties of the `Mesh` class (which is also poorly documented), I figured that `polygons` is supposed to be a list of `int`s consisting of a number (of points) and offsets (indeces). However, setting those to the simplest possible case (see comment in the code above) yields a SIGSEV when constructing the `WMesh`. I would highly appreciate proper documentation for the `WMesh` class and its constructor or at least an example on how to use it when *not* loading a mesh from a file.

I am very well aware that this could be considered a questions rather than a bug report. However, given that there was not even a single answer to any one of my viz-related questions on answers.opencv.org within the last three weeks, I'd rather report the current state of documentation as a bug and move on so that future developers have a better idea of how to use the (practically) undocumented classes of this module.
Repository: vscode
Issue: Search bar input field very narrow
Labels: editor-find,under-discussion

- VSCode Version: Code 1.15.1 (41abd21afdf7424c89319ee7cb0445cc6f376959, 2017-08-16T17:15:57.756Z)
- OS Version: Darwin x64 16.7.0
- Extensions: the listing length exceeds browsers' URL characters limit
---

Steps to Reproduce:

1. Open search in current file
2. See attached file

<img width="2313" alt="schermata 2017-08-29 alle 11 04 53" src="https://user-images.githubusercontent.com/142634/29813576-c21471f6-8caa-11e7-9172-0013e052c8f7.png">


<!-- Launch with `code --disable-extensions` to check. -->
Reproduces without extensions: Yes/No
Repository: nvm
Issue: NVM Detects Windows NPM Versions when using Bash on Windows
Labels: OS: windows,needs followup

- Operating system and version: Ubuntu 16.04 on Windows 10 Build 16275 (Also tested with OpenSUSE Leap 42.2)

- `nvm debug` output:
<details>
<!-- do not delete the following blank line -->

```sh
nvm --version: v0.33.2
$SHELL: /bin/bash
$HOME: /home/seth
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)'
uname -a: 'Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux'
OS version: Ubuntu 16.04.3 LTS  
curl: /usr/bin/curl, curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.17.1 built on linux-gnu.
git: /usr/bin/git, git version 2.7.4
nvm current: none
which node: 
which iojs: 
which npm: /mnt/c/Program Files/nodejs/npm
npm config get prefix: /mnt/c/Program Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm: 
: not found
/mnt/c/Program Files/nodejs/npm: 5: /mnt/c/Program Files/nodejs/npm: 
: not found
/mnt/c/Program Files/nodejs/npm: 6: /mnt/c/Program Files/nodejs/npm: Syntax error: word unexpected (expecting "in")
npm root -g: /mnt/c/Program Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm: 
: not found
/mnt/c/Program Files/nodejs/npm: 5: /mnt/c/Program Files/nodejs/npm: 
: not found
/mnt/c/Program Files/nodejs/npm: 6: /mnt/c/Program Files/nodejs/npm: Syntax error: word unexpected (expecting "in")
```
</details>

- `nvm ls` output:
<details>
<!-- do not delete the following blank line -->

```sh
            N/A
[1;31mnode[0m [0;90m->[0m [1;31mstable[0m ([0;90m->[0m [1;31mN/A[0m) [0;37m(default)[0m
[1;31miojs[0m [0;90m->[0m [1;31mN/A[0m [0;37m(default)[0m
```
</details>

- How did you install `nvm`? (e.g. install script in readme, homebrew): install script

- What steps did you perform?
Install NVM, that's it really

- What happened?
Windows versions of NPM and I think Node, I think based on the random escape characters, were detected and added to nvm

- What did you expect to happen?
Nothing to be found, since I don't have Node installed in either my Ubuntu Bash or OpenSUSE Bash yet

- Is there anything in any of your profile files (`.bashrc`, `.bash_profile`, `.zshrc`, etc) that modifies the `PATH`?
No
Repository: angular
Issue: Route Transition no longer working if loaded component has animation trigger
Labels: type: bug/fix,area: animations,freq2: medium,P3

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[x] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
</code></pre>

## Current behavior

Navigating between components using animations on route changes causes the newly loaded component to not display and to have a display:none; style if the component also has an animation trigger defined (even if not used). Animations between other components are working as expected however simply adding "animations: [trigger('someAnimation', [])]" will cause it to not display. This was working in 4.3.2 however after updating to 4.3.6 it no longer works. Loading the component directly without changing route shows the component as expected.

## Expected behavior

The component should display after route changes even if the router and child component have animations.

## Minimal reproduction of the problem with instructions

app.component.ts
<pre><code>
import { Component } from '@angular/core';
import { trigger, style, transition, animate, query } from '@angular/animations';

@Component({
	selector: 'body',
	templateUrl: './app.component.html',
	animations: [
		trigger('routerAnimations', [
			transition('* => *', [
				query(':leave', [
					animate('500ms ease', style({ opacity: 0, transform: 'translateY(100px)' }))
				], { optional: true }),
			])
		])
	]
})

export class AppComponent {

	prepareRouteTransition(outlet) {
		return outlet._activatedRoute ? outlet._activatedRoute.url._value.join('/') : 'void';
	}

}
</code></pre>


child.component.ts
<pre><code>
import { Component } from '@angular/core';
import { trigger, state, style, transition, animate } from '@angular/animations';

@Component({
	selector: '.child-component',
	templateUrl: './child.component.html',
	animations: [
		trigger('childAnimation', [])
	],
})

export class AdmissionsDetailComponent {
	
}
</code></pre>

## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->


## Environment

<pre><code>
Angular version: 4.3.6

Browser: (seems to be all but tested in:)
- [x] Chrome (desktop) version 60
- [x] Firefox version 54
 
</code></pre>
Repository: vscode
Issue: [folding] Automatic function/method folding
Labels: feature-request,editor-folding

Please consider automatic function folding, based on the current cursor location.

I think it can be a great way to help developers maintain a high level mental map of source files and ease navigation between functions/methods. While it builds on existing building blocks already present in many code editors (block folding, tracking language specific scopes, ...) it may also be a novel approach (I'm not aware of any existing implementation)

The core idea is to edit source code with all functions folded by default, and expand the "current" function when the cursor enters it, then fold it back when the cursor leaves the function region. Explicit pins can allow developers to keep key functions expanded.

[Full description of the proposal](https://docs.google.com/document/d/13L_xmx64E-2Y8lHRX7wzJOXVteVMTApeUhcF4RSKU-w/edit?usp=sharing)
Repository: neovim
Issue: CTRL-L of popupmenu-keys is broken for complete() function
Labels: bug-vim,needs:vim-patch

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`: 

```
NVIM v0.2.0
Build type: Release
Compilation: /usr/lib/ccache/bin/cc -specs=/void-packages/common/environment/configure/gccspecs/hardened-cc1 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe  -g -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -O2 -DNDEBUG -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/builddir/neovim-0.2.0/build/config -I/builddir/neovim-0.2.0/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/builddir/neovim-0.2.0/build/src/nvim/auto -I/builddir/neovim-0.2.0/build/include
Compiled by void-buildslave@build

Optional features included (+) or not (-): +acl   +iconv    -jemalloc +tui      
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
```

- Vim (version: ) behaves differently?

Vim has the same behavior.

- Operating system/version:

void-linux

```
uname -a
Linux roxma-void-usb 4.12.9_1 #1 SMP PREEMPT Fri Aug 25 08:49:12 UTC 2017 x86_64 GNU/Linux
```

- Terminal name/version:
- `$TERM`:
xterm-256color


### minimal vimrc

```vim
filetype plugin indent on
set encoding=utf-8 fileencodings=ucs-bom,utf-8,gbk,gb18030,latin1 termencoding=utf-8

set completeopt=menu,menuone,noinsert,noselect

func Foo()
        call complete(1, ['ffffoo'])
        return ""
endfunc

imap <silent> .  <c-r>=Foo()<CR>
```

### Actual behaviour

![ctrl-l](https://user-images.githubusercontent.com/4538941/29851885-4f1fef58-8d69-11e7-8db0-53ac3bda85ae.gif)

### Expected behaviour

omnifunc version:

```vim
filetype plugin indent on
set encoding=utf-8 fileencodings=ucs-bom,utf-8,gbk,gb18030,latin1 termencoding=utf-8

set completeopt=menu,menuone,noinsert,noselect

func Foo(findstart, base)
        if a:findstart
                return 0
        endif
        return ["ffffoo"]
endfunc

set omnifunc=Foo
```

![omni](https://user-images.githubusercontent.com/4538941/29851963-d56e4ca8-8d69-11e7-97ab-6dba0bf3615c.gif)

### Related issue

https://github.com/roxma/nvim-completion-manager/issues/127
Repository: pytorch
Issue: Add a hash function for tensor data
Labels: triaged,function request

Hi,

I'm looking at the `def __hash__()` method defined in Tensor base class. That function builds off on python's `id()` method, which runs on CPU right? Is there a way to hash a tensor on GPU and use the hashed value as index to store this Tensor?