sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: terminal
Issue: [Scenario] 2 Resize 2 Reflow
Labels: Product-Conpty,Area-CodeHealth,Issue-Scenario

During 1.0, we discovered a ton of bugs in our resize with reflow implementation, and now that we need to keep both the conpty and the terminal in sync on these things, it's more important than ever to do these things right. 

I'm collecting up all the straggling tasks I've found that might _possibly_ be related.

This is a combo of "Make Reflow work correctly", and "Get rid of the spaghetti in the VtEngine related to line wrapping"

(see also #4200, the original reflow mega thread)

## Issues
* [ ] #796 Resize reflow tests 
* [ ] #797 Resize with Reflow loses leading spaces on resize operation
* [ ] #3088 WSL Terminal Line Endings (the "exact wrap" bug)
  * #802 [host] If a line is exactly the width of the buffer and you increase the buffer width, it will wrap incorrectly resize reflow 
* [ ] #5228 Conpty: Additional `ScrollFrame` optimizations
* [x] [REGRESSION >0.11.1251] Backward-kill-word after line wrapping in powershell doesn't clear exited line properly #5839 (PR #5870)
* [ ]  MSFT:19446208 - [This code in `TextBuffer::Reflow`](https://github.com/microsoft/terminal/blob/cf62922ad8da67464c517931b89f3fc098381b76/src/buffer/out/textBuffer.cpp#L2034-L2043)
* [ ] #6566 Some text not displayed when the screen scrolls
* [ ] #6901 When Copying, Line Wrapped Text Is Inconsistently Broken Into Multiple Lines
  - [ ] #10833 Multi-line paste with WSL omits and splices together lines
  - [ ] #11739
  - [ ] #11809
* [ ] #7028 No line wrap at the bottom of the Terminal window when entering text in TCC
* [ ] #7253 Un-snapping Terminal Placing Cursor in Middle of Previous Command's Output
  * (actually has a consistent repro)
* [ ] #6987 Rendering errors in tmux split panes 
  - [ ] This might also be "Tmux pane content gets garbled after refreshing tmux client #4029"
* [ ] #7019 conpty exhibits pathological performance on scrolling region redraw (repaints entire screen) 
* [ ] #7479
* [ ] #7581
* [ ] #12440, which might just be #780

### Things I think will all be fixed by #8000
* [ ] #6546 Command History on wrong line
* [ ] #10130
* [ ] #10848 Cursor position is lost when resizing the window if not on the bottom line 
  * [ ] #10868 also looks like this

## PRs
Many of these are 1.0 PRs, but they've all got important context.

<details>
<summary> 
1.0 PRs
</summary> 

* [x] Don't remove spaces when printing a new bottom line with a background color #5550
* [x] Fix wrapped lines in `less` in Git for Windows #5771
* [x] Don't duplicate spaces from potentially-wrapped EOL-deferred lines #5398
* [x] Add a test to cover #5428 #5449
* [x] Fix copying wrapped lines by implementing better scrolling #5181
* [x] Emit lines wrapped due to spaces at the end correctly #5294
* [x] Fix an accidental regression from #5771 #5870

</details> 

* [ ] Don't reflow a line as wrapped if it broke on the last cell #5368
Repository: create-react-app
Issue: Give me the token
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

I am currently dealing with an unexpected token issue, but I don't know what special character has been inserted

<img width="446" alt="image" src="https://user-images.githubusercontent.com/97965/81348521-0fdcf880-9073-11ea-814e-c18433894340.png">

### Describe the solution you'd like

Ideally the character (and/or unicode values of the character) would be output so I could search for it.
### Describe alternatives you've considered

Guess and check
### Additional context

The file in question is just a import and re-export file. It would be nice if the error were reported on the actual file. Currently rearranging the imports to track it down by column number change.

This is happening on a Linux CI server (GitHub Actions) and not on my local (macOS)
Repository: flutter
Issue: Allow backdrop filter to be used as blur effect behind Scaffold's drawer and endDrawer
Labels: c: new feature,framework,f: material design,c: proposal,P3,team-design,triaged-design

## Use Case

Currently I have my Scaffold's `drawerScrimColor` set to `Colors.grey.withOpacity(0.5)`. I wanted to change this to something closer to the "Frosted Glass" effect which seems to be achievable using the BackdropFilter widget.

I was able to achieve this desired effect by modifying the lines 554-556 in drawer.dart **(Flutter version 1.14.6)** from:
```
child: Container( // The drawer's "scrim"
    color: _scrimColorTween.evaluate(_controller),
),
```
to this (just an example):
```
child: new BackdropFilter(
    filter: new ImageFilter.blur(sigmaX: 5.0 * _controller.value, sigmaY: 5.0 * _controller.value),
    child: Container(color: Colors.grey.shade200.withOpacity(0.2)),
),
```

The issue is that there doesn't seem to be a way to do this without modifying Flutter's source code directly. 

## Proposal

I'm not sure what the best way to achieve this would be but having a parameter in Scaffold which could be set to a BackdropFilter would be ideal.
Repository: flutter
Issue: Add a flag to flutter pub/packages to use a self-signed cert file
Labels: c: new feature,tool,customer: crowd,P2,team-tool,triaged-tool

See https://github.com/flutter/website/issues/2472

This would work by plumbing a tool flag to the `DART_VM_OPTIONS` environment variable of the pub subprocess environment.
Repository: flutter
Issue: Flutter drive --use-existing-app should accept either http or ws vm service uri.
Labels: c: new feature,tool,t: flutter driver,P2,team-tool,triaged-tool
Repository: vscode
Issue: Provide some richer (optional) UI for custom tree views
Labels: feature-request,tree-views

Refs: #96927

It would be great to have some richer optional UI components that could be enabled within a custom view, e.g.

- [x] Search/Filter box
- [ ] General input box
- [ ] "Details" pane -- kind of like a footer to show details about the selected item(s)
- [x] Richer hovers https://github.com/microsoft/vscode/issues/84032

@idoprz Can you please add some more details here too?
Repository: rust
Issue: Optimize away bounds check in loop indexing into slice, given an assertion
Labels: A-LLVM,I-slow,C-enhancement,E-needs-test,T-compiler,C-optimization

I wrote a simple loop indexing into a slice, to test rustc's ability to optimize away bounds checks if it knows an index is in bounds. Even with this very simple test case, I can't seem to get rust to omit the bounds checks no matter what `assert!` I add. (I know that I could trivially write this code using iterators instead, but I'm trying to figure out rust's ability to optimize here.)

Test case (edited since original posting to augment the `assert!` further):

```rust
#[no_mangle]
fn f(slice: &[u64], start: usize, end: usize) -> u64 {
    let mut total = 0;
    assert!(start < end && start < slice.len() && end <= slice.len());
    for i in start..end {
        total += slice[i];
    }
    total
}
```

I put that into the compiler explorer, with `-O`, and the resulting assembly looks like this:

```
f:
        push    rax
        cmp     rdx, rcx
        jae     .LBB5_8
        cmp     rsi, rdx
        jbe     .LBB5_8
        cmp     rsi, rcx
        jb      .LBB5_8
        xor     eax, eax
.LBB5_4:
        cmp     rdx, rsi
        jae     .LBB5_7
        add     rax, qword ptr [rdi + 8*rdx]
        add     rdx, 1
        cmp     rcx, rdx
        jne     .LBB5_4
        pop     rcx
        ret
.LBB5_7:
        lea     rax, [rip + .L__unnamed_5]
        mov     rdi, rdx
        mov     rdx, rax
        call    qword ptr [rip + core::panicking::panic_bounds_check@GOTPCREL]
        ud2
.LBB5_8:
        call    std::panicking::begin_panic
        ud2
```

Based on the x86 calling convention, `rdi` contains the slice base address, `rsi` contains the slice length, `rdx` contains `start`, and `rcx` contains `end`.

So, the first three comparisons verify the assertion and jump to `.LBB5_8` if it fails, to panic.

Then inside the loop, there's still another comparison of `rdx` to `rsi`, and a jump to `.LBB5_7` to panic if out of bounds.

As far as I can tell, that's exactly the same comparison. Shouldn't rustc be able to optimize away that bounds check?

Things I've tested:
- I tried replacing the `assert!` with an `if` and `unreachable!`, or an `if` and `unsafe { std::hint::unreachable_unchecked() }`, but in both cases the loop still checked if the index was in bounds on each iteration.
- I tried using `-Zmutable-noalias=yes`, which didn't help.
- I tried various forms of the assertion condition.

Ideally, rustc should be able to optimize away the bounds check in the loop, based on the assertion. Even better would be if rustc could hoist the bounds check out of the loop even without the assertion, but that seems like a harder problem.
Repository: TypeScript
Issue: Ignore Specific Error [AGAIN]
Labels: Suggestion,Awaiting More Feedback

Yes, this is a duplicate of #11051, but that issue is closed and this **NEEDS** to be addressed.

People use Typescript for more than just Javascript compilation now. There are tons of transpilers that convert TS to all sorts of useful languages. Typescript must have a proper way to disable certain error codes project-wide.

My specific issue right now is that I'm using TypescriptToLua, a Typescript transpiler that produces lua code, and Typescript throws a fit whenever I try to use mathematical operators on classes. This would make sense if I was compiling to Javascript, but I'm not, but I'm forced to annotate every line with @ts-ignore (unrealistic) or suffer through constant reports of TS2362 and TS2363 in my console (infuriating).

There could easily be an `ignoreErrors: number[]` in the .tsconfig file that provides this functionality. The only thing stopping it from existing is stubborness. Well designed errors that never cause issues are a nice dream, but realistically there will always be use cases that are not met by the error handler, and the user should have the power to suppress invalid warnings.

A short example of my issue:

**Typescript that will be converted using TypescriptToLua:**

```Typescript
/** @customConstructor vector.new */
declare class Vector {
	constructor(x: number, y?: number, z?: number);
}

const v = new Vector(1, 2, 3);
const vSquared = v * v;
```

**Generated (valid) lua code:**

```Lua
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
v = vector.new(1, 2, 3)
vSquared = v * v
```

**Obnoxious compiler output:**
```
main.ts:9:18 - error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

9 const vSquared = v * v;
                   ~

main.ts:9:22 - error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

9 const vSquared = v * v;
                       ~
```

Thank you for your time, I hope that this issue can be seen as what is is, which is a frustrating lack of user control and agency.
Repository: pytorch
Issue: ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory
Labels: module: build,triaged


## Issue description

Attempting to run Detectron 2, getting the above error

## Code example
python demo.py –config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml   --webcam \  --opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl

Ubuntu 20
Pytorch 1.4.0
Python3.7

## System Info
Traceback (most recent call last):
  File "demo.py", line 11, in <module>
    from detectron2.data.detection_utils import read_image
  File "/home/ty/anaconda3/envs/detectron_env/lib/python3.7/site-packages/detectron2/data/__init__.py", line 4, in <module>
    from .build import (
  File "/home/ty/anaconda3/envs/detectron_env/lib/python3.7/site-packages/detectron2/data/build.py", line 14, in <module>
    from detectron2.structures import BoxMode
  File "/home/ty/anaconda3/envs/detectron_env/lib/python3.7/site-packages/detectron2/structures/__init__.py", line 6, in <module>
    from .keypoints import Keypoints, heatmaps_to_keypoints
  File "/home/ty/anaconda3/envs/detectron_env/lib/python3.7/site-packages/detectron2/structures/keypoints.py", line 6, in <module>
    from detectron2.layers import interpolate
  File "/home/ty/anaconda3/envs/detectron_env/lib/python3.7/site-packages/detectron2/layers/__init__.py", line 3, in <module>
    from .deform_conv import DeformConv, ModulatedDeformConv
  File "/home/ty/anaconda3/envs/detectron_env/lib/python3.7/site-packages/detectron2/layers/deform_conv.py", line 10, in <module>
    from detectron2 import _C
ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory


cc @malfet
Repository: vscode
Issue: up-vote release note features
Labels: question-discussion

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Allow up-voting of features in (and via) the release notes. 

For instance: I tried switching tabs using mouse wheel for first time tonight after seeing the feature in the release notes.  It was so smooth and natural it's like I found a muscle memory I never realized I had all along. I wanted to up-vote the feature right in the release notes for whomever it was that implemented it.
Repository: tensorflow
Issue: tf.Module.name_scope overrides parent scopes
Labels: comp:tensorboard,stat:awaiting tensorflower,type:bug,TF 2.5

**System information**
- Have I written custom code: Yes
- OS Platform and Distribution: macOS 10.15.5
- Mobile device if the issue happens on mobile device: n/a
- TensorFlow installed from (source or binary): binary
- TensorFlow version (use command below): 2.2.0
- Python version: 3.6.8
- Bazel version (if compiling from source): n/a
- GCC/Compiler version (if compiling from source): n/a
- CUDA/cuDNN version: n/a
- GPU model and memory: n/a

**Describe the current behavior**
The `name_scope` of a `tf.Module` instance has a forward slash appended to the name, which causes the scope to disregard any parent scopes. Using `with tf.Module.name_scope` and `with tf.name_scope(mymod.name_scope.name):` both result in this issue. 

**Describe the expected behavior**
Each of the following should have the same outcome:
- `with tf.Module.name_scope:`
- `with tf.name_scope(tf.Module.name_scope.name):`
- `with tf.name_scope(tf.Module.name):`

**Standalone code to reproduce the issue**
```python
import tensorflow as tf


def my_test_mod_scopes():
    mymod = tf.Module(name='mymod')
    with tf.name_scope('first_scope'):
         with mymod.name_scope:
             tf.summary.scalar('scalar1', 84.9)
         with tf.name_scope(mymod.name):
             tf.summary.scalar('scalar2', 74.3)
         with tf.name_scope(mymod.name_scope.name):
             tf.summary.scalar('scalar3', 79.7)

with tf.summary.create_file_writer('./logs').as_default():
    tf.summary.experimental.set_step(0)
    my_test_mod_scopes()
```
![Screen Shot 2020-05-07 at 21 43 20](https://user-images.githubusercontent.com/31281983/81361269-e7bdbb80-90ab-11ea-84b9-4d41f84250b8.png)

**Other info / logs** Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
Repository: storybook
Issue: Addon-docs: Pretty json in Props table
Labels: feature request,addon: docs,block: argstable

**Is your feature request related to a problem? Please describe.**
No

**Describe the solution you'd like**
![image](https://user-images.githubusercontent.com/15278220/81369807-006ab780-9126-11ea-970f-c8f4cf9d0f9b.png)
If the input value is object, the content is not pretty, so, it looks terrible

**Describe alternatives you've considered**
No

**Are you able to assist bring the feature to reality?**
yes, add JSON.stringfy is ok
Repository: PowerToys
Issue: Resize windows with alt right click
Labels: Idea-New PowerToy,Product-Always On Top

# Summary of the new feature/enhancement
Resize windows with alt right click

Sometimes my cursor is to far from the windows edge and I click something I didn't mean to click on another window. With this feature the user would just hold the alt key while right clicking near the edge they want to resize. I know some linux distros have this feature and its really useful.

# Proposed technical implementation details (optional)

<!-- 
A clear and concise description of what you want to happen.
-->
Repository: godot
Issue: AutoComplete dialog doesn't resize when clipped
Labels: bug,topic:editor,usability

**Godot version:**
3.2.1.stable.offical
**OS/device including version:**
win 10 home 10.0.18362 build 18362
HP laptop 15-da0xxx
**Issue description:**
When the autocomplete dialogue is clipped by the text editor region it doesn't add scrollbars.
**Steps to reproduce:**
open the script editor and resize the window so it only shows 9 lines. type "V" it shows the complete autocomplete dialogue with scroll bar. type "e" so it's auto-completing "Ve" Vector2d is clipped off the top. 
![godot](https://user-images.githubusercontent.com/25010423/81380473-98d64d00-90d0-11ea-85d1-b009d2d08289.png)

**Minimal reproduction project:**

[Map Editor.zip](https://github.com/godotengine/godot/files/4597514/Map.Editor.zip)
Repository: rust
Issue: constant reference has unstable address acrosss compilation units.
Labels: A-docs,C-bug,A-const-eval

Consider the following code, split across two crates:

```rust
//crate_b; lib.rs:
#![feature(const_fn)]

pub const fn give_ptr<T>(x: &T) -> *const T { x as *const T }
pub const MY_CONST: &'static i32 = &1;
pub const fn my_const_ptr() -> *const i32 { give_ptr(MY_CONST) }


//crate_a; depends on crate_b; main.rs:
fn main() {
    assert_eq!(crate_b::my_const_ptr(), crate_b::give_ptr(crate_b::MY_CONST));
    // thread 'main' panicked at 'assertion failed: `(left == right)`
    //   left: `0x13fe2b3d0`,
    //  right: `0x13fe2b300`', src\main.rs:3:5
}
```
This behavior is mildly surprising - effectively inlining a function changes the computation result.

[The reference](https://doc.rust-lang.org/reference/items/constant-items.html) mentions a similar situation:
> References to the same constant are not necessarily guaranteed to refer to the same memory address

however, as written, this is not applicable to the code above - there's only *one* reference to a constant, not multiple. It is *the same* reference to a constant that gets treated differently based on the compilation unit.

I understand that this is an incredibly niche situation, and likely no real code hits it.
I also understand that it's likely very hard to "fix" the "bug" (i.e. make `assert_eq!` above pass).
I think I'd be happy if the reference doc was simply adjusted instead (but have no suggestion on a better wording). I'm mildly concerned that even with better wording, the code might be obfuscated enough to the point where `main()` does not see any reference types while doing the inlining, yet still triggers the bug (but I couldn't craft such obfuscation myself).
Repository: rust
Issue: Enhance Error Message For Misusing Methods As Functions
Labels: C-enhancement,A-diagnostics,A-resolve,T-compiler,D-papercut

Consider the following example ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=56822f4bd3c9bb8bf0bdaa8f3e75e967)):

```rust
struct S;

trait T {
    fn some(&self) {}
}

impl T for S {}

fn main() {
    let s = S;

    s.some();
    s::some();
}
```

If there is `fn some(&self);`, and I called `s::some()` instead of `s.some()` (the correct one), the compiler wil emit `error[E0433]: failed to resolve: use of undeclared type or module 's'`. I think this is hard for developers to understand, and a hint of using method would be better in this case.

To be more precise, when the code misuses methods as functions, in addition to the current `E0433`, a hint would be provided, for example `possible misusing methods as functions, try change to method call`.
Repository: opencv
Issue: Please add seamlessClone do openCV.js
Labels: feature

In mean while are there some alternatives?
Repository: opencv
Issue: Add decompression bombs protection
Labels: feature,category: imgcodecs,effort: few days

https://libpng.sourceforge.io/decompression_bombs.html
Repository: TypeScript
Issue: JSDoc import integration doesn't support return-style AMD modules
Labels: Awaiting More Feedback

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:** 4.0.0-dev.20200508
also 3.8.3 (and presumably any other version)

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
require, AMD, exports, import, JSDoc, module

**Code**

`mod.js`
```ts
// @ts-check

define(function () {
  // (1) this checks
  // exports.number = 12;

  // (2) this doesn't check
  // var exports = {
  //   number: 12
  // };
  // return exports;

  // (3) this also doesn't check
  return {
    number : 12
  }
});
```

`usage.js`
```ts
// @ts-check

define(function(require) {
  /** @type {import('mod')} */
  var Mod = require('mod');
  Mod.number;
});
```

My tsconfig is configured for JS/AMD/es5/noEmit:

```
    "allowJs": true,
    "module": "AMD",
    "target": "es5",
    "noEmit": true,
```

**Expected behavior:**

The [import](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#import-types) in the `@type` annotation in `usage.js` is correctly resolved for all three AMD module variants of `mod.js` .

**Actual behavior:**

Only the first variant, where `number` is explicitly added to `exports` works.
For the second and third variants, I get a compile error.

```
src/usage.js:4:23 - error TS2306: File 'd:/ns-prog/ts-jsdoc/src/mod.js' is not a module.

4     /** @type {import('mod')} */
```

Considering both (2) and (3) are valid AMD modules, I would expect this to work.

Note that JSDoc supports [@exports](https://jsdoc.app/tags-exports.html) annotation. Perhaps that could be utilized in the TypeScript-JSDoc integration?

**Playground Link:** N/A (I didn't see an option to have multiple files.)

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
There's a StackOverflow question from 2016 <https://stackoverflow.com/questions/37035462/importing-amd-modules-that-don-t-use-exports-with-typescript>, but I didn't find any issue for it here.