sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vue
Issue: Vue.compile should return the errors which happens during compilation even in prod env
Labels: feature request,improvement

### What problem does this feature solve?
I am building a VueJS frontend where templates are coming from a backend where end users contributed them in a CMS or something else. VueJS is bundled with esm in order to have the Vue.compile method.

When I run Vue.compile with the template string coming from the backend, I have no way to know if a compilation error occured in order to display a message to the user. In development I just have the warn messages in the console.

### What does the proposed API look like?
Vue.compile could return an error boolean in an attribute or an array of all errors that occured during compilation.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: pytorch
Issue: [Caffe2] Cannot load caffe2.python. Error: libcaffe2.so: cannot open shared object file: No such file or directory
Labels: caffe2

## Issue description
I was trying to read my onnx model via caffe and deployed it onto AWS lambda.

The complete deployment seems to be working fine in my local but on AWS lambda we are getting this error.

## Code example
import caffe2.python.onnx.backend as backend

Please try to provide a minimal example to repro the bug.
Error messages and stack traces are also helpful.

Cannot load caffe2.python. Error: libcaffe2.so: cannot open shared object file: No such file or directory

## System Info
. AWS lambda deployed using zappa.

- PyTorch or Caffe2:
- How you installed Caffe2 (conda, pip, source):
Source
- Build command you used (if compiling from source):
- OS:
Linux and deployed onto AWS lambda
- PyTorch version:
0.4.0
- Python version:
2.7
- CMake version: 4.8
Repository: pytorch
Issue: [feature request] Implementing Block Sparse Operations
Labels: module: sparse,feature,triaged

**TL;DR:**  Implementing block-sparse operations for faster matrix-multiplication. 
Is this something worth adding to PyTorch?

Goals:
1. Faster matrix-multiplication by taking advantage of block-sparsity
2. Improve running time of large-scale LSTMs - Word Language or Sentiment Analysis Models
3. Based on https://blog.openai.com/block-sparse-gpu-kernels/

New Features:
1. LinearBSMM Layer – A plug & play replacement for the standard linear layer where the user specifies the block size and sparsity pattern
2. Helper functions to generate different sparsity patterns – Random, Barabasi Albert, Watts Strogatz

Examples:
**Original Linear Layer**
```
m = nn.Linear(20, 30)
input = torch.randn(128, 20)
output = m(input)
```
**Block Sparse Linear Layer**
```
D = 20
N = 30
m = linearBSMM.random(D, N, p=0.25, block_size=32)
input = torch.randn(128, D)
output = m(input)
```
OR
```
D = 20
N = 30
sparsity_pattern = linearBSMM.random(D, N, p=0.25, block_size=32)
m = nn.LinearBSMM(D, N, sparsity_pattern)
input = torch.randn(128, D)
output = m(input)
```
Repository: rust
Issue: Use hash of compilation unit expression tree to prevent needless recompiles after formatting changes
Labels: C-enhancement,I-compiletime,T-compiler,A-incr-comp,C-feature-request,WG-incr-comp

If it is possible to obtain some sort of digest or fingerprint for the complete expression tree of a single compilation unit after tokenization and parsing has been completed but before actual compilation takes place, it should be possible to optimize away recompilations of code that has only changed aesthetically but reduces to an identical call tree.

Essentially, the idea is to explore whether it is possible to obtain a unique signature for a unit of code that has been parsed but before the heaviest lifting is done or any real compilation takes place, such that after compiling a file containing - for example - the following:

```rust
fn main() {
    return match 1 == 1 {
        true => { () }
        false => { () }
    }
}
```

that file is refactored to contain the following:

```rust
fn main() {
    return match 1 == 1 {
        true => (),
        false => (),
    }
}
```

the compiler is able to determine after a quick first pass that although the file has changed, the logic of the file remains unchanged and apart from updating symbol locations, etc. the actual compilation need not be repeated.

While this was an extremely naive example, there are a host of other changes that could be taken into account. Ultimately, it would be wonderful if (as a benchmark) any valid code once compiled would not trigger a complete recompile if `cargo fmt` is run regardless of how many superficial changes that cleanup/reformatting triggered.

Things that come to mind:

* Changing `use` statements
* Referring to types by their abbreviated vs unabbreviated names
* Adding or dropping commas or braces in places where the meaning is not affected
* Adding or removing comments anywhere
* Adding or removing whitespace anywhere
* Literally reordering independent (non-nested) blocks within a file such that `struct foo;` which was once before `struct bar;` now comes after it, etc.
Repository: TypeScript
Issue: Ability to patch/overwrite missing/wrong declarations
Labels: Suggestion,Needs Proposal

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

correct wrong declaration, fix declaration, overwrite module declaration, fix module type

## Suggestion

<!-- A summary of what you'd like to see added or changed -->

Sometimes we encounter an npm module with missing declarations and incorrect declarations in its types file. Wish we have this ability patch/correct its declaration for temporary using before PR a patch and have it's released.

## Current behavior & Workaround

Consider this situation, module `moduleWithIssues` indeed exports `itemExistedWithoutDeclaration` but its declaration file doesn't contain it, and has a incorrect declaration `itemWithWrongDeclaration`

```ts
import {
    foo, bar,
    itemExistedWithoutDeclaration,   // report 'itemExistedWithoutDeclaration' doesn't exist
    itemWithWrongDeclaration
} from 'moduleWithIssues'

// 'itemWithWrongDeclaration' is number type but declared as string, TS report type error
console.log(Math.abs(itemWithWrongDeclaration))
```

At present, I found a workaround is adding a local module declaration for `itemExistedWithoutDeclaration` and assert `itemWithWrongDeclaration` as its correct declaration

```ts
import { foo, bar, itemExistedWithoutDeclaration, itemWithWrongDeclaration } from 'moduleWithIssues'

declare module 'moduleWithIssues' {
  const itemExistedWithoutDeclaration: number
}

const itemCorrected: number = itemWithWrongDeclaration as any
```

It works in `*.ts` file but not in `*.d.ts` file. An idea patching solution should be re-declare some items of `moduleWithIssues` in a `*.d.ts` file in the project. like below:

```ts
// interfaceInProject.d.ts
declare module 'moduleWithIssues' {
  const itemExistedWithoutDeclaration: number
  const itemWithWrongDeclaration: number
}
```
unfortunately this patch module will shadow original module declaration of `moduleWithIssues`  package.
```ts
import { foo, bar, itemExistedWithoutDeclaration, itemWithWrongDeclaration } from 'moduleWithIssues'
```

`foo` and `bar` are reported non-existent.

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

## Checklist

My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. new expression-level syntax)
Repository: rust
Issue: Optimize incremental compilation of data-only changes
Labels: C-enhancement,T-compiler,A-incr-comp,C-optimization

Given a complex call tree such as `foo(bar(baz("hello")))` compiled successfully then changed to `foo(bar(baz("goodbye")))`, it should be possible for the compiler to realize that (with no other changes) no recompilation aside from the change of static data is needed, as I do not believe rust generics allow for introspection based on the content of the string data (like TypeScript does).
Repository: terminal
Issue: cmd: add environment variable to disable/enable 'Terminate batch job (Y/N)?' confirmation
Labels: Issue-Feature,Product-Cmd.exe,Area-Interaction

(migrated from https://github.com/PowerShell/PowerShell/issues/7080 per @BrucePay's suggestion) 

When I cancel a `cmd` script with Ctrl C, the following dialog pops up:

    Terminate batch job (Y/N)?

I understand why this exists, but I'd also like the option to disable it, so cancelling cancels immediately. [Judging by Stack Overflow, I'm not the only one](https://stackoverflow.com/questions/39085380/how-can-i-suppress-terminate-batch-job-y-n-confirmation-in-powershell)

So a request: could we have an environment variable to control this?
Repository: neovim
Issue: Focus reporting in terminal windows
Labels: enhancement,terminal

Neovim does not appear to forward focus reporting into `:terminal` windows.

After `printf '\e[?1004h'; cat -` you should see `^[[O` and `^[[I` when your terminal emulator supports focus reporting, and focus moves out/in.

When using `:term` this does not work anymore.

Since Neovim gets notified about it, it should forward it to the current terminal window (if any).

Additionally it should send focus-in/-out codes when entering/leaving a terminal window - similar to how tmux triggers it when moving in/out of a pane (with the focus-events option).
This should only happen if focus reporting was requested, of course.

(mentioned in https://github.com/neovim/neovim/issues/8696#issuecomment-403123949 already, but taking it out from there into a separate issue)
Repository: flutter
Issue: TabController.animateTo() should return future like ScrollController.animateTo()
Labels: framework,a: animation,f: material design,c: proposal,P2,team-design,triaged-design

ScrollController.animateTo() returns a Future<null>, so that I can easily animate a scroll change, and then do something when we've arrived.

TabController.animateTo() is void, so I can't.

I would like these to have a more consistent signature, and I'd like to be able to easily do something after a TabController's animateTo has completed.
Repository: godot
Issue: Cannot remove extra quads in the cylindrical part of CapsuleMesh and CylinderMesh
Labels: enhancement,topic:rendering,topic:3d

Godot 3.0.4

There are extra Quads in the cylindrical section of `CapsuleMesh` and `CylinderMesh`.

If you remove rings in `CapsuleMesh`, it also reduces them on the spherical sections, which is unwanted.
You cannot remove all rings from `CylinderMesh`, there is always at least one in the middle.

![image](https://user-images.githubusercontent.com/1311555/42416078-1ea8d2ec-825d-11e8-87d8-63ef580ee9d9.png)
Repository: flutter
Issue: shared_preferences plugin should support value observing
Labels: c: new feature,p: shared_preferences,package,team-ecosystem,P3,triaged-ecosystem

Both Android and iOS support the observer pattern for `SharedPreferences`/`UserDefaults`.

Alas, the `shared_preferences` plugin in Flutter should, in addition to simple writing & reading, provide `Stream` endpoints to the values as well.

Android: 
https://developer.android.com/reference/android/content/SharedPreferences.OnSharedPreferenceChangeListener
 - This will listen to any change in the preferences, and therefore might have performance implications for preference-heavy apps

iOS:
https://developer.apple.com/documentation/foundation/userdefaults/1408206-didchangenotification
 - This will also listen to any change, and is therefore not providing the best performance
 - `UserDefaults` does support the `KVO`, which can be used to listen for specific changes
Repository: opencv
Issue: Some functions in filterengine.hpp are not accessible any more
Labels: category: imgproc,RFC


##### System information (version)

- OpenCV => master


##### Detailed description
The following functions are not accessible outside
https://github.com/opencv/opencv/blob/43f821afb91330958d4723f6300a5ec0bfa2185e/modules/imgproc/src/filterengine.hpp#L282-L352

Some of them are accessible from the 2.4 branch
https://github.com/opencv/opencv/blob/f1c5d8364f83c693a631f7b6ed659faebd85d155/modules/imgproc/include/opencv2/imgproc/imgproc.hpp#L286-L303

Are there any reasons to hide them.
Repository: opencv
Issue: Unknown exception occurs randomly when executing Mat.clone()
Labels: bug,category: java bindings,incomplete

##### System information (version)
OpenCV 3.4.1
OS Windows 10 Home Edition 64 Bit
Java 8 with OpenCV java binding

##### Detailed description
Unknown exception occurs randomly when executing Mat.clone() method, we also use Mat.empty() method to check whether the Mat is empty. Here is the detail stacktrace, we did not find the location of OpenCV native log file to find out what is the reason of this issue.

```
java.lang.Exception: unknown exception
	at org.opencv.core.Mat.n_clone(Native Method) ~[opencv-3.4.1.jar:3.4.1]
	at org.opencv.core.Mat.clone(Mat.java:219) ~[opencv-3.4.1.jar:3.4.1]
	at com.scsmait.preprocessor.services.SurveillanceService$2.onNext(SurveillanceService.java:127) [classes/:na]
	at com.scsmait.preprocessor.services.SurveillanceService$2.onNext(SurveillanceService.java:1) [classes/:na]
	at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.onNext(ObservableSubscribeOn.java:58) [rxjava-2.1.14.jar:na]
	at io.reactivex.observers.SerializedObserver.onNext(SerializedObserver.java:113) [rxjava-2.1.14.jar:na]
	at io.reactivex.internal.operators.observable.ObservableThrottleFirstTimed$DebounceTimedObserver.onNext(ObservableThrottleFirstTimed.java:82) [rxjava-2.1.14.jar:na]
	at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:200) [rxjava-2.1.14.jar:na]
	at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252) [rxjava-2.1.14.jar:na]
	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) [rxjava-2.1.14.jar:na]
	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) [rxjava-2.1.14.jar:na]
	at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_141]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [na:1.8.0_141]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_141]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_141]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_141]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_141]」
```

Any suggestion is welcome. Thank you.
Repository: terminal
Issue: Give API to measure the space that a string occupies
Labels: Issue-Feature,Product-Conhost,Area-Server

This is an extension to #57.
Under a certain console/PTY, assume the font family/size is specified, give a string, and return the space (a bit mask of the character matrix?) it would occupy.
Repository: opencv
Issue: minAreaRect fails with a particular contour (and probably others)
Labels: category: imgproc,RFC

##### System information (version)

- OpenCV => 3.4.1 (I found the same behavior with 3.3.0 though)
- Operating System / Platform => OSX / WIN10
- Compiler => apple clang / Visual c++ 2017

##### Detailed description

minAreaRect is supposed to provide a rotated bounding box of a set of points (contour), it works fine in probably most of the cases but I encountered one case in which the rotated rectangle is not enclosing the contour.

##### Steps to reproduce

cpp code:
```
std::vector<Point> hull;
hull.push_back(Point(7826,5663));
hull.push_back(Point(4190,5685));
hull.push_back(Point(882,5699));
hull.push_back(Point(879,5390));
hull.push_back(Point(871,2696));
hull.push_back(Point(865,558));
hull.push_back(Point(870,140));
hull.push_back(Point(7369,119));
hull.push_back(Point(7797,119));
hull.push_back(Point(7825,5314));
hull.push_back(Point(7826,5598));

RotatedRect rbb = minAreaRect(hull);
Point2f vertices[4];
rbb.points(vertices);

Mat image = Mat::zeros(6000, 8000, CV_8UC3);

std::vector<std::vector<Point> > contours(1);
contours[0] = hull;
drawContours(image, contours, 0, Scalar(0, 0, 255));

for (int i = 0; i < 4; ++i) {
  line(image, vertices[i], vertices[(i+1)%4], Scalar(0, 255, 0));
}

imwrite("./view.png", image);
```

The resulting image (rotated rect is drawn in green and original contour in red):

![view](https://user-images.githubusercontent.com/10025039/42420857-a31704bc-82cc-11e8-920f-3fcdb3aed837.png)

Zoom on bottom left corner:

<img width="841" alt="bottomleftcorner" src="https://user-images.githubusercontent.com/10025039/42420874-c4261b3e-82cc-11e8-9ac8-4152e0f44f48.png">

Zoom on bottom right corner:

<img width="705" alt="bottomrightcorner" src="https://user-images.githubusercontent.com/10025039/42420893-e9fff5e6-82cc-11e8-94d2-984c36a133c3.png">
Repository: rust
Issue: `./x.py test src/doc` fails with "no rules matched"
Labels: T-bootstrap,C-bug

commit: 0c0315cfd9 

An example in src/bootstrap/README.md, `./x.py test src/doc`, doesn't seem to actually work. It fails with the following output:

```
$ RUST_BACKTRACE=1 ./x.py test src/doc
Updating only changed submodules
Submodules updated in 0.03 seconds
    Finished dev [unoptimized] target(s) in 0.22s
thread 'main' panicked at 'Error: no rules matched src/doc.', bootstrap/builder.rs:239:21
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:511
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:426
   6: std::panicking::begin_panic_fmt
             at libstd/panicking.rs:413
   7: bootstrap::builder::StepDescription::run
             at bootstrap/builder.rs:239
   8: bootstrap::builder::Builder::run_step_descriptions
             at bootstrap/builder.rs:569
   9: bootstrap::builder::Builder::execute_cli
             at bootstrap/builder.rs:559
  10: bootstrap::Build::build
             at bootstrap/lib.rs:465
  11: bootstrap::main
             at bootstrap/bin/main.rs:29
  12: std::rt::lang_start::{{closure}}
             at /checkout/src/libstd/rt.rs:74
  13: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  14: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  15: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  16: std::rt::lang_start
             at /checkout/src/libstd/rt.rs:74
  17: main
  18: __libc_start_main
  19: _start
failed to run: /home/euclio/repos/rust/build/bootstrap/debug/bootstrap test src/doc
Build completed unsuccessfully in 0:00:01
```

I didn't check the other examples, but they ought to be checked as well.
Repository: go
Issue: runtime: document the behaviour of Caller and Callers when used in deferred functions
Labels: Documentation,NeedsFix,compiler/runtime

### What version of Go are you using (`go version`)?
```
go version go1.10 linux/amd64
```

### Does this issue reproduce with the latest release?
Yes, I've tried on b001ffb.

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ainar/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ainar/go"
GORACE=""
GOROOT="/home/ainar/go/go1.10"
GOTMPDIR=""
GOTOOLDIR="/home/ainar/go/go1.10/pkg/tool/linux_amd64"
GCCGO="/usr/bin/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-build197597232=/tmp/go-build -gno-record-gcc-switches"
```

### What did you do?
https://play.golang.org/p/Jz6y0GkqTNW

### What did you expect to see?
Either
```
    direct: main.go:11
  deferred: main.go:10
```
Or the documentation of [`runtime.Caller`](https://golang.org/pkg/runtime/#Caller) mentioning that deferred functions have line numbers that point to the line after `return`.

### What did you see instead?
```
    direct: main.go:11
  deferred: main.go:12
```
And no mention of `defer` in `runtime.Caller` or `runtime.Callers` docs.

I understand why it's that way, and I've even created a wonky workaround ([on Russian SO](https://ru.stackoverflow.com/a/851812/180092), [on Playground](https://play.golang.org/p/mTFoW5WtEJq)). But I think that it would be good to mention this behaviour and basic reasoning behind it in the functions' docs.
Repository: go
Issue: proposal: bytes/v2: remove NewBufferString
Labels: v2,Proposal

The constructor is often misused and confuses people. It can be used to put initial contents into a buffer that will be written into after, but so can buf.Write. Meanwhile, NewReader handles the case that most beginners misuse, calling NewBufferString when they only need NewBuffer.

This function's use case is not worth the confusion it causes and it should be deleted from the library.
Repository: pytorch
Issue: [feature request] SSIM-based cost function as part of the standard set of loss functions
Labels: module: loss,triaged,enhancement

## Issue description

SSIM-based cost function as part of the standard set of loss functions in PyTorch. 
See example here: https://github.com/Po-Hsun-Su/pytorch-ssim
Repository: go
Issue: proposal: spec: clone and splice, new channel primitives
Labels: LanguageChange,Proposal,LanguageChangeReview

Here are a couple of suggestions made by Doug McIlroy, original author of test/chan/powser[12].go and instigator of pipes in Unix. They are intriguing.

In Doug's words:

====

`splice c1 c2`
        where channel c1 contains no buffered data,
        identifies the write end of channel c1 with that
        of channel c2. Channel c1 becomes write-only.

`clone c`
        makes a new read-only channel positioned at the
        same place in the data stream as readable
        channel c. Thereafter both channels read the
        same data sequence from the stream at unrelated
        rates.

Splice allows a filter to elide itself from a pipeline
when it has no further substantive work to do, rather than
going into a copy loop.

Clone enables (buffered) fanout of a data stream.
Buffered data items may be garbage-collected when they
have been delivered to all readers.

These two capabilities are of general utility in stream
processing.  golang.org/test/chan/powser1.go is one
application that could profitably use them--to eliminate
the many instances of Copy and also the per-element
go-routines spawned for every Split. Some Unix variants
have offered pipe splicing, and fanout is a staple of
dataflow algorithms. The current workarounds consume an
awful lot of bootless machine cycles.