sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vue
Issue: VNode.componentInstance is undefined when rendered by a functional component
Labels: regression

### Version
2.5.17-beta.0
2.5.16

### Reproduction link
[https://codepen.io/anon/pen/rKwWXq?editors=1010](https://codepen.io/anon/pen/rKwWXq?editors=1010)

### Steps to reproduce
Open the console

### What is expected?
An instance of `MyComponent` should be logged

### What is actually happening?
`undefined` is logged

---
This worked in 2.5.15
It also works if you change `RootComponent` to be non-functional:
```js
const content = h(MyComponent, {}, this.slots.default)
```
I'm guessing this was caused by 62a922e8, `cloneVNode` doesn't include that property. 

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: go
Issue: cmd/compile: merge sequential memory moves into bigger memory moves
Labels: Performance,NeedsInvestigation,compiler/runtime

## The issue

Go tip compiles the following code into the following assembly:

```go
func fff(s string) int {
        return strings.IndexByte(s, ' ')
}
```

```asm
EXT fff(SB)
func fff(s string) int {
  0x50f060              64488b0c25f8ffffff      MOVQ FS:0xfffffff8, CX
  0x50f069              483b6110                CMPQ 0x10(CX), SP
  0x50f06d              763f                    JBE 0x50f0ae
  0x50f06f              4883ec28                SUBQ $0x28, SP
  0x50f073              48896c2420              MOVQ BP, 0x20(SP)
  0x50f078              488d6c2420              LEAQ 0x20(SP), BP
        return strings.IndexByte(s, ' ')
  0x50f07d              488b442430              MOVQ 0x30(SP), AX
  0x50f082              48890424                MOVQ AX, 0(SP)
  0x50f086              488b442438              MOVQ 0x38(SP), AX
  0x50f08b              4889442408              MOVQ AX, 0x8(SP)
  0x50f090              c644241020              MOVB $0x20, 0x10(SP)
  0x50f095              e8b635efff              CALL strings.IndexByte(SB)
  0x50f09a              488b442418              MOVQ 0x18(SP), AX
  0x50f09f              4889442440              MOVQ AX, 0x40(SP)
  0x50f0a4              488b6c2420              MOVQ 0x20(SP), BP
  0x50f0a9              4883c428                ADDQ $0x28, SP
  0x50f0ad              c3                      RET
func fff(s string) int {
  0x50f0ae              e85d7df4ff              CALL runtime.morestack_noctxt(SB)
  0x50f0b3              ebab                    JMP fff(SB)
```

The assembly copies sequential stack arguments from `fff` to `IndexByte` using the following instructions:
```asm
  0x50f07d              488b442430              MOVQ 0x30(SP), AX
  0x50f082              48890424                MOVQ AX, 0(SP)
  0x50f086              488b442438              MOVQ 0x38(SP), AX
  0x50f08b              4889442408              MOVQ AX, 0x8(SP)
```

These instructions may be substituted by shorter (and, probably, faster) assembly:
```asm
MOVO 0x30(SP), Xn
MOVO Xn, 0(SP)
```

## Solution

Add the corresponding arch-specific rewrite rules for merging sequential memory moves into bigger memory moves

cc'ing @randall77 and @TocarIP .
Repository: neovim
Issue: Custom text objects (or: syntax group as text object)
Labels: enhancement,needs:design,syntax

Hello,

I know this somewhat planned https://www.reddit.com/r/neovim/comments/2zm7s1/what_neovim_feature_will_do_you_get_the_most/cpl2t36

But I wanted to start discussions and possible design for this.

I am pretty sure this will be hugely inspired by https://github.com/kana/vim-textobj-user and projects based on it.

Design proposed by deleted user https://github.com/wellle/targets.vim/issues/14#issuecomment-68344944

**Here are some useful links**
http://vim.wikia.com/wiki/Creating_new_text_objects
http://vim.wikia.com/wiki/Indent_text_object
https://github.com/inkarkat/vim-CountJump
https://github.com/kana/vim-textobj-user/wiki

**Example of projects that will definitely benefit from unified text objects interface**
https://github.com/tpope/vim-surround
https://github.com/wellle/targets.vim
https://github.com/bkad/CamelCaseMotion
https://github.com/tweekmonster/braceless.vim

What I personally would like to see, is ability to have text-objects based on filetype and very easy interface of defining new ones.
Repository: pytorch
Issue: batchnorm2d  track_running_stats
Labels: module: serialization,triaged

when I load a pretrained model, Runtime error occurred:  Missing key(s) in state_dict: bn.num_batches_tracked in every BatchNorm2d layer
Repository: go
Issue: cmd/go: allow forcing tags on/off during go mod vendor, tidy
Labels: NeedsDecision,modules

In https://golang.org/cl/117258 the "vendor ALL" was introduced to include all files when walking the source tree, except for ignore build tags. This is great.

In https://golang.org/cl/118317 the command introduces flags for "mod -fix" and "mod -sync" (but waits for another CL to implement them). These flags use the knowledge of complete source tree (when trimming or adding requirements) to operate.

Lastly, it is important to note that the "go.mod" exclude directive only operates on the current module. This is good and to the benefit of this proposal.

This proposal adds two things: 
 * Add the ability to interpret an exclude directive as a tag.
 * Use the list of excluded tags in certain operations, such as "mod -vendor", "mod -sync", and "mod -fix", that operate over the entire source tree. These commands would operate as normal in the "ALL" traversal mode, but also ignore the excluded tags as defined in the previous point.

This would be used when the entire source tree (ALL) contains irrelevant platforms to the direct user of the module (common examples would be "exclude appengine" and "exclude solaris". Because exclude directives are ignored by other modules, they do not define limits of the module's use. In addition, these exclude tags are not used when running "build" or "install".

There are two optional features of this proposal as well, but not intrinsic to the base proposal:
 * Allow excluding test as a tag: use "exclude test" to ignore dependencies in "*_test.go" files.
 * Allow exclude negation: "exclude !windows".

The implementation in govendor supports these cases here:
https://github.com/kardianos/govendor/blob/master/context/tags.go

Two ways to specify tags would be to call any "exclude" that has no "/" a tag. Another way would be to prefix the tag with a "tag:".

/cc @rsc @dlsniper @bcmills
Repository: pytorch
Issue: Use CMAKE_<LANG>_COMPILER_LAUNCHER
Labels: module: build,triaged

Moving more parts of the build into CMake we should use

- CMAKE_C_COMPILER_LAUNCHER (since CMake 3.4)
- CMAKE_CXX_COMPILER_LAUNCHER (since CMake 3.4)
- CMAKE_CUDA_COMPILER_LAUNCHER (since CMake 3.10)

To transparently use ccache in development. Latest ccache (version 3.4) includes working support for nvcc.

cc @orionr
Repository: go
Issue: net: SplitHostPort errors if no port is specified, but not if input ends with a trailing ":"
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?

All

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

All

### What did you do?

Repro case:
https://play.golang.org/p/etsLIZv_Oz8

### What did you expect to see?

An error due to improper "host:port" syntax.

### What did you see instead?

An empty port in the result and no error.
Repository: rust
Issue: Tracking issue for the #[alloc_error_handler] attribute (for no_std + liballoc)
Labels: A-allocators,T-lang,T-libs-api,B-unstable,C-tracking-issue,WG-embedded,finished-final-comment-period,disposition-close,Libs-Tracked,S-tracking-design-concerns,S-tracking-needs-summary

This attribute is mandatory when using the `alloc` crate without the `std` crate. It is used like this:

```rust
#[alloc_error_handler]
fn foo(_: core::alloc::Layout) -> ! {
    // …
}
```

Implementation PR: https://github.com/rust-lang/rust/pull/52191

## Blocking issues

* [ ] #83430
* [ ] https://github.com/rust-lang/unsafe-code-guidelines/issues/506
* [ ] https://github.com/rust-lang/rust/issues/134225
* [ ] https://github.com/rust-lang/rust/issues/134234

## Original issue:

----

In a `no_std` program or staticlib, linking to the `alloc` crate may cause this error:

```
error: language item required, but not found: `oom`
```

This is fixed by providing the `oom` lang item, which is is normally provided by the `std` crate (where it calls a dynamically-settable hook https://github.com/rust-lang/rust/issues/51245, then aborts). This is called by `alloc::alloc::handle_alloc_error` (which is called by `Vec` and others on memory allocation failure).

```rust
#![feature(lang_items)]

#[lang = "oom"]
extern fn foo(_: core::alloc::Layout) -> ! {
    // example implementation based on libc
    extern "C" { fn abort() -> !; }
    unsafe { abort() }
}
```

However, defining a lang item is an unstable feature.

Possible solutions include:

1. Add and stabilize a dedicated attribute similar to [the `#[panic_implementation]` attribute](https://rust-lang.github.io/rfcs/2070-panic-implementation.html#panic_implementation):

  ```rust
  #[alloc_error_handler]
  fn foo(_: core::alloc::Layout) -> ! {
      // …
  }
  ```

  The downside is that this is one more mandatory hoop to jump through for `no_std` program that would have been fine with a default hook that aborts.

2. ~~Move `std`’s dynamically-settable hook into `alloc`: https://github.com/rust-lang/rust/pull/51607. The downside is some mandatory space overhead.~~
Repository: node
Issue: readline with /dev/tty: echos and doesn't close
Labels: readline,tty

* **Version**: v10.2.1
* **Platform**: Linux and macOS
* **Subsystem**: readline

The use case is that a node script is being run from a piped bash script and so `process.stdin` is the pipe and `/dev/tty` must be used explicitly to get user input.

```js
var readline = require('readline');
var input = require('fs').createReadStream('/dev/tty');
var rl = readline.createInterface({
  input: input
, output: process.stdout
//, terminal: false
});
rl.question("This is the prompt: ", function (response) {
  console.log("This is the response:", response);
  rl.close();
  // If I don't close the input explicitly, it stays open.
  input.close();
});
```

Output:

```
This is the prompt: yay
yay
This is the response: yay
```

Uncommenting `terminal: false` solves the issue of echoing, but creates a new problem in that it no longer treats `stdout` as a proper terminal.

Past issues that appear to be similar: https://github.com/nodejs/node/issues/7965 https://github.com/nodejs/node-v0.x-archive/issues/7101 https://stackoverflow.com/questions/24661774/createinterface-prints-double-in-terminal
Repository: pytorch
Issue: [caffe2] Why the GPU memory consumption has no change after enable optimize_gradient_memory?
Labels: caffe2

## Issue description
When I ran the file of 'resnet50_trainer.py' in caffe2/python/examples, I found that the GPU memory consumption has no change whether I enable the property of 'optimize_gradient_memory'. I would like to ask what is the reason. The input I use 'null'. Other parameters are default. Thanks.

## Code example
optimize_gradient_memory=True

## System Info
- Caffe2,
- How you installed? From source.
- Build command you used (if compiling from source): sudo make install -j32
- OS: Ubuntu 16.04
- CUDA/cuDNN version: 8.0 / 5.1
- GCC version (if compiling from source):5.4
Repository: go
Issue: crypto: document which cipher.Block implementations are safe for concurrent use
Labels: Documentation,help wanted,NeedsFix

Many of them are, but since it's undocumented it might change from one architecture to the next.

This came up in https://go-review.googlesource.com/c/crypto/+/118535 because x/crypto/xts effectively assumes they all are.
Repository: pytorch
Issue: [JIT] Generalize checkTrace() to also compare gradients of parameters, not just inputs
Labels: oncall: jit

Right now `checkTrace()` in test_jit.py only checks gradients for inputs, but does not check gradients for parameters on a traced module. We should generalize this so that we can pass in regular modules and test them
Repository: vscode
Issue: Add DecorationRangeBehavior.Word
Labels: feature-request,api,editor-textbuffer

From #50779

**Problem**
Using decorators, a common pattern is that you want an decoration that applies to a given whole word. None of the current `DecorationRangeBehavior` values handle this well. `Open` will always expand the decorator even if you type non-word characters, while `Close` never expands the decorator

**Proposal**
Add a `DecorationRangeBehavior.Word` setting or similar that would expand the decoration if the edit extends the word at the edges of the decoration. Typing a word character would expand the decorator while typing space would not
Repository: pytorch
Issue: Does the caffe2 have the depthwise separable convolution oprater  ?
Labels: caffe2

Rencently, I need depthwise separable convolution for my project in order to reduce the parameters.
Does the caffe2 have the depthwise separable convolution oprater  ?
Repository: rust
Issue: NLL Regression: Conditional control flow returning from functions no longer works
Labels: A-borrow-checker,T-compiler,A-NLL,C-bug,fixed-by-polonius

If a match expression has one arm that returns a borrowed matched value from its pattern, and another arm that doesn't borrow directly from a matched value but instead borrows the variable the matched value borrows and returns it, compilation fails if the match statement is returning from a function, but not if it's assigning to a variable. This used to work (and iirc one of the goals of NLLs was to make this pattern work), but it broke between `nightly-2018-05-17` and `nightly-2018-05-19`. A nightly for May 18th doesn't appear to exist.

Examples:

This doesn't work now:
```rust
// Doesn't compile on nightly-2018-05-19 and later, but does on nightly-2018-05-17.
fn borrow(o: &mut Option<i32>) -> Option<&mut i32> {
    match o.as_mut() {
        Some(i) => Some(i),
        None => o.as_mut()
    }
}
```

This is similar to the other code, but *does* work both before and after `nightly-2018-05-19`
```rust
fn main() {
    let mut o: Option<i32> = Some(1i32);

    // Compiles everywhere!
    let x = match o.as_mut() {
        Some(i) => Some(i),
        None => o.as_mut()
    };
}
```
Repository: pytorch
Issue: An error occurred while creating a new notebook. 
Labels: caffe2

I following [Caffe2 Tutorials Overview](https://caffe2.ai/docs/tutorials.html#null__new-to-deep-learning)

When I  run` ./start_ipython_notebook.sh` ，Jupyter interface pops up.
I am trying to create a new python file，Error message appears as follows.
```
An error occurred while creating a new notebook.
Unexpected error while running post hook save: [Errno 2] No such file or directory.
```
But I run `jupyter notebook` in other directories without this problem.
Repository: flutter
Issue: InputDecorator lacks support for material theming
Labels: c: new feature,framework,f: material design,P2,team-design,triaged-design

When using a material input widget, and adding an icon to it, whether it is suffix, prefix or the leading icon, there's no way of showing that icon with a custom icon theme, because in the code the color is fixed:
```dart
  Color _getDefaultIconColor(ThemeData themeData) {
    if (!decoration.enabled)
      return themeData.disabledColor;

    switch (themeData.brightness) {
      case Brightness.dark:
        return Colors.white70;
      case Brightness.light:
        return Colors.black45;
      default:
        return themeData.iconTheme.color;
    }
  }
```
This comes from [input_decorator.dart](https://github.com/flutter/flutter/blob/48f4ff6ddab5520a6a761f4e6079c64000c16d29/packages/flutter/lib/src/material/input_decorator.dart#L1534)
So, if the theme brightness is dark or light (and it can not be of any other value), the color of the icon on inactive state of the input are always `Colors.white70` or `Colors.black45`, and the default case in the switch will never be taken.
There's a solution for this, which is setting the color in the `Icon` widget directly, but that makes the icon have the same color always, so, to have it changed to primary color when the input gets focused I would have to listen to the focus node of the input and change it from outside, but I think there's no need for this, mainly because it will rerender the input decorator from the state of the input parent widget when it can be changed inside the input making the parent stateless.
Repository: react
Issue: Allow Portals to be used for Reparenting
Labels: Type: Feature Request

**Do you want to request a *feature* or report a *bug*?**

feature

**What is the current behavior?**

[Reparenting](https://github.com/facebook/react/issues/3965) is an unsolved issues of React(DOM). So far, it was possible to hack around the missing support for it by relying on unstable API (`unstable_renderSubtreeIntoContainer`) to render **and update** a subtree inside a different container. It's important to note that this API was using React's diffing algorithm so that, similar to `ReactDOM.render()`, it is possible to keep components mounted.

```js
ReactDOM.render(<Foo />, container);
// This won't get <Foo /> to be unmounted and mounted again:
ReactDOM.render(<Foo />, container);

ReactDOM.unstable_renderSubtreeIntoContainer(
  parentComponent,
  <Foo />,
  container
);
// This also won't get <Foo /> to be unmounted and mounted again, no matter if 
// we change parentComponent (and thus call it from a different parent):
ReactDOM.unstable_renderSubtreeIntoContainer(
  parentComponent,
  <Foo />,
  container
);
```

However this unstable API is [going to be deprecated soon](https://github.com/facebook/react/issues/10143) and recent features like the introduction of the new context API introduced [additional issues](https://github.com/facebook/react/issues/12493).

As an alternative to this unstable API, `ReactDOM.createPortal(children, container)` was introduced. However this API is unsuitable for the reparenting issue since it will always [create a new mount point](https://github.com/facebook/react/issues/10713) inside the `container` instead of applying the diffing _when called from a different parent_ (Check out this [CodeSandbox](https://codesandbox.io/s/91o7oovo54) where calling the portal from a different portal will cause the `<Leaf />` to have a new uuid). The reason for this is that we want multiple portals to be able to render inside the same `container` which makes perfect sense for more common use cases like popovers, etc.

Before we're going to remove `unstable_renderSubtreeIntoContainer`, I suggest we find a way to portal into a specific node instead of appending to it so that we can diff its contents instead (or implement a solution for #3965 although that seems to be more complicated), similar to `unstable_renderSubtreeIntoContainer`.
Repository: kubernetes
Issue: strategic patch doesn't keep order of duplicated elements in the list
Labels: kind/bug,priority/backlog,sig/api-machinery,help wanted,lifecycle/frozen,triage/accepted

/kind bug

**What happened**:
 given list with duplicated keys D1

```
mergingList:
 - name: D1
   value: URL1
 - name: A
   value: x
 - name: D1
   value: URL2
```

and a patch updating non-duplicated key A:
```
$setElementOrder/mergingList:
 - name: D1
 - name: A
 - name: D1
mergingList:
 - name: A
   value: z
```

it reorders keys:
```
mergingList: 
 - name: D1
   value: URL1
 - name: D1
   value: URL2
 - name: A
   value: z
```

**What you expected to happen**:

Order of duplicated keys stays the same
```
mergingList: 
 - name: D1
   value: URL1
 - name: A
   value: z
 - name: D1
   value: URL2
```

**How to reproduce it (as minimally and precisely as possible)**:

I created test-case which fails on release-1.10 and master: https://github.com/redbaron/kubernetes/commit/971c1b20e51dd2090a9fd585bafa18282c2984f5

**Anything else we need to know?**:

I am trying to find out why kubectl creates incorrect patch on apply. Although I can't reproduce it with a simple test case like in this ticket, it look related to it. On a real resource kubectl apply it reorders keys in generated patch, so it generates something like:

```
$setElementOrder/mergingList:
 - name: D1
 - name: A
 - name: D1
mergingList:
 - name: D1
   value: URL1
 - name: D1
   value: URL2
 - name: A
   value: z
```

which makes it an invalid patch as order of keys differs from order of values. This reordering might or might not be result of the same underneath bug.

/sig api-machinery
Repository: rust
Issue: Ironing out StepBy<Range>'s performance issues
Labels: I-slow,C-enhancement,T-libs-api

The behaviour of `<Range<_> as Iterator>::nth` has a slight mismatch with `StepBy` (or `Step` depending on your viewpoint) as [@scottmcm has found out](https://github.com/rust-lang/rust/issues/27741#issuecomment-385237631), resulting in sub-optimal performance.
On every iteration, the range has to first step forwards `n-1` times to get the next element and then advance again by 1.

I'm hoping we can improve `step_by` into a 100% zero-cost abstraction.

It seems like the performance issue is specific to `StepBy<Range>`. I'm thinking therefore that we could specialize `Iterator for StepBy<Range<I>>` such that it would use @scottmcm's suggested semantics. Like this:

```rust
impl<I> Iterator for StepBy<Range<I>>
where
    I: Step
{
    fn next(&mut self) -> Option<Self::Item> {
        self.first = false;
        if let Some(mut n) = self.start.add_usize(self.step+1) {
            if n < self.end {
                std::mem::swap(&mut self.start, &mut n);
                return Some(n);
            }
        }

        self.start = self.end.clone();
        None
    }
}
```

That also avoids the branch on a regular `next()`. I haven't looked at the other methods but that boolean in `StepBy` could possibly become superfluous. During construction of the `StepBy` adapter, the `size` in `.step_by(size)` is decremented and this specialization has to counter-add 1 every time but that should be optimized away if inlined.

If someone were to depend on side-effects in `Step::add_usize` (when the trait is stabilized), this pre-stepping would become weird. Same thing with a hypothetical `next_and_skip_ahead()`.

@scottmcm what do you think of this?
Repository: go
Issue: cmd/go: maybe show legacy tags in pseudoversions
Labels: NeedsDecision,modules

If you do 

	go get foo@tag

where tag is not a proper semver tag for foo, then vgo looks up tag, resolves the commit, finds the date on the commit, and records instead of tag a pseudo-version like

	v0.0.0-20180501123456-1234abcdef

I wonder if we should preserve the tag, so that the recorded version would be:

	v0.0.0-20180501123456-1234abcdef-tag

This would work for branch names and legacy semver tags too, of course, so that we could have:

	v0.0.0-20180501123456-1234abcdef-devbranch
	v0.0.0-20180501123456-1234abcdef-v17.0.0

These would just show a little bit more information when you list your dependencies in projects not using tagged releases (or at least vgo-compatible tagged releases in the case of the legacy v17).