sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Missing line information for calls to diverging functions
Labels: A-debuginfo,E-needs-test,T-compiler,C-bug

Under some circumstances, `rustc` emits debug information with missing line numbers for calls to diverging functions.
```rust
fn main() {
    if True == False {
        // unreachable
        diverge();
    }

    diverge();
}

#[derive(PartialEq)]
pub enum MyBool {
    True,
    False,
}

use MyBool::*;

fn diverge() -> ! {
    panic!();
}
```
Compiling with `rustc main.rs -g --emit=llvm-ir -Clto` and then inspecting the debug info for `main` in the `.ll` file, the line information is 0:
```llvm
call void @_ZN4main7diverge17h595c254fa559ce50E(), !dbg !3943
!3943 = !DILocation(line: 0, scope: !3942)
```
If the unreachable call is removed, the line info matches the source file as expected:
```llvm
!4340 = !DILocation(line: 16, column: 4, scope: !4338)
```
I get the same behavior with the latest stable
```
rustc 1.33.0 (2aa4c46cf 2019-02-28)
binary: rustc
commit-hash: 2aa4c46cfdd726e97360c2734835aa3515e8c858
commit-date: 2019-02-28
host: x86_64-unknown-linux-gnu
release: 1.33.0
LLVM version: 8.0
```
and with the latest nightly
```
rustc 1.35.0-nightly (237bf3244 2019-03-28)
binary: rustc
commit-hash: 237bf3244fffef501cf37d4bda00e1fce3fcfb46
commit-date: 2019-03-28
host: x86_64-unknown-linux-gnu
release: 1.35.0-nightly
LLVM version: 8.0
```
cc @japaric
Repository: godot
Issue: Inconsistent Behavior For String/Bool Conversion
Labels: discussion,topic:core

When converting a bool to a String, the String is set to "True" and "False" for the appropriate boolean values. However, when converting a String to a bool, the bool is set to true if the string is non-empty, regardless of the contents.

This inconsistent behavior means that if a bool set to false is converted to a string, and then is converted back, it will become true. Furthermore, the current string-to-bool conversion is not very useful for many (or even most) of the use cases for such conversions, e.g. custom text data parsing, where usually one wants to convert a string such as "true" to a bool.

I propose the following:

1. The bool to String conversion remains as it is.
2. For the String to bool conversion, the result is true if the String is "True", "TRUE", "true" or "1", and false if the String is "False", "FALSE", "false" or "0". If the string is set to anything else, then it is true if non-empty, and false otherwise.

If this proposal is accepted, then I will gladly work on the pull request to implement it.
Repository: neovim
Issue: folding by column
Labels: enhancement,needs:discussion

could neovim support folding by column? for example

```c
if (a > 1) {
    printf("xxx")
} else {
    printf("yyy")
}
```

will be folded
```c
if (c > 1) {...} else {...}
```
Repository: rust
Issue: Implement a custom allocator to provide detailed memory usage info during compilation
Labels: T-compiler,C-feature-request,I-compilemem,A-self-profile

Idea from @eddyb:

It would be great if we could measure the memory used by the compiler during compilation in a very fine-grained way. One idea to do this would be to implement a custom allocator which could record statistics for memory allocated and deallocated. This allocator could also be integrated with rustc's arenas so that we could see exactly how much memory is used by each arena at any given instant.
Repository: pytorch
Issue: [FR] add CPU information in collect_env.py
Labels: module: collect_env.py,triaged,enhancement
Repository: TypeScript
Issue: Document --preserveWatchOutput in tsc --help
Labels: Docs

**TypeScript Version:**  3.4.1

I had to look up https://github.com/Microsoft/TypeScript/issues/26873 to find what the flag was in order to use it in a `--build` setup as it's not documenting in `--help`.
Repository: pytorch
Issue: [FR] Warn in cuda init if cuda < 10 is used with RTX cards
Labels: module: cuda,module: molly-guard,triaged

There are a lot of bug reports from users trying to use CUDA 9 builds with RTX cards. We should warn about the incompatibility.
Repository: TypeScript
Issue: bug: Decorator Method Name Type Restriction By Enum
Labels: Needs Investigation

**TypeScript Version:**  3.3.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

is:issue decorator type method name propertyKey 

**Code:**
this works as expected:
```ts
interface SomeTypeMap {
    fieldOne: string;
    fieldTwo: number;
}

function MethodDecorator<Key extends keyof SomeTypeMap>(
    target: SomeClass,
    methodName: Key,
    descriptor: TypedPopertyDescriptor<(...args: any[]) => SomeTypeMap[Key]>) {
    /* some implementation */
}

class SomeClass {
    // works fine, as expected
    @MethodDecorator
    public fieldOne() {
        return "";
    }

    // compiler error, as expected
    // since it returns string instead of number
    @MethodDecorator
    public fieldTwo() {
        return "";
    }

    // compiler error, as expected
    // since method name is not a key in SomeTypeMap
    @MethodDecorator
    public fieldThree() {
        return "";
    }
}

```

this does not work as expected:
```ts
enum Field {
    One = "fieldOne"
}

interface SomeTypeMap {
    [Field.One]: string;
}

function MethodDecorator<Key extends keyof SomeTypeMap>(
    target: SomeClass,
    methodName: Key,
    descriptor: TypedPopertyDescriptor<(...args: any[]) => SomeTypeMap[Key]>) {
    /* some implementation */
}

class SomeClass {
    // compiler error, unexpected
    @MethodDecorator
    public [Field.One]() {
        return "";
    }
}

```

**Expected behavior:**

In the second code example, I would expect there to be no compiler errors.

**Actual behavior:**

Error message: `Argument of type 'string' is not assignable to parameter of type Field`

The method name seems to be of type `string` here, which is true, but it should also be of type `Field`

**Playground Link:** 

can't enable experimental decorators in the playground.

**Related Issues:**

#17795

less related:
#30102

**Comments:**

Thanks for all your hard work TypeScript team.
Repository: neovim
Issue: dot-repeat fold operation
Labels: enhancement,folds,normal-mode

- `nvim --version`: v0.3.4
- Vim (version: ) behaves differently? no
- Operating system/version: macOs
- Terminal name/version: iTerm
- `$TERM`: xterm-256color

### Steps to reproduce using `nvim -u NORC`

```
nvim -u NORC

move to one code block type
zfa{
will fold the block code

move to next code block and type the dot
```

### Actual behaviour
repeat last modifications operation, not the fold operation
### Expected behaviour
repeat the fold action and fold the current code block
Repository: TypeScript
Issue: event argument has no target.result property on  IDBRequest: success event
Labels: Bug,Domain: lib.d.ts

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.4.0-dev.201
updated mar 1 & still no fix
https://github.com/Microsoft/TypeScript/blob/00bf32ca3967b07e8663d0cd2b3e2bbf572da88b/lib/lib.webworker.d.ts
goto line 1860

**Search Terms:**
onsuccess target result eventtarget idbrequest

**Code**
please note this code is a cut & past from https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB#Generating_handlers
```ts
var request = indexedDB.open("MyTestDatabase");
request.onsuccess = function(event) {
  db = event.target.result;
};
```

**Expected behavior:**
no error

**Actual behavior:**
error TS2339: Property 'result' does not exist on type 'EventTarget'

**Playground Link:** N/A

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
FileReader.onLoad/onLoadEnd event argument has no target.result property #4163 (Fixed)
 IDBOpenDBRequest.onupgradeneeded also needs the same augmentation
IDBTransaction.onerror event.target.error will most likely also need type definitions updated
Repository: rust
Issue: Check that non-overwrite accesses to downcast projections are dominated by variant checks.
Labels: C-enhancement,A-codegen,T-compiler,A-MIR

Pattern-matching in Rust, e.g.:
```rust
fn f<T>(_: T) {}
fn g<T>(_: T) {}

// T and E have Copy bounds to reduce MIR verbosity. 
pub fn foo<T: Copy, E: Copy>(r: Result<T, E>) {
    match r {
        Ok(x) => f(x),
        Err(e) => g(e),
    }
}

```
turns into this MIR (slightly cleaned up):
```rust
fn foo(_1: std::result::Result<T, E>) -> () {
    let mut _0: ();                      // return place
    let mut _2: isize;
    let mut _3: T;
    let mut _4: E;

    bb0: {
        _2 = discriminant(_1);
        switchInt(move _2) -> [0isize: bb2, 1isize: bb3, otherwise: bb1];
    }

    bb1: {
        unreachable;
    }

    bb2: {
        _3 = ((_1 as Ok).0: T);
        _0 = const f(move _3) -> bb4;
    }

    bb3: {
        _4 = ((_1 as Err).0: E);
        _0 = const g(move _4) -> bb4;
    }

    bb4: {
        return;
    }
}
```

We already have a dominator tree for MIR, so we can build on top of that and compute the known variants for places (in this case, `Ok` and `Err` for `_1`).

Then we can just check that any read/borrow/etc. access (any access with does not fully overwrite the previous value, really) within a downcast (e.g. `(_1 as Ok).0`) is dominated by a variant check for that variant (i.e. `_1` being `Ok`, via `_2` being `discriminant(_1)`).

That said, the kind of dataflow borrowck already needs to do might easily include this too (e.g. treating `(_1 as Ok)` as initialized iff `_1` is initialized and `discriminant(_1) == 0` was checked).

(Also tempting: moving `Discriminant` into `Operand` to be able to get rid of the `_2` and have `switchInt(discriminant(_1))` directly)

cc @rust-lang/wg-compiler-nll @oli
Repository: go
Issue: x/net/http2: sendWindowUpdate may send invalid window size increment
Labels: NeedsInvestigation

Disclaimer: I didn't run into an issue here, but I'm working on an HTTP/2 implementation and saw something that could possibly not be according to the spec.

The code linked below contains a loop that sends multiple `WINDOW_UPDATE` frames if the window size increment is higher than the allowed by the HTTP/2 spec. It then sends a last `WINDOW_UPDATE` frame after the loop has exited.

https://github.com/golang/net/blob/74de082e2cca95839e88aa0aeee5aadf6ce7710f/http2/server.go#L2189-L2193

However, because the check reads: `for n >= maxUint31`, the last frame sent could contain a window size increment of 0 if the initial `n` is a multiple of 2^31 - 1. That is not allowed by the HTTP/2 spec:

From: https://httpwg.org/specs/rfc7540.html#rfc.section.6.9

> A receiver MUST treat the receipt of a WINDOW_UPDATE frame with an flow-control window increment of 0 as a stream error (Section 5.4.2) of type PROTOCOL_ERROR; errors on the connection flow-control window MUST be treated as a connection error (Section 5.4.1).


I think the fix here would be just to change the `>=` check to `>`. I suspect that the reason nobody ran into this before is that it's already extremely unlikely that all the conditions for this bug to manifest are actually met in the wild.


P.S.: The questions in the issue template didn't really apply to this issue. Apologies in advance if this is not very helpful.
Repository: vscode
Issue: Smart Backspace feature
Labels: feature-request,editor-commands

There is a good example of how PHPStorm handles it, https://blog.jetbrains.com/phpstorm/2014/09/smart-backspace-in-phpstorm-8/ VSCode really lacks feature like this as it requires to delete all the spaces / tabs before the cursor when you want to go back to previous line end using backspace.
Repository: TypeScript
Issue: Synchronize unsaved config files with the TS Server
Labels: Suggestion

**Request**
TS Server currently only reads `tsconfig` and `jsconfig` files from disk. When editing a config file in an editor like vscode, you have to save it to the disk for the project configuration changes to take effect.

We'd like to be able to synchronize unsaved config files with the tsserver as well, the same way we synchronize unsaved js/ts files. This would mainly be helpful for error reporting in the config files
Repository: flutter
Issue: FlutterPlatformViewFactory always passes a CGRectZero 
Labels: framework,engine,a: platform-views,P2,found in release: 1.21,team-engine,triaged-engine

It seems like we always receive a CGRectZero when creating a platform view. Why? Shouldn't it receive the size from flutter?

https://github.com/flutter/engine/blob/f3ec767458f12bb3099248fdc57d6c0d1051f042/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm#L78
Repository: opencv
Issue: Request to change the test code(or interface?)
Labels: category: python bindings,RFC

Hello! I just submitted a [pr](https://github.com/opencv/opencv/pull/14189), and the robot reports errors on *modules/python/test/test_facedetect.py**, as

> Traceback (most recent call last):
  File "/build/precommit_linux64/opencv/modules/python/test/test_facedetect.py", line 55, in test_facedetect
    rects = detect(gray, cascade)
  File "/build/precommit_linux64/opencv/modules/python/test/test_facedetect.py", line 18, in detect
    rects[:,2:] += rects[:,:2]
TypeError: list indices must be integers or slices, not tuple

and the source file is

https://github.com/opencv/opencv/blob/360758e8ae5ebaf94c62f739d37892eae4222df4/modules/python/test/test_facedetect.py#L13-L19

Since the C++ version of this code provides vector<Rect>, the python version should return  LIST OF TUPLES instead of  NUMPY 2D ARRAY as above, which satisfy the consistency of vector convertion between Python and C as well.

https://github.com/opencv/opencv/blob/360758e8ae5ebaf94c62f739d37892eae4222df4/modules/objdetect/src/cascadedetect.cpp#L1351-L1356

Which can be fixed by convert it to numpy array
`rects = np.array(rects)`

<!--
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).

Please:

* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.


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 => 4.1.0
- Operating System / Platform => Ubuntu 16.04
- Compiler => gcc 5.4.0

##### Detailed description

<!-- your description -->

##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: godot
Issue: Material assigned to OBJ mesh doesn't display in the running project
Labels: bug,topic:rendering,topic:editor,confirmed,topic:3d

**Godot version:**
v3.1.stable.official

**OS/device including version:**
Windows 10

**Issue description:**
Imported model has textures in editor, but when I press F5 (in-game) it appears white, like without textures.

**Steps to reproduce:**
Not sure, imported obj file, then double clicked, tried to change materials, looked like they were saved, so I placed model to main game scene, in editor there are textures, but once I started game, there was none.

There were 2 materials expected from that .obj model, cause it had UVs and 2 materials inside
Here is screenshot of texture being in editor, but not in game 
![image](https://user-images.githubusercontent.com/46406204/55291117-b15f3880-53e3-11e9-994b-7e1ab8dd2864.png)


And here's how I "fixed" the issue
![image](https://user-images.githubusercontent.com/46406204/55291122-bde39100-53e3-11e9-9dfd-ed6ebdbc8cba.png)
Repository: react
Issue: useMemo / useCallback cache busting opt out
Labels: Type: Discussion

According to the `React` docs, `useMemo` and `useCallback` are subject to cache purging:

> You may rely on useMemo as a performance optimization, not as a semantic guarantee. In the future, React may choose to “forget” some previously memoized values and recalculate them on next render, e.g. to free memory for offscreen components. Write your code so that it still works without useMemo — and then add it to optimize performance. [source](https://reactjs.org/docs/hooks-reference.html#usememo)

I am working on moving `react-beautiful-dnd` over to using hooks https://github.com/atlassian/react-beautiful-dnd/issues/871. I have the whole thing working and tested 👍 

It leans quite heavily on `useMemo` and `useCallback` right now. If the memoization cache for is cleared for a dragging item, the result will be a cancelled drag. This is not good. 

My understanding is that `useMemo` and `useCallback` are currently *not* subject to cache purging based on this language:

> In the **future**, React may choose to “forget”

**Request 1**: Is it possible to opt-out of this cache purging? Perhaps a third `options` argument to `useMemo` and `useCallback`:

```js
const value = useMemo(() => ({ hello: 'world' }), [], { usePersistantCache: true });
```

(Naming up for grabs, but this is just the big idea)

A work around is to use a custom memoization toolset such as a `useMemoOne` which reimplements `useMemo` and `useCallback` just using `ref`s [see example](https://twitter.com/alexandereardon/status/1108488559881641986)

I am keen to avoid the work around if possible.

**Request 2**: While *request 1* is favourable, it would be good to know the exact conditions in which the memoization caches are purged
Repository: flutter
Issue: Dead code in scaffold.dart
Labels: team,framework,f: material design,P2,team-design,triaged-design

There's some code that can be cleaned out of scaffold.dart to make it faster and smaller:
https://github.com/flutter/flutter/pull/21535/files
Repository: neovim
Issue: node-client: autocmd error not raised when command invoked from RPC client
Labels: bug,api,provider,remote-plugin

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`: NVIM v0.4.0-442-g0920c6ca8
- Vim (version: ) behaves differently? Yes
- Operating system/version: MacOS
- Terminal name/version: iTerm2
- `$TERM`: xterm-256color

### Steps to reproduce using `nvim -u NORC`

Create a node remote plugin like:

``` js
module.exports = (plugin) => {
  let { nvim } = plugin
  plugin.registerCommand('OpenList', async () => {
    await nvim.command('botright 5sp list://abc')
    this.window = await nvim.window
    await this.window.request(`nvim_win_set_height`, [this.window, 5])
  })
}
```
in `~/.config/nvim/rplugin/node/` and run `:UpdateRemotePlugins`

```
nvim -u NORC
:autocmd BufEnter * lcd %:p:h
:OpenList
```

### Actual behaviour

<img width="389" alt="Screen Shot 2019-04-01 at 2 50 28 PM" src="https://user-images.githubusercontent.com/251450/55308496-86312380-548d-11e9-8947-a4762540d9c6.png">

### Expected behaviour

Neovim send error to client or ignore the error like vim.
Repository: pytorch
Issue: How to compile/install caffe2 with cuda 9.0?
Labels: caffe2

I'm building caffe2 on ubuntu 18.04 with CUDA 9.0? But when I run "python setup.py install" command, I have met issue about version of CUDA. It needs to CUDA 9.2 instead of 9.0 but i only want to build with 9.0. 
How to pass it?

Thank you!
Repository: go
Issue: x/crypto/ssh/terminal: ReadPassword keeps echo disabled when stopped with Ctrl+C
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.1 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?
Linux and macOS

### What did you do?
Tried to use the following code to read passwords (from https://qiita.com/moutend/items/12d53750363edbbc3d6b):
```
package main
  
import (
    "fmt"
    "log"
    "syscall"

    "golang.org/x/crypto/ssh/terminal"
)

func main() {
    fmt.Print("Password: ")
    password, err := terminal.ReadPassword(int(syscall.Stdin))
    if err != nil {
        log.Fatal(err)
    } else {
        fmt.Printf("\nYour password is %v\n", string(password))
    }
}
```



### What did you expect to see?
If I press Ctrl+C at the point when I'm supposed to enter password I'm expecting my terminal back working as before running the code.

### What did you see instead?
I'm unable to see what I'm typing anymore as echo is kept disabled
Repository: kubernetes
Issue: Reduce default CPU requests of  kube system services
Labels: sig/scalability,kind/feature,lifecycle/frozen

By default some system services request too much CPU resources:
* fluentd-gcp (100mCPU)
* kube-dns (260mCPU)
* heapster (138mCPU)

However their real life those services consume maximum 10mCPU. And such requests doesn't allow to create small clusters. Also services mentioned above are running on all pods in cluster pool.
Repository: vue-element-admin
Issue: How to change to tabs-like multi-page to support iframe caching
Labels: feature

How does router-view change to tabs-like multi-page when you click on the left routing menu? Because I need to embed external iframe, and I need caching, I won't reload iframe when I switch tabs.
Repository: kubernetes
Issue: Cannot drain node with pod with more than one Pod Disruption Budget
Labels: kind/bug,priority/important-soon,area/usability,kind/feature,sig/apps,lifecycle/frozen,needs-triage

**What would you like to be added**:
When attempting to drain a node that has a pod scheduled on it with more than one PodDisruptionBudget the drain fails with the following message:
"Err: This pod has more than one PodDisruptionBudget, which the eviction subresource does not support."

It would be great if this was actually supported. 

**Why is this needed**:
It is not possible to upgrade clusters that have any pods with more than one PodDisruptionBudget since they fail on drain.
Repository: TypeScript
Issue: Reflect.has fails to act as type guard (should act same as "in" operator)
Labels: Suggestion,Domain: lib.d.ts,Experience Enhancement

**TypeScript Version:**  ^3.4.0-dev.20190330

**Search Terms:**
  Reflect.has
  in operator

**Code**

```ts
const test1 = (a: { field: number } | {}) => (("field" in a) ? a.field : 0);

const test2 = (a: { field: number } | {}) => Reflect.has(a, "field") ? a.field : 0;
```

**Expected behavior:**
Both compile successfully.  "in" operator acts as a type guard per https://github.com/Microsoft/TypeScript/issues/10485.  Reflect.has should act [the same as "in" operator here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/has).

We'd like to use Reflect.has a lot more and this case holds us back.  Thank you!

**Actual behavior:**
"in" operator line compiles; `Reflect.has` line does not compile.  Error:

> allPasos.ts:445:31 - error TS2339: Property 'field' does not exist on type '{} | { field: number; }'.
>   Property 'field' does not exist on type '{}'.

445   Reflect.has(a, "field") ? a.field : 0;

**Playground Link:**

https://goo.gl/2R4dkS

**Related Issues:**

https://github.com/Microsoft/TypeScript/issues/10485