sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: search in files focus resets when line changed
Labels: bug,search,confirmed

- VSCode Version: Code 1.9.1 (f9d0c687ff2ea7aabd85fb9a43129117c0ecf519, 2017-02-08T23:44:55.542Z)
- OS Version: Linux x64 4.4.0-62-generic
- Extensions:

|Extension|Author|Version|
|---|---|---|
|glslx-vscode|evanw|0.0.8|
|cpptools|ms-vscode|0.10.1|
|csharp|ms-vscode|1.7.0|
|mono-debug|ms-vscode|0.13.0|
|debugger-for-chrome|msjsdiag|2.5.3|
|arduino-vscode|steveyin|0.2.0|

---

Steps to Reproduce:

1. ctrl-shift-f search for a string that appears at least 3 times
2. hit F4 a TWO times to go to the 2nd result.
  - notice how in the search window the focused result is hilighted
3. now, edit the file (that contains the 2nd search result) so the line in that file no longer matches the search criteria.
 - notice how the 2nd search result disappears from the search results pane, and NO results are hilighted.
4. hit F4 again.
  - BUG: the first search result is hilighted.

expected: F4 should progress to the new 2nd search result (which was previously the 3rd result).

this bug breaks the process of using F4 to skip through results selectively editing, since every time you make an edit you have to start back at the beginning of the result. for hundreds of results, and many to skip repeatedly, this is extremely annoying.
Repository: go
Issue: cmd/internal/obj: optimize wrapper method prologue for branch prediction
Labels: Performance,compiler/runtime

Wrapper functions (such as those found in CL 36809) have an extra prologue inserted during preprocessing. Quoting cmd/internal/obj/xk86/obj6.go (after CL 36833), what this does is:

```
		// if g._panic != nil && g._panic.argp == FP {
		//   g._panic.argp = bottom-of-frame
		// }
		//
		//	MOVQ g_panic(CX), BX
		//	TESTQ BX, BX
		//	JEQ end
		//	LEAQ (autoffset+8)(SP), DI
		//	CMPQ panic_argp(BX), DI
		//	JNE end
		//	MOVQ SP, panic_argp(BX)
		// end:
		//	NOP
```

These jumps are the wrong direction. Static branch prediction says forward jumps are not taken, but the first forward jump is almost always taken. Rearrange the code to fix that.

I have a CL, to be mailed momentarily, that does this. However, I am having a hard time writing a test for this, because I cannot find a way to trigger the rare (in-a-panic) cases. From reading the panic sources, this only happens when panicking inside a deferred statement (?), but even then I see the wrapper function in the traceback.

What exactly _is_ this prologue for? How do I test that it is doing its job correctly?

cc @randall77 @minux
Repository: vscode
Issue: [html] prevent that embedded grammars can corrupt syntax highlighting of rest of document
Labels: bug,upstream,languages-basic,debt

Currently, when writing embedded language, a lot of the times the embedded grammar can cause disruption to the rest of DOCUMENT:

This is html grammar.

![image](https://cloud.githubusercontent.com/assets/4033249/22858475/9430d0b4-f08c-11e6-8386-e949dcccfb20.png)

Imagine editing css in a `<style>` at the `<head>` of a long html file. The rest of document will be constantly re-tokenized and (wrongly) syntax highlighted. This doesn't look good UX-wise and will probably have some perf impact.

For the following grammar and setting:

```yaml
- name: source.css.embedded.html
   begin: <style>
   end: </style>
   patterns:
   - include: source.css
```

```json
"embeddedLanguages": {
  "source.css": "css"
}
```

I hope VSCode can only apply CSS grammar to the section between `<style>` and `</style>`, so when I'm typing out my incomplete CSS VSCode would just re-tokenize and highlight until `</style>`, but not rest of the document.

/cc @alexandrudima 

Also would like to hear @aeschli's opinion, as you are writing the html grammar.
Repository: rust
Issue: Performance regression in nightly-2017-01-15
Labels: I-slow,C-enhancement,T-compiler,A-incr-comp

I've recently run into a performance regression in the Rust compiler in a project I'm working on. I've used nightlies to narrow it down to somewhere in 778988174..bf6d7b665. Specifically, the 2017-01-14 nightly is good, and 2017-01-15 is bad. The regression is independent of `CARGO_INCREMENTAL=1`.

If you have a machine with a few cores, you can test it on a clone of https://github.com/mit-pdos/distributary/. Run with
```console
$ cargo run -v --release --bin vote -- --avg --articles=100000 --runtime=10 --migrate=3 soup:// | grep 'PUT+'
```

On `-14`, the "migration" mentioned in the middle finishes quite quickly. On `-15`, it takes a long time, and so `PUT` never transitions to `PUT+`.

I wanted to try a `git bisect` to narrow the problem down further, but compiling it takes *forever*. A cursory glance over the commit range doesn't reveal anything particularly suspect, and `#rust-internals` told me to post here to get some more eyes on the problem.
Repository: opencv
Issue: Minor C++11 type narrowing issues with IplImage->depth?
Labels: bug,category: build/install

##### System information (version)
- OpenCV => any
- Operating System / Platform => Mac OSX
- Compiler => Xcode 7.1.1

##### Detailed description

Building OpenCV itself with C++11 on Mac OS X used to fail
( http://code.opencv.org/issues/2263 ); the problem was probably suppressed by
https://github.com/opencv/opencv/commit/c5aba337 which added
add_extra_compiler_option(-Wno-narrowing) to CMakeLists.txt.

But apps that use opencv and happen to write functions that do
```
  switch (my_iplImage->depth) {
       case IPL_DEPTH_32S: ...
```
will fail to compile with errors like

error: case value evaluates to 2147483680, which cannot be narrowed to type 'int' [-Wc++11-narrowing]

because IPL_DEPTH_32S is built up using #define IPL_DEPTH_SIGN   0x80000000,
which is not a legal int.

##### Steps to reproduce

Given x.cc:
```
#include <opencv2/core/core_c.h>

int foo(IplImage &foobar) {
   switch (foobar.depth) {
   case IPL_DEPTH_32S: return 1;
   }
   return 0;
}
```

the following command fails:
```
g++ -I /path/to/opencv/include -c -std=c++11 -Wall x.cc
x.cc:5:9: error: case value evaluates to 2147483680, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
   case IPL_DEPTH_32S: return 1;
        ^
/path/to/opencv//include/opencv2/core/types_c.h:444:23: note: expanded from macro 'IPL_DEPTH_32S'
#define IPL_DEPTH_32S (IPL_DEPTH_SIGN|32)
                      ^
1 error generated
```

The app can work around this by casting foobar.depth to unsigned int,
but shouldn't have to.  If opencv were to clean up its act and enable
the narrowing warning, this minor user annoyance would go away.
Repository: opencv
Issue: OpenCL Implementation for cv::StereoSGBM is missing
Labels: feature,category: calib3d,category: ocl

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => 3.2
- Operating System / Platform => macOS Sierra (10.12.3)
- Compiler => gcc

##### Detailed description

OpenCV 3 has supported T-APIs (Transparent APIs) which enables code to be ran with OpenCL or without OpenCL support based on the availability of the Hardware Support.

Though I found that StereoSGBM algorithm lacks on OpenCL Kernel Implementation. Yet similar algorithm StereoBM is implemented OpenCL Kernel (One may want to take reference from)

This Issue submit requests new feature/implementation of StereoSGBM under OpenCL.

There has been 2 Separate Implementation for OpenCV implementation for StereoSGBM (Normal and 3Way) both uses some of the common computation methods. 

Mark this as new Implementation Issue.
Repository: vscode
Issue: Search: target particular set of files
Labels: feature-request,search

- VSCode Version: Code 1.9.1 (f9d0c687ff2ea7aabd85fb9a43129117c0ecf519, 2017-02-08T23:31:51.320Z)
- OS Version: Darwin x64 15.6.0
- Extensions:

|Extension|Author|Version|
|---|---|---|
|cpptools|ms-vscode|0.10.1|

---

Steps to Reproduce:

1.when i use global search, it's not easy to type whole file path and name in input box,
  hope that there is a convenient way to  use highlight in search current file by typing "<current file>"

---

Note from @roblourens This includes searching in any particular subset of files such as

- All open files
- Files staged in git
- Recently modified files

etc
Repository: vue
Issue: Аn unexpected behaviour when using <transition> with a Vue component.
Labels: improvement,transition

### Vue.js version
2.1.10

### Reproduction Link
https://jsfiddle.net/bhrztdjn/4/

### Steps to reproduce
Click on "Toggle" button.

### What is Expected?
Transitions for a component should have the same behavior as transitions applied to HTML element.

### What is actually happening?
A CSS transition works fine with an HTML element with both directive - `v-if` and `v-show` (as [declared in docs](https://vuejs.org/v2/guide/transitions.html#Transitioning-Single-Elements-Components)).
But for the component, which has a directive v-show on its root element the transition isn't applied on entering and leaving states.
And for the component, which has a directive v-if on its root element the transition isn't applied on leaving state.
Repository: go
Issue: database/sql: sql.Result has problems that should be fixed / replaced
Labels: NeedsInvestigation

I'm not proposing anything at this point. I'm just documenting various things I've come things I've come across that relate to sql.Result.

@mjibson has said:
> the current problem i'm having with the database/sql API is that it's not possible to get intermediate non-rows returning results when sending multiple statements in a single string
for example given create table t (i int); drop table a; i'd like to get back 2 results instead of 1. the next result sets stuff assumes that a full rows object instead of optionally returning a sql.Result instead. i am modifying lib/pq to support this, but only if you don't use database/sql.

The other @mattn has [said](https://github.com/mattn/go-oci8/issues/55#issuecomment-271909189):
> One of the motivation is rowid in oracle. rowid is not number, so go-oci8 doesn't work correctly for the go's LastInsertId. The second, we have to allocate/free the buffer to get result specific value for the pl/sql.

@tgulacsi do you have anything to add?
Repository: rust
Issue: rustdoc splits test-args wrongly
Labels: T-rustdoc,C-feature-request

rustdoc is [splitting](https://github.com/rust-lang/rust/blob/717ac960b51a5a2bbedf0e4da899aec7ab2ab7ee/src/librustdoc/lib.rs#L238-L241) test-args using split_whitespace, it should use something like [shlex](https://crates.io/crates/shlex/).

After the output of rusdoc testing changes, it is not possible to run a specific test anymore. For example, consider a x.rs file:

```rust
/// ```
/// assert!(true);
/// ```
fn f() { }
```

With stable compiler (1.15.1), this run the test

```
rustdoc +stable x.rs --test --test-args --exact --test-args "f_0"
```
With nightly compiler (1.17.0-nightly (ba7cf7cc5 2017-02-11)), this does not run the test

```
rustdoc +nightly x.rs --test --test-args --exact --test-args "x.rs - line 1"
```

Note that I'm taking the test name using `rustdoc +stable x.rs --test --test-args --list`

It would be great if something like `rustdoc +nightly x.rs --test --test-args '--exact "x.rs - line 1"'` worked.
Repository: flutter
Issue: Would like `flutter devices` to show gpu information
Labels: c: new feature,team,tool,P3,team-tool,triaged-tool

I have a lot of phones on my desk.  Sometimes I want to know what GPU one has.  Would be nice if `flutter devices` told me.

Might also be nice for bug reports, to save us one step in looking up a phone model.

For example, right now I have a phone which on the back says "Galaxy S III mini", and flutter devices says:

```
%flutter devices                                                                                                    [/tmp/gradel]
1 connected device:

SAMSUNG SM G730A • 6a5d62e9 • android-arm • Android 4.2.2 (API 17)
```

Would be nice to know a bit more, including at least the GPU.
Repository: youtube-dl
Issue: Site Request: Blaze.TV
Labels: site-support-request,geo-restricted

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.14**
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Site support request (request for adding support for a new site)

---

### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:

Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):
```
youtube-dl.exe -v http://www.blaze.tv/series/seasons
/episode?series=American%20Restoration&season=0&episode=9
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://www.blaze.tv/series/seasons/episode?se
ries=American%20Restoration']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2017.02.10
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-83410-gb1e2192, ffprobe N-83410-gb1e2192
[debug] Proxy map: {}
[generic] episode?series=American Restoration: Requesting header
WARNING: Falling back on generic information extractor.
[generic] episode?series=American Restoration: Downloading webpage
[generic] episode?series=American Restoration: Extracting information
ERROR: Unsupported URL: http://www.blaze.tv/series/seasons/episode?series=Americ
an%20Restoration
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpdk0ryty4\bu
ild\youtube_dl\YoutubeDL.py", line 696, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpdk0ryty4\bu
ild\youtube_dl\extractor\common.py", line 369, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpdk0ryty4\bu
ild\youtube_dl\extractor\generic.py", line 2589, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: http://www.blaze.tv/series/s
easons/episode?series=American%20Restoration

'season' is not recognized as an internal or external command,
operable program or batch file.
'episode' is not recognized as an internal or external command,
operable program or batch file.
...
<end of log>
```

---

### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: http://www.blaze.tv/series/seasons/episode?series=American%20Restoration&season=0&episode=9

---

### Description of your *issue*, suggested solution and other information

Please add support for www.Blaze.TV
Repository: flutter
Issue: Add support for parallax effect in scrolling Widgets
Labels: c: new feature,framework,f: scrolling,d: examples,P3,team-framework,triaged-framework

I'd like to have a parallax scrolling effect in `ListView` items - namely, the actual image content be offset with regards to the `Image` displaying it in such a way as to create the impression that image is "behind" the main plane and thus moving slower.

I made a short video of the original Android version of the app I am trying to port to Flutter: https://www.youtube.com/watch?v=5FTf1irqhDM

In #1234 @abarth mentioned the sliver protocol as part of a possible solution.
Repository: go
Issue: doc: Effective Go's "safelyDo" does not demonstrate safe use of recover
Labels: Documentation,NeedsFix

Effective Go gives an [example](https://golang.org/doc/effective_go.html#recover) of a server that captures and logs panics so that a single panicking goroutine does not take down the entire server. Copying the example below:

```go
func server(workChan <-chan *Work) {
    for work := range workChan {
        go safelyDo(work)
    }
}

func safelyDo(work *Work) {
    defer func() {
        if err := recover(); err != nil {
            log.Println("work failed:", err)
        }
    }()
    do(work)
}
```

This design is controversial and I recommend that the example be either removed or updated with caveats. In general, there is no guarantee that shared data structures are in a usable and safe state after a panic occurs. It is arguably better to let panics crash the program. Empirically, the above design has led to real bugs in production systems. Specific examples of how bugs can arise:

1. A held mutex is not unlocked after the panic because the caller did not use `defer m.Unlock()`. This is a specific example of how `do(work)` may not be _panic safe_. Note that `do(work)` is especially vulnerable if it calls library code that is not panic safe.

2. The panic is the result of an invariant violation in a shared data structure. Program execution should not continue because the shared data structure is in an invalid state.

3. The panic is the result of a data race. Technically, program behavior is undefined from this point (especially if the data race involved an interface or slice).

Given these potential problems, I would argue that `safelyDo` is actually not safe. That said, the general design is not entirely invalid. It is possible to write a safe version of `safelyDo`, but to do so, one of the following properties must be guaranteed:

1. `safelyDo` must only recover from explicitly-thrown panics that it knows about. An example of this is shown in the `Compile` regexp function just below the `safelyDo` example.

2. The goroutines must not use any mutable shared state, i.e., `safelyDo(a)` touches completely disjoint state than `safelyDo(b)` for all `a != b`. This implies that `safelyDo` cannot invoke any libraries that use mutable shared state.

3. The implementation of `do(work)` must be completely panic safe, including all library code used by the implementation.
Repository: TypeScript
Issue: Re-export module namespace as global
Labels: Suggestion,In Discussion

We're attempting to migrate users within Google to new @types typings, which move most typings into modules, and having a ton of trouble.  The basic problem is that a module (e.g. CodeMirror) used to declare a global complex interface:

```
declare function CodeMirror(...);
declare namespace CodeMirror { ... }
```

and now they are modules:

```
export = CodeMirror;
```

and other typings refer to them as modules (so we can't just undo that export statement) but we also have tons of older user code that *doesn't* refer to them as modules.  Ideally we'd be able to make it work both ways while we migrate users incrementally.

I appreciate that you don't want the language to make this convenient, but I'm having difficulty finding any way to make it work temporarily while we migrate.

Some things I tried:

1) Aliasing the module into the global namespace
```
declare global {
  import CodeMirror = require('codemirror');
}
```
(and other variants) fails with "Imports are not permitted in module augmentations.".

2) Making the module global first, then aliasing it into a module namespace.
If you wrap the file contents with a "declare global {", then I couldn't figure out a way to repackage that global as a module again.  The `export = CodeMirror;` fails with "Cannot find name 'CodeMirror'." despite the global CodeMirror being declared in the same file.

Do you have any advice?  Note that "export as namespace" doesn't help because our user code is already modules, not scripts.
Repository: TypeScript
Issue: Access `global` as a type
Labels: Suggestion,Awaiting More Feedback

Since https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#augmenting-globalmodule-scope-from-modules it's been possible to augment the `global` from a module. However, in TypeScript definitions (such as `dom.d.ts` or `node.d.ts`) we're left to create our own "globals". This results in two issue:

1. inconsistency with what is _actually_ the global namespace
2. requiring the declaration of global types multiple times in case it's used as a "real global" or from `window.` (browsers) or `global.` (node)

Instead of this, it'd be really nice to access TypeScript's `global` as a type. For instance, in `dom.d.ts` we could do:

```ts
declare var window: global
```

Or in `node.d.ts`:

```ts
declare var global: global
```

I couldn't see any previous issues, but it's partially related to things like https://github.com/Microsoft/TypeScript/issues/12902 - the difference though is that those issues seems to be tracking adding variables to the TypeScript global scope whereas this would be using the global scope as a type to define these variables themselves.
Repository: go
Issue: x/mobile: X11 Key Events
Labels: mobile

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
1.7 (sorry i am using windows at the office, the issue occurs at home)

### What operating system and processor architecture are you using (`go env`)?
ubuntu amd64 (sorry i am using windows at the office, the issue occurs at home)

### What did you do?
run flappy gopher

### What did you expect to see?
key events are triggered

### What did you see instead?
no key events triggered, and close button not functional.

key events are not yet implemented at 
- app/x11.go 
- app/x11.c 

but shiny have implemented this: 
https://godoc.org/golang.org/x/exp/shiny/driver/internal/x11key

Should gomobile reuse shiny?
Repository: rust
Issue: Trait object coercion supercedes deref coercion
Labels: I-needs-decision,T-lang,C-feature-request,A-coercions,T-types,A-trait-objects

This seems like it should work: [Playground link](https://is.gd/Q8MWVS)

```rust
use std::sync::Arc;

trait Foo {}

struct Bar;

impl Foo for Bar {}

fn takes_foo(foo: &Foo) {}

fn main() {
    let foo: Arc<Foo> = Arc::new(Bar);
    takes_foo(&foo);
}
```

However, it seems the compiler is attempting to coerce `&Arc<Foo>` to a trait object before attempting deref coercion, which gives this unintuitive error:

```
rustc 1.15.1 (021bd294c 2017-02-08)
error[E0277]: the trait bound `std::sync::Arc<Foo>: Foo` is not satisfied
  --> <anon>:13:15
   |
13 |     takes_foo(&foo);
   |               ^^^^ the trait `Foo` is not implemented for `std::sync::Arc<Foo>`
   |
   = note: required for the cast to the object type `Foo`
```

Adding a deref-reref seems to fix the issue, but it's definitely a papercut:

```rust
takes_foo(&*foo);
```
Repository: neovim
Issue: :grep doesn't detect ENOSPC in /tmp
Labels: enhancement,ux

- `nvim --version`: 0.1.7-3
- Vim (version: ) behaves differently? no
- Operating system/version: Debian amd64
- Terminal name/version: xterm/tmux
- `$TERM`: screen

### Actual behaviour
With a full `/tmp` the command `:grep ...` says `error 1`, doesn't show (partial) list of matches

### Expected behaviour
User gets a notice like `$TMPDIR is full`.

I guess that the external `tee` command would have to be implemented within `nvim` to see the `ENOSPC` error code, without having to second-guess another program's return code.