sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Emmet too active in files such as JSX, TSX, and PHP 
Labels: bug,emmet,emmet-parse

<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: Version 1.24.0 (1.24.0)
- OS Version: macOS 10.13.4 (17E199)

Steps to Reproduce:

1. Open a new file, set language to `javascriptreact`.
2. Add the following code:

```js
const arr = [1, 2, 3]
const i = 0

arr[i|]
```

3. The location where the pipe is, after typing the `i`, the suggestions will appear, and the top suggestion is Emmet.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: flutter
Issue: Document ListView usage with the Column widget
Labels: framework,f: scrolling,d: api docs,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-framework,triaged-framework

I use flutter framework with following revisions:

```
Flutter 0.4.4 • channel beta • https://github.com/flutter/flutter.git
Framework • revision f9bb4289e9 (4 weeks ago) • 2018-05-11 21:44:54 -0700
Engine • revision 06afdfe54e
Tools • Dart 2.0.0-dev.54.0.flutter-46ab040e58
```

I cannot use ListView or ListViewBuilder inside Column widget. No list item is shown until I remove Column wrapper. Is it supposed not to work in that way, or is it a bug?

Here it is my test widget.
```dart
new Container(
        child: new Column(
      children: <Widget>[
        new ListView.builder(
            itemCount: 3,
            padding: const EdgeInsets.only(top: 10.0),
            itemBuilder: (context, index) {
              return new Text(" asdasd");
            })
      ],
    ))
```
Repository: flutter
Issue: SliverAppBar flexibleSpace with height depending on children
Labels: c: new feature,framework,f: material design,f: scrolling,customer: crowd,c: proposal,P2,team-design,triaged-design

I have a SliverAppBar with a flexibleSpace that holds information that will change in height. I simply want my AppBar to determine it's height at runtime rather than the static expandedHeight option. Do I really need to calculate the height of this widget before I pass it to the flexibleSpace? Or is there a built in method to allow the SliverAppBar to determine that on it's own?
Repository: rust
Issue: Improper use of closures not detected
Labels: A-diagnostics,A-closures,T-compiler,C-bug

The following code gets "overflow evaluating the requirement `[closure@src/main.rs:20:19: 20:28]: std::ops::FnMut<(i32,)>`" if the line in `main` is uncommented.
If the error should exist (which I'm unsure about), it should be detected without needing to call `map`.
If not, that's a bug.

```rust
enum Foo<T> {
    A(T),
    B(Box<Foo<T>>, Box<Foo<T>>),
}

impl<T> Foo<T> {
    fn map<F, T2>(self, mut f: F) -> Foo<T2>
    where
        F: FnMut(T) -> T2,
    {
        match self {
            Foo::A(x) => Foo::A(f(x)),
            Foo::B(x, y) => Foo::B(Box::new(x.map(&mut f)), Box::new(y.map(&mut f))),
        }
    }
}

fn main() {
    // Foo::A(0).map(|x| x + 1);
}
```
Repository: pytorch
Issue: how can I fetch the result of output's Blobs_namet after  I sum two numpy array via brew.sum
Labels: caffe2

for example:
data1=np.random.randint(20,size=(2,3)).astype(np.int32)
data2=np.random.randint(20,size=(2,3)).astype(np.int32)
workspace.FeedBlob('data1',data1)
workspace.FeedBlob('data2',data2)
model=model_helper.ModelHelper(name="sumsum")
data3=brew.sum(model,['data1','data2'],"data3")
when I print the type of data3,it will tell me data3 is the BlobReference.But when I want to find the BlobReference name in the  workspace.Blobs(), I don't find the data3 in it. 
WHY???and I want to know how can i inspect the result of sum
Repository: rust
Issue: Unchecked array indices with --emit=metadata
Labels: A-lints,T-compiler,C-bug

This is a spinoff of Issue #51308.

Using:

```
rustc 1.28.0-nightly (a805a2a5e 2018-06-10)
binary: rustc
commit-hash: a805a2a5ebba2802f432d79874e59c24e398f82a
commit-date: 2018-06-10
host: x86_64-pc-windows-gnu
release: 1.28.0-nightly
LLVM version: 6.0
```

On this code:

```
fn main() {
    let a: [i32; 1] = [0; 1];
    a[1];
}
```

Compiling with:

`rustc test.rs`

I get:

```
error: index out of bounds: the len is 1 but the index is 1
 --> test.rs:3:5
  |
3 |     a[1];
  |     ^^^^
  |
  = note: #[deny(const_err)] on by default
```

Compiling with `rustc --emit=metadata test.rs` I get no errors.
Repository: rust
Issue: Method resolution should obey usual shadowing rules for glob imports & prelude
Labels: A-resolve,A-trait-system,T-lang,T-libs-api

Today item import take precedence over glob imports which take precedence over prelude imports. This works for traits:


```rust
mod a {
    pub trait X {
        fn x(&self) { println!("a"); }
    }

    impl X for () {}
}

mod b {
    pub trait X {
        fn x(&self) { println!("b"); }
    }

    impl X for () {}
}

use a::X;
use b::*;

fn main() {
    ().x(); // Works and prints "a", b/c b is shadowed
}
```

However, this logic does not work for trait *methods*. If we rename `b::X` to `b::Y`, the code fails to compile:

```rust
mod a {
    pub trait X {
        fn x(&self) { println!("a"); }
    }

    impl X for () {}
}

mod b {
    pub trait Y {
        fn x(&self) { println!("b"); }
    }

    impl Y for () {}
}

use a::X;
use b::*;

fn main() {
    ().x(); // error: multiple `x` found
}
```

I think this problematic for two reasons:

* it seems inconsistent with how other names work
* it makes adding a trait to prelude in std and other crates a breaking change (see https://github.com/rust-lang/rust/issues/51418)


Could we perhaps fix it?

r? @rust-lang/lang
Repository: go
Issue: cmd/cgo: undefined reference for C function with -buildmode=c-archive
Labels: help wanted,NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?
go version go1.10.3 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="/Users/Andari/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/Andari/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/lw/5pzww_8n38g1lv_kqqmqfvqr0000gn/T/go-build228325343=/tmp/go-build -gno-record-gcc-switches -fno-common"

### What did you do?
I was experimenting with C interfacing:
```
// int cadd(int a, int b);
import "C"
...
// using the function somewhere
```
I built it with `go build -buildmode=c-archive GoAdd.go`

### What did you expect to see?
The build to be successful.

### What did you see instead?
Undefined symbols for architecture x86_64:
  "_cadd", referenced from:
      __cgo_ece3f0761be9_Cfunc_cadd in _x002.o

Why would linking be neccessary, if I am generating an archive which I link together with the cadd implementing object file later?
Repository: rust
Issue: Implementing `Alloc` for mutable references to `Alloc`
Labels: T-lang,C-feature-request

I don't see why this shouldn't be implemented. It certainly proves useful when working with generic allocators, without requiring a `Copy` bound on them. For example:

    struct AllocWithInternalMutability {
      ...
    }
    
    impl<'a> Alloc for &'a AllocWithInternalMutability { ... }
    
    impl AllocWithInternalMutability {
      fn use_self(&self) {
        //Ugly code
        let mut ref_to_self=self;
        use_alloc(&mut ref_to_self);
      }
    }
    
    fn use_alloc<A: Alloc>(a: &mut A) {
      //Multiple usages of `A` in here
      a.alloc(...);
      a.dealloc(...);
    }

While having an `impl<A: Alloc> Alloc for &mut A` generic implementation would allow for this instead:

    impl AllocWithInternalMutability {
      fn use_self(&self) {
        //Much cleaner
        use_alloc(self);
      }
    }
    
    fn use_alloc<A: Alloc>(mut a: A) {
      //Multiple usages of `A` in here, thanks to `&mut A` also implementing `Alloc`
      a.alloc(...);
      a.dealloc(...);
    }

The other current option is to require `Copy` on `A`, allowing for multiple uses of `A` without losing ownership.
Repository: TypeScript
Issue: Source code transpiles, but emitted declarations filled with errors
Labels: Bug,Domain: Declaration Emit

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

I apologize if I shouldn't be opening an issue about this.

I asked about debugging long compile times before in another issue, #24435

This issue right now is related to that but in a different way.

The [`typed-orm`](https://github.com/AnyhowStep/typed-orm) project transpiles quickly now, after an unintuitive solution, but the emitted declarations appear "unusable" by other projects (at least according to `tsc`).

`ts-node` and VS code don't seem to have a problem with the emitted declarations and seem to run just fine.

-----

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  2.9.1

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** emit declarations incorrect

**Code**

```ts
import * as o from "typed-orm";
o;
```

And then run `tsc --noEmit --diagnostics`

A repo that reproduces the problem can be found [here](https://github.com/AnyhowStep/emitted-typed-orm-errors)

**Expected behavior:**

Success after about 17 seconds

**Actual behavior:**

Errors after about 37s

The list of errors is... Rather large.

-----

I have a different project that is using `typed-orm` and `ts-node` seems to run it fine. VS code also seems to do some type checking fine (seems to, maybe it skips some more involved checks, or does incremental checking, I have no idea).

However, when I try to run `tsc` (checking types/transpiling), `node` just runs out of memory, even after giving it 8GB of RAM.

-----

I tried to debug what was wrong. The `typed-orm` project itself transpiles very quickly, now. I figured there must be something wrong with that project. However, after removing a lot of code, I still got out-of-memory exceptions.

In the end, I created an entirely new project, wrote that snippet above, and saw that even though the source code for `typed-orm` transpiles, the transpiled declarations seem to have errors.

-----

**Link to example:** [here](https://github.com/AnyhowStep/emitted-typed-orm-errors)

**Link to `typed-orm`:** [here](https://github.com/AnyhowStep/typed-orm)

**Related Issues:** #24435
Repository: TypeScript
Issue: Finding definitions exported by string key does not work
Labels: Bug,VS Code Tracked,Domain: JavaScript

_From @Flamefire on June 9, 2018 12:35_

<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.24.0
- OS Version: WIn10 x64

Steps to Reproduce:

1. Export by string key:
```
function parse(){return 1;}
exports["parse"] = parse; // exports.parse = parse;
```
2. Import and try GoTo Def:
require("./foo")
foo.parse(); // Not found

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

Both versions (`exports["parse"] = parse; // exports.parse = parse;`) should work exactly the same.

_Copied from original issue: Microsoft/vscode#51520_
Repository: ant-design
Issue: Is there a Listener triggered after Sider component's animation is finished ?
Labels: Inactive

### What problem does this feature solve?
I want do something AFTER the Sider component's collapse animation is finished . But the listener `onCollapse` triggered when the animation begin . Is there a listener like `onCollapsed` but not `onCollapse` ?

### What does the proposed API look like?
Just the same behavior like `onCollapse` but triggered After the animation finished .


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: Refactoring Scene breaks custom properties in inherited scene
Labels: bug,topic:core,confirmed

**Godot version:**
3.0.3 rc1

**Issue description:**
Refactoring the scene hierarchy in the parent scene makes the inherited scene lose custom property.
If the nodes are just moved around and/or renamed, they should keep the child property.
related to #16650

**Steps to reproduce**
1. Make Scene A, with B as a children
2. Make Scene A' inheriting from A
3. Move B in scene A'
4. Add a node in A and move B as a child node of that node
5. A' has the new hiearchy but lost the custom translation of B.
Repository: rust
Issue: Compiler doesn't suggest missing method that is implemented for different type parameter
Labels: C-enhancement,A-diagnostics,T-compiler

Consider the following API that allows us to control some piece of hardware, while providing some compile-time guarantees by tracking the hardware state as a type parameter:
``` rust
pub struct Hardware<State>(State);

impl Hardware<Disabled> {
    pub fn new() -> Self {
        Hardware(Disabled)
    }

    pub fn enable(self) -> Hardware<Enabled> {
        Hardware(Enabled)
    }
}

impl Hardware<Enabled> {
    pub fn do_stuff(&mut self) {}
}


pub struct Enabled;
pub struct Disabled;
```

`Hardware` is created in the `Disabled` state and needs to be `enable`d before anything can be done with it.

The following piece of code tries to `do_stuff` without `enable`ing first:
``` rust
let hw = Hardware::new();
hw.do_stuff();
```

It fails with the following error message:
```
error[E0599]: no method named `do_stuff` found for type `Hardware<Disabled>` in the current scope
  --> src/main.rs:24:8
   |
1  | pub struct Hardware<State>(State);
   | ---------------------------------- method `do_stuff` not found for this
...
24 |     hw.do_stuff();
   |        ^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
```

I think this error message is misleading, as the method does exist. It's just not available with this specific type parameter. This could be highly confusing to someone who isn't used to this kind of API.

I believe that the compiler should suggest the method, and note that it would be available, if the type parameter were different. Similarly to how it would suggest a trait method for a trait that isn't imported into the current scope. Ideally, I would like the compiler to suggest calling the `enable` method, as that would put the API into a state that would allow `do_stuff` to be called.

I'm aware that method suggestions like this were removed some time ago ([issue](https://github.com/rust-lang/rust/issues/42929), [PR](https://github.com/rust-lang/rust/pull/46461)). Adding an attribute to mark function that should be suggested for state transitions like this [has been suggested before](https://github.com/rust-lang/rust/issues/42929#issuecomment-345792124) (@zackmdavis [seemed interested in working on this](https://github.com/rust-lang/rust/issues/42929#issuecomment-345914556)). From my perspective as an API author, such an attribute would be an excellent way to improve the user experience when using APIs like this.

cc @oli-obk (We talked about this at RustFest. Sorry for taking so long to open this issue.)
Repository: pytorch
Issue: [Feature request] Add torch.multiprocessing.Pipe
Labels: module: bootcamp,module: multiprocessing,triaged,enhancement,small

It would be convenient to support Pipe in PyTorch wrapper of multiprocessing. Since pipe sometimes much faster than Queue when only two points transmissions needed.
Repository: neovim
Issue: UI: "fold" events
Labels: enhancement,api,ui-extensibility,core

It would be nice to have an RPC API for manipulating folds directly without switching to a window first. It'd also be nice to get fold update events, but window events deserve their own issue: https://github.com/neovim/neovim/issues/8539

https://github.com/neovim/neovim/blob/77192889f09a118c8993af79b2eaa7f43623b6c2/src/nvim/fold.c#L1046-L1049

```
fold_desc = [top, len, flags, small?]
get all folds: window_get_folds() -> [fold_desc, ...]
set all folds: window_set_folds([fold_desc, ...])
expand all folds touching range: window_expand_folds(start_line, end_line)
collapse all folds touching range: window_collapse_folds(start_line, end_line)
```
Repository: pytorch
Issue: Properly release NCCL resources
Labels: triaged,module: nccl

Right now we're simply leaking them, because NCCL segfaults if you attempt to destroy them after the driver is unloaded.

One strategy to fix it would be to use an `atexit` handler.

See #8352 for more context.
Repository: go
Issue: gccgo: internal compiler error for interface with cyclic result types
Labels: NeedsInvestigation

With
```$ gccgo --version
gccgo (google-gccgo-261288) 9.0.0 20180607 (experimental)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
the following program
```Go
$ cat x.go
package main

func main() {
}

type I interface {
	M1() interface {
		I
	}
	M2() interface {
		I
	}
}

type S struct{}

func (S) M1() interface{ I } {
	return nil
}

func (S) M2() interface{ I } {
	return nil
}
```
crashes the compiler:
```
$ gccgo x.go
gccgo: internal compiler error: Segmentation fault signal terminated program go1
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://go.ext.google.com/go/> for instructions.
```
The program compiles (somewhat surprisingly) without error if the struct definition is absent:
```Go
$ cat x.go
package main

func main() {
}

type I interface {
	M1() interface {
		I
	}
	M2() interface {
		I
	}
}
```
For the reference:
- go/types accepts this code (not clear that it should)
- cmd/compile doesn't terminate (issue #25262)

cc: @thanm
Repository: scrcpy
Issue: Mouse pointer visibility
Labels: feature request

Under full screen mode make mouse pointer fade away after some time without mouse activity.
It's specially useful for presentations.
Repository: go
Issue: proposal: io/v2: remove io.Seeker, SeekStart, etc., change Seek method 
Labels: v2,Proposal

Copying @bradfitz's comment https://github.com/golang/go/issues/17920#issuecomment-260542015 into a separate proposal.

For Go 2 we should consider changing the `Seek` method to just take a file position, not a whence argument.  We should consider adding `SeekFromCurrent` and `SeekFromEnd`, though I suspect they are unnecessary.  We should change `Seeker` similarly.  We should remove `io.SeekStart`, `io,SeekCurrent`, and `io.SeekEnd`.

Rationale: the current `Seek` method is copied from C.  It presents three different interfaces, and doesn't make much sense as a single method in Go.  People who implement the `io.Seeker` interface often only implement it for `io.SeekStart`, and do not correctly handle the other possible values.

See also #17920, which this would replace.
Repository: flutter
Issue: Provide a way to screenshot an entire ListView.builder
Labels: a: tests,c: new feature,framework,P3,team-framework,triaged-framework

(Coming here from #12994)

`ListView.builder` will only render the items visible on the screen. For widget screenshot tests, however, it would be useful to screenshot the entire contents of the widget -- as if there were no vertical constraints, resulting in all the widgets being built.

Possible ideas to do this:
- Add a debug option to make it display all the widgets?
- Manually scroll the screen down until it won't scroll anymore and determining the height. Place the ListView in a SizedBox of that height.
Repository: rust
Issue: NLL no longer figures out non-lexical lifetimes within loop
Labels: C-enhancement,T-compiler,A-NLL,NLL-polonius

Minimal useful example:

```rust
#![feature(nll)]
use std::collections::VecDeque;

fn next(queue: &mut VecDeque<u32>, above: u32) -> Option<&u32> {
    let result = loop {
        {
            let next = queue.front()?;
            if *next > above {
                break next;
            }
        }
        queue.pop_front();
    };
    
    Some(result)
}
```

This program compiled in `nightly-2018-03-07`, but does not compile on `nightly-2018-05-27`. Instead, it fails with this error:

```
error[E0502]: cannot borrow `*queue` as mutable because it is also borrowed as immutable
  --> src/main.rs:12:9
   |
7  |             let next = queue.front()?;
   |                        ----- immutable borrow occurs here
...
12 |         queue.pop_front();
   |         ^^^^^^^^^^^^^^^^^ mutable borrow occurs here
   |
```
([playground](https://play.rust-lang.org/?gist=403ae9ce2d986ecb264087fa8a927762&version=nightly&mode=debug))


To my understanding, this program is in fact sane. `next` is always dropped by the time `queue.pop_front()` runs, and if it escapes and is returned, `queue.pop_front()` is not run.

The error is the same if `return Some(next);` is used instead of `break next;`.
Repository: rust
Issue: Nightly version is off by one
Labels: T-infra,C-feature-request

This says it all:
```
$ rustc +nightly-2016-06-10 --version
rustc 1.11.0-nightly (7d2f75a95 2016-06-09)
```
The version reported by rustc itself is consistently off by one compared to what I requested from rustup. That's particularly confusing when looking at e.g. Travis CI build logs of of my project with a particular nightly, and trying to reproduce the result by installing the same nightly.
Repository: flutter
Issue: Support soft hyphenation (line breaks at U+00AD plus rendering a hyphen at the end of the line)
Labels: c: new feature,framework,engine,a: typography,customer: crowd,P2,team-engine,triaged-engine

I was surprised not to find a parameter to have automatic hyphenation in Text widgets (and the likes). I think it is a useful feature to get nice designs. Without it, justified text may be filled with ugly blank spaces if there are too many very long words.

Could text hyphenation be implemented in flutter, or does it sound like a bad idea for some reason ?

Thanks and congrats to the flutter team for the great job !
Repository: flutter
Issue: FlutterDriver does not support to find/read validation errors (errorText) of a form field.
Labels: a: tests,c: new feature,framework,t: flutter driver,P2,team-framework,triaged-framework

Hi,

I'm writing an integration test for my flutter application. Goal of the integrationtest is to test the form field validation behaviour.

As an example, I want to check if an email field contains a valid email address. If not, an appropriate errorText is displayed below the form field.

As far as I have seen, FlutterDriver currently only supports to read the text of a form field. What I would need for my IntegrationTest case is to read the errorText of the form field.

Would be great if the FlutterDriver could support such cases.

Regards,
Sacha