sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: OnMemoryPressure is unreliable on Android
Labels: engine,c: performance,perf: memory,P3,team-engine,triaged-engine

## Steps to Reproduce

1. Create several cache's that load large amounts of data.
2. Create a handler for the OnMemoryPressure to clear the caches
3. Suspend application
4. Use another application (say: https://play.google.com/store/apps/details?id=me.empirical.android.application.fillmemory)
to fill memory

## Issue:
OnMemoryPressure is frequently triggered to late and the Flutter application is killed before  it can clear the cache or even sometimes while it is clearing the cache.

## Relevant source:
This is the handlers that are captured from the Activity:
https://github.com/flutter/engine/blob/365627889410bbab8044528ad8e889881287a112/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java#L266-L275

Both of them call:
https://github.com/flutter/engine/blob/5ce89a0f3deeb3b591a30de71351e3ec0120b4c5/shell/platform/android/io/flutter/view/FlutterView.java#L276-L280
Which sends a **Async** Message over to the Dart side AND then continues running.

The source of the call inside the Android OSP is:
https://github.com/aosp-mirror/platform_frameworks_base/blob/880839d2d10d0a3468a29b9ea20007159f014444/core/java/android/app/ActivityThread.java#L5311-L5331
If you notice right after it calls onLowMemory; on line 5331 it calls GC on the memory...   This is so that is can then reclaim any memory freed.

Well, since it calls the kernel GC BEFORE we (the Flutter app) can actually cleanup; this leaves the Flutter application in a state where it now is considered for Termination because the GC happens more than likely before we can even sync the OnMemoryPressure event to our app.      This depends on what is going on in the OS; if their are lots of apps running; the odds of our app surviving are improved; if there are not very many apps running and we are using a lot of memory; the odds of the OS terminating our Flutter app; because we are still using all that memory after a GC is greatly enhanced.

This would be fixed by Sync message (https://github.com/flutter/engine/pull/4358) support; since the return from the "OnTrimMemory" and "OnLowMemory" is what actually triggers the GC.   If this even was Sync, we could clear our dart memory; return, and return to the OS which would then GC and consider our Flutter application a good citizen.



cc: @Hixie
Repository: pytorch
Issue: [feature request] Callback on learning rate drop in torch.optim.lr_scheduler.ReduceLROnPlateau
Labels: todo,module: optimizer,triaged

Currently [torch.optim.lr_scheduler.ReduceLROnPlateau](http://pytorch.org/docs/master/optim.html#torch.optim.lr_scheduler.ReduceLROnPlateau) has the option to print a fixed message once the learning rate drops.

I propose that either this be replaced, or modified in some way so that we can run an arbitrary closure / callback at each drop.

This could be useful for things such as logging which epochs the drop happened at, for terminating after a given number of drops, for taking a model snapshot, etc.

cc @vincentqb
Repository: scrcpy
Issue: Add density controls
Labels: feature request

While it's nice that I can set `adb shell wm density XXX` before running scrcpy, it would be nicer to have this while using it, eg. CTRL-OP or something that increments density live (if it's possible).

If not live, maybe a start argument, that first sets density and then runs scrcpy.
Repository: pytorch
Issue: [feature request] scalar input to scatter_add_ like scatter_
Labels: triaged,function request,module: scatter & gather ops

Note that #5659 only fix the bug reported in #5405 (thanks for @zou3519 pointing out, I open a new issue about that). Do we need scalar input to `scatter_add_`?
I think the implementation may be similar to `scatter_` where it broadcast the scalar based on `dim` and `index`.
Repository: vue
Issue: Globally registered component naming converts to kebap-case when PascalCase is used
Labels: improvement

### Version
2.5.15

### Steps to reproduce
Currently all globally registered components automatically convert their name to  kebap-case. 

```js
// register component
Vue.component('RouterLink', {...})

// get component fails, returns undefined
Vue.component('RouterLink')

// get component works, returns the component
Vue.component('router-link')
```

It would be nice to have the registered components also available as with their PascalCase naming. This would also mean that you could use the PascalCase naming in `.vue` templates, which is a nice way to quickly distinguish Vue components from HTML elements. Right now its is not possible, and to make it work this code has to be used:

```html
<template>

  <RouterLink :to="link">Link</RouterLink>

</template>
<script>
{
    components: {
       RouterLink: Vue.component('router-link')
   }
}
</script>
```


### What is expected?
Access globally registered components with their PascalCase naming if it was provided on register function call.

### What is actually happening?
For now the component naming always converts to kebap-case.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: react
Issue: React onBlur events not firing during unmount
Labels: Type: Bug,Component: DOM,Type: Needs Investigation

**Do you want to request a *feature* or report a *bug*?**

bug

**What is the current behavior?**

If a DOM element rendered by a React component has focus, and the React component unmounts, the React `onBlur` event does not fire on parent DOM elements.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**

https://codesandbox.io/s/134wrzy6q7

**What is the expected behavior?**

I would expect that, just like the browser fires a `focusout` event when removing a DOM node, React would fire an `onBlur` events up to parent nodes when the focused node is removed / unmounted.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

React: 16.2
Mac OS X: 10.13.2
Browser: Chrome 67.0.3366.0, Chrome 64.0.3282.186

No idea if this worked in earlier versions of React.
Repository: godot
Issue: Input.is_action_just_released() not working with left/right shift and neo2 keyboard layout
Labels: bug,platform:linuxbsd,topic:core,topic:input

**Godot version:**
3.0.2 official


**OS/device including version:**
Linux, Debian Stretch


**Issue description:**
Input.is_action_just_released() is not working for SHIFT if using neo 2 keyboard layout
tested successfully with standard "qwert" and "dvorak" layout, only "neo2" gives problems
Repository: rust
Issue: Collecting into a Result<Vec<_>> doesn't reserve the capacity in advance
Labels: I-slow,C-enhancement,T-libs,C-optimization

Couldn't find an issue for this and don't know if it counts but filing anyway.

----

If you have 

    fn foo(s: &[i8]) -> Vec<u8> {
        s.iter()
        .map(|&x| x as u8)
        .collect()
    }

the `SpecExtend` machinery ensures that the vector has `s.len()` space reserved in advance. However if you change it to return a result


    fn foo(s: &[i8]) -> Result<Vec<u8>> {
        s.iter()
        .map(|&x| if x < 0 { Err(...) } else { Ok(x as u8) } )
        .collect()
    }

then (based on examining the LLVM IR and heaptracker's "Temporary" measurements) that optimization has quietly been lost.

This is technically correct in the sense that the first element yielded could be an `Err` of course (the size hint for the `Adapter` in `Result`'s `FromIterator` impl has a lower bound of 0). But this pessimizes the good path to take more memory and be slower in favor of possibly saving memory on the bad one, which seems backwards.

Is there a specialization that could be added to fix this?
Repository: go
Issue: x/sys/unix: add Solaris/Illumos ACL and extended attribute support
Labels: help wanted,OS-Solaris,NeedsFix,compiler/runtime

Would it be possible to get these calls added as part of Solaris/Illumos.  Must use cgo to interface with file attributes otherwise.  Some of these might exist, most don't.  Most implementations seem to handle these via a syscall which we don't have in Solaris.

fgetattr,fsetattr,getattrat,setattrat
acl_get,facl_get,acl_set,facl_set, acl_totext, acl_fromtext,unlinkat
openat,fchownat,fstatat,futimesat,renameat, attropen, fdopendir, readdir, read, write

http://illumos.org/man/3lib/libc
http://illumos.org/man/3lib/libsec

### What version of Go are you using (`go version`)?

1.10

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

amd64/solaris

### What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.


### What did you expect to see?

Ability to change acls and extended attributes from syscall or os package.

### What did you see instead?

Need to use cgo.
Repository: go
Issue: x/build/cmd/gerritbot: Gobot shouldn't be added as a CC/Reviewer
Labels: help wanted,Builders,NeedsFix

Gobot is added as a CC when it says "Trybots beginning", and as a Reviewer when it posts Trybot-Result+1 or Trybot-Result-1. For example, see: https://go-review.googlesource.com/c/go/+/100475

I realise that this is how Gerrit is supposed to work for humans - a user should be subscribed to updates if they comment, and added as a reviewer if they touch one of the flags/labels. However, I think this is noisy for bots. Is there a way to keep it from happening?
Repository: flutter
Issue: libtxt: Single line RTL text is clipped on the beginning (right) of the text instead of the end (left).
Labels: framework,engine,a: internationalization,a: typography,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-engine,triaged-engine

When a single line of text (defined like this):
```dart
new Text('תווית ארוכה מאוד תווית ארוכה מאוד',
         maxLines: 1,
         softWrap: false,
         overflow: TextOverflow.fade,
         textAlign: TextAlign.start,
         textDirection: TextDirection.rtl)
```
Reaches the end of its allowed size (e.g. it's placed inside a box that is constrained to a width smaller than the text box), it will clip as expected, but on RTL it will clip off the **beginning** of the string instead of the end.

I tried tracking this down, and got lost when it jumped to the platform side, but I know that it shows the same behavior on Blink and libtxt.  I'm assuming it is somewhere in the ParagraphBuilder, or in Paragraph.layout.  Looking at the ui.ParagraphStyle and the TextPainter, I couldn't see anything amiss.

For instance, the string above is clipped like this:
![image](https://user-images.githubusercontent.com/8867023/37375138-9063a6f6-26db-11e8-8932-fdcf5150151e.png)

When the string should start (on the left) with "תווית", and the long string should be clipped on the right.

LTR strings clip properly, so it's clearly something to do with something not handling/knowing about the text direction.
Repository: godot
Issue: Editor plugin receives mouse events even if the Spatial gizmo is being manipulated
Labels: bug,topic:editor

Godot 3.0.2

I made a plugin which lets the user paint on a terrain. However, I noticed that if I select the terrain node and try to drag the usual Spatial gizmo to move it, if my click lines up with the terrain, I end up painting and the gizmo doesn't reacts (because my plugin got the event and captured it).

If I don't capture the event, I end up both moving the gizmo, making a square selection and painting all at the same time, which get messy really quickly.

The gizmos should receive input first and capture it, before the event gets forwarded to the plugin. Or is there any other way to avoid this?
Repository: go
Issue: os/user: LookupUser() doesn't find users on macOS when compiled with CGO_ENABLED=0
Labels: OS-Darwin,NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
go version go1.9.2 darwin/amd64

### Does this issue reproduce with the latest release?
Yes.

### What operating system and processor architecture are you using (`go env`)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jeff_walter/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOOS="darwin"
GOPATH="/home/jeff_walter/src/agent"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/freebsd_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="0"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build053729832=/tmp/go-build -gno-record-gcc-switches -fno-common"

### What did you do?
If I run the following program with sudo I get a different result than I get when I run it as 'someuser' (where 'someuser' is my current logged in user).

```
package main

import (
    "fmt"
    "os/user"
)

func main() {
    u, err := user.Lookup("someuser")
    if err != nil {
        fmt.Printf("%s", err)
        return
    }

    fmt.Printf("%V", u)
}
```

### What did you expect to see?
$ ./user 
&{%!V(string=502) %!V(string=20) %!V(string=someuser) %!V(string=) %!V(string=/Users/someuser)}

### What did you see instead?
$ sudo ./user 
user: unknown user someuser
Repository: flutter
Issue: Merge debug tracing toggles
Labels: team,framework,engine,a: debugging,P3,team-engine,triaged-engine

There are `debugProfilePaintsEnabled` and `debugProfileBuildsEnabled` to break down the timeline in debug mode for the framework build and paint phases. But for breaking down LayerTree::Paint in the GPU thread in the timeline, the toggle is on by passing `--trace-skia` when invoking the command line. Would be good to consolidate the debug toggles.
Repository: nvm
Issue: upgrade node succeed but nodejs failed.
Labels: OS: ubuntu

<!-- Thank you for being interested in nvm! Please help us by filling out the following form if you‘re having trouble. If you have a feature request, or some other question, please feel free to clear out the form. Thanks! -->

- Operating system and version:
Ubuntu server 14.04
- `nvm debug` output:
<details>
<!-- do not delete the following blank line -->

```sh
root@iZj6c0yo64w6enlu2ye50lZ:~# nvm debug
nvm --version: v0.33.8
$SHELL: /bin/bash
$HOME: /root
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)'
uname -a: 'Linux 4.4.0-79-generic #100~14.04.1-Ubuntu SMP Fri May 19 18:36:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux'
OS version: Ubuntu 14.04.5 LTS  
curl: /usr/bin/curl, curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.15 built on linux-gnu.
git: /usr/bin/git, git version 2.14.2
grep: /bin/grep (grep --color=auto), grep (GNU grep) 2.16
awk: not an option: --version
awk: /usr/bin/awk, 
sed: /bin/sed, sed (GNU sed) 4.2.2
cut: /usr/bin/cut, cut (GNU coreutils) 8.21
basename: /usr/bin/basename, basename (GNU coreutils) 8.21
rm: /bin/rm, rm (GNU coreutils) 8.21
mkdir: /bin/mkdir, mkdir (GNU coreutils) 8.21
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.4.2
nvm current: v9.8.0
which node: $NVM_DIR/versions/node/v9.8.0/bin/node
which iojs: 
which npm: $NVM_DIR/versions/node/v9.8.0/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v9.8.0
npm root -g: $NVM_DIR/versions/node/v9.8.0/lib/node_modules
```
</details>

- `nvm ls` output:
<details>
<!-- do not delete the following blank line -->

```sh
root@iZj6c0yo64w6enlu2ye50lZ:~# nvm ls
->       v9.8.0
         system
default -> node (-> v9.8.0)
node -> stable (-> v9.8.0) (default)
stable -> 9.8 (-> v9.8.0) (default)
iojs -> N/A (default)
lts/* -> lts/carbon (-> N/A)
lts/argon -> v4.8.7 (-> N/A)
lts/boron -> v6.13.1 (-> N/A)
lts/carbon -> v8.10.0 (-> N/A)
```
</details>

- How did you install `nvm`? (e.g. install script in readme, Homebrew):
script in readme
- What steps did you perform?
nvm install node
- What happened?
succeed.
```sh
root@iZj6c0yo64w6enlu2ye50lZ:~# node -v
v9.8.0
```
- What did you expect to happen?
`nodejs -v` should also return `v9.8.0`. but in fact it returns `v6.11.3`
- Is there anything in any of your profile files (`.bashrc`, `.bash_profile`, `.zshrc`, etc) that modifies the `PATH`?
No
Repository: go
Issue: cmd/compile: keeping a subset of a struct value's fields is slow
Labels: Performance,compiler/runtime

### What version of Go are you using (`go version`)?

    go version devel +e601c07908 Tue Mar 13 22:02:46 2018 +0000 linux/amd64

### What did you do?

https://play.golang.org/p/H9LaiI3BP-U

See the comments as to why I prefer writing the slower version, as it helps maintain the software in the long run.

### What did you expect to see?

The two to perform the same, or at least comparably.

### What did you see instead?

The second method being easily 10x as slow.

    BenchmarkResetUnwanted-4     2000000000      0.72 ns/op     0 B/op     0 allocs/op
    BenchmarkKeepWanted-4        200000000       9.72 ns/op     0 B/op     0 allocs/op

I can imagine why this is; naively, the second function does more work. It has to write the entire struct - 7 ints - instead of just three ints, like the first one. However, I'd hope that the compiler can learn to recognise assignments like these to avoid the unnecessary extra work.
Repository: neovim
Issue: swapfile: support long file names
Labels: enhancement,bug-vim

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`: v0.2.2
- Vim (version: 8.0) behaves differently? Yes
- Operating system/version: Arch Linux
- Terminal name/version: GNOME Terminal 3.26.2 Using VTE version 0.50.3 +GNUTLS
- `$TERM`: xterm-256color
- [strace.log](https://github.com/neovim/neovim/files/1808572/strace.log)

### Details

NVim directory:

    :set directory?
    directory=~/.local/share/nvim/swap//

Debugging:

    $ ls -al ~/.local/share/nvim/swap//
    total 120
    drwxr-xr-x 2 kevin kevin  4096 Mar 14 08:16  .
    drwx------ 5 kevin kevin  4096 Nov  9 02:08  ..

    $ strace -o strace.log nvim -u NONE my_file
    $ grep ENAMETOOLONG strage.log
    lstat("/home/kevin/.local/share/nvim/swap//%home%kevin%olivia%olivia_git%data_manager%olivia_modules%cashflow-pattern-detector%rules-historical-cashflow%similar-transaction-count-heuristics.js.swp", 0x7ffc674c52d0) = -1 ENAMETOOLONG (File name too long)
    lstat("/home/kevin/.local/share/nvim/swap//%home%kevin%olivia%olivia_git%data_manager%olivia_modules%cashflow-pattern-detector%rules-historical-cashflow%similar-transaction-count-heuristics.js.swp", 0x7ffc674c57e0) = -1 ENAMETOOLONG (File name too long)
    openat(AT_FDCWD, "/home/kevin/.local/share/nvim/swap//%home%kevin%olivia%olivia_git%data_manager%olivia_modules%cashflow-pattern-detector%rules-historical-cashflow%similar-transaction-count-heuristics.js.swp", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0600) = -1 ENAMETOOLONG (File name too long)

I've found very strange the strace log, because from what I've seen, the `ENAMETOOLONG` error should be bounded to the `NAME_MAX` variable, which is equal to 255 in my system, and the path does not exceed this value.

Can anyone confirm if this is the source of the NeoVim error? Here is the complete strace log:
https://github.com/neovim/neovim/files/1808572/strace.log
Repository: vue
Issue: v-model support for web components (stenciljs)
Labels: feature request

### What problem does this feature solve?
V-model support for web components(tested with web component implemented with ionic's stenciljs compiler).

Does not work:
```
<ui-input v-model="mySelect" />
```

Works:
```
<ui-input :value="mySelect" @input="mySelect = $event.target.value" />
```

Can this be enabled to support ignored elements as well that have been declared with:

```Vue.config.ignoredElements = [/^ui-/];```

### What does the proposed API look like?
Declaration
```
Vue.config.ignoredElements = [/^ui-/];
```
Usage
```
<ui-input v-model="mySelect" />
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: rust
Issue: Incorrect recursion in type inference
Labels: A-trait-system,T-compiler,C-bug

I encountered a recursion overflow error on a trait implementation of HashMap (`Encodable`) when I tried to extend an unrelated trait (`Inner`) by a where clause for the same trait. This might end in a case of 'You are holding it wrong', but I couldn't find any clue why the change should infer with the given implementation:

Minimal Example
---------

[Playground](https://play.rust-lang.org/?gist=c0f644997edc02c89ee81eff442c9ed3&version=stable)

```rust
use std::collections::HashMap;

pub trait Encodable {}

pub trait Inner
where
    for<'a> &'a Self: Encodable,
{
}

pub trait Outer {
    type Inner: Inner;
}

impl<'a, K, V, S> Encodable for &'a HashMap<K, V, S>
where
    &'a V: Encodable,
{
}
```

Error Log
------
```error
 Compiling playground v0.0.1 (file:///playground)
error[E0275]: overflow evaluating the requirement `_: std::marker::Sized`
  |
  = help: consider adding a `#![recursion_limit="128"]` attribute to your crate
  = note: required because of the requirements on the impl of `for<'a> Encodable` for `&'a std::collections::HashMap<_, _, _>`
  = note: required because of the requirements on the impl of `for<'a> Encodable` for `&'a std::collections::HashMap<_, std::collections::HashMap<_, _, _>, _>`
  = note: required because of the requirements on the impl of `for<'a> Encodable` for `&'a std::collections::HashMap<_, std::collections::HashMap<_, std::collections::HashMap<_, _, _>, _>, _>`
  = note: required because of the requirements on the impl of `for<'a> Encodable` for `&'a std::collections::HashMap<_, std::collections::HashMap<_, std::collections::HashMap<_, std::collections::HashMap<_, _, _>, _>, _>, _>`
  = note: required because of the requirements on the impl of `for<'a> Encodable` for `&'a std::collections::HashMap<_, std::collections::HashMap<_, std::collections::HashMap<_, std::collections::HashMap<_, std::collections::HashMap<_, _, _>, _>, _>, _>, _>`
[...]
```

Reproduced with:
- stable: rustc 1.24.1 (d3ae9a9e0 2018-02-27)
- nightly: rustc 1.26.0-nightly (2789b067d 2018-03-06)