sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: [html-templating] easy way to inherite advanced html features
Labels: feature-request,html

With the vscode extension [Better Jinja](https://github.com/samuelcolvin/jinjahtml-vscode) the `jinja-html` language highlights jinja html templates, however some more advanced features available with the `html` langauge are not working with `jinja-html`:
* highlighting the opening tag when the cursor is in the closing tag (and visa versa) ![image](https://user-images.githubusercontent.com/4039449/39631948-95a001c0-4fab-11e8-911d-6fd571357b76.png) ![image](https://user-images.githubusercontent.com/4039449/39631931-8c49dbbe-4fab-11e8-8595-42f7ab8b1eda.png) In the second case with `jinja-html` as the language all `div`s are highlighted, not just the sibling of the tag under the cursor
* auto creating the closing tag once the opening tag is created.

And probably more, but these are the two which would be most useful.

How do I get these advanced features working in my child language definition?

I've tried copying most of the config from `extensions/html/package.json` and `extensions/html/language-configuration.json` into my extension but to no avail. I also tried looking through `extensions/html-language-features` but there's nothing obvious there to include.

This isn't as simple as adding more file extensions somewhere, even in a `.html` file if the language is changed to `jinja-html` the features above disappear.

- VSCode Version: `1.22.2 3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9 x64`
- OS Version: ubuntu 18.04

Steps to Reproduce:

1. install "Better Jinja"
2. open or create a file with some html in
3. change the language to `jinja-html`
4. try using advanced html features as described above

Does this issue occur when all extensions are disabled?: Yes (the advanced features work with the `html` language without extensions, obviously the error can only be shown with the extension installed)
Repository: go
Issue: proposal: os: make a Go 2 type for environment variables?
Labels: v2,Proposal

Should we change the type of environment variables in Go 2?

Currently it's `[]string` which is slightly odd. We at least solved the duplicated problems in Go 1.9 with https://golang.org/doc/go1.9#os/exec (#12868).

In https://github.com/golang/go/issues/25210#issuecomment-386256365, @alexbrainman suggested `map[string]string` but that doesn't work well for case-insensitive Windows, and doesn't permit intentional(ly odd) duplicates or specific ordering on Unix, if such control is ever desired. (whether we wish to permit that is an additional question)

It might be nice to have some new opaque type (not exposing the underlying representation) and have various constructors and accessors.
Repository: go
Issue: x/net/publicsuffix: PublicSuffix() is case sensitive
Labels: NeedsInvestigation


### What version of Go are you using (`go version`)?
```
go version go1.10.1 linux/amd64
```

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOOS="linux"
```

### What did you do?
PublicSuffix() returns incorrect values when the domain contains letters with uppercase

According to [RFC4343](https://tools.ietf.org/html/rfc4343) I believe PublicSuffix() should be case insensitive.

```
package main

import (
	"fmt"
	"golang.org/x/net/publicsuffix"
)

func main() {
	suffix, icann := publicsuffix.PublicSuffix("abc.CoM.Br")
	fmt.Printf("suffix: %s\nicann: %v\n", suffix, icann)
}
```

### What did you expect to see?
```
suffix: com.br
icann: true
```

### What did you see instead?
```
suffix: Br
icann: false
```
Repository: go
Issue: x/mobile/cmd/gomobile: RunOnJVM is not available from init functions
Labels: mobile

In my library, JNI functions are called from Go side. JVM is accessed via a global C variable `current_vm`. I admit depending this variable is not a good way, but there is no other way to access JNI from Go. Actual code is https://github.com/hajimehoshi/ebiten/blob/master/internal/jni/jni_android.go

I realized that `current_vm` is not initialized yet when `init` functions are called. IIUC, `current_vm` is initialized at `SetCurrentContext` when the activity's `onCreate` is called, and this `onCreate` is called after all `init` functions are called and before `main` is called.

Wouldn't it be possible to make JVM available even from `init` functions? For gomobile-bind, as `init` functions are automatically called before calling `SetCurrentContext`, then it might be impossible. If this is impossible, is there other way to call JNI functions from Go side?

As for iOS, Objective-C binding via cgo is available and there is not such problem.
Repository: TypeScript
Issue: Repeated mapped type inference causes incorrect typeToString results
Labels: Bug,Domain: Type Display

**TypeScript Version:**  2.8.0-insiders.20180320

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** mapped type inference display typetostring

**Code**

Via https://stackoverflow.com/questions/50181650/type-inference-lost-inner-level-types-in-typescript

```ts
interface IAction {
    type: string;
}

type Reducer<S> = (state: S, action: IAction) => S

function combineReducers<S>(reducers: { [K in keyof S]: Reducer<S[K]> }): Reducer<S> {
    const dummy = {} as S;
    return () => dummy;
}

const test_inner = (test: string, action: IAction) => {
    return 'dummy';
}
const test = combineReducers({
    test_inner
});

const test_outer = combineReducers({
    test
});

// '{test: { test_inner: any } }'
type FinalType = ReturnType<typeof test_outer>;

var k: FinalType;
k.test.test_inner // 'string'
```

**Expected behavior:** `FinalType`'s hover type should be `{ test: { test_inner: string } }`

**Actual behavior:** Shows as `{ test: { test_inner: any } }`

**Playground Link:** [Link](https://www.typescriptlang.org/play/#src=interface%20IAction%20%7B%0D%0A%20%20%20%20type%3A%20string%3B%0D%0A%7D%0D%0A%0D%0Atype%20Reducer%3CS%3E%20%3D%20(state%3A%20S%2C%20action%3A%20IAction)%20%3D%3E%20S%0D%0A%0D%0Afunction%20combineReducers%3CS%3E(reducers%3A%20%7B%20%5BK%20in%20keyof%20S%5D%3A%20Reducer%3CS%5BK%5D%3E%20%7D)%3A%20Reducer%3CS%3E%20%7B%0D%0A%20%20%20%20const%20dummy%20%3D%20%7B%7D%20as%20S%3B%0D%0A%20%20%20%20return%20()%20%3D%3E%20dummy%3B%0D%0A%7D%0D%0A%0D%0Aconst%20test_inner%20%3D%20(test%3A%20string%2C%20action%3A%20IAction)%20%3D%3E%20%7B%0D%0A%20%20%20%20return%20'dummy'%3B%0D%0A%7D%0D%0Aconst%20test%20%3D%20combineReducers(%7B%0D%0A%20%20%20%20test_inner%0D%0A%7D)%3B%0D%0A%0D%0Aconst%20test_outer%20%3D%20combineReducers(%7B%0D%0A%20%20%20%20test%0D%0A%7D)%3B%0D%0A%0D%0A%2F%2F%20'%7Btest%3A%20%7B%20test_inner%3A%20any%20%7D%20%7D'%0D%0Atype%20FinalType%20%3D%20ReturnType%3Ctypeof%20test_outer%3E%3B%0D%0A%0D%0Avar%20k%3A%20FinalType%3B%0D%0Ak.test.test_inner%20%2F%2F%20'string'%0D%0A)
Repository: pytorch
Issue: [proposal] [discussion] Refactor pruning/weight_norm using new Reparametrization functionality + actually deprecate old impl of SpectralNorm
Labels: module: nn,triaged

Currently the [weight_norm](https://github.com/pytorch/pytorch/blob/master/torch/nn/utils/weight_norm.py) and [spectral_norm](https://github.com/pytorch/pytorch/blob/master/torch/nn/utils/spectral_norm.py) are patching a passed module + implement special functions for adding/removing these from a module.

Some ideas for refactoring to make it less tricky:
- provide a stable signature for getting weight, then they can be cleanly used with methods such as `torch.matmul` and `F.conv2d`
- if module patching (adding some new buffers as parameters and registering a hook) is needed and is a reasonable pattern, provide a user-facing stable abstraction for it (especially adding and removal of parameters). It seems we have a chain of decorators-hooks, and each of them may have some extra buffers, and currently they are all patched into the passed module object.

cc @jerryzh168 @jianyuh @dzhulgakov
Repository: TypeScript
Issue: Experiment with always using parameters from base types for derived methods
Labels: Suggestion,In Discussion

Note some related issues for doing this with *properties* rather than methods: #3667, #6118, #1373.

# Goal

We want to make it easier for users to derive types without rewriting the same parameter signature every time

```ts
class Base {
  method(x: number) {
    // ...
  }
}

class Derived extends Base {
  method(x) {
    // 'x' should have the type 'number' here.
  }
}
```

# Potential ideas

* Only enable in `noImplicitAny` (doesn't work for default initializers 😞)
* Revert to `any` in all locations, opt in with another strictness flag (😞)
* Something else? 😕

# Potential issues

## Default initializers with more capable derived types

```ts
class A {
  a = 1;
}

class B extends A {
  b = 2;
}

class Base {
  method(x: A) {
    // ...
  }
}

class Derived extends Base {
  method(x = new B) {
    x.b;
    // Today, 'x' has type 'B' which is technically unsound
    // but that's just what we do. Does changing this to 'A' break things?
  }
}
```

## Default initializers that become less-capable via contextual types

```ts

class Base {
  method(x: "a" | "b") {
    // ...
  }
}

class Derived extends Base {
  method(x = "a") {
    // We have to make sure 'x' doesn't have type '"a"'
    // which is both unsound and less useful.
  }
}
```

## Distinction between properties and methods

Would this work?

```ts
class Base {
  method = (x: number) => {
    // ...
  }
}

class Derived extends Base {
  method(x) {
    // Does 'x' have the type 'number' here?
  }
}
```

What about this?

```ts
class Base {
  method(x: number) {
    // ...
  }
}

class Derived extends Base {
  method = (x) => {
    // Does 'x' have the type 'number' here?
  }
}
```

____

**Keywords:** base type derived contextual contextually inherit methods implicit any
Repository: material-ui
Issue: [Menu] Clicking outside a menu blocks click from bubbling up
Labels: new feature,component: menu,component: select

## Current Behavior

There a fundamental issue with the menu dismissal. When presented with multiple buttons or select fields that show a menu, it take 2 clicks to dismiss the existing menu and show the next one.

![material-ui](https://user-images.githubusercontent.com/2038264/39656921-7d1544dc-4fd1-11e8-9956-fb3440461c85.gif)

## Steps to Reproduce

In the demo below, try opening the first menu by clicking on the first button, then the second menu by clicking on the second button. Notice that an extra click is needed to dismiss the first menu then another one to show the second menu.

https://codesandbox.io/s/9lp94v86zo

## Expected Behavior

Good UX guidelines recommend to reduce the number of clicks needed to perform an action. As opposed to modals and dialogs, menus are not expected to hijack the click away events.

The issue is that the background click to dismiss a menu, has a `e.preventDefault()` which prevents it from bubbling up to the other element. 

In other frameworks, you can click on an other element, and it will have double effect: close up the first menu, and show the new one in one click action. For reference:

*Bootstrap*

http://getbootstrap.com/2.3.2/components.html#buttonDropdowns

![bootstrap](https://user-images.githubusercontent.com/2038264/39656862-20504d3c-4fd1-11e8-8957-0a80cc33b4e3.gif)

*Semantic-UI*

![semantic-ui](https://user-images.githubusercontent.com/2038264/39656804-b0666056-4fd0-11e8-998c-d1ad26846445.gif)

*Sencha ExtJS*

http://examples.sencha.com/extjs/6.5.3/examples/kitchensink/?modern#buttons-split

![extjs6-2](https://user-images.githubusercontent.com/2038264/39657084-b412f5d2-4fd2-11e8-82dc-c75a02c96eda.gif)

*UIKit*

https://getuikit.com/v2/docs/button.html

## Your Environment

| Tech         | Version |
|--------------|---------|
| Material-UI  |   v1.0.0-beta.44     |
| React        |    16     |
| browser      |   Chrome 65  |
| etc          |         |
Repository: pytorch
Issue: Optional modifiers (e.g., Tensor?) are not checked for non-dispatched native functions
Labels: triaged,module: dispatch

I noticed this because I swapped some of the CuDNN RNN functions from pass through to dispatched, and I started getting failures when I passed undefined tensors to `Tensor x` arguments (...from C++, I think). Which is clearly supposed to be not allowed, but it shouldn't have mattered which dispatch strategy was being used here.

Maybe C10 will make this problem obsolete.
Repository: rust
Issue: Suggested fix for E0658 does not resolve the compiler error
Labels: C-enhancement,A-macros,T-compiler

A little while back I've released my [bitrange](https://github.com/trangar/bitrange) crate. 

On `rustc 1.27.0-nightly (ac3c2288f 2018-04-18)`, this works like a charm.

On `rustc 1.27.0-nightly (91db9dcf3 2018-05-04)`, I get the following error:
```
error[E0658]: procedural macros cannot be expanded to expressions
...
   = help: add #![feature(proc_macro_non_items)] to the crate attributes to enable
   = note: this error originates in a macro outside of the current crate (in Nightuilds, run with -Z external-macro-backtrace for more info)
```

I've tried adding the suggested `#![feature(proc_macro_non_items)]` to the following items, but the error is not resolved:
- `bitrange_plugin/src/lib.rs`, the crate that defines the proc macros
- `src/lib.rs`, the crate that uses the `bitrange_plugin` crate and exposes a new macro
- `src/bin/test.rs`, a test crate that imports `src/lib.rs` and calls that macro (which includes the proc macro)

I've added the suggested fixes to [this branch](https://github.com/Trangar/bitrange/tree/proc_macro_issue). (run `cargo test` to trigger the errors)
Repository: godot
Issue: Polygon 2D UV editor UI unclear
Labels: enhancement,discussion,topic:editor,usability

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if non-official. -->
af9a620

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->


**Issue description:**
<!-- What happened, and what was expected. -->
Testing the new polygon 2D UV editor and I cannot distinguish the weight of small value when painting. Can their be a way to show the number or any other way to show the weight clearly?

Can we have text showing the paint mode? like add and minus? I noticed that the tooltip explains the button but I think it is not direct enough, can we have text like **Paint Mode:** before the two dots 

Can there be numerical input for the strength slider?

![2018-05-05 17 02 04](https://user-images.githubusercontent.com/10883749/39661561-11f2932a-5086-11e8-8553-9dfacf634f2d.png)


It is unclear to see the selected painted mode, the white dot turns blue but the black dot doesn't change when selected.

**Steps to reproduce:**


**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Repository: godot
Issue: [Bullet] Rigidbodies have crazy movement when used with joints
Labels: bug,confirmed,topic:physics

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if non-official. -->
3.0.2

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
linux mint

**Issue description:**
<!-- What happened, and what was expected. -->
I try to make a simple ragdoll and the movement went crazy with bullet but not in godot physics. I think it has something to do with the size of objects.

I tried to test with default size collision shapes and rigidbodies with joints and the result is stable. So I guess it is related to the size as the collision shapes have the size pram smaller than 1 in the attach project. 

**Steps to reproduce:**
check project , switch physics engine and run the scene

**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->

[BUG.zip](https://github.com/godotengine/godot/files/1976687/BUG.zip)
Repository: go
Issue: math: Pow() results are less accurate than libc pow()
Labels: NeedsInvestigation

Please see detailed discussion on the topic here: https://groups.google.com/forum/#!topic/golang-nuts/LqVD5kMHJQw

Note that the headline is about Fibonacci numbers, however, the root issue is regarding the accuracy of math.Pow, compare to libc pow() function. 

### What version of Go are you using (`go version`)?
```go version go1.9.5 linux/amd64```

### Does this issue reproduce with the latest release?
did not test with go1.10, but could not find anything related to math performance in release notes

### What operating system and processor architecture are you using (`go env`)?
```
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ylifshit/go"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build223266492=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
```

### What did you do?
compare accuracy of math.Pow tolibc pow(). cod, as well as detailed results are in the go-nuts discussion above

### What did you expect to see?
see group discussion above

### What did you see instead?
see group discussion above
Repository: youtube-dl
Issue: Bharat Acharya Education Site Support
Labels: site-support-request

for example log into bharatacharyaeducation.com and log in using these credentials email : chinnu.akanksh@gmail.com pwd: bankai and choose 8086 as topic for watching videos and afterwards video will play...and how do I download these videos
Repository: pytorch
Issue: Issue when importing both retro (from OpenAI) and torch
Labels: triaged,module: pybind

**Issue description:**

Crash when importing both retro and torch, order doesn't matter

**Code example:**

import retro
import torch

I then get the windows pop-up saying python has stopped working

- PyTorch or Caffe2: PyTorch
- How you installed PyTorch (conda, pip, source): Conda
- OS: Windows 10
- PyTorch version: 0.4.0
- Python version: 3.6.4
- CUDA/cuDNN version: 9.0
- GPU models and configuration: Nvidia GTX 760
Repository: rust
Issue: Misleading diagnostic when trying to use Box<Error> for io::Error:new
Labels: C-enhancement,A-diagnostics,T-compiler

```rust
fn main(){
    let q : Box<::std::error::Error /* + Send + Sync */ > = unimplemented!();
    let w : ::std::io::Error = ::std::io::Error::new(::std::io::ErrorKind::Other, q);
}
```

First compiler error message:

```
error[E0277]: the trait bound `std::error::Error: std::marker::Sized` is not satisfied
 --> src/main.rs:3:32
  |
3 |     let w : ::std::io::Error = ::std::io::Error::new(::std::io::ErrorKind::Other, q);
  |                                ^^^^^^^^^^^^^^^^^^^^^ `std::error::Error` does not have a constant size known at compile-time
  |
  = help: the trait `std::marker::Sized` is not implemented for `std::error::Error`
  = note: required because of the requirements on the impl of `std::error::Error` for `std::boxed::Box<std::error::Error>`
  = note: required because of the requirements on the impl of `std::convert::From<std::boxed::Box<std::error::Error>>` for `std::boxed::Box<std::error::Error + std::marker::Send + std::marker::Sync + 'static>`
  = note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<std::error::Error + std::marker::Send + std::marker::Sync + 'static>>` for `std::boxed::Box<std::error::Error>`
  = note: required by `std::io::Error::new`
```

Later it gets to the `Send` and `Sync` parts, but initially it makes one wonder about why wanting `Sized` to `Error` itself instead of `Box<Error>`.
Repository: rust
Issue: Warn when a user-defined trait is used on an std library type without full path
Labels: C-enhancement,A-trait-system,T-compiler

I'd like rustc to warn me when I use a trait method on a std (or liballoc, core, ...) type without using the full trait path.

That is, if I implement my own trait for a `std` library type:

```rust
trait Foo { fn bar(&self); }

impl Foo for Vec<u32> {
  fn bar(&self) { }
}

fn main() {
    let v = Vec::new();
    v.bar(); // Warning
    Foo::bar(&v); // OK
}
```

The motivation is that:

* if the `std` library adds a new trait with a method called `foo` and implements it for `Vec<u32>` my code stops compiling due to an ambiguity error
* if the `std` library adds an inherent method to `Vec<u32>` called `foo`that has the same signature as `Foo::foo`, my code continues to compile but might silently change behavior

---

I don't know whether this warning should apply exclusively to the std library or to types defined in external crates as well.
Repository: flutter
Issue: Would like a benchmark tracking install size of hello_world
Labels: team,engine,c: performance,a: size,perf: app size,team: benchmark,P3,team-engine,triaged-engine

Including after extracting icudata.

We also get asked about install-size occasionally: https://github.com/flutter/flutter/issues/16833#issuecomment-387019591
Repository: rust
Issue: EvaluationCache overwrites its entries
Labels: C-enhancement,T-compiler

When the insertion to `EvaluationCache ` is changed to use `HashMapExt::insert_same`. It triggers an the assertion which checks that the old value is the same as the new one. This is because the DepNodeIndex changed.

[Backtrace](https://gist.github.com/Zoxc/c81faf46c9b1a532f029c1a3776c6a4b#file-gistfile1-txt)
[Log output](https://gist.github.com/Zoxc/c81faf46c9b1a532f029c1a3776c6a4b#file-log-output)

cc @arielb1 @nikomatsakis
Repository: pytorch
Issue: [feature request] [PyTorch] More flexible optimizer API
Labels: module: optimizer,triaged,enhancement

Currently, there is no easy way to change the decay / momentum / lr for a parameter after constructing the optimizer. For example, it is hard to stop a parameter from being decayed in an iteration.

Maybe we should support a getter/setter API like `optim.set(my_parameter, 'decay', 0)`.

cc @vincentqb
Repository: pytorch
Issue: [memory leak] [PyTorch] .backward(create_graph=True)
Labels: module: autograd,module: memory usage,triaged

```python
>>> import torch
>>> import gc
>>> _ = torch.randn(1, device='cuda')
>>> del _
>>> torch.cuda.synchronize()
>>> gc.collect()
0
>>> print(torch.cuda.memory_allocated())
865280
>>> x = torch.randn(1, device='cuda', requires_grad=True)
>>> y = x.tanh()
>>> y.backward(torch.ones_like(y), create_graph=True)
>>> del x, y
>>> torch.cuda.synchronize()
>>> gc.collect()
0
>>> print(torch.cuda.memory_allocated())
867328
```

leaks with `y  = x.tanh()` but not with `y = x  + 1`.

Discovered when running code in #7270 

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved