sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: spec: permit eliding the type of struct fields in nested composite literals
Labels: LanguageChange,Proposal,LanguageChangeReview

> Within a composite literal of array, slice, or map type T, elements or map keys that are themselves composite literals may elide the respective literal type if it is identical to the element or key type of T. Similarly, elements or keys that are addresses of composite literals may elide the &T when the element or key type is *T.

When the type of a nested composite literal may derived from its context, that type may be elided in all cases except when the composite literal is the value of a struct field.

```go
type T struct{ V int }

var _ = map[T]T{{1}: {1}}      // type elided from map key and element
var _ = []T{{1}}               // type elided from slice element
var _ = [...]T{{1}}            // type elided from array element
var _ = struct{ F T }{F: T{1}} // type is required
```

I propose that elision be permitted in this case as well.

```go
var _ = struct{ F T }{F: {1}}
var _ = struct{ F *T }{F: {1}}
```

I submit that the arguments in favor are the same as for eliding the type in other contexts, as well as conceptually simplifying the language--it is simpler to say that types may always be elided in nested literals (when the type can be derived from context) than to say that types may be elided in all but one case.

Proposed spec change:

> Within a composite literal of array, slice, **struct,** or map type T, ...

This proposal is a subset of #12854, which proposes elision of types in all composite literals, not just nested ones.
Repository: godot
Issue: Blend shapes glitches in the event that the node is duplicated
Labels: bug,topic:editor,confirmed

**Operating system or device - Godot version:**
Ubuntu16.04, Godot3.0 Alpha1

**Issue description:**
The change in the form keys of the mesh is spoiled, in the event that the node is duplicated.

**Steps to reproduce:**
[Video Bug shape key.flv.zip](https://github.com/godotengine/godot/files/1232221/Video.Bug.shape.key.flv.zip)


**Link to minimal example project:**
[Bug shape keys.zip](https://github.com/godotengine/godot/files/1232233/Bug.shape.keys.zip)
Repository: go
Issue: proposal: spec: lightweight anonymous function syntax
Labels: LanguageChange,Proposal,LanguageChangeReview

Many languages provide a lightweight syntax for specifying anonymous functions, in which the function type is derived from the surrounding context.

Consider a slightly contrived example from the Go tour (https://tour.golang.org/moretypes/24):

```go
func compute(fn func(float64, float64) float64) float64 {
	return fn(3, 4)
}

var _ = compute(func(a, b float64) float64 { return a + b })
```

Many languages permit eliding the parameter and return types of the anonymous function in this case, since they may be derived from the context. For example:

```scala
// Scala
compute((x: Double, y: Double) => x + y)
compute((x, y) => x + y) // Parameter types elided.
compute(_ + _) // Or even shorter.
```

```rust
// Rust
compute(|x: f64, y: f64| -> f64 { x + y })
compute(|x, y| { x + y }) // Parameter and return types elided.
```

I propose considering adding such a form to Go 2. I am not proposing any specific syntax. In terms of the language specification, this may be thought of as a form of untyped function literal that is assignable to any compatible variable of function type. Literals of this form would have no default type and could not be used on the right hand side of a `:=` in the same way that `x := nil` is an error.

# Uses 1: Cap'n Proto

Remote calls using Cap'n Proto take an function parameter which is passed a request message to populate. From https://github.com/capnproto/go-capnproto2/wiki/Getting-Started:

```go
s.Write(ctx, func(p hashes.Hash_write_Params) error {
  err := p.SetData([]byte("Hello, "))
  return err
})
```

Using the Rust syntax (just as an example):

```go
s.Write(ctx, |p| {
  err := p.SetData([]byte("Hello, "))
  return err
})
```

# Uses 2: errgroup

The errgroup package (http://godoc.org/golang.org/x/sync/errgroup) manages a group of goroutines:

```go
g.Go(func() error {
  // perform work
  return nil
})
```

Using the Scala syntax:

```go
g.Go(() => {
  // perform work
  return nil
})
```

(Since the function signature is quite small in this case, this might arguably be a case where the lightweight syntax is less clear.)
Repository: TypeScript
Issue: Seemingly wrong arguments object when both es6 and commonjs options are present
Labels: Bug

**TypeScript Version:**  2.4.2

**Code**

```ts
export const foo = (bar: number) => {
    console.log(arguments)
}
```

**Expected behavior:**

The code either produces errors or prints the arguments object of `foo` consistently in all targets and module types

**Actual behavior:**

- When the module is built with `tsc bug.ts` command line, ` error TS2496: The 'arguments' object cannot be referenced in an arrow function` is produced and no code is generated.
- With `tsc -t es6 bug.ts` it builds an es6 module and the code prints the arguments of `foo` at runtime
- With `tsc -t es6 -m commonjs` the generatesd `commonjs` module prints a strange object with 4 arguments, which seems to be an implementation detail of commonjs modules in node.js.

So I'd like at least to produce a warning in the third case, because I hit this problem in my program and the resulting bug was hard to locate.
Repository: TypeScript
Issue: Need way to express hybrid types that are indexable for a subset of properties 
Labels: Suggestion,Awaiting More Feedback

**Edit by @DanielRosenwasser**: This might be thought of as a "rest index signature" or a catch-all index signature.

__________

This is a feature request.

**TypeScript Version:**  2.4

**Code**

```ts
interface CSSProperties {
  marginLeft?: string | number
  [key: string]: CSSProperties
}
```

Based on the [docs](https://www.typescriptlang.org/docs/handbook/interfaces.html), this is not allowed:

> While string index signatures are a powerful way to describe the “dictionary” pattern, they also enforce that all properties match their return type. This is because a string index declares that obj.property is also available as obj[“property”]. In the following example, name’s type does not match the string index’s type, and the type-checker gives an error:

Unfortunately, it seems to make this type (which is common amongst jss-in-css solutions) not expressible. Coming from flow, which handles index types by assuming they refer to the properties that are not explicitly typed, this is frustrating.

As it stands, you can workaround it with:

```ts
interface CSSProperties {
  marginLeft?: string | number
  [key: string]: CSSProperties | string | number
}
```

But this is not sound. It allows this:

```ts
const style: CSSProperties = {
  margarineLeft: 3
}
```

This could potentially be solved with subtraction types if they allowed subtracting from `string` (and you were allowed to specify key types in this way):

```ts
interface CSSProperties {
  marginLeft?: string | number
}

interface NestedCSSProperties extends CSSProperties {
  [key: string - keyof CSSProperties]: CSSProperties
}
```

I asked about this on [stackoverflow](http://stackoverflow.com/questions/43357734/typescript-recursive-type-with-indexer/43359686) to confirm that I wasn't missing something. It seems I'm not, so I guess I'd consider this a suggestion/discussion starter, since it's probably not a "bug". Thanks!
Repository: flutter
Issue: showOnScreen should only scroll if new offset is within bounds
Labels: framework,a: accessibility,f: scrolling,customer: mulligan (g3),P2,team-framework,triaged-framework

In accessibility mode, if showOnScreen [1] calculates an offset that is outside of the minExtent and maxExtent of the scrollable, we still attempt to scroll. This results in an overscroll animation, which is misplaced in a11y mode. Instead, if scrolling is not possible, nothing should happen.

Related:  https://github.com/flutter/flutter/issues/11663

[1] https://github.com/flutter/flutter/blob/8f56f6fdd1c6b4586518b927623bc87341452b50/packages/flutter/lib/src/widgets/single_child_scroll_view.dart#L431
Repository: TypeScript
Issue: Error inferring types of promise function
Labels: Bug,Has Repro

**TypeScript Version:**  nightly (Version 2.5.0-dev.20170816)

**Code**

(based on `DefinitelyTyped/types/bluebird/index.d.ts`)
```ts
declare function props<K, V>(x: PromiseLike<Map<K, PromiseLike<V> | V>>): Promise<Map<K, V>>;
declare const input: Promise<Map<number, Promise<string>>>;
const out: Promise<Map<number, string>> = props(input);
```

**Expected behavior:**

No error.

**Actual behavior:**

```
src/a.ts(3,7): error TS2322: Type 'Promise<Map<number, Promise<string>>>' is not assignable to type 'Promise<Map<number, string>>'.
  Type 'Map<number, Promise<string>>' is not assignable to type 'Map<number, string>'.
    Type 'Promise<string>' is not assignable to type 'string'.
```

It works if I explicitly specify `props<number, string>(input)`.
The error only reproduces with `"lib": ["es6"]`.
Repository: pytorch
Issue: ReduceLROnPlateau with a naive Backtracking
Labels: feature,module: optimizer,triaged

Is it possible to implement a simple backtracking for the `ReduceLROnPlateau` module?  
That is, store the best model coefficients and reload it upon rate reduction.

In my experiments, this helps speed up learning, though it might be expensive for very large models.

cc @vincentqb
Repository: flutter
Issue: Should be possible to indicate to the refresh indicator that a reload is in progress.
Labels: c: new feature,framework,f: material design,customer: crowd,c: proposal,P3,team-design,triaged-design

There is presently no clean way to create a RefreshIndicator which is already visible.

How creating this might look:

```dart
new RefreshIndicator(child: widget, onRefresh: refreshAction, refreshing:true)
```
Repository: opencv
Issue: resizeWindow is a few pixels off with WINDOW_GUI_EXPANDED
Labels: bug,category: highgui-gui

##### System information (version)
- OpenCV => 3.3
- Operating System / Platform => Ubuntu 16.04 (x86-64) with QT 5
- Compiler => g++ 5.4.0

##### Detailed description

`resizeWindow` supposedly (http://docs.opencv.org/3.3.0/d7/dfc/group__highgui.html#ga9e80e080f7ef33f897e415358aee7f7e) resizes so that

> [t]he specified window size is for the image area. Toolbars are not counted.

However, this is not the case, at least with QT. Consider the following example:

##### Steps to reproduce

```
#include <iostream>
#include <opencv2/highgui.hpp>

using namespace std;
using namespace cv;

int main()
{
  const auto size = 20;
  namedWindow("Test window", WINDOW_GUI_NORMAL); //Use WINDOW_GUI_EXPANDED to see the values missing
  imshow("Test window", Mat(size, size, CV_8UC1, Scalar(128)));
  resizeWindow("Test window", 30 * size, 30 * size);
  waitKey(0);
  return 0;
}
```

This program resizes the image area so that it is exactly 30 times larger than the shown image, which should reveal the pixel values like this:

![screenshot_2017-08-18_15-09-42](https://user-images.githubusercontent.com/11800082/29460219-6930ecbc-8427-11e7-8451-44b0631326ac.png)

However, when using `WINDOW_GUI_EXPANDED` above, the result looks like this:

![screenshot_2017-08-18_15-12-40](https://user-images.githubusercontent.com/11800082/29460307-c2c5e660-8427-11e7-83bf-9fa423814c6e.png)

The values are not revealed which means that the image area is not 30 times the image size (or larger) which means that there is either a bug in the calculation of the image area in `resizeWindow` in combination with `WINDOW_GUI_EXPANDED` or the documentation is incorrect (i.e., the toolbars do actually count and the size specified is *not* the image area). I consider this to be a bug in either case.

Note that the size calculation does not seem to be too far off, since zooming once (in the `WINDOW_GUI_EXPANDED` case) already reveals the values. Also note that the illustration of the values is not the point of this issue, but they make it easier to see the effect because one does not have to measure the actual image area.
Repository: pytorch
Issue: "Shared memory manager connection has timed out"
Labels: needs reproduction,module: multiprocessing,triaged

This _seems_ to be a new error as of 0.2.0. I'm using a `torch.multiprocessing` Pool via `pool.map`.

```
Process ForkPoolWorker-5:
Traceback (most recent call last):
  File "/home/wwhitney/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
    self.run()
  File "/home/wwhitney/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/wwhitney/anaconda3/lib/python3.6/multiprocessing/pool.py", line 108, in worker
    task = get()
  File "/home/wwhitney/anaconda3/lib/python3.6/multiprocessing/queues.py", line 345, in get
    return _ForkingPickler.loads(res)
  File "/home/wwhitney/anaconda3/lib/python3.6/site-packages/torch/multiprocessing/reductions.py", line 86, in rebuild_storage_filename
    storage = cls._new_shared_filename(manager, handle, size)
RuntimeError: Shared memory manager connection has timed out at /opt/conda/conda-bld/pytorch_1502009910772/work/torch/lib/libshm/core.cpp:125
```
Repository: flutter
Issue: Make flutter inspector accessible
Labels: framework,a: accessibility,f: inspector,P3,team-framework,triaged-framework

The flutter inspector does not currently support accessibility.

It isn't clear exactly what accessibility support for the inspector should look like. For example, if the semantics debugger is made accessible perhaps it should be used when using the inspector in accessibility mode.
Repository: youtube-dl
Issue: [alarabiya.net] Site support request
Labels: site-support-request

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.08.18**
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Site support request (request for adding support for a new site)

Dear youtube-dl. I appreciate adding support (if possible) to the following sites:

- Single video: http://ara.tv/gbetq
- Single video: http://www.iranproud.online/iran-movies/drama/adat-nemikonim?ghiXbed2Vi8MrhmpgJYi

Thanks a million!
Repository: flutter
Issue: Have flutter_test track when Timers are created
Labels: a: tests,framework,c: proposal,P3,team-framework,triaged-framework

Since Zones let you override when Timers are created, maybe we can also track when they're created so that when there's any left we can report where it was created, the way we do with tickers.
Repository: vscode
Issue: No way to have tab show as eight spaces, indent with something else
Labels: feature-request,editor-core

It does not appear to me that there is a way to make it so tabs show up as 8 spaces distinct from the actual indent size or tabs/spaces preference.

Pretty simple feature request, actually.  I have an existing codebase that I am converting over piecemeal to use 4 space indents.  Trouble is, the codebase is already full of a mixture of spaces and tabs which assumes that a tab character indents by 8 spaces, despite nominally having an indent of four spaces.  So you get fun horrors like:

```
····foo();
····if (bar) {
⭾       baz();
····}
```

It'd be nice to have it both ways.  VS Community seems to allow this, but I haven't found a combination of features that allows this in VS Code
Repository: opencv
Issue: mingw32 build with IPP
Labels: feature,priority: low,category: build/install

A solution for building OpenCV 3.3 under mingw32-w64 with the IPP support. This has been tested with mxe for macOS.

- OpenCV 3.3
- Operating System: mxe macOS
- Compiler mingw32-w64

##### Detailed description

IPP is not found using mingw due to a name mismatch, and then some stack checking symbols present in the library ippicv. 

Bonus: little fixes to dshow and gstreamer

##### Steps to reproduce

Approach:
1) stub library for the missing RunTmChk providing the required functions (e.g. __chkstk)
2) copy of 3rdparty/ippicv/ippicv_win/lib/intel64/ippicvmt.lib to 3rdparty/ippicv/ippicv_win/lib/intel64/libippicvmt.a

Full details here: https://github.com/eruffaldi/eruffaldi.github.io/blob/master/opencv3build.md#mxe

The following is needed for building RunTmChk:
add_library(RunTmChk STATIC code.c)

then code.c

void __fastcall __GSHandlerCheck() {}
void __fastcall __security_check_cookie(unsigned* p) {}
void __fastcall __chkstk() {}
unsigned* __security_cookie;

##### Addition 1: sprintf bug

modules/videoio/cap_dshow.cpp 

Requires: #define STRSAFE_NO_DEPRECATE 

##### Addition 2: fullpath missing

inline char *realpath(const char *path, char *resolved_path)
 {
    return _fullpath(resolved_path,path,PATH_MAX);
 }
Repository: vscode
Issue: [theming] Access theme's colors programmatically 
Labels: feature-request,themes,api-proposal

I think we should add support for accessing theme's colors programmatically. 

For instance let's take as an example the popular [OneDark Pro](https://github.com/Binaryify/OneDark-Pro/blob/master/themes/OneDark-Pro.json) theme, I'd like to access colors defined under [tokenColors](https://github.com/Binaryify/OneDark-Pro/blob/master/themes/OneDark-Pro.json#L67).

My use case: I'm making an extension that decorates some tokens, and I'd like them to have the same color that comments have in my theme, the problem is that the regex I use to find those tokens depends on some configurable value, so I cannot pre-compute it in advance and just put it in a `.tmLanguage` file.

It's already possible to somehow access colors defined under the [colors](https://github.com/Binaryify/OneDark-Pro/blob/master/themes/OneDark-Pro.json#L4) key, via something like `new vscode.ThemeColor ( 'activityBar.background' )`, adding support for this sounds like a useful generalization to me.

What do you think?
Repository: angular
Issue: AnimationPlayer instance can only be used once
Labels: type: bug/fix,area: animations,freq2: medium,P4

## 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>

## Current behavior
I am using the AnimationFactory and AnimationPlayer to create some animations. I noticed that the animationPlayer can only be used once, when the animation has finished it cannot be replayed, I am not sure if this is by design to destroy the animationPlayer onFinish or a bug

## Expected behavior
For me, it should be reusable, thus when doing `.reset()/.restart()` the animation can be re-played even when it has finished. This would make sense if you want to keep using the same animation over and over again.

## Minimal reproduction of the problem with instructions
```ts
 ngAfterViewInit() {
    this.collapseAnimation = this.animationBuilder.build([
      style({ overflow: "hidden" }),
      animate("200ms ease-out", style({
        height: "50px"
      }))
    ]).create(this.content.nativeElement)

    this.expandAnimation = this.animationBuilder.build([
      style({ overflow: "hidden" }),
      animate("200ms ease-in", style({
       height: "100%"
      }))
    ]).create(this.content.nativeElement);
  }

  toggle() {
    if (this.isExpanded) {
      this.collapseAnimation.restart();
    } else {
      this.expandAnimation.restart();
    }

    this.isExpanded = !this.isExpanded;
  }
```
Live example: 
https://stackblitz.com/edit/animation-player-re-create

Note: I havn't included the animations shims in the demo.

Angular version: 4.3.4
Repository: vscode
Issue: Drag markdown preview to New Window
Labels: feature-request,markdown,webview

- VSCode Version: 1.15.1, 64 bit
- OS Version: Windows 10 64 bit

Steps to Reproduce:
1. Open markdown file, click the preview button
2. File/New Window
3. Try and drag just the preview part to the new window

It would be really nice if I could drag the markdown preview to a new window so I can edit the markdown on one monitor and see the preview result on another monitor.
Repository: rust
Issue: Warn when `crate_type` attribute is ignored because of `--crate-type`
Labels: C-enhancement,A-attributes,T-compiler,A-CLI

I just learned the hard way (i.e. after lots of scratching my head) that the `crate_type` attribute is entirely ignored when Cargo is used. This is hinted at in <https://doc.rust-lang.org/nightly/reference/linkage.html>, but only if you know that cargo always passes `--crate-type`. The first hit when I search for the attribute is <https://rustbyexample.com/attribute/crate.html> which doesn't mention this at all.

Those sites should probably be fixed, but moreover, I think the compiler shouldn't just silently ignore these attributes. It should tell me. That would have saved me lots of time.

(There may be other attributes which are similarly ignored. `crate_name` comes to my mind. But I don't know for sure.)
Repository: opencv
Issue: empty() methods of Mat class always returns true on Universal Windows Platform x86 build.
Labels: feature,platform: winrt/uwp

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => 3.3.0
- Operating System / Platform => Universal Windows Platform x86
- Compiler => Visual Studio 15 2017
- Cmake => 3.9.0

##### Detailed description
empty() methods of Mat class always returns true on Universal Windows Platform x86 build.
However, empty() methods returns correct results on Universal Windows Platform x64 and ARM build.

##### Steps to reproduce
cd opencv/platforms/winrt
setup_winrt.bat "WS" "10.0" "x86"

Test Code
```
cv::Mat testMat(100, 200, CV_8UC3);

if(testMat.empty()){
    print('empty() returns true')
}else{
    print('empty() returns false')
}
```

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->