sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: gccgo: improperly ordered evaluation of "x, z := f(&x), f(&x)"
Labels: NeedsFix

This is an issue separated from https://github.com/golang/go/issues/23188.

### What version of Go are you using (`go version`)?

go version go1.10 linux/amd64

### Does this issue reproduce with the latest release?

yes

### Description

sorry, this issue is a little complex, so I don't use the issue report template.

First, the behaviors of gc and gccgo are different for the following program.
```golang
package main

import "fmt"

func f(p *int) int {
	*p = 123
	return *p
}

func main() {
	var x int
	y, z := x, f(&x)
	fmt.Println(y, z) // gc: 123 123.  gccgo: 0 123
}
```

But, the behaviors of the two compiler are the same for the following modified version.
I think here gccgo is inconsistent with itself.
```golang
package main

import "fmt"

func f(p *int) int {
	*p = 123
	return *p
}

func main() {
	var x int
	x, z := x, f(&x)
	fmt.Println(x, z)// both: 123 123
}
```

There is certainly a bug in gccgo (may be also not, as spec really doesn't specify the order).
Whether or not it is a bug for gc is not specified in Go spec.
However, I think, it is best to specify the order in Go spec (if it is possible).
Repository: rust
Issue: Value assigned is never read
Labels: C-enhancement,A-lints,T-compiler,A-suggestion-diagnostics

I have the following simple code:

```
fn main() {
	let mut foo = String::new();
	foo = "Hi!".to_string();

	println!("{}", foo);
}
```

The compiler gives me the following warning:

```
warning: value assigned to `foo` is never read
 --> src\main.rs:2:6
  |
2 |     let mut foo = String::new();
  |         ^^^^^^^
  |
  = note: #[warn(unused_assignments)] on by default

```

This warning seems to be wrong to me. The assignment `foo` has been used in the println! macro. So I should not get this error. When I remove the mutable assignment as follows, I get no warning as expected:

```
fn main() {
	let foo = "Hi!".to_string();
	println!("{}", foo);
}

```

I am using rustc 1.24.1 (d3ae9a9e0 2018-02-27) on Windows 7.
Repository: flutter
Issue: flutter test --machine differs from pub test protocol (debug/observatory event)
Labels: a: tests,tool,P3,team-tool,triaged-tool

@devoncarew suggested these should be the same (and I hope they are, so I can re-use this same debug adapter for Dart and Flutter in future).

Mostly they seem the same, but the [json spec](https://github.com/dart-lang/test/blob/master/doc/json_reporter.md) for the `test` package says this that there is a debug event with `type=debug`, however it actually comes through in a very different format to the other messages (it's bracketed, called `test.startedProcess` and in the format of other Flutter message, not the format of these other test messages):

```text
[13:53:41]: <== {"suite":{"id":0,"platform":"vm","path":"m:\\Coding\\Applications\\Dart-Code\\test\\test_projects\\flutter_hello_world\\test\\hello_test.dart"},"type":"suite","time":0}
[13:53:41]: <== {"test":{"id":1,"name":"loading m:\\Coding\\Applications\\Dart-Code\\test\\test_projects\\flutter_hello_world\\test\\hello_test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":1}
[13:53:41]: <== [{"event":"test.startedProcess","params":{"observatoryUri":"http://127.0.0.1:10284/"}}]
[13:53:43]: <== {"testID":1,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":2141}
[13:53:43]: <== {"group":{"id":2,"suiteID":0,"parentID":null,"name":null,"metadata":{"skip":false,"skipReason":null},"testCount":1,"line":null,"column":null,"url":null},"type":"group","time":2147}
```
Repository: node
Issue: win, cluster: no callback called after write
Labels: help wanted,cluster,windows

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify affected core module name

If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you are able.
-->

* **Version**: 9.6.0
* **Platform**: Windows
* **Subsystem**: cluster

On Windows, after calling `process.disconnect` callbacks for previous `process.send` calls are not called. Example:
```javascript
'use strict';
const cluster = require('cluster');

if (cluster.isMaster) {
  cluster.fork().on('message', (msg) => {
    console.log(msg.msg);
  });
} else {
  process.send({msg: 'hello'}, () => {
    console.log('cb!');
  });
  process.disconnect();
}
```
On Windows this will print:
```
hello
```
whereas on Linux it will print
```
hello
cb!
```

This was reported in https://github.com/libuv/libuv/issues/1729, but it looks like some issue with cluster module. Callbacks are called on both platforms in the following code, which uses bare IPC pipe:
```javascript
const cp = require('child_process');

if (process.argv[2] === 'child') {
  process.send({msg: 'hello'}, () => {
    console.log('cb!');
  });
  process.disconnect();
} else {
  const child = cp.spawn(process.argv0, [__filename, 'child'], {
    stdio: ['inherit', 'inherit', 'inherit', 'ipc']
  });
  child.on('message', (msg) => {
    console.log(msg.msg);
  })
}
```
On Windows this will print:
```
hello
cb!
```
and on Linux:
```
cb!
hello
```

/cc @nodejs/platform-windows  @nodejs/cluster
Repository: neovim
Issue: please document E903 (and other similar errors)
Labels: documentation

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`:  v0.2.3-874-g739fb93a9 (nvim.appimage nightly build)
- Vim (version: ) behaves differently? N/A
- Operating system/version: linux
- Terminal name/version: putty
- `$TERM`:tmux-256colors

I got a bug [report about a failing `jobstart()`](https://github.com/vim-airline/vim-airline/issues/1692) in vim-airline. It seems that jobstart() fails, because of a invalid CWD (directory without x bit). Now I wondered whether this error happens, because I was missing a `on_stderr` message or whether I should simply try/catch that error to silence it.

However I cannot find any documentation on what E903 actually means? Vim allows usually to `:h EXXX` to get more information, however it seems like this is not really documented for neovim.
Repository: flutter
Issue: Commands that have --offline as an option should recommend it when unable to connect.
Labels: c: new feature,tool,P3,team-tool,triaged-tool

`flutter create` and `flutter packages get` (and others?) have an `--offline` flag that allows them to work offline if the pub cache is sufficiently full.  We should have those commands recommend using `--offline` if they fail to connect to the server.

Alternatively, we could just go ahead and try to run offline automatically (with a great big warning that we've done so) if we can't connect.
Repository: flutter
Issue: Document how to use GlobalKey with TextField and OrientationBuilder
Labels: framework,d: api docs,P2,team-framework,triaged-framework

## Steps to Reproduce
1. Pull down https://github.com/flutter/udacity-course/pull/80
2. Build the app - note that tapping on the TextField input causes the keyboard to appear, but immediately disappear.
3a. Wrap the widget in converter_route's build function with a SingleChildScrollView. This resolves the issue. But then in landscape mode, the width of the widget (450.0) is ignored.
3b. Wrap only the Orientation.portrait return widget with a SingleChildScrollView. This doesn't resolve the keyboard disappearing issue.

@HansMuller
Repository: go
Issue: x/website: addressing inaccessible links on CN site
Labels: NeedsInvestigation

Many of the external links on [golang.google.cn](https://golang.google.cn) are inaccessible from Mainland China (e.g. `*.golang.org`, `*.blogspot.com`, `*.googlesource.com`), which might cause some troubles for Chinese developers.

Directly removing all inaccessible links would lead to situations like: "For more details, please check out this post" (while there isn't a link, nor is it clear which post it is). Instead, we can keep those links and automatically render a tooltip for blacklisted URLs that is shown if you put your mouse over it (a hover overlay, actually already implemented in the DevSite infrastructure. For instance [tensorflow.google.cn](https://tensorflow.google.cn), put mouse over the Google logo in the company list to test)

The other route we could take is to separate files, like `go_faq.zh.html`, and let them slowly be translated by the community. It would be nice to have Chinese translations in the future. We'd have to remember to add content to both in the future, though.

See the discussion on https://go-review.googlesource.com/c/go/+/89215 for more context.

/cc @chenglu for checking CN site policies   @andybons @bradfitz
Repository: youtube-dl
Issue: YouTubeTV does't work
Labels: geo-restricted,account-needed

Login to YTTV fails ... the login page is not the same as regular YT, so ytdl can't parse it.

YTTV has a free trial, easy to test, with pretty much any video.  Access is only possible by clicking the "Already a Member?" link on the redirected page, then entering your google acct info.

youtube-dl --verbose -F -u <username> -p <password> "https://tv.youtube.com/watch/a43h5AS8ik4?vpp=2AEA"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '-F', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://tv.youtube.com/watch/a43h5AS8ik4?vpp=2AEA']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2018.03.20
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.16299
[debug] exe versions: ffmpeg N-77380-g2dba040
[debug] Proxy map: {}
[generic] a43h5AS8ik4?vpp=2AEA: Requesting header
[redirect] Following redirect to https://tv.youtube.com/welcome/?vpp=2AEA&dst=watch/a43h5AS8ik4
[youtube:user] Downloading login page
[youtube:user] Looking up account info
[youtube:user] Logging in
WARNING: Unable to login: Invalid password
[youtube:user] welcome: Downloading channel page
WARNING: Unable to download webpage: HTTP Error 404: Not Found
[youtube:user] welcome: Downloading page #1
ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\common.py", line 519, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\YoutubeDL.py", line 2199, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
Repository: rust
Issue: miri interpretation of large array initialization is slow
Labels: I-slow,C-enhancement,I-compiletime,T-compiler,A-MIR,A-const-eval,A-miri,A-mir-opt,C-optimization

Right now, if you are initializing a large array either manually or with an array repeat expression takes a long time during interpretation.

* [ ] Fixing array repeat expressions requires us to stop filling each element individually and just manually filling up the virtual memory (https://github.com/rust-lang/rust/blob/master/src/librustc_mir/interpret/eval_context.rs#L591)

Arrays with lots of fields that are initialized as

```rust
static FOO: [T; N] = [A, B, C, ....., XX, XY];
```

are turned into the MIR equivalent of

```rust
static FOO: [T; N] = {
let array: [T; N] = mem::uninitialized();
let a = A;
let b = B;
let c = C;
....
let xx = XX;
let xy = XY;
array = [A, B, C, ...., XX, XY];
array
}
```

Which requires twice the memory (once for each variable and once for the array) and twice the instructions (initializing the variables and copying each variable into the array).

* [ ] Instead, we should turn that MIR into 

```rust
static FOO: [T; N] = {
let array: [T; N] = mem::uninitialized();
array[0] = A;
array[1] = B;
array[2] = C;
....
array[N-2] = XX;
array[N-1] = XY;
array
}
```

What do you think @eddyb ?

cc @Zoxc @bob_twinkles @rkruppe
Repository: vue
Issue: Subscribe to all custom events on a child component
Labels: feature request

### What problem does this feature solve?
Would make writing wrapper components easier

### What does the proposed API look like?
When v-on receives a function it should trigger on every custom event emitted by the child

    <my-custom-component v-bind="$props" v-on="onAnyEvent"></my-custom-component>

Argument one could be the name of the event

    onAnyEvent(eventName, eventArgs) { // do something }

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: flutter
Issue: DateFormat Crash - Locale data has not been initialized, call initializeDateFormatting(<locale>)
Labels: c: crash,framework,a: internationalization,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-framework,triaged-framework

Hey all! Was trying to format Dates with i18n translations. I ran into some interesting issues and wanted to share my journey to see if there's any improvements that can be made in this arena!

## Steps to Reproduce

  1. Use a `new DateFormat('d.MMMM y', 'en').format(date);` -- everything works great
  2. Use `new DateFormat('d.MMMM y', 'no').format(date);` -- Oh no, errors! Norwegian language not supported.
  3. Ok, intl package says I need to call `initializeDateFormatting`. Done. Wait! It actually doesn't do anything, since if you've already initialized some locales, this function will actually be a no-op!
  4. Realize the MaterialLocalizations are calling `initializeDateFormattingCustom` version of this function, but with only a sub-set of the languages supported by the i18n package :( :( :(
  5. Discover I can call `initializeDateFormattingCustom` myself! However, rather than relying on the `intl` package to do this for me with `initializeDateFormatting` with all supported locales, I need to do this manually for each supported language like this:

```dart
initializeDateFormattingCustom(
  locale: 'no',
  symbols: dateTimeSymbolMap()['no'],
  patterns: dateTimePatternMap(),
);
```

Overall, formatting Dates was pretty rough, and required I dig through the internals of the MaterialLocalizations and intl package to get it working. I tried calling `initializeDateFormatting` myself before the MaterialLocalizations did their thing, but that caused other errors.

## Possible solution

It would be great if i18n date formatting "Just Worked" by instantiating the `initializeDateFormatting` method up front, rather than instantiating a bunch of `initializeDateFormattingCustom` locales in the MaterialLocalizations.

Alternative solution: Could MaterialLocalizations instantiate only the locales in `supportedLocales`?
Repository: rust
Issue: Constants can contain references that are not Sync
Labels: P-medium,T-compiler,I-unsound,C-bug,A-const-eval,F-negative_impls,S-bug-has-test,T-types

This compiles ([playground](https://play.rust-lang.org/?gist=fa10d9ae0d7d9992a1c1d48862a417ca&version=nightly)):

```rust
#![feature(negative_impls)]

#[derive(Debug)]
struct Foo {
    value: u32,
}

impl !std::marker::Sync for Foo {}

fn inspect() {
    let foo: &'static Foo = &Foo { value: 1 };
    println!(
        "I am in thread {:?}, address: {:p}",
        std::thread::current().id(),
        foo as *const Foo,
    );
}

fn main() {
    let handle = std::thread::spawn(inspect);
    inspect();
    handle.join().unwrap();
}
```

And prints this (addresses vary, but always the same):

```
I am in thread ThreadId(0), address: 0x5590409f7adc
I am in thread ThreadId(1), address: 0x5590409f7adc
```

Which shows that two threads get the same `'static` reference to non-`Sync` struct.

The problem is that promotion to static does not check if the type is `Sync`, while doing it manually does (this does not compile):

```rust
static PROMOTED: Foo = Foo { value: 1 };
let foo = &PROMOTED;
```

Reading the [RFC](https://github.com/rust-lang/rfcs/blob/master/text/1414-rvalue_static_promotion.md), it seems that the relevant condition is about containing `UnsafeCell`, but does not account for other `!Sync` types, which are also not supposed to be shared across treads.
Repository: rust
Issue: Inconsistent `Path::file_stem` and `Path::extension` handling of files starting with multiple dots
Labels: C-enhancement,T-libs-api,A-io

I've been using the `Path::file_stem` and `Path::extension` functions and while writing some tests for my code I've found an inconsistent handling of filenames which start with more than one dot (for example `..a` or `...a`), as exemplified below.  While names like these are atypical, they are however valid file names (which I would say have no extension).

The following code ( https://play.rust-lang.org/?gist=06fc9a031434d53f0c41a34ca5051170 ):

    let p = Path::new ("a");  println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
    let p = Path::new (".a");  println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
    let p = Path::new ("..a");  println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
    let p = Path::new ("...a");  println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
    
    let p = Path::new (".");  println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
    let p = Path::new ("..");  println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
    let p = Path::new ("...");  println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());

Prints the following:

    "a" -> Some("a") + None
    ".a" -> Some(".a") + None
    !! "..a" -> Some(".") + Some("a")
    !! "...a" -> Some("..") + Some("a")

    "." -> None + None
    ".." -> None + None
    !! "..." -> Some("..") + Some("")

The issue can be seen in the lines marked with `!!`, where I would expect that the `Path::file_stem` to return the entire name and `Path::extension` to return `None` as there is no "proper" extension in this case.  Namely I would expect the output to be:

    "..a" -> Some("..a") + None
    "...a" -> Some("...a") + None
    "..." -> Some("...") + None
Repository: go
Issue: net/http: WriteTimeout times out writes before they're written
Labels: Documentation,help wanted,NeedsFix

(related to #21389)

### What version of Go are you using (`go version`)?
I checked `go version go1.10 linux/amd64` and `go version go1.9.4 linux/amd64`, which behave the same.

### Does this issue reproduce with the latest release?
Yeah.

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ubuntu/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ubuntu/go"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build665138149=/tmp/go-build -gno-record-gcc-switches"
```

### What did you do?
I set `WriteTimeout` to some value, which was smaller than the time handler took to handle the request.

https://gist.github.com/WGH-/90bbfe656e63f6fa457db84f91384c41

```
curl '18.196.145.219:8080/foo?t=1.5s' -v
```

### What did you expect to see?
Well, the documentation clearly states "It is reset whenever a new request's header is read.", after all.  So strictly speaking, everything is working as intended.

However, I expected that `WriteTimeout` would only timeout write calls that're taking too long, or at least that it would start ticking at the first write. It would make much more sense this way.

### What did you see instead?
As soon as server tries to write anything, even it hasn't written anything before, assuming timeout is passed, it will close the connection.
```
curl: (52) Empty reply from server
```
Repository: kubernetes
Issue: hostPath volumes used with subPath volume mounts don't support reconstruction
Labels: kind/bug,sig/storage,lifecycle/frozen

<!-- This form is for bug reports and feature requests ONLY! 

If you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).
-->

**Is this a BUG REPORT or FEATURE REQUEST?**:
@kubernetes/sig-storage-bugs 

**What happened**:
Normally this isn't a problem, but if you use subpath with hostpath volumes, then that means the subpath mounts will not get cleaned up during the reconstruction window (a pod is force deleted while kubelet is down)
Repository: flutter
Issue: Shared flutter runtime
Labels: c: new feature,engine,c: proposal,P3,team-engine,triaged-engine

We all know that building a flutter app comes with some overhead in file size.
Is there a plan to ship the flutter core/runtime with the OS so that it can be shared between installed apps?

In the case of Android & Fuchsia it should be possible considering they're both also maintained by Google.
The most important part of that integration would be that the flutter framework can be updated Independent from the OS itself. Similar to how Google Play Services are working on Android.
Repository: go
Issue: cmd/gofmt: not idempotent on line with multiple comments
Labels: NeedsInvestigation

```
$ gotip version
go version devel +5f0a9ba134 Tue Mar 20 22:46:00 2018 +0000 linux/amd64
```

Note as the second `gofmt` invocation changes the code again:

```
$ cat test.go
package p

func f() {
	foo(); /* one */ fooooo(); /* two */
}

$ cat test.go | gofmt
package p

func f() {
	foo() /* one */
	fooooo() /* two */
}

$ cat test.go | gofmt | gofmt
package p

func f() {
	foo()    /* one */
	fooooo() /* two */

```
Repository: rust
Issue: Need more helpful warning when "pub extern" function is not exported via "pub use"
Labels: C-enhancement,A-diagnostics,T-compiler

I'm creating a bunch of `#[no_mangle] pub extern fn` that will be callable from C code.  Sometimes I forget to put them in my toplevel `lib.rs` as `pub use`.  This is the warning I get:

```
warning: function is marked #[no_mangle], but not exported
   --> src/state.rs:436:1
    |
436 |   pub extern "C" fn rsvg_state_rust_parse_style_pair(
    |   ^
    |   |
    |  _help: try making it public: `pub `
```

At first sight, that function is already `pub`!  The warning should say that I need to export it from the crate via `pub use`.