sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Elide updates to backing stores when the contents of that layer don't change.
Labels: platform-ios,engine,e: embedder,P2,team-ios,triaged-ios

During custom composition (custom embedders & iOS only today), the backing stores of all layers and rendered into presented on each updates. This is in spite of the fact that some layers may not have need updated during that frame. These updates need to be elided. Once this optimization is in place, `FlutterLayer::did_update` can sometimes return `false`. Currently, it is always `true`.
Repository: pytorch
Issue: TensorIterator "builder" options should be documented.
Labels: module: internals,triaged

We got rid of the TensorIterator builder for efficiency reasons, but the current documentation is now pretty confusing.  For example, all of the options aren't clear (maybe they should start with a common prefix?) and none of them actually contain documentation, for example:
https://github.com/pytorch/pytorch/blob/bd054e7cef00da543b80844aeb7ae0ac78c91675/aten/src/ATen/native/TensorIterator.h#L281-L283

I have no idea what Device and Dtype are for.
Repository: flutter
Issue: Document the structs in the embedder API that are sealed.
Labels: engine,d: api docs,e: embedder,P3,team-engine,triaged-engine

This can be done via comments in the header. Most structs are safe to modify by appending members at the end of the struct. However, some are not (these are the ones without `struct_size` or the ones that are non-pointer union members in other structs.)
Repository: go
Issue: runtime: unexpected fault address runtime.memhash16
Labels: NeedsInvestigation,compiler/runtime

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
go version go1.12.5 linux/amd64

</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
NAME="Ubuntu"
VERSION="14.04.5 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.5 LTS"
VERSION_ID="14.04"

$ uname -a
Linux {pod name} 4.15.0-1033-aws #35-Ubuntu SMP Wed Feb 6 13:29:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

</pre></details>

### 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?



### What did you see instead?

Our application is occasionally crashing with the following error:

```
unexpected fault address 0x432200
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x2 addr=0x432200 pc=0x432200]

goroutine 2373 [running]:
runtime.throw(0x1306be9, 0x5)
	/root/.gimme/versions/go1.12.5.linux.amd64/src/runtime/panic.go:617 +0x72 fp=0xc007f9cd28 sp=0xc007f9ccf8 pc=0x45dc92
runtime.sigpanic()
	/root/.gimme/versions/go1.12.5.linux.amd64/src/runtime/signal_unix.go:397 +0x401 fp=0xc007f9cd58 sp=0xc007f9cd28 pc=0x473251
runtime.memhash16(0xc007f9ce1e, 0xd2bd649e, 0x0)
	/root/.gimme/versions/go1.12.5.linux.amd64/src/runtime/alg.go:56 fp=0xc007f9cd60 sp=0xc007f9cd58 pc=0x432200
runtime.mapassign(0x1146c80, 0xc001b329f0, 0xc007f9ce1e, 0x11)
	/root/.gimme/versions/go1.12.5.linux.amd64/src/runtime/map.go:593 +0x73 fp=0xc007f9cde8 sp=0xc007f9cd60 pc=0x43e273
...snip...

```

The code in question looks like:

```golang
type MessageReader struct {
        //...
	latency map[string]map[uint16]int64
}

func (mr *MessageReader) captureLatency(timestamp int64, cluster string, partition uint16) {
	if _, ok := mr.latency[cluster]; !ok {
		mr.latency[cluster] = make(map[uint16]int64)
	}
	mr.latency[cluster][partition] = time.Now().Unix() - timestamp
}
```

This particular application is processing messages and calling this once per message at a rate of ~75k / second.  We've seen this happen twice over the past week or so.
Repository: bitcoin
Issue: ASN-based bucketing of the network nodes
Labels: P2P

Currently we bucket peers (or potential peers)  based on /16 network groups  which directly correlate to the IP-addresses. This is done to diversify connections every node maintains, for example to avoid connecting to the nodes all belonging to the same region/provider.

Currently peers.dat (serialized version of addrman) does not store ip->bucket mappings explicitly, and all the known ips from peers.dat are re-hashed and re-bucketed at every restart (although it's very cheap).

## Idea

It was [recently](http://www.erisian.com.au/bitcoin-core-dev/log-2019-06-20.html) suggested by @TheBlueMatt to use ASN-based bucketing instead. This is strictly better because if the goal is to diversify connections: the distribution of IPs among the ASNs is not uniform, and because of that netgroup-based bucketing may result in having 8 peers from just 2 large ASNs. 
If we allow connecting to each ASN at most once, this would increase the security of the network.

We have @sipa's script to create a compressed representation of mapping (ip->ASN), which is less than 2 megabytes.

However, there are integration-related design questions.

### Distribution of the .map file

During the meeting there was a rough consensus (not unanimous though, @jnewbery ) that mapping file should be distributed along with the release, instead of becoming part of the binary. 

If you want to question these, feel free to comment below.

### Legacy /16 bucketing
There was a suggestion of having an old method as well. I think we should do it.

### ~Loading the map~
Maybe there will be concerns here, I have an understanding for now.
Repository: pytorch
Issue: Check PyTorch version when initializing process groups
Labels: oncall: distributed,module: bootcamp,triaged,enhancement

@VitalyFedyunin asked whether `c10d` checks PyTorch versions during initialization. IIUC, we don't check that currently, and it will work in the best-effort manner, which might lead to weird errors (e.g., when pickling format changes). 

@pietern @zhaojuanmao @pritamdamania87 Please do correct me if I misunderstand the implementation.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera
Repository: puppeteer
Issue: page.addScriptTag({content: 'window.__foobar'}) should throw when CSP prevents operation
Labels: bug,confirmed,P3

With https://crrev.com/683391, chrome no longer throws exceptions when not executing inline script tags due to CSP.

We can fix this with probing runtime first - checking if inline scripts have any power. Alternatively, we might want to check current page CSP policy.
Repository: rust
Issue: Desugaring of struct update syntax is unnecessarily restrictive for private fields
Labels: T-lang,C-feature-request

Take the following example struct:

```rust
mod module {
    #[derive(Default)]
    pub struct Foo {
        pub a: i32,
        b: u32
    }
}
```

Let's say you don't have access to `b`, and you want to create an instance of `Foo` with a non-default value for `a`. The idiomatic way to do that is with the struct update syntax, like so:

```rust
let foo = Foo {
    a: 2,
    ..Foo::default()
};
```

Right now, that fails with the following error:

```
error[E0451]: field `b` of struct `main::module::Foo` is private
  --> src/main.rs:15:7
   |
15 |     ..Foo::default()
   |       ^^^^^^^^^^^^^^ field `b` is private
```

That error is unintuitive since we never directly reference `b` in our source code. What's more, it's entirely unnecessary, since it's merely the side effect of what seems to be the current desugaring strategy, as follows:

```rust
let foo = {
    // we create temp_a before calling Foo::default() to preserve source code ordering
    let temp_a = 2;
    let temp = Foo::default();
    Foo {
        a: temp_a,
        b: temp.b
    }
};
```

Ideally we'd desugar to the following, which would allow the initial example to compile as expected:

```rust
let foo = {
    let temp_a = 2;
    let mut temp = Foo::default();
    temp.a = temp_a;
    temp
};
```

This issue proposes moving to the second method. I can't see any disadvantages to doing that, although that may just be because I'm not looking close enough.

This admittedly changes the language's behavior, but I'm submitting it as an issue instead of an RFC because the current behavior seems unintentional and this is an extremely minor change. I'll happily create an RFC if that's necessary, though.
Repository: vscode
Issue: Bring the "track changes" feature to VS Code
Labels: feature-request,editor-contrib

Anyone who has worked with Visual Studio is likely familiar with the "track changes" feature, which adds green/yellow bars to the side of the editor, as seen in the attached image.

![TrackChangesIndicators](https://user-images.githubusercontent.com/36111895/62987162-7bf43e00-be0c-11e9-8fdd-f9ca3d2a9060.png)
Green bars are new lines added and saved since opening the file; yellow bars are unsaved lines.

Unfortunately, this doesn't exist in VS Code.
However, VS Code does have a very similar feature called "gutter indicators" as mentioned in [the documentation](https://code.visualstudio.com/docs/editor/versioncontrol#_gutter-indicators) but it only applies if you're using version control, whereas in Visual Studio, the feature works with locally stored projects/solutions as well.

Since the functionality already exists in VS Code (for version control), are there any plans to extend it to also work with local files too, just like in Visual Studio?
Repository: scrcpy
Issue: Auto reconnect mode
Labels: feature request

It would be nice if the app would wait for the same device to reconnect to it automatically (in case of a restart etc)
Repository: scrcpy
Issue: Better support for wireless adb
Labels: feature request

I would love to have a dedicated input for wifi ip or maybe scanning
currently i'm using:
```batch
@echo off
set ip=192.168.2.50:5555
title SCRCPY - Wireless (IP: %ip%)
adb devices
:START
adb connect %ip%
scrcpy --bit-rate 2M --max-size 700 --show-touches --turn-screen-off
REM timeout /t 3
GOTO START
```
Repository: pytorch
Issue: Port `masked_fill` operator from the TH code to Aten
Labels: module: cuda,module: cpu,triaged,module: porting,better-engineering

`masked_fill` is the point-wise operator so porting if from the TH code to Aten (and TensorIterator) expected to be easy. Such migration will help to clean up the code, simplify dispatch as well as provide immediate 2-3x operator performance gain.

Porting guide: https://github.com/pytorch/pytorch/wiki/TH-to-ATen-porting-guide

Example PR with porting of the adaptive_avg_pool2d: https://github.com/pytorch/pytorch/pull/14714

How to use TensorIterator: https://github.com/pytorch/pytorch/wiki/How-to-use-TensorIterator
Repository: flutter
Issue: TextField doesn't appear within a direction:Axis.vertical Wrap
Labels: a: text input,framework,f: material design,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design

code:
![image](https://user-images.githubusercontent.com/8746914/62993013-4bea8080-be88-11e9-84ea-93f3908b57bd.png)
screenshot:
<img src="https://user-images.githubusercontent.com/8746914/62993022-5442bb80-be88-11e9-9b76-9d620f7147fa.png" width ="300">
Repository: go
Issue: cmd/compile: reflected methods have extra wrapping
Labels: NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?

1.12.7

### Does this issue reproduce with the latest release?

Probably.

### What operating system and processor architecture are you using (`go env`)?

amd64, or amd64p32. Reproduces on playground, probably not specific to it.

### What did you do?

https://play.golang.org/p/tEu9qKfYdEB

Obtain a method using (reflect.Value).MethodByName(), convert it to a function type, and call it.

The method has a stack trace.

### What did you expect to see?

A function pointer identical to one I could call directly.

### What did you see instead?

A fancy wrapped function pointer which is doing some kind of marshalling and then unmarshalling of its parameters.

```trace:
goroutine 1 [running]:
main.(*Updater).Update(0x414020, 0x7d0, 0x13, 0x0)
	/tmp/sandbox371765888/prog.go:15 +0x80
main.callFn(...)
	/tmp/sandbox371765888/prog.go:22
main.main()
	/tmp/sandbox371765888/prog.go:29 +0x160

trace:
goroutine 1 [running]:
main.(*Updater).Update(0x414020, 0x7d0, 0x0, 0x446494)
	/tmp/sandbox371765888/prog.go:15 +0x80
reflect.callMethod(0x43e320, 0x454f70, 0x454f64, 0x0)
	/usr/local/go/src/reflect/value.go:690 +0x180
reflect.methodValueCall(0x7d0, 0x414020, 0x201, 0x138901, 0x121ac0, 0x43e320, 0x125060, 0x414020, 0x213, 0x1d, ...)
	/usr/local/go/src/reflect/asm_amd64p32.s:35 +0x40
main.callFn(...)
	/tmp/sandbox371765888/prog.go:22
main.main()
	/tmp/sandbox371765888/prog.go:30 +0x180
```

(The stray "callFn" is an attempt to ensure that the compiler isn't just outsmarting me here by taking short-cuts when it can easily see that the method it's calling is a method of a local object...)

It seems to me like it would be really nice if there were a way for the methods reflect.MethodByName yields to be the same functions that you get from method values.
Repository: flutter
Issue: Video_player plugin: Get the current played frame number 
Labels: c: new feature,p: video_player,package,team-ecosystem,P3,triaged-ecosystem

I was wondering if there is/will be any feature to get the current played frame of a video in progress.

Right now, when I use the plugin, I can easily attach a listener callback to the videoController and In can easily do stuff like this:
```
videoPlayerController.addListener(() {
      print("VIDEO POSITION IS ${videoPlayerController.value.position.inMilliseconds}");
      print("VIDEO DURATION (s) ${videoPlayerController.value.duration.inSeconds}");
      print("VIDEO DURATION (milsec) ${videoPlayerController.value.duration.inMilliseconds}");
      print("VIDEO DUR (mcrosec) ${videoPlayerController.value.duration.inMicroseconds}");
    });
```

But I am really not sure how to proceed (if possible) to get the current frame played at any time while de video is playing, or, for example, if i pause the video and i slide to another time position, how do i know in which frame I am?

Would it be a feature interesting to develop??
Repository: pytorch
Issue: Value_select to perform region-wise selection
Labels: triaged,function request

## 🚀 Feature
```python
import torch

a = torch.tensor([[0,0,1,1,1],[0,0,1,1,2],[3,3,3,3,2]])
c = 2
feat = torch.randn(c, *a.size())
num_sp = a.max().long() + 1

# For now, I have to use torch.masked_select for many times
output = []
for i in range(num_sp):
    # (c*1), mean of each SP.
    output.append(torch.masked_select(feat, a==i).view(c, -1).mean(-1, keepdim=True)) 
output = torch.stack(output)
print('feat')
print(feat)
print('ref_mask')
print(ref_mask)
print('output')
print(output)

# Something like this will be better
output, return_index = torch.value_select(feat, mask_ref = a, values=torch.arange(num_sp))

```
```bash
feat
tensor([[[-0.6140, -1.5337,  1.4974, -1.2668, -0.3866],
         [-0.1943,  0.0868,  1.0380,  0.1135,  1.1820],
         [-1.4744,  1.5889, -0.2627, -1.7951, -0.0045]],

        [[-0.8168, -0.6949, -1.9554, -0.5807, -0.2200],
         [-0.7170, -0.8191,  0.5452,  1.6736, -0.6598],
         [-0.6220,  0.8880, -0.6597,  0.6438, -1.5148]]])
ref_mask
tensor([[0, 0, 1, 1, 1],
        [0, 0, 1, 1, 2],
        [3, 3, 3, 3, 2]])
output
tensor([[[-0.5638],
         [-0.7619]],

        [[ 0.1991],
         [-0.1075]],

        [[ 0.5887],
         [-1.0873]],

        [[-0.4858],
         [ 0.0625]]])
```

## Motivation
In some cases, label matrix (ref_mask above) indicates which class the pixel should be categorized to. Suppose we get some labels from a super-pixel algorithm, then I want to calculate the mean of SP region or perform other operations for each region. Then `value_select` function is quite useful. In a word, it performs `region-wise` selection and will be useful for other tasks too.

## Pitch
As the pixels contained in each region is not constant, then we need to return the indexes for each region, logged in `return_index`.
Repository: vscode
Issue: macOS Text Selection: shift+left should expand selection
Labels: feature-request,macos,editor-commands

- VSCode Version: 1.37.0
- OS Version: macOS Mojave 10.14.6

On macOS, the standard text selection behaviour is to expand the current selection when shift + the left arrow key is pressed:

> Here is the **example** text with 'example' selected (e.g. by double-clicking the text)
> Here is th**e example** text on macOS in most applications after pressing shift + the left arrow key twice.
> Here is the **exampl**e text on macOS in Visual Studio code after the same action.

To be consistent with platform conventions, shift + the left arrow should ideally expand the selection. I believe the current behaviour matches the behaviour on Windows.

If there is already a configuration option that changes this behaviour, then I would suggest that the default on macOS be changed to the standard system behaviour.
Repository: TypeScript
Issue: Documentation: usage of types/interfaces defined in modules on global
Labels: Docs

## Search Terms

- export from module to global
- global namespace
- declare as global
- assign to global
- globalThis

## Suggestion

Documentation says that 
> It can be surprisingly difficult to access or declare values in the global scope, perhaps because we’re writing our code in modules...

(https://devblogs.microsoft.com/typescript/announcing-typescript-3-4/#type-checking-for-globalthis)

It shows an example how typed variable may be declared in the global scope. But it doesn't cover scenario when one needs to declare variable/function/namespace which use a type/interface declared in some module.

I think that the documentation should clearly explain that it's not possible or show an example how to do it (if it's possible).

## Use Case

One creates a function with input parameter and/or return type declared in module.
She wants to make this function available on global.

It's an anti-pattern in the same way as augmenting types from external modules, but as discussed here #5292 it exists in real life.

One may have a well organised non-poluting-global modules-based codebase. But at some point by some reason she have to provide an interface for a global consumer. Moving all exposed interfaces and types to global and rewrite the codebase which used to consume them from modules would be ugly and painful.

## Example

```typescript
import { SomeType, SomeInterface } from 'some/module';

function functionForGlobalConsumer(input: SomeType): SomeInterface {
  // some code...
}

globalThis.functionForGlobalConsumer = functionForGlobalConsumer;
```

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: electron
Issue: feat: implement prevent shutdown / sign out procedure 
Labels: enhancement :sparkles:

<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success. 
(there was something like this but has been closed, i hope this will receive a new consideration) 

### Problem Description
<!-- Is your feature request related to a problem? Please add a clear and concise description of what the problem is. -->
OS : Windows 

I would like a way to prevent windows sign out/shutdown until i finish/stop my running tasks. 

### Proposed Solution
<!-- Describe the solution you'd like in a clear and concise manner -->

Add the following functions 

`app.preventShutDown(reason)` 

When it is called the following should happen: 
[ ] call the `ShutdownBlockReasonCreate` API to prevent the shutdown. 
[ ] all windows that receive the `WM_QUERYENDSESSION` event should return false


`app.releaseShutDown()`

This function should call `ShutdownBlockReasonDestroy` witch will allow the sign out/shutdown of windows. 



### Alternatives Considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

For now the method i use to achieve this result is using the node-ffi addon. But that is a complicated and not very efficient method.
Repository: electron
Issue: globalShortcuts don't work for alternate keyboards on Mac 10.14.6
Labels: platform/macOS,bug :beetle:,status/confirmed,5-0-x,7-0-x,8-x-y,6-1-x,7-1-x,9-x-y,10-x-y,11-x-y

* **Electron Version:**
  * 6.0.2
* **Operating System:**
  * mac 10.14.6

### Expected Behavior
globalShortcuts work regardless of the chosen keyboard layout

### Actual Behavior
On Mac, globalShortcuts seem to default to either qwerty or the keyboards layout (I think? I don't have a dvorak keyboard) rather than the chosen keyboard layout.

### To Reproduce
Here's a fiddle that I tested on all three platforms. Windows works perfectly, Linux work with a caveat that it doesn't pick up keyboard changes made while the app is running, and Mac is broken.

https://gist.github.com/Kilian/995123ef2e31d6d15ee147a613831bed

To test this, add dvorak to your keyboard layouts. If set to Dvorak, the `l` is in the position of the `p` on a qwerty layout. If you press `ctrl + p` on a physical qwerty keyboard but are using the dvorak layout that should correspond to `ctrl + l` and pressing it should give a console.log in fiddle.
Repository: rust
Issue: How to install a single target from source without building the whole compiler?
Labels: A-cross,T-compiler,C-feature-request

I'm using Arch Linux and my distribution provides a (usually) up-to-date version of rustc & cargo. In particular, I have a system-wide copy of the `x86_64-unknown-linux-gnu`, placed in `/usr/lib/rustlib`.  Please note that rustup is not used here at all. 

Sometimes I need to cross-compile to other targets, such as `x86_64-pc-windows-gnu` or `wasm32-wasi`. This has issues, for instance https://github.com/rust-lang/rust/issues/49078. It also results in unnecessary duplication.

Currently it's possible to build a Rust cross compiler manually, such as [the rust-mingw AUR package](https://aur.archlinux.org/packages/mingw-w64-rust/). Still, this requires building the whole LLVM, compiler, cargo, which takes a lot of time and this is basically emulation of rustup without rustup (there are separate copies of rustc, cargo, etc.)

Is it possible to only compile the required bits, so that one can just supplement the existing system-wide instance of Rust with new target? We can assume that their version will match. 

For reference, the rustup steps for `wasm32-wasi` are:
``` 
rustup target add wasm32-wasi
```
for `x86_64-pc-windows-gnu`:
```
rustup install stable-x86_64-pc-windows-gnu
rustup target add x86_64-pc-windows-gnu
```