sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: JSDoc optional/required variant doesn't play well with multi-@param RecordType declarations
Labels: Bug,Domain: JSDoc,Domain: JavaScript

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 -->
<!--
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
-->

<!-- If you have a QUESTION:
   THIS IS NOT A FORUM FOR QUESTIONS.
   Ask questions at http://stackoverflow.com/questions/tagged/typescript
    or https://gitter.im/Microsoft/TypeScript
-->

<!-- If you have a SUGGESTION:
  Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.
  See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md
-->

<!-- If you have a BUG:
  Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  2.9.0-dev.20180330

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**  as mentioned in [this comment](https://github.com/Microsoft/TypeScript/issues/19645#issuecomment-377952907), I'm opening this issue because with this JSDoc syntax typescript doesn't recognize the params correctly.

**Code**

```ts
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.

/**
 * @param {!object} args 
 * @param {!string} args.prop1
 * @param {?string} args.prop2
 */
function patate(args) {
  const { prop1, prop2 } = args;
} 
```

**Expected behavior:** No errors

**Actual behavior:** With allowJs and checkJs, I get JSDoc '@param' tag has name 'prop1', but is no parameter with that name.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> 

**Related Issues:** https://github.com/Microsoft/TypeScript/issues/19645
Repository: vue
Issue: Merge common class names of component and root element of that component
Labels: improvement,has PR

### What problem does this feature solve?
It looks a little awkward if there are duplicate class names in a DOM element.

### What does the proposed API look like?
If you look into [this fiddle](https://jsfiddle.net/zLnzuh1f/). 

The `div` element of `foo` component will have two `bar` classes in it. So it looks like.

```html
<div class="bar bar"></div>
```

If the two classes would have been merged into one.

```html
<div class="bar"></div>
```

It would have worked and behaved exactly in the same way but the code will look a lot cleaner.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: vue
Issue: Vue Selected Bind Does Not Work on Option Tags
Labels: improvement

### Version
2.5.16

### Reproduction link
[https://codepen.io/jbenner/pen/geJqex](https://codepen.io/jbenner/pen/geJqex)

### Steps to reproduce
1. Instantiate a Vue instance with a `data` property named `locations` which is an array consisting of `['all', 'north', 'south', 'east', 'west']`.
2. Iterate over the locations in an `option` tag like so `<option v-for="location in locations" :selected="location === 'all'">{{ location }}</option>`.

### What is expected?
The `selected` attribute to be set on the "all" `option` element.

### What is actually happening?
The `selected` attribute is not being set.

---
I've also tried the following while attempting to debug but to no avail:

```
<option v-for="(location, index) in locations" :selected="index === 0">{{ location }}</option>
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: go
Issue: path/filepath: TestEvalSymlinks tests with "/" prefix fail in Windows
Labels: help wanted,OS-Windows,NeedsInvestigation

### What version of Go are you using (`go version`)?
go version go1.10.1 windows/amd64

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
set GOARCH=amd64
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows

### What did you do?
Built go using "all.bat"

### What did you expect to see?
while running tests
ok     path/filepath   x.xxxs

### What did you see instead?
--- FAIL: TestEvalSymlinks (0.04s)
        path_test.go:798: EvalSymlinks("C:\\Users\\varga\\AppData\\Local\\Temp\\evalsymlink400713581\\test/linkabs") returns "C:\\", want "/"
FAIL
FAIL    path/filepath   1.552s

I have a code fix for this if this. Essentially just prepending the expected result with the volume name if we are on Windows and the path has a prefix of "/".

Does that sound reasonable?
Repository: TypeScript
Issue: Describe object vs Object in the Handbook
Labels: Docs

https://www.typescriptlang.org/docs/handbook/basic-types.html should cover the built-in `object` type and have a brief discussion of it vs `Object`

See #20614
Repository: vscode
Issue: Windows update failed: Access is denied
Labels: bug,install-update,windows

Log from %HOME%\AppData\Local\Temp\vscode-inno-updater.log

```
Apr 13 11:27:40.666 INFO Starting: C:\Program Files\Microsoft VS Code\Code.exe, false
Apr 13 11:27:40.670 INFO Checking for running Code.exe processes... (attempt 1)
Apr 13 11:27:40.670 INFO Code.exe is running, wait a bit
Apr 13 11:27:41.148 INFO Checking for running Code.exe processes... (attempt 2)
Apr 13 11:27:41.153 INFO Code.exe is running, wait a bit
Apr 13 11:27:41.654 INFO Checking for running Code.exe processes... (attempt 3)
Apr 13 11:27:41.666 INFO Code.exe is not running
Apr 13 11:27:41.666 INFO Starting update, silent = false
Apr 13 11:27:41.691 INFO do_update: "C:\\Program Files\\Microsoft VS Code\\Code.exe", _
Apr 13 11:27:41.692 INFO move_update: "C:\\Program Files\\Microsoft VS Code\\unins000.dat", _
Apr 13 11:27:41.696 INFO Delete: "Code.exe" (attempt 1)
Apr 13 11:27:41.744 INFO Delete: "Code.exe" (attempt 2)
Apr 13 11:27:41.945 INFO Delete: "Code.exe" (attempt 3)
Apr 13 11:27:42.396 INFO Delete: "Code.exe" (attempt 4)
Apr 13 11:27:43.197 INFO Delete: "Code.exe" (attempt 5)
Apr 13 11:27:44.448 INFO Delete: "Code.exe" (attempt 6)
Apr 13 11:27:46.249 INFO Delete: "Code.exe" (attempt 7)
Apr 13 11:27:48.700 INFO Delete: "Code.exe" (attempt 8)
Apr 13 11:27:51.901 INFO Delete: "Code.exe" (attempt 9)
Apr 13 11:27:55.952 INFO Delete: "Code.exe" (attempt 10)
Apr 13 11:28:00.953 INFO Delete: "Code.exe" (attempt 11)
Apr 13 11:28:00.953 ERRO Access is denied. (os error 5)
```

On Windows 10 64 bit
Repository: three.js
Issue: Request function Render To Depth
Labels: Enhancement

You need a function similar to renderer.render, but with the ability to render it in depth.
Why is not standard use appropriate?
```
scene.overrideMaterial = overrideMaterial;
renderer.render (scene, camera, ...);
scene.overrideMaterial = null;
```
due to the fact that using this method for Skin mesh will be drawn a static position, i.e. without animation.

Why is not suitable use:
`renderer.render (scene, camera, ...);`
because of the fact that some objects have their own CustomDepthMaterial. And also due to the fact that too heavy shader can be, but in the depths it is not needed.

How did I do this? used something between **renderer.render and WebGLShadowMap.renderObject**, because in WebGLShadowMap.renderObject is implemented exactly as it should be done in WebGLRenderer.
I just do not want to make my edits to it after every update of the engine, so I ask you to do this, I think it will be useful to many, now it is not enough.
Repository: terminal
Issue: Add an option to toggle the width of ambiguous-width characters
Labels: Issue-Feature,Product-Conhost,Help Wanted,Product-Conpty,Area-Server,Area-Settings,Product-Terminal

This bug-tracker is monitored by Windows Console development team and other technical types.  **We like detail!**

If you have a feature request, please post to [the UserVoice](https://wpdev.uservoice.com/forums/266908).  

> **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue.

Please use this form and describe your issue, concisely but precisely, with as much detail as possible

* Your Windows build number:  (Type `ver` at a Windows Command Prompt)
10.0.16299.371

* What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)
1. Set font to ”MS Gothic” or a Japanese monospace font
2. Type ”■square□square” or another text that contains ambiguous-width characters like ”■” and ”┌”
3. Ambiguous-with characters lap over the next characters to them
* What's wrong / what should be happening instead:
Some characters like ”■” and ”┌” has the same width as ASCII characters in latin fonts but double width in Japanese (and maybe some other languages) fonts.  These characters are called ambiguous-weighted.

Other terminal emulator has the option to toggle the width of them but Windows Console doesn't.

EDIT: also see #16779
Repository: vue
Issue: v-once for component tag doesn't work in v-for
Labels: bug,has PR

### Version
2.5.16

### Reproduction link
[https://jsfiddle.net/hL0rrbs9/6/](https://jsfiddle.net/hL0rrbs9/6/)

### Steps to reproduce
Run code, and watch.

### What is expected?
"Yay Yay ;)" values should not change to "hell naw!" in 3 seconds.

### What is actually happening?
"Yay Yay ;)" values are changing in to "hell naw!" in 3 seconds.

---
<h2>
  Wait 3 seconds. Behavior is not consistent. "component" tag in v-for should not change. 
</h2>
<div id="app">
  <component :is="comp" v-once></component>
  <p v-once>{{comp}}</p>
  
  <div v-for="n in items" :key="n.id">
    <component :is="comp" v-once></component>
    <p v-once>{{comp}}</p>
  </div>
</div>
<script>
var z = new Vue({
	el: "#app",
  data: {
  	comp:	"comp1",
    items: [{id:1}, {id:2}]
  },
  components: {
  	"comp1": {
    	template: "<p style='background:green;color:white'>yay yay ;)</p>"
    },
  	"comp2": {
    	template: "<p style='background:red;color:white'>hell naw!</p>"
    }
  }
});

setTimeout(function() {
	z.comp = "comp2"
}, 3000);
</script>

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: go
Issue: cmd/go: list command crashes on testdata packages under vendor
Labels: NeedsInvestigation

If the Go files in a `testdata` package import another package found in `vendor` directory, running `go list` command in the `testdata` package will result in an error:

```
unexpected directory layout:
	import path: p
	root: /Users/zplin/gocode/src
	dir: /Users/zplin/gocode/src/go_examples/vendor/p
	expand root: /Users/zplin/gocode/src
	expand dir: /Users/zplin/gocode/src/go_examples/vendor/p
	separator: /
```

However, if the `testdata` package doesn't import any package from `vendor`, the `go list` command works fine.

### What version of Go are you using (`go version`)?
go version go1.10.1 darwin/amd64

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"

### What did you do?
```
git clone git@github.com:linzhp/go_examples.git
cd go_examples/testdata
go list
```
### What did you expect to see?
`_/Users/zplin/gocode/src/buck_go_examples/testdata`

### What did you see instead?
```
unexpected directory layout:
	import path: p
	root: /Users/zplin/gocode/src
	dir: /Users/zplin/gocode/src/go_examples/vendor/p
	expand root: /Users/zplin/gocode/src
	expand dir: /Users/zplin/gocode/src/go_examples/vendor/p
	separator: /
```
Repository: TypeScript
Issue: Support a @nonnull/@nonnullable JSDoc assertion comment
Labels: Suggestion,Committed,Domain: JSDoc,Domain: JavaScript

This could be used in place of the non-null assertion operator, and solve #23403.

```js
while (queue.length) {
    (/** @nonnull */ queue.pop())();
}
```

Related is #23217, which tracks definite assignment assertions.
Repository: vscode
Issue: Add wordwrap indicator
Labels: feature-request,editor-wrapping

There's currently no visual indication when you use the `"editor.wordWrap": "on"` setting.

I'd propose optionally adding a wordwrap-indicator on each newline, something like this: 
![untitled](https://user-images.githubusercontent.com/24317742/38761997-b52116bc-3f87-11e8-8a61-aa9e0c88c151.png)

so it becomes easy to spot when a line has been wordwrapped.
Repository: vue
Issue: Creating a component named map should warn the user (as with button)
Labels: contribution welcome,improvement,good first issue,has PR

### Version
2.5.15

### Reproduction link
[https://jsfiddle.net/e2yxoomh/2/](https://jsfiddle.net/e2yxoomh/2/)

### Steps to reproduce
Create a component that includes the word "map" (case insensitive). For example:
- Map
- MapView
- mapper


### What is expected?
I expect these to work, or at least give me some sort of error message.

### What is actually happening?
Nothing happens. The components do not render. There is no error message.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: go
Issue: x/build/maintner: GerritMessage doesn't include inline comments
Labels: Builders,NeedsDecision,FeatureRequest

Consider [CL 97058](https://golang.org/cl/97058) as an example. It has reviews with inline comments. For example, here's one by Andrew:

![image](https://user-images.githubusercontent.com/1924134/38772631-be33f8aa-4009-11e8-8eb6-fbd94c039b90.png)

[`GerritMessage`](https://godoc.org/golang.org/x/build/maintner#GerritMessage) structure has the [`Message string`](https://godoc.org/golang.org/x/build/maintner#GerritMessage.Message) field:

```Go
// Message is the raw message contents from Gerrit (a subset
// of the raw git commit message), starting with "Patch Set
// nnnn".
Message string
```

But it doesn't expose the inline comments that were a part of that message. Here's the corresponding `GerritMessage` from `maintner.Corpus`:

```Go
(*maintner.GerritMessage)({
  Meta:    (*maintner.GitCommit)({GitCommit 9298d2c50518c3444f01b95aae9579f9d3bdb30d}),
  Version: (int32) 1,
  Message: (string) (len=26) "Patch Set 1:\n\n(4 comments)",
  Date:    (time.Time) 2018-02-26 05:16:52 +0000 +0000,
  Author:  (*maintner.GitPerson)({
    Str: (string) (len=61) "Andrew Bonventre <22285@62eb7196-b449-3ce5-99f1-c037f21e1705>"
  })
}),
```

This is a feature request and a tracking issue for it. I imagine this should be in scope, since CL comment bodies are already included. /cc @bradfitz @andybons
Repository: rust
Issue: No compiler error when attempting to change field of const struct
Labels: C-enhancement,A-lints,T-compiler

There is no compiler error, when trying to change the field of a ```const``` struct.

I tried this code:

```rust
struct StructA {
	pub a: u32,
}

const A: StructA = StructA{a: 0};

fn main() {
    A.a = 10;
    println!("{}", A.a);
}
```

I expected to see this happen:
Compiler error, because I try to change the value of a ```const```.

Instead, this happened:
The statement is just ignored. ```A.a = 10;```looks like the value of ```A.a ```  is set to ```10```, since there is no compiler error, I expect this to happen.
Instead when printing the value of ```A.a```, it is still the initial value ```0```

## Meta

`rustc --version --verbose`:
```console
rustc 1.24.0-nightly (8e7a609e6 2018-01-04)
binary: rustc
commit-hash: 8e7a609e635b728eba65d471c985ab462dc4cfc7
commit-date: 2018-01-04
host: x86_64-apple-darwin
release: 1.24.0-nightly
LLVM version: 4.0
```
Repository: rust
Issue: Putting `#![feature(…)]` in a module `.rs` file is silently ignored
Labels: C-enhancement,A-diagnostics,T-compiler

Putting `#![feature(…)]` in a mod is silently ignored.

I tried this code (minimized version):

https://github.com/nelhage/feature-in-mod

I'm writing some toy Rust code that needs to perform pattern-matching over ASTs (that use `Box` to reference children), and wanted to use `box` patterns.  On advice of https://doc.rust-lang.org/1.14.0/book/box-syntax-and-patterns.html I added `#![feature(box_patterns)]` to the top of my `.rs` file (which is a `mod` inside the larger executable).

I expected to see this happen: Either:
- The `feature()` directive would work and I would get access to the feature
- The `feature()` directive would yield an error

Instead, this happened:
The `feature()` directive had no observable effect at all; `cargo build` output did not change after adding the line, either to show a new error or to suppress the "box pattern syntax is experimental" error.

## Meta

`rustc --version --verbose`:
```
rustc 1.25.0 (84203cac6 2018-03-25)
binary: rustc
commit-hash: 84203cac67e65ca8640b8392348411098c856985
commit-date: 2018-03-25
host: x86_64-unknown-linux-gnu
release: 1.25.0
LLVM version: 6.0
```
Repository: react
Issue: Unexpected warning when hydrating with portal and SSR
Labels: Type: Bug,Difficulty: medium

**Do you want to request a *feature* or report a *bug*?**

*bug*

**What is the current behavior?**

Given the following (simplified) snippet:

```jsx
class HoverMenu extends React.Component {
  render() {
    if (typeof document === 'undefined') return null
    const root = document.getElementById('root')
    return ReactDOM.createPortal(<div>Hello World</div>, root)
  }
}

class Para extends React.Component {
  render() {
    return (
      <span>
        Some Text
        <HoverMenu />
      </span>
    )
  }
} 
```

where `div#root` is a valid `div` that exists, the following error is shown when hydrating after SSR:

`Warning: Expected server HTML to contain a matching <div> in <span>`

The warning goes away if I update the definition of `HoverMenu` to:

```jsx
class HoverMenu extends React.Component {
  componentDidMount() {
    this.setState({ isActive: true })
  }
  render() {
    const { isActive} = this.state
    if (!isActive) return null
    const root = document.getElementById('root')
    return ReactDOM.createPortal(<div>Hello World</div>, root)
  }
}
```

I'd prefer not to do that because of the double rendering caused by `setState` in `componentDidMount`.

I don't quite understand what that error is telling me. No `<div />` is rendered server-side in either case. The error is particularly confusing, as the `HoverMenu` DOM `div` is not even rendered inside a DOM `span`. (I wonder if this is happening because `HoverMenu` is nested inside a React `span`.)

**What is the expected behavior?**

No error is thrown. Or, at least that the error message is clearer.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

Chrome 65
React 16.2
(SSR through Next 5.1)
Repository: flutter
Issue: RenderFilter to change the brightness/contrast of all child widgets.
Labels: c: new feature,framework,P3,team-framework,triaged-framework

## feature request.

RenderFilter to change the brightness/contrast of all child widgets.
Repository: vscode
Issue: Allow webviews to be shown in modal windows
Labels: feature-request,api,webview

It would be very helpful if extension writers could show a popup/modal window with various kinds of graphical options (e.g: create file from list, with a preview of various file types).

In fact there is already something like that (the built-in issue report window), but I'd prefer more flexibility by either allowing more control types in the dialog (like icon views, treeviews etc.) or make the entire content a webview.

Thanks
Repository: go
Issue: x/net/dns/dnsmessage: cannot parse mDNS SRV records
Labels: NeedsInvestigation

DNS message compression was disabled SRV Target fields in golang/go#10622 / https://golang.org/cl/100055 (as per [RFC 2782](https://tools.ietf.org/html/rfc2782#page-4)).

However, compression is explicitly allowed for the MDNS SRV target field ([RFC 6762 Sec 18.14](https://tools.ietf.org/html/rfc6762#section-18.14)):

> Unicast DNS does not allow name compression for the target host in an SRV record, [...] all Multicast DNS implementations are REQUIRED to decode compressed SRV records correctly.

Attempting to decode a Chromecast MDNS SRV record with `dnsmessage.Message.Unpack` now fails with the error:

> unpacking Additional: SRV record: Target: compressed name in SRV resource data

Compression support for DNS SRV target fields is necessary to support MDNS. Please consider:
* adding an option to allow compression/decompression, or
* reverting the earlier change.

Cc @mdempsky @iangudger
Repository: pytorch
Issue: [caffe2] benchmark performance for different operators 
Labels: caffe2

The environment of server is the following:
- Framework:  Caffe2
- OS: Centos-7.3.1611
- CUDA/cuDNN version: CUDA-8.0(cudnn-6.0)
- GPU: Tesla K80
- GCC version: gcc-4.8
- CMake version: cmake3

I want to test the performance on different convolution and fully-connected operators. But I got a rather ridiculous result, where different convolution operators may have great difference performance among each other.
I follow the method from the `caffe2/python/convnet_benchmarks.py` file.  What I did is to build a model net which contains only one operator, such as ConvOp operator, for obtaining performance. Now 
the result is the following:

> ======begin** EigenConvOp(CPU)benchmark=====================
> Starting benchmark.
> Running warmup runs.
> Main runs.
> Main run finished. Microseconds per iter: 21989.7. Iters per second: 45.4759
> =======end EigenConvOp(CPU) benchmark=======================
> 
> 
> =======begin ConvOp(CPU) benchmark=========================
> Starting benchmark.
> Running warmup runs.
> Main runs.
> Main run finished. Microseconds per iter: 426.187. Iters per second: 2346.39
> =======end ConvOp(CPU) benchmark==========================
> 
> 
> =======begin MKLDNNConvOp(CPU) benchmark==================
> I0415 21:44:07.254658 23478 operator.cc:165] Engine MKLDNN is not available for operator Conv.
> Starting benchmark.
> Running warmup runs.
> Main runs.
> Main run finished. Microseconds per iter: 426.828. Iters per second: 2342.86
> =======begin MKLDNNConvOp(CPU) benchmark===================
> 

 The `EigenConvOp` is too slow and the time of it  50 times than others. I think the result is wrong and I guess there are some problems on  `workspace.BenchmarkNet` method. 
 When I look the  `net_dag.cc:DAGNetBase::TEST_Benchmark` method,  I found everything was ok.
Anyone has a effective method to benchmark different operator performance?
Repository: rust
Issue: Writing Eq::eq produces an unhelpful diagnostic  (`std::cmp::Eq` cannot be made into an object)
Labels: C-enhancement,A-diagnostics,A-trait-system,T-compiler,D-confusing

```rust
fn hi() -> bool {
    Eq::eq(&(), &())
}
```

```
   Compiling playground v0.0.1 (file:///playground)
error[E0038]: the trait `std::cmp::Eq` cannot be made into an object
 --> src/main.rs:3:5
  |
3 |     Eq::eq(&(), &())
  |     ^^^^^^ the trait `std::cmp::Eq` cannot be made into an object
  |
  = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses

error: aborting due to previous error
```

I stared at this for a moment in pure disbelief... and then once I woke up a bit more, I remembered that `eq` is actually on the `PartialEq` trait (and so what I wrote is not interpreted as `<_ as Eq>::eq`, but rather as `<Eq>::eq`).