sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/go: add option to ignore local replace/exclude directives
Labels: modules

If you have a go.mod with replace/exclude directives, those are used when building that module as the top-level target but not when used as a dependency. It might be helpful to have a command-line build flag that means "ignore those even in the top-level module" so that you can test more easily in the configuration users will see.
Repository: opencv
Issue: Base class like cv::Point, cv::Rect could be made easily trivially copiable in C++11, allowing optimizations
Labels: feature,category: core,category: build/install

Because of C++98 compatibility, classes like cv::Point_, cv::Point3_, cv::Size_ and cv::Rect_ have an explicit copy constructor (and = operator), which copies field by field.
Using C++11 (conditional compiling I suppose) we could make these classes trivially copyable, simply defining the copy constructor and the = operator as `= default`.

This would enable some optimization. In particular, `std::is_trivially_copyable` would return true (in this moment it returns false unfortunately).
More about TriviallyCopiable: http://en.cppreference.com/w/cpp/concept/TriviallyCopyable
As example of optimization enabled, see notes in std::copy documentation http://en.cppreference.com/w/cpp/algorithm/copy
Repository: go
Issue: proposal: crypto/tls: provide a way to access local certificate used to set up a connection
Labels: Proposal,Proposal-Crypto

While TLS provides [ConnectionState()](https://golang.org/pkg/crypto/tls/#Conn.ConnectionState) to share some connection security info, like remote certificate (`PeerCertificates`),  it lacks the info about local certificate used to set up a connection. And it's not always possible to predict local certificate used as the selection depends on the remote end requirements.

Exposing the local certificate would be very helpful for debugging connection issues, for example, user may find certificate getter returns suboptimal certificate, which may be expiring soon or having a long verification chain. Moreover, it will also enable collecting certificate usage statistics, which could be valuable for service owners.  

@FiloSottile Thanks!
Repository: TypeScript
Issue: Comparing constrained generic types/substitution types to conditional types
Labels: Suggestion,Awaiting More Feedback

When comparing a generic type to a conditional type whose checkType is the same type, we have additional information that we are not utilizing.. for instance:

```ts
function f<T extends number>(x: T) {
    var y: T extends number ? number : string;

    // `T` is not assignable to `T extends number ? number : string`
    y = x;
 }
```
Ignoring intersections, we should be able to take the true branch all the time based on the constraint.

The intuition here is that `T` in the example above is really `T extends number ? T : never` which is assignable to `T extends number ? number : string`.

Similarly, with substitution types, we have additional information that we can leverage, e.g.:

```ts
declare function isNumber(a: any): a is number;

function map<T extends number | string>(
    o: T,
    map: (value: T extends number ? number : string) => any
): any {
    if (isNumber(o)) {
        // `T & number` is not assignable to `T extends number ? number : string`
        return map(o);
    }
}
```
Repository: pytorch
Issue: [feature request] adding a nonzero element "in-place" in sparse tensor
Labels: module: sparse,triaged

First mentioned here, but turns out to be non-existent. 
https://github.com/pytorch/pytorch/pull/6225#pullrequestreview-108887248

This operation would simply add a new index and a new value to a sparse tensor. 

cc @vincentqb @aocsa @nikitaved @pearu @mruberry
Repository: rust
Issue: New lookup functions on BTreeMap/Set
Labels: C-enhancement,A-collections,T-libs-api

The current function `get` attempts to find an exact key match; if it fails, it returns `None`. I propose the addition of four variants:

- `get_lt` finds the greatest `(key, element)` in the map/set that is less than the given key.
- `get_lte` returns the lookup key and element in the map if present, otherwise returning the next smallest key and element.
- `get_gt` finds the smallest `(key, element)` in the map/set that is greater than the given key.
- `get_gte` looks up the key; if present, returns it and the element, if not, returns the next largest key and element.

The specific use case that prompted this:

I'm working on a toy Smalltalk implementation. One of the implementation methods is "given an object pointer, find the next object pointer that is an instance of of the class." Given a value `instances: BTreeSet<Pointer>`, the implementation is simply `get_gt(obj_ptr)`.

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":null}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: pytorch
Issue: [Caffe2] mobile_exporter init_net has code calling information
Labels: caffe2

**The init_net file generated from the mobile_exporter function has code calling information,**
There is fragment information in my generated init_net file:

■146 "GivenTensorFill*	
shape0*
values-6}■?-
{╓>-$└?R┐  File "Style_torch.py", line 186, in <module>
    init_net, predict_net = mobile_exporter.Export(c2_workspace, c2_model, c2_model.external_input)
  File "/home/wguo/lib/temp1/caffe2/build/caffe2/python/predictor/mobile_exporter.py", line 86, in Export
    add_tensor(init_net, blob_name, blob)
  File "/home/wguo/lib/temp1/caffe2/build/caffe2/python/predictor/mobile_exporter.py", line 53, in add_tensor
    utils.MakeArgument("values", values),
* 
Repository: opencv
Issue: Viz3d memory leak - memory allocated for widgets never released
Labels: bug,category: viz

##### System information (version)
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015

##### Detailed description

Memory allocated for widgets is never released once the event loop is triggered via spin() or spinOnce() so it is not possible to dynamically update the widget content which would be very useful for many applications. This happens even if all previous widgets are removed before adding new ones or even if the Viz3d object is deleted and recreated. The memory leak is particularly obvious when working with large point clouds (WCloud) that need to be updated frequently. This limits the usability of Viz3d for showing one-off static content only.

##### Steps to reproduce

Instantiate Viz3d
loop {
  Generate a cv::Mat of CV_32FC3 with a large number of points
  Create a WCloud from this Mat and show it with showWidget()
  Start the event loop e.g. with spinOnce(1, true);
  Delete any objects above that were allocated dynamically
}

or even worse

loop {
  Instantiate Viz3d
  Generate a cv::Mat of CV_32FC3 with a large number of points
  Create a WCloud from this Mat and show it with showWidget()
  Start the event loop e.g. with spinOnce(1, true);
  Delete any objects above that were allocated dynamically and the Viz3d object
}
Repository: vscode
Issue: [html] propose html 4 properties (cellPadding ...)
Labels: feature-request,html

#Issue Type: <b>Bug</b>

Cell-padding and cell-spacing, valign and align attribute autocomplete not working 

VS Code version: Code 1.21.1 (79b44aa704ce542d8ca4a3cc44cfca566e7720f1, 2018-03-14T14:46:47.128Z)
OS version: Windows_NT x64 10.0.16299

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (8 x 2594)|
|Memory (System)|15.93GB (7.93GB free)|
|Process Argv|C:\Program Files\Microsoft VS Code\Code.exe|
|Screen Reader|no|
|VM|0%|

</details><details><summary>Extensions (25)</summary>

Extension|Author (truncated)|Version
---|---|---
html-snippets|abu|0.2.1
vscode-caniuse|aka|0.5.3
vs-code-css-comments|ash|1.0.3
htmltagwrap|bra|0.0.7
php-autocomplete|bsc|0.4.2
simple-react-snippets|bur|1.1.1
vscode-css-modules|cli|0.2.2
jshint|dba|0.10.17
vscode-eslint|dba|1.4.8
vscode-quick-select|dba|0.2.5
auto-rename-tag|for|0.0.15
auto-comment-blocks|kev|1.0.1
expand-region|let|0.1.2
node-debug2|ms-|1.22.0
sublime-keybindings|ms-|3.0.3
team|ms-|1.122.0
sass-indented|rob|1.4.8
vscode-idiomatic-css-comments|rya|0.1.2
git-autoconfig|shy|0.0.1
easysass|spo|0.0.6
css-auto-prefix|spo|0.1.4
vscode-jss-snippets|vis|0.2.2
vscode-react-native|vsm|0.6.6
html-css-class-completion|Zig|1.17.1
vscode-open-in-github|ziy|1.3.1

(2 theme extensions excluded)

</details>
Reproduces only with extensions
<!-- generated by issue reporter -->
Repository: rust
Issue: Stability attributes on moved items can be confusing
Labels: A-stability,T-compiler,C-bug,S-needs-repro

https://doc.rust-lang.org/beta/std/ops/enum.Bound.html

says it has been around since 1.17.0, but

https://doc.rust-lang.org/std/ops/enum.Bound.html

does not exist. (and I can't use it on stable in the playground)

Digging more into it, it looks the type itself was indeed stabilized in 1.17.0, but in a different location (`collections`).  I think this sort of thing can be confusing, and it raises the question; what version *should* it say here?

Is there precedent here?  And if so (and if the current choice to use 1.17.0 is indeed following that precedent), should there perhaps be some prominent notice in the docs indicating the version at which Bound was moved to this location?
Repository: bitcoin
Issue: Wallet transactions affected by RBF double spends are not (always) clearly shown in GUI or RPC
Labels: Feature,Brainstorming,Wallet,Mempool

# What behavior did you expect?

When the mempool contains a transaction that conflicts with a wallet transaction, for this to (always) be visible in both bitcoin-qt GUI and bitcoin-cli output.

# What was the actual behavior (provide screenshots if the issue is GUI-related)?

RPC:
If the conflicting transaction touches the wallet (eg. if you are the sender, or if you are the recipient and we are considering an honest RBF feebump), the conflict is visible in the (undocumented) `walletconflicts` return value of the `listtransactions` and `gettransaction` RPC calls. In the case the conflicting transaction does NOT touch the wallet (eg. if you are the receiver of a maliciously doublespent RBF transaction), this is not indicated.

GUI:
If the conflicting transaction touches the wallet (eg. if you are the sender, or if you are the recipient and we are considering an honest RBF feebump), all versions are visible in the GUI, without indication of conflict between them, but the "pending" part of the balance (correctly) does not show a duplicate amount of incoming money. In the case the conflicting transaction does NOT touch the wallet (eg. if you are the receiver of a maliciously doublespent RBF transaction), there is no indication of any conflict (pending balance still counts the incoming transaction that has been doublespent) aside from the transaction details stating it is not in the mempool.

![rbfdoublespend1](https://user-images.githubusercontent.com/37372069/38313687-eb5b8e02-3824-11e8-8f02-cd124946f54f.png)

![rbfdoublespend2](https://user-images.githubusercontent.com/37372069/38313690-ef300f1c-3824-11e8-80e8-0506924c6454.png)

![rbfdoublespend3](https://user-images.githubusercontent.com/37372069/38313695-f1a1819a-3824-11e8-9c6b-eba5778353e3.png)

# How reliably can you reproduce the issue, what are the steps to do so?

Very reliably; screenshots provided are from 3 interconnected regtest nodes, the top node has mined some coins and has first spent them to the middle node, RBF-feebumped that transaction (only second transaction shown in screenshots), RBF-doublespent it to the bottom node, then RBF-doublespent it to itself. All nodes have only the latest transaction in the mempool.

# What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)?

Version 0.16.0, pre-compiled version from bitcoincore.org.
Repository: opencv
Issue: OpenCV static build fails on -lavcodec not found on macOS
Labels: category: build/install,platform: ios/osx,incomplete

##### System information (version)
- OpenCV => master branch current tip on 2018-04-04 7bc980edaf7ff2f515e195e7fdd8f274f820d4a1
- Operating System / Platform => macOS 10.13.3
- Compiler => Apple LLVM version 9.1.0 (clang-902.0.39.1)

##### Detailed description

Building OpenCV as a static lib fails.

> [ 52%] Linking CXX executable ../../bin/opencv_perf_core
> ld: library not found for -lavcodec
> clang: error: linker command failed with exit code 1 (use -v to see invocation)

##### Steps to reproduce

`cmake -D CMAKE_BUILD_TYPE=DEBUG -D BUILD_SHARED_LIBS=OFF ../opencv && make`
or
`cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_SHARED_LIBS=OFF ../opencv && make`
Repository: rust
Issue: Should -Ctarget-feature go straight to LLVM?
Labels: A-LLVM,C-enhancement,A-stability,T-compiler

The `--print target-features` and `-C target-feature` options list/accept all target features LLVM knows, under the names LLVM gives them (see discussion in #49428). This is in contrast to `#[target_feature]` and `cfg(target_feature)`, which accept only explicitly whitelisted features, and in some cases change the LLVM names (e.g., `bmi1` instead of `bmi`). This is inconsistent, and also makes the command line interface less stable than it could be.

As @gnzlbg noted in #49428, this difference has existed for a while. However, in effect the command line options don't have a real stability guarantee: `rustc`s not built with our LLVM fork don't currently recognize *any* target features, and the LLVM names can change under our feet (this was part of the rationale for having a whitelist in rustc). Note that `-C` flags "without stability guarantee" are not without precedent, e.g., consider `-C passes` (which also depends on LLVM internals).

So I believe we're within our rights to change this. Especially now that the whitelist is much more complete. And it has real advantages: consistency between command line and attributes/cfgs, more stability for the command line switch, and making it work on `rustc`s with system LLVMs, thanks to @cuviper's work in #49428.

cc @japaric are you aware of uses of this option that aren't covered by [the current whitelists](https://github.com/rust-lang/rust/blob/e31addf7c358aba28ce0910e93d009397a72a05f/src/librustc_trans/llvm_util.rs#L85-L111)?
Repository: pytorch
Issue: Multithreading Scaling Issue with MKL
Labels: caffe2

Trying to optimize my intel CPU and reach the performance mentioned [here](https://software.intel.com/en-us/blogs/2017/04/18/intel-and-facebook-collaborate-to-boost-caffe2-performance-on-intel-cpu-s) through muli-threading:

I build the binaries using MKL blas with OpenMP enabled. I'm running [convnet_benchmark.py](https://github.com/pytorch/pytorch/blob/master/caffe2/python/convnet_benchmarks.py) as mentioned in the link above. 

I'm changing the number of threads using both OMP_NUM_THREADS and MKL_NUM_THREADS.
If I increase number of threads using the former the performance drops, if I use the latter it does nothing.

Anyone else has seen similar issues?
Repository: vscode
Issue: [json] completion has bad replacement span, overwrites comment
Labels: feature-request,json

Issue Type: <b>Bug</b>

* Open a `tsconfig.json` containing:
```json
{
    "compilerOptions": {
        "target": "es5"
    }
}
```
* Comment out `//"es5"`
* Put a `"` in front of it. Choose the completion that pops up for "es2015".
* Result:
```json
{
    "compilerOptions": {
        "target": "es2015",es5"
    }
}
```

VS Code version: Code - Insiders 1.22.0-insider (6b4d53cdab8bcae1eaaa4934d93c077319b573db, 2018-04-04T13:52:38.747Z)
OS version: Windows_NT x64 10.0.15063

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz (8 x 3492)|
|Memory (System)|15.91GB (6.76GB free)|
|Process Argv|C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe|
|Screen Reader|no|
|VM|0%|

</details>Extensions: none
<!-- generated by issue reporter -->
Repository: go
Issue: runtime: add g.p
Labels: Performance,compiler/runtime

Some important and hot data is stored in Ps, such as write barrier buffers and defer pools. Getting from a G to a P currently requires evaluating `g.m.p`. We should consider adding a direct link, `g.p`, to avoid an extra memory lookup. This should reduce memory lookups and cache pressure / cache misses on hot code, particularly write barrier writes.

This might also enable us to eliminate the mcache.

This requires updating `g.p` every time a G gets (un)scheduled.

I took a stab at this but never quite got it working. I hope someone else might.

cc @aclements @dvyukov
Repository: vue
Issue: Transition on overflowed elements prevents scroll
Labels: browser quirks,transition

### Version
2.5.16

### Reproduction link
[https://codepen.io/johnjleider/pen/MVqyXB](https://codepen.io/johnjleider/pen/MVqyXB)

### Steps to reproduce
- Click the button to open the menu
- As the element is transitioning in, begin to scroll (try not to move your mouse while scrolling)

### What is expected?
The scrollable area continues to scroll

### What is actually happening?
The scrolling area will get stuck. The scrolling event is still being fired but is not actually scrolling the content. Once you move your mouse and start to scroll again, it works as expected.

If you wait for the transition to finish before scrolling, the bug does not present itself.
![scroll](https://user-images.githubusercontent.com/9064066/38321350-643295b6-3805-11e8-92ff-ddd2fb3eecd2.gif)

---
We had a report of the `v-select` component not scrolling. We have confirmed this is only happening in Chrome 65, but extends back to even 0.15 of the framework (Vuetify). I created the attached codepen to determine if it was framework specific or generally reproducible.

While their may be other css properties that trigger this issue, I have only had success with opacity and happens specifically with the `enter` declaration. If you remove the entry animation, this does not occur.

**Removed entry animation** https://codepen.io/johnjleider/pen/ZxMObZ?editors=1111

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: TypeScript
Issue: In JS, auto types don't narrow with `if`
Labels: Bug,Domain: JavaScript



```ts
var result;
if (!!!!true) {
    result = { type: /** @type {"ok"} */("ok"), payload: 12 }
}
else {
    result = { type: /** @type {"error"} */("error"), message: "Really, really bad" }
}

if (result.type === 'ok') {
    result.payload
    result.message
}
else if (result.type === 'error') {
    result.payload
    result.message
}
else {
    result.payload
    result.message
}
switch (result.type) {
case "ok":
    result.payload
    result.message // error
    break;
case "error":
    result.payload // error
    result.message
    break;
default:
    result.payload // error
    result.message // error
    break;
}
```

**Expected behavior:**
Narrowing should work the same for `if` and `switch`. The three branches of the `if` should error exactly where `switch` does.

**Actual behavior:**
No narrowing with `if`. No errors with `if`.

Notes:

1. Auto types are always enabled in javascript, even if `noImplicitAny: "false"`.
2. Everything works fine if `result` has a declared type instead of an auto type.
Repository: TypeScript
Issue: In JS, auto type assignments don't add string index to literal types
Labels: Bug,Domain: JavaScript

**Code**

```js
function lit() {
    return { a: 1 }
}
var result;
if (!!!!true) {
    result = lit()
}
else {
    result = { b: 1 }
}
result/**/
```

**Expected behavior:**
`result : { [x: string]: any, a: number } | { [x: string]: any, b: number}`

**Actual behavior:**
`result : { [x: string]: any, a: number } | { b: number}`

Note that if you initialise `result` in one statement, everything works:

```js
function lit() {
    return { a: 1 }
}
var result = !!!!true ? lit() : { b: 1 };
result/**/
```
Repository: go
Issue: cmd/compile: incorrect column reported for "struct literal does not implement" error
Labels: NeedsFix,compiler/runtime

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?

go1.10.1

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

```
GOARCH="amd64"
GOOS="darwin"
```

### What did you do?

https://play.golang.org/p/XjJFwvLoNoA

```go
package main

type Interface interface {
	Method()
}

func UseInterface(i Interface) {}

type Struct struct{}

func main() {
	UseInterface(Struct{})
}
```


### What did you expect to see?
```
prog.go:12:15: cannot use Struct literal (type Struct) as type Interface in argument to UseInterface:
	Struct does not implement Interface (missing Method method)
```
```go
func main() {
	UseInterface(Struct{})
//	             ^
}
```

### What did you see instead?
```
prog.go:12:21: cannot use Struct literal (type Struct) as type Interface in argument to UseInterface:
	Struct does not implement Interface (missing Method method)
```
```go
func main() {
	UseInterface(Struct{})
//	                   ^
}
```
Repository: godot
Issue: Distribute Godot on the Windows 10 Store
Labels: enhancement,platform:windows,topic:porting

I know the open source art program Krita has done something similar, but perhaps Godot could be on the Windows 10 app store along with Steam to streamline the update experience for those who don't have the Steam client open all the time. Krita is also a paid app, so perhaps that could help fund development if there's interest in that option.