sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vue
Issue: Vue warns about missing required prop that has a default value
Labels: discussion,improvement

### Version
2.5.13

### Reproduction link
[http://jsfiddle.net/df4Lnuw6/207/](http://jsfiddle.net/df4Lnuw6/207/)

### Steps to reproduce
Specify a required prop with a default value:

```js
Vue.component('comp', {
    template: '<div>{{ typeof x }} {{ x }}</div>',
    props: {
        x: {
            type: Number,
            required: true,
            default: 5,
        },
    },
});
```

Render the component without specifying a value for that prop:

```html
<comp></comp>
```

### What is expected?
The component should render the following without any prop validation errors:

```html
<div>number 5</div>
```

### What is actually happening?
The component renders OK, but warns about missing required prop `x`.

---
While it's true that prop `x` is not specified, since it has a default value, there should be no warning message.

What exactly does `required` check for? It appears that it checks two things:

1. The prop should be *provided*, as in at least `<comp :x="..."></comp>`.
2. The prop value should be non-null and non-undefined.

I think in the case where a required prop has a default value, (1) should be relaxed.

Otherwise, how can I enforce a prop to never be null while also providing a default value if the prop value was not provided?

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: TypeScript
Issue: Find All Reference from requiring file to module file works only if not default CommonJS exports
Labels: Bug,VS Code Tracked

_From @Hoishin on February 28, 2018 4:58_

> By "default CommonJS exports" I mean `module.exports = something`, rather than `module.exports.foo = something` or `module.exports = {foo: something}`

Might belong to https://github.com/Microsoft/vscode/issues/21507, but I thought it is a bit different.

- VSCode Version: 1.20.1
- OS Version: macOS High Sierra Version 10.13.3

Steps to Reproduce:

1. `module.exports` something
```js
const f = 1234;
module.exports = f;
```
2. `require` it
```js
const f = require('./above-file');
console.log(f);
```
3. The `f` in `console.log` doesn't show references across files in Find All References. You can find references across files if you Find All References from the module file.

However,
1. `module.exports.foo` something
```js
const f = 1234;
module.exports.foo = f;
```
2. `require` it
```js
const {foo} = require('./above-file');
console.log(foo);
```
3. The `foo` in `console.log` DOES show reference across files in Find All References. You can find references across files if you Find All References from the module file.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes


_Copied from original issue: Microsoft/vscode#44700_
Repository: rust
Issue: Variable name corrections should take type into account
Labels: C-enhancement,A-diagnostics,T-compiler,D-invalid-suggestion

I'm not sure whether this is feasible in all cases, but as far as possible, suggestions to rename variables that are typos should take the types of the suggestions into account.

Consider:
```rust
fn index(i: usize, a: &[i32]) -> i32 {
    a[j]
//    ^ did you mean `a`?
}
```
Here, `a` is clearly not a valid index for the slice (and we get an error if we attempt the suggestion), but it is suggested anyway. On the other hand, `i` clearly has the correct type and is a more sensible suggestion.

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":null}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: opencv
Issue: Zenodo DOI for OpenCV?
Labels: RFC

Quick question: for a project like OpenCV that's heavily used in an academic context, would it make sense to register a DOI at https://zenodo.org/ so that it can be cited properly in papers etc.?
Repository: opencv
Issue: vlc FTBFS with opencv-3.4.1
Labels: category: build/install,RFC

##### System information (version)
- OpenCV => 3.4.1
- Operating System / Platform => Linux
- Compiler => gcc-7-20180222 (a 7.3.1 snapshot)


<!-- your description -->
vlc-3.0.1 fails to build against  opencv-3.4.1, because the C compiler produces and error at line 485 of /usr/include/opencv2/core/cvdef.h. The error message is:
```
           /usr/include/opencv2/core/cvdef.h:485:1: error: unknown type name 'namespace'  
```

This is because the C compiler is trying to compile C++ code.

##### Steps to reproduce
1. build and install opencv-3.4.1
2. configure vlc-3.0.1 to include opencv and then run make

##### Proposed fix
The following patch to opencv allows the build of vlc to complete:

```.diff
--- opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h.orig	2018-02-28 10:16:45.000320632 +0000
+++ opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h	2018-02-28 10:34:30.852346927 +0000
@@ -454,6 +454,7 @@ Cv64suf;
 
 
 // Integer types portatibility
+#if defined __cplusplus
 #ifdef OPENCV_STDINT_HEADER
 #include OPENCV_STDINT_HEADER
 #else
@@ -494,6 +495,9 @@ typedef ::uint64_t uint64_t;
 }
 #endif
 #endif
+#else
+#include <stdint.h>
+#endif
 
 
 //! @}
```

With the patched opencv installed, I have also built the frei0r-plugin-1.6.0, gstreamer-plugins-bad-1.12.4 and LiVES-2.8.7, all of which use opencv (although I don't know whether they failed against an unpatched version)
Repository: flutter
Issue: '[!]' in flutter doctor looks too much like an error state
Labels: tool,t: flutter doctor,a: quality,P3,team-tool,triaged-tool


## Flutter Doctor
```
C:\>flutter doctor -v
[√] Flutter (on Microsoft Windows [Version 10.0.16299.248], locale en-US, channel beta)
    • Flutter version 0.1.4 at C:\flutter
    • Framework revision f914e701c5 (9 days ago), 2018-02-19 21:12:17 +0000
    • Engine revision 13cf22c284
    • Dart version 2.0.0-dev.27.0-flutter-0d5cf900b0

[√] Android toolchain - develop for Android devices (Android SDK 27.0.0)
    • Android SDK at C:\Users\zowhair\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.
```
Repository: node
Issue: Merge streams handling code for http2 streams & net.Socket
Labels: help wanted,net,http2

Hey :)

It would be great if we could unify all the code from `net` and `http2` that is only concerned with pushing data to/from the underlying stream, ideally into a common base class of `net.Socket` and `Http2Stream`, so that we could also maybe port some of the other native streams (zlib, fs) to using `StreamBase` on the native side & generally just share a lot of code.

This is probably not an *easy* task, and probably not doable in one pass, because the http2 and net implementations are always just *slightly* different, but if anybody wants to try to start working on this, feel free to reach out by commenting here.
Repository: create-react-app
Issue: Make launch editor a standalone package.
Labels: issue: proposal

The launchEditor module is super useful: https://github.com/facebook/create-react-app/blob/next/packages/react-dev-utils/launchEditor.js

I'd like to use it standalone, outside of create-react-app. Is there anyone willing to send a PR to make this a standalone package? :)
Repository: flutter
Issue: Support for progressive jpegs
Labels: c: new feature,engine,a: images,P2,team-engine,triaged-engine

I don't know if it is possible right now, but it would be great if flutter had the capabilities of decoding an image progressivly instead of baseline if the image supports it.
Repository: vscode
Issue: Support environment variables for paths in .code-workspace files
Labels: feature-request,workbench-multiroot

### Issue Type
Feature Request

### Description

I'm attempting to use `{ "path": "${env:APPDATA}/Code/User" }` in my workspace to be able to easily open settings.json and keybindings.json as raw files (the custom panels take up too much space and I rarely need them) and it appears variables are not substituted when loading the workspace file.

### VS Code Info

VS Code version: Code 1.20.1 (f88bbf9137d24d36d968ea6b2911786bfe103002, 2018-02-13T15:34:36.336Z)
OS version: Windows_NT x64 10.0.16299
Repository: godot
Issue: Project Settings : Autoload tab -- confusing layout, columns cut off, icon illegible
Labels: enhancement,topic:editor,usability

**Godot version:**
3.0.1

**OS/device including version:**
Windows 10 / Microsoft Surface Pro 4

**Issue description:**
3 usability issues in the Autoload dialog (see accompanying screenshot)

1) the input fields for node name and path are reversed from the order they appear in the table. Recommend keeping same order so user's mental model - established during input matches the table shown on-screen.

2) the 'Singleton' column is cut-off and the table columns don't appear to be adjustable.

3) the toggle icon for a node in the Singleton column is illegible - cannot tell whether on or off

**Steps to reproduce:**
1. open the settings dialog
2. click the autoload tab
3. add an autoload node

![godot_301_settings_autoload_dialog](https://user-images.githubusercontent.com/253436/36802313-d897901c-1cb4-11e8-9901-aabc8231d783.PNG)
Repository: rust
Issue: Compiliation aborted because it can not delete dep-graph.bin
Labels: T-compiler,A-incr-comp,C-bug

Probably not important, but I report it anyway.
See this travis log: https://travis-ci.org/rust-lang-nursery/rand/jobs/347348670

The first test command finishes successfully, but the second fails because one of the (leftover?) incremental compilation files can not be deleted (because it does not exist).

```
The command "cargo test --tests --no-default-features --features=alloc" exited with 0.
$ cargo test --all --features serde-1,log,nightly
   Compiling rand v0.4.2 (file:///home/travis/build/rust-lang-nursery/rand)
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/home/travis/build/rust-lang-nursery/rand/target/debug/incremental/rand-1tsi5gagblzct/s-eyqipa1yw1-8k3grx-working/dep-graph.bin`: No such file or directory (os error 2).
error: aborting due to previous error
error: Could not compile `rand`.
warning: build failed, waiting for other jobs to finish...
error: build failed
```
Repository: go
Issue: cmd/compile: tighten CFG as well as values
Labels: Performance,compiler/runtime

```go
func f(x int, b bool) int {
	if x < 0 {
		x *= -1
	}
	if b {
		return x
	}
	return 0
}
```

The compiled code for `f` matches the input closely: It checks `x < 0`, negates it if so, then checks b.

But we only need to check and modify x if b is true. The compiler should rewrite this code into:

```go
func f(x int, b bool) int {
	if b {
		if x < 0 {
			x *= -1
		}
		return x
	}
	return 0
}
```

This is similar to the tighten pass, but instead of operating on values, it should operate on subsections of the CFG. Similar to the tighten pass, it should avoid moving work into a loop.

Among other things, this would help avoid doing needless work when the return value of copy is unused; see https://go-review.googlesource.com/c/go/+/94596.

Marking 1.11 optimistically, although I have no plans to work on this myself.

cc @randall77 @dr2chase @cherrymui
Repository: flutter
Issue: `flutter channel foo` should have a option to upgrade first?
Labels: c: new feature,tool,P3,team-tool,triaged-tool

It's a bit silly that when I `flutter channel foo` it downloads all the artifacts for that version when I just plan to upgrade again immediately.  Would be nice to be able to skip that download and/or just switch and upgrade at the same time?
Repository: flutter
Issue: API Inconsistency: Some Animations use named parameters, some do not
Labels: framework,a: animation,c: API break,c: proposal,P2,team-framework,triaged-framework

Animations that combine 2 animations together have very different signatures for creating them:
```dart
TrainHoppingAnimation(this._currentTrain, this._nextTrain, { this.onSwitchedTrain }) // Unnamed
CompoundAnimation( { @required this.first, @required this.next } ) // Required named params
AnimationMean( { Animation<double> left, Animation<double> right } ) // Not required named, even though AnimationMean extends CompoundAnimation
AnimationMax(Animation<T> first, Animation<T> next) // Unnamed
```

We should clean up these APIs to all work the same way.  IMO I think the unnamed, required structure works well because it's more succinct and works better for the inheritance structure custom animations need to fit into:

 - When creating a new CompoundAnimation, having the constructor with only named parameters means that the dart analyzer doesn't complain when I create a subclass without a constructor
 - names like 'left' and 'right' don't really apply to how animations combine together.
 - names like 'first' and 'next' also don't apply very well in cases like the Mean, Max and Min animations.

I'm applying the docs - api label, as that seems most appropriate.
Repository: go
Issue: reflect: cannot call *T methods on addressable Values of type T
Labels: NeedsInvestigation,compiler/runtime

I would expect this program to work:

    package main

    import "reflect"

    type T int
    func (*T) M() {}

    func main() {
            var t T
            v := reflect.ValueOf(&t).Elem()
            v.MethodByName("M").Call(nil)
    }

Currently, it produces `panic: reflect: call of reflect.Value.Call on zero Value` panic, because `M` is not in the method set of `T` (only `*T`).

This seems overly strict to me. The Go spec allows calling `t.M()` where t is an addressable value of type T; it's just implicitly executed as `(&t).M()`. I would expect package reflect to handle this implicit dereference, but it does not.

For comparison, the spec also allows an implicit dereference to call value-receiver methods on pointer types, and package reflect *does* perform this implicit dereference.

/cc @ianlancetaylor @dsnet
Repository: kubernetes
Issue: kube-controller-manager: healthz should indicate that the garbage collector is running.
Labels: sig/api-machinery,lifecycle/frozen

If the GC gets stuck, controller manager needs to be restarted.

The GC should never get stuck, of course.

But right now, if it did, I think we'd have no way to know?
Repository: vscode
Issue: Overview ruler becomes redundant
Labels: feature-request,editor-scrollbar

<!-- Do you have a question? Please ask it on https://stackoverflow.com/questions/tagged/vscode. -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.20.1
- OS Version: Windows 10

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

1. Create a typescript file with 2000-3000+ lines of code/blank lines (the more lines the worse it gets), usually starts at around 1500 lines+.
2. Click to place your cursor in the editor half way down the file somewhere
3. Scroll the page so cursor is at very top of screen
4. Observe overview ruler on right hand side of editor and the 'blip' used to indicate location of the cursor is incorrect (not sure what you call these but I refer to them as blips in this issue) 

![image](https://user-images.githubusercontent.com/11023398/36825133-b7ea1e3c-1d6a-11e8-8487-fbfb15ee0d82.png)

This has caused me a few problems as its also used for search, error and warning blips. Often it will say the item is in my current view when it's not. The bigger my file the more out of sync it is.

I'm guessing there's some arbitrary limit to the height of the box used to indicate what the current view is showing and I can understand that there would need to be some limit as it may be hard to view things correctly the more lines of code you add.

I propose a few solutions below, not sure which is best:

1) When you reach a point where you cant reduce the blip height and/or window preview height in ruler then don't show anything - This is the quickest and simplest solution but I believe it's better than showing incorrect data. Maybe need someway to show that its being disabled so users don't report another bug saying its not showing :)

2) Put the scroll bar in its own vertical container without the blips and preview and then show 2 or more vertical rulers to the right of it so as you scroll up and down the preview window will show in one of the vertical rulers (could be split when crossing between overview rulers), when everything fits on the one then the scroll bar and overview are combined as they are now, when you make the file bigger you would have two vertical overview rulers, then three up to some limit. 

3) Keep it as it is now with one vertical ruler but only show the preview for x lines of code below and above current view pos. This means when you're half way down a 5000 line file the ruler may only show lines 1500 - 4000, by doing this you can keep the heights of the graphics at a reasonable value, need to show somehow at the top/bottom of the ruler if lines are being hidden.

Keep up the good work!
Repository: flutter
Issue: Make it easy to override Scrollable's gesture detectors, e.g. to enable scale+scroll
Labels: c: new feature,framework,f: scrolling,f: gestures,customer: crowd,P3,team-framework,triaged-framework

Currently if you want a Scrollable that can both be scaled and scrolled, you have to have separate Scale and VerticalDrag gesture detectors, the scale in your code, and the vertical drag in the Scrollable. This makes the UI ugly, because it means the user has to know which operation they are doing when they begin, and if they move one finger as they're putting the second down, it'll trigger the scroll instead of the scale.

Another use case is two orthogonal Scrollables sharing a single Pan gesture detector.

We should make it easy to override how Scrollable listens to gestures.
Repository: pytorch
Issue: torch.jit.trace(network, data) fails if data is an OrderedDict
Labels: oncall: jit,module: bootcamp,days

My network takes a bunch of inputs, and I was keeping them in an ordereddict so that I could keep track of what they were. When I tried to run TensorboardX on my network, it fails with:

```Traceback (most recent call last):
  File "tensorboard.py", line 63, in <module>
    main()
  File "tensorboard.py", line 60, in main
    writer.add_graph(network, data)
  File "/usr/local/lib/python2.7/dist-packages/tensorboardX/writer.py", line 400, in add_graph
    self.file_writer.add_graph(graph(model, input_to_model, verbose))
  File "/usr/local/lib/python2.7/dist-packages/tensorboardX/graph.py", line 52, in graph
    trace, _ = torch.jit.trace(model, args)
  File "/usr/local/lib/python2.7/dist-packages/torch/jit/__init__.py", line 241, in trace
    return TracedModule(f, nderivs=nderivs)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 357, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/torch/jit/__init__.py", line 266, in forward
    in_vars, in_struct = _flatten((args, tuple(kw_items)), self.state_dict(keep_vars=True).values())
  File "/usr/local/lib/python2.7/dist-packages/torch/jit/__init__.py", line 568, in _flatten
    obj_vars = tuple(itertools.chain(function._iter_variables(obj), params))
  File "/usr/local/lib/python2.7/dist-packages/torch/autograd/function.py", line 277, in _iter
    for var in _iter(o):
  File "/usr/local/lib/python2.7/dist-packages/torch/autograd/function.py", line 277, in _iter
    for var in _iter(o):
  File "/usr/local/lib/python2.7/dist-packages/torch/autograd/function.py", line 281, in _iter
    "an input object of type " + torch.typename(obj))
ValueError: NestedIOFunction doesn't know how to process an input object of type collections.OrderedDict
```

Digging through, I found that the problem was in torch.jit.trace, tho, I'm less confident about trying to fix it.

I'm running Linux, 4.4.0-112-generic, pytorch 0.3.1 on python 2.7.12 and I installed it with pip. (I don't think the CUDA information is relevant, because this fails on my laptop which doesn't have a GPU.)

I'm attaching two files: One called "works.py" which works, if instead of using an OrderedDict, I use a list.
and one called "fails.py" which fails, since it uses an OrderedDict.

Thanks..
[demo.zip](https://github.com/pytorch/pytorch/files/1770599/demo.zip)




cc @gmagogsfm
Repository: angular
Issue: feat: `::part` support in Angular's Emulated CSS parser 
Labels: feature,area: core,core: CSS encapsulation,feature: under consideration

## 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)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[x ] 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
Angular has no real replacement for the deprecated /deep/ (aka >>> and ::ng-deep) which are all marked as deprecated.  


## Expected behavior
Angular should be at the forefront of web technology and provide today the technologies of tomorrow.
::part and ::theme provide a controlled and safe way to style components from outside without allowing abuse to the encapsulation that Shadow DOM is meant to provide.
[Explaining article](https://meowni.ca/posts/part-theme-explainer/)
[Spec Draft](https://tabatkins.github.io/specs/css-shadow-parts/#intro)

I would believe that such declared parts can be treated almost like @Input variables that trigger change detection. Although declared on the @Component style part they will be compiled into the .ngstyle and be incoparated in the view. when another component uses the ::part annotated component the styles are propagated. 


## What is the motivation / use case for changing the behavior?
a component needs to allow external users to style its inner parts, let say a dropdown needs to have it's button, drop-down list & selection hover styleable.

Angular version: 5.2.6

Browser: Any, it should compile away to allow browsers to support it today.