sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: path/filepath: Split on a path with more than 1 separator at the start doesn't work on Windows
Labels: NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.11.4 windows/amd64
</pre>

### Does this issue reproduce with the latest release?
I don't have a working installation of it at the moment.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\vittorio.parrella\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=c:\GOPATH\trunk\ETS2
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\VITTOR~1.PAR\AppData\Local\Temp\2\go-build213636594=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?
<pre>
import (
   "fmt"
   "path"
   "path/filepath"
)

func main() {
	dir,file := filepath.Split(`C:\test\test.jpg`)
	fmt.Println("path: ", dir, " - file: ", file)

        // this is the problematic scenario
        // seems that if there is more than separator at the start, the split does not work
	dir,file = filepath.Split(`\\test/test.jpg`)
	fmt.Println("path: ", dir, " - file: ", file)
	dir,file = filepath.Split(`\test/test.jpg`)
	fmt.Println("path: ", dir, " - file: ", file)

	dir,file = filepath.Split(`//test/test.jpg`)
	fmt.Println("path: ", dir, " - file: ", file)

       // in fact, using path.Clean eliminates the problem
	dir,file = filepath.Split(path.Clean(`//test/test.jpg`))
	fmt.Println("path: ", dir, " - file: ", file)
}
</pre>

### What did you expect to see?
<pre>
path:  C:\test\  - file:  test.jpg
path:  \\test/  - file:  test.jpg
path:  \test/  - file:  test.jpg
path:  ////test/  - file:  test.jpg
path:  /test/  - file:  test.jpg
</pre>

### What did you see instead?
<pre>
path:  C:\test\  - file:  test.jpg
path:  \\test/test.jpg  - file:  
path:  \test/  - file:  test.jpg
path:  //test/  - file:  test.jpg
path:  /test/  - file:  test.jpg
</pre>

Note:
On linux it seems that the issue does not manifest, the output is as expected (minus the absolute windows path which is ok): https://play.golang.org/p/9PlmyANLFAL
Repository: flutter
Issue: Let CupertinoNavigationBar leading/trailing sizing be customizable
Labels: c: new feature,framework,f: cupertino,c: proposal,P3,workaround available,team-design,triaged-design

The cupertino navigation bar leading width seems limited:

![image](https://user-images.githubusercontent.com/21303438/61643872-51fc9f80-acd6-11e9-8510-365aca47a2e3.png)

I can not make my widget such as a Row with text and image in side ...... What should I do?
Repository: vscode
Issue: Scrolling can be improved
Labels: feature-request,editor-scrollbar

Issue Type: <b>Feature Request</b>

when some of my file's size grows when I'm developing, then it becomes more and more hard to scroll. 
Little scrolling drag shifts code in screen very large amount up or down, but sometimes I want it to shift only little bit. 
This is convenient to do if file contains about under 2000 rows but becomes more and more inconvenient as rows amount grow.

There can be nice solution for that: if holding down Ctrl key while dragging scrollbar button with mouse, then code in screen moves more slowly.
It would be most nice when i move cursor with mouse about 200 pixels up while dragging.
then code in screen moves down about 30 rows. 
(Mouse cursor and scrollbar button doesn't need to stay in one place - when cursor moves
example 200px up, then scrollbar button can move example only 50px up)

Thank you :)
I love this program :)

VS Code version: Code 1.36.0 (0f3794b38477eea13fb47fbe15a42798e6129338, 2019-07-03T13:25:46.372Z)
OS version: Windows_NT x64 6.1.7601


<!-- generated by issue reporter -->
Repository: go
Issue: wiki: CodeReviewComments change
Labels: Documentation,NeedsInvestigation

Hello, 

I suggest an example to be added to explain why interface constructor should return the struct not the interface type itself

The edit to be added on [CodeReviewComments #interfaces](https://github.com/golang/go/wiki/CodeReviewComments/b61e691f208b5b3523cc3fde1870e8ccec4b2170#interfaces)

`Go interfaces generally belong in the package that uses values of the interface type, not the package that implements those values. The implementing package should return concrete (usually pointer or struct) types: that way, new methods can be added to implementations without requiring extensive refactoring, **and this will enable the struct to implement more than one interface and be accepted/evaluated to all of them in different functions** `

The code example 
https://play.golang.org/p/zZU0rFzjuEm
```go
// DONOT DO THIS
package main
import ("io")
type Thinger interface { 
	Thing() bool 
}
type defaultThinger struct{  }
func (t defaultThinger) Thing() bool { 
	return true 
}
func (t defaultThinger) Read(p []byte) (n int, err error) {
   	return 0, nil
}  	
func NewThinger() Thinger { 
	return defaultThinger{  } 
}
func main() {
	testThinger(NewThinger())
	// will return cannot use NewThinger() (type Thinger) as type io.Reader in argument to testReader: Thinger does not implement io.Reader (missing Read method)
	// if NewThinger() return defaultThinger it will work
	testReader(NewThinger())
}
func testReader(r io.Reader) {}
func testThinger(t Thinger) {}
```
Repository: rust
Issue: -Csave-temps does not retain linker scripts
Labels: A-linkage,T-compiler,C-bug

Rust uses a linker script with gcc linker flavour, adding a flag like this:

```
-Wl,--version-script=/run/user/1000/rustcXt0Huw/list
```

However this file is not preserved even when `-Csave-temps` is specified, making it impossible to really debug linkage issues outside of rustc.
Repository: flutter
Issue: Log file for 'flutter run widget_test.dart'
Labels: a: tests,c: new feature,tool,P3,team-tool,triaged-tool

Following the tip here for running widget tests:
https://twitter.com/flutterdev/status/1038114431325163521?lang=en

We would like to be able to store the results of our test to a log file, or if possible create a json file that can be used for reporting. 
How do we do this without storing the file to the mobile test device and instead save the logs on our machine?
Repository: flutter
Issue: 'flutter run widget_test.dart' does not end the running process after all the tests have completed.
Labels: a: tests,tool,d: stackoverflow,P3,team-tool,triaged-tool

Following the advise here https://twitter.com/flutterdev/status/1038114431325163521?lang=en does run our widget test on the device. However the process just keeps on running.
Is there any additional info that would end the process after the widget tests are completed?

Thanks.
Repository: godot
Issue: `MenuButton` ignores custom styles because it's `flat` by default
Labels: enhancement,discussion,confirmed,topic:gui

the menubutton's normal style don't seem to be rendering even though it's set to a the same texturestyle as the button below it
![image](https://user-images.githubusercontent.com/2453707/61678565-0a671b00-acb8-11e9-8db2-33f6d0edf8de.png)
Repository: opencv
Issue: Opencv with cuda GpuMat::create() call causes access violation
Labels: category: gpu/cuda (contrib),incomplete,needs investigation

Hi, 
**I compiled (debug and release) opencv 4.1.0 with contrib modues and enabled cuda.**

I'm trying to create a GpuMat and upload host data from cv::Mat.

This works properly when running in debug mode. However when I run in release mode (even when turning off optimizations) I get an access violation in the GpuMat::create() function (gpu_mat.cu line 174):

`bool allocSuccess = allocator->allocate(this, rows, cols, esz);`

"Exception thrown: read access violation. this->allocator was 0x21A."

My code for creating the GpuMat:

`cv::Mat raw = cv::Mat(inImg->height, inImg->width, CV_16UC1, inImg->host_data);
g_inImg.create(inImg->height, inImg->width, CV_16UC1);`

The crash is only happens in Release mode.

Do anyone has a clue what could be the reason?

Thank you in advance.
Repository: flutter
Issue: How to make an aop package (aspectd) in a decent way?
Labels: c: new feature,tool,customer: alibaba,a: build,P3,team-tool,triaged-tool

This issue is related to https://github.com/flutter/flutter/pull/35803

Recently, I've developed a package aiming at implement the AOP(aspect oriented programming) feature for dart based on kernel-to-kernel transformation which is available at: https://github.com/alibaba-flutter/aspectd

A design diagram is given below:
![Aspectd Diagram](https://camo.githubusercontent.com/b7ae6c179ddda11ed838676770915a62f358a443/687474703a2f2f67772e616c6963646e2e636f6d2f6d742f5442313053424964676148334b566a535a466a58586346577058612d3836352d3737312e706e67)

Though it is expected to do aop without invasion, there is still one invasion point.

Given an app package(where original codes is given), aspectd requires a new aop package where aop codes are written, so that when compiling the aop package, both app and aop codes can be all compiled into the app.dill.
Henceforth, a hook is needed in the app building process(flutter_tools) so that aop package can be compiled when app package is compiled successfully, both in jit/aot mode.
After the aop package is compiled into dill successfully, a dill transformer is needed to extract the annotations and transform the component object so that aop feature can be implemented as expected.

More generally,  different from gradle, design of flutter_tools make it hard for developers if they want to do inject some customized hooks before/after running flutter commands.

It would be better if a generalized way is provided.

Current patching logic to flutter_tools is given below:
a. build_aot.dart

![Screen Shot 2019-07-23 at 4 34 49 PM](https://user-images.githubusercontent.com/817851/61696305-b6b40a80-ad67-11e9-987e-1821a867b980.png)

b.build_bundle.dart
![Screen Shot 2019-07-23 at 4 34 57 PM](https://user-images.githubusercontent.com/817851/61696392-d6e3c980-ad67-11e9-9c67-613cc78c6b41.png)

c.aspectd.dart
Not a problem as totally new.

cc @jonahwilliams
Repository: rust
Issue: Doc comments break proc_macro::SourceFile
Labels: A-macros,T-compiler,C-bug

Adding a doc comment before a procedural macro invocation causes [`proc_macro::SourceFile::path`](https://doc.rust-lang.org/proc_macro/struct.SourceFile.html#method.path) to return the path to lib.rs or main.rs instead of the actual path. The documentation states that if [`proc_macro::SourceFile::is_real`](https://doc.rust-lang.org/proc_macro/struct.SourceFile.html#method.is_real) returns false, the returned path may not be an actual path on the filesystem, but this is not the case(it returns true and the path is a real path). I originally found the issue in pustaczek/icie@53a9913.

I tried this code:

```rust
// src/lib.rs

pub mod sub;
```
```rust
// src/sub.rs

#[ohnodoc_codegen::sparklify]
pub fn without_doc_comment() -> i32 {
    42
}

/// I'm a doc comment!
#[ohnodoc_codegen::sparklify]
pub fn with_doc_comment() -> i32 {
    42
}
```
```rust
// ohnodoc-codegen/src/lib.rs

#![feature(proc_macro_span)]

extern crate proc_macro;

use proc_macro::TokenStream;

#[proc_macro_attribute]
pub fn sparklify(_params: TokenStream, item: TokenStream) -> TokenStream {
    let source = item.clone().into_iter().next().unwrap().span().source_file();
    eprintln!("path = {:?}, is_real = {:?}", source.path(), source.is_real());
    item
}
```

I expected to see this happen: during compilation, these two lines are printed to stderr:
```
path = "src/sub.rs", is_real = true
path = "src/sub.rs", is_real = true
```

Instead, this happened: these two lines were printed:
```
path = "src/sub.rs", is_real = true
path = "src/lib.rs", is_real = true
```

## Meta

rustc 1.38.0-nightly (07e0c3651 2019-07-16)
binary: rustc
commit-hash: 07e0c3651ce2a7b326f7678e135d8d5bbbbe5d18
commit-date: 2019-07-16
host: x86_64-unknown-linux-gnu
release: 1.38.0-nightly
LLVM version: 8.0
Repository: create-react-app
Issue: errors are coming wen i start 
Labels: issue: bug

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-you@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-you@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\AnithaHR\AppData\Roaming\npm-cache\_logs\2019-07-23T09_40_13_120Z-debug.log
Repository: flutter
Issue: [webview_flutter] Support injecting `js` script `atDocumentStart` instead of `onload`
Labels: c: new feature,d: stackoverflow,p: webview,package,team-ecosystem,P3,triaged-ecosystem

I am trying to create a `webview` in flutter so that web browser can inject some `js` code to the document before it loads (`atDocumentStart`).

I have tried several ways, but it always seems to inject the code too late (`onload`).

```dart
final String injectScript =  ("some js code");

class WebPage extends StatefulWidget {
  WebPage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _WebPageState createState() => _WebPageState();
}

class _WebPageState extends State<WebPage> {
  GlobalKey<ScaffoldState> scaffoldState;
  bool isLoading = false;
  final assetIdController = TextEditingController(text: "");
  bool isValid = true;
  static Completer<WebViewController> _webViewController =
      Completer<WebViewController>();
      

  @override
  void initState() {
    super.initState();

  }

    Widget favoriteButton() {
    return FutureBuilder<WebViewController>(
        future: _webViewController.future,
        builder: (BuildContext context,
            AsyncSnapshot<WebViewController> controller) {
          if (controller.hasData) {

            return FloatingActionButton(
              onPressed: () async {
//                TOO LATE HERE:
                controller.data.evaluateJavascript(injectScript);
              },
              child: const Icon(Icons.refresh),
            );
          }
          return Container();
        });
    }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        key: scaffoldState,
        appBar: AppBar(
          centerTitle: true,
          elevation: 0.0,
          iconTheme: IconThemeData(color: Theme.of(context).primaryColor),
          backgroundColor: Theme.of(context).canvasColor,
        ),
        backgroundColor: const Color(0xFFF8F8F8),
        body: WebView(
          initialUrl: 'https://communities-qa.cln.network',
          javascriptMode: JavascriptMode.unrestricted,
          onWebViewCreated: (WebViewController webViewController) async {
//            NOT WORKING HERE:
//            await webViewController.evaluateJavascript(injectScript);

            _webViewController.complete(webViewController);
          },
        ),
        floatingActionButton: favoriteButton(),);
  }
}
```

I expect it to load the code before the page (the page relying on the evaluated code to run), but it is either too late or not working.
Repository: rust
Issue: absolute-paths-not-starting-with-crate warning emitted for macros from 2015 edition crates used in 2018 edition crates
Labels: A-lints,A-macros,T-compiler,C-bug,A-edition-2018

See e.g.

```
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
   --> src/lib.rs:156:1
    |
156 | / gst_plugin_define!(
157 | |     ndi,
158 | |     env!("CARGO_PKG_DESCRIPTION"),
159 | |     plugin_init,
...   |
165 | |     env!("BUILD_REL_DATE")
166 | | );
    | |__^
    |
    = note: `-W absolute-paths-not-starting-with-crate` implied by `-W rust-2018-compatibility`
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
    = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
```

The macro in question is declared by a 2015 edition crate and used in a 2018 edition crate.

Right now this is only annoying but if this ever becomes a hard error then using all 2015 crates as dependencies of an 2018 crate will be impossible, which was one of to promises of the editions system.
Repository: create-react-app
Issue: Set webpack cfg devtool property to 'nosources-source-map'
Labels: issue: proposal

### Webpack cfg devtool property other than: 'cheap-module-source-map', 'source-map' or false

This is mostly frustrating for production build where I'd like to have possibility to set devtool='nosources-source-map' or other less specific source-map

Now devtool is calculated as below:
```
    devtool: isEnvProduction
      ? shouldUseSourceMap
        ? 'source-map'
        : false
      : isEnvDevelopment && 'cheap-module-source-map',
```

so there is no chance to override devtool value either for development nor production mode.
Repository: pytorch
Issue: Consolidate multiprocessing helpers in distributed tests
Labels: oncall: distributed,triaged

We have a few test files where we rely on multiprocessing to setup a distributed context:

* `test/test_c10d.py`
* `test/test_c10d_spawn.py`
* `test/test_distributed.py`

The helpers should be consolidated in a single base test class or set of helper functions.

cc @mrshenli since we spoke about it in person.
Repository: angular
Issue: Hook into router config loading
Labels: feature,freq1: low,area: router,feature: under consideration,canonical

<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅

Oh hi there! 😄 

To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.

🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->


# 🚀 feature request

### Relevant Package
This feature request is for @angular/router


### Description
[Router.resetConfig](https://angular.io/api/router/Router#resetConfig) allows you to basically post process router at application startup - e.g. replace static placeholders, translate urls, mass add route data etc.). However you don't get a chance to do this for lazy loaded components.

### Describe the solution you'd like
Add some possibility to hook into the `RouterConfigLoader` when routes from the child modules are processed (e.g. a provider that would be called with the routes resolved from the just loaded module's injector - https://github.com/angular/angular/blob/master/packages/router/src/router_config_loader.ts#L43).

### Describe alternatives you've considered
The way to get around this is implemented in [localized-router](https://github.com/Greentube/localize-router): https://github.com/Greentube/localize-router/blob/master/src/localize-router-config-loader.ts. This is a hack in the first place and will not work with the new loadChildren syntax.

The solution which would support also the new syntax is here: https://github.com/gilsdav/ngx-translate-router/blob/master/projects/ngx-translate-router/src/lib/localized-router.ts which is an even bigger hack.

/cc @gilsdav @meeroslav Pls comment if you have any thoughts on this.
Repository: pytorch
Issue: Unofficial ARMv6, ARMv7, ARMv8 builds
Labels: module: build,module: docs,triaged

Hello everyone,

just wanted to let you know that I started this repo:

https://github.com/nmilosev/pytorch-arm-builds

which contains builds for ARM devices and some inference tests. Everything is working good, it would maybe be nice to put this link somewhere visible so that people know it exists. I intend to update this with every pytorch and torchvision release.

Hope this is ok.

Thanks for everything! :)
Repository: node
Issue: Contexts created with vm.createContext() do not define the URL() constructor
Labels: vm,feature request,never-stale,realm

<!--
Thank you for reporting a possible bug in Node.js.

Please fill in as much of the template below as you can.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify the affected core module name

If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you can.
-->

* **Version**: v12.6.0 (also seen in 10.13.0)
* **Platform**: Darwin Davids-MacBook-Pro.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
* **Subsystem**:

<!-- Please provide more details below this comment. -->

I've created a simple testing framework that runs tests using vm.Script.runInContext(). Now I'm writing tests for code that uses the whatwg URL API. If I use `vm.createContext()`, the created context does not define the URL() constructor. But if I pass in the URL constructor with `vm.createContext({URL})`, then I have a situation where arrays returned by URLSearchParams methods are defined using the Array.prototype object from outside the context, and my tests are trying to compare those to arrays defined inside the context with a different Array.prototype object. So because I have two arrays with different prototypes, `assert.deepStrictEqual()` thinks they are not the same.

I'd argue that the underlying bug here is that URL should be automatically defined in newly created contexts without having to be passed in.  Or maybe this is a bug in `assert.deepStrictEqual()` and it is stricter than it ought to be in this cross-context situation? 

In any case, here is an example that reproduces the issue for me:

```
const vm = require('vm');

// URL is not defined inside the context, and I can't require it, so
// I need to pass it to the context from outside. But it returns arrays
// using the Array class from outside the context.
let context = vm.createContext({require, URL, externalArray:Array});

let script = new vm.Script(`
    const assert = require('assert');
    let url = new URL('http://example.com');
    url.searchParams.append('x', '1');
    url.searchParams.append('x', '2');
    let actual = url.searchParams.getAll('x'); // Uses array class from outside
    let expected = ['1', '2'];                 // Uses array class from inside
    assert(Array.isArray(actual));                                // passes
    assert.deepStrictEqual(Array.from(actual), expected);         // passes
    assert.deepStrictEqual(actual, externalArray.from(expected)); // passes
    assert.deepStrictEqual([...actual], expected);                // passes
    assert.deepStrictEqual(actual, expected);               // fails
    assert.equal(Object.getPrototypeOf(actual),             // also fails
                 Object.getPrototypeOf(expected)); 
`);

script.runInContext(context);
```