sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: terminal
Issue: Code Health: Follow ES.9: Avoid ALL_CAPS names per ISO C++ guidelines
Labels: Product-Meta,Issue-Task,Area-CodeHealth

Per ISO C++ guidelines, ALL_CAPS is to be avoided except for macros:
[ES.9: Avoid ALL_CAPS names](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.html#es9-avoid-all_caps-names)

The reasoning behind this is that it allows the pre-processor to silently replace you variables with a macro definition without a warning.

_Originally posted by @binarycrusader in https://github.com/microsoft/terminal/pull/913_
Repository: terminal
Issue: Make all test binaries consistent in Target and Project name
Labels: Product-Meta,Issue-Task,Area-CodeHealth

Probably another area where cleanup/reconciliation is needed.

The Host Unit Tests (the O.G. of our testing libraries) says

```
<ProjectName>Host.Tests.Unit</ProjectName>
<TargetName>Conhost.Unit.Tests</TargetName>
```

So at least the target name might need to be pluralized to match the pattern in the CI (i.e. `Types.Unit.Tests`).
I think ProjectName only affects the sort order inside Visual Studio so similar projects are sorted together visually.

I'd recommend aligning at least the `TargetName` (or confirming the CI pattern isn't looking for the plural) here and then filing a follow on task to make the test libraries named more consistently.

_Originally posted by @miniksa in https://github.com/_render_node/MDIzOlB1bGxSZXF1ZXN0UmV2aWV3VGhyZWFkMTc1MTU5OTM4OnYy/pull_request_review_threads/discussion_
Repository: godot
Issue: Segfault when running PCK from older Godot version with newer Server binary
Labels: bug,topic:core,confirmed,crash

**Godot version:**
3.1

**OS/device including version:**
Ubuntu 18.04


**Issue description:**
Running a 3.1 export .pck using 3.1.1 server binary results in segfault without message as to why.

*Original issue*:
Game server runs fine in editor and as exported executable, but not when running .pck file via server binary.
I have game client and server. In editor both run fine, exported and executed directly, both run fine. However when using the server template from https://godotengine.org/download/server I get segfault.



**Minimal reproduction project:**
Can follow the original ones. The server .pck provided was exported using 3.1-stable, and if run with official 3.1.1 server binary you'll see segfault. 
What's curious is as far as I can tell, you still have to click the "Lets go" button on client to trigger crash.

*Original steps*:
Not sure what issue is, so included my client/server in addition to exports of both. Instructions in zip on how to run and achieve segfault.
Note if you want to export my project, be sure to include *.json resources.

Zip for download at https://menip.itch.io/deathmatch. Password is "godot"
Repository: TypeScript
Issue: Convert to class declaration quick fix misses superclass
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.4.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

- class declaration quick fix
- 80002

**Code**

This code is a mix of ES2015- and function-style classes:

```ts
class A {
  constructor() {
    this.a = 'a';
  }
  doAThing() {
    console.log(this.a);
  }
}

/**
 * @constructor
 * @extends {A}
 */
function B() {
  this.b = 'b';
}
B.prototype = new A();

B.prototype.doBThing = function() {
  console.log('b: ', b);
};
```

The TS language services offer a quickfix to convert B into an ES2015 class. Great!

**Expected behavior:**

I'd hope that one of (or both of) the `@extends` and `B.prototype = new A();` would result in `B extends A`:

```ts
class B extends A {
  constructor() {
    super();
    this.b = 'b';
  }
  doBThing() {
    console.log('b: ', b);
  }
}
```

**Actual behavior:**

The quick fix produces this code:

```ts
/**
 * @constructor
 * @extends {A}
 */
class B {
  constructor() {
    this.b = 'b';
  }
  doBThing() {
    console.log('b: ', b);
  }
}
B.prototype = new A();
```

TypeScript flags an error on the last line:

    (property) B.prototype: B
    Type 'A' is missing the following properties from type 'B': b, doBThingts(2739)

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> no quickfixes on the playground, alas!

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: TypeScript
Issue: CTRL-Click not working on require('...') path
Labels: Bug

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.34.0
- OS Version: Ubuntu 18.04

Steps to Reproduce:

1. Create a `index.js` and a `mocks.js` files in the same folder
2. Put the following code in `index.js`:

`require('./mocks.js');`

2. Try to CTRL+Click on the path to enable navigation and witness that it is not possible.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: godot
Issue: Shader editor doesn't save its state
Labels: bug,topic:editor,confirmed

**Godot version:**
 e2375f4


**Issue description:**
The shader editor, unlike the script editor, doesn't save its state when closed (breakpoints, bookmarks, etc).
Repository: vscode
Issue: TextEditorDecoration applied to incorrect range if racing with user edits
Labels: feature-request,editor-core,semantic-tokens

Version: 1.33.1 (user setup)
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:27:14.102Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.18362

The wrong text gets decorated if the user is typing when the decoration is applied.

Steps to Reproduce:

1. Add the following to a didChangeTextDocument handler in an extension:

```
        let decoration: vscode.TextEditorDecorationType = vscode.window.createTextEditorDecorationType({
            color: "#FF00FF"
        });
        let txt1: string = textDocumentChangeEvent.document.getText();
        let editors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => e.document.uri === textDocumentChangeEvent.document.uri);
        for (let e of editors) {
            e.setDecorations(decoration, [new vscode.Range(1, 1, 1,10)]);
        }
        let txt2: string = textDocumentChangeEvent.document.getText();
```

2. Prepare a file with some text i.e.: 

```
XXXXXXXXXXXX
XXXXXXXXXXXX
```

3. Put a breakpoint immediately after the first call to getText().
4. When you hit that breakpoint, inspect txt1.  You will see the contents of the file.
5. While remaining at the breakpoint, paste a couple lines to the start of the file.  For example, to make the file look like so:

```
YYYYYYYYYYYY
YYYYYYYYYYYY
XXXXXXXXXXXX
XXXXXXXXXXXX
```

6. Step past the second call to getText().  You will see it retains the original content.  This is good (better then changing the state of the document out from under us, before delivering didChangeTextDocument with the new edits).  The intention here is to set a decoration within the second line of X's, and the apparent state of the document seems to imply this is what to expect.
7. Continue, allowing the didChangeTextDocument handler to return.

Seeing: The decoration is applied to the wrong text.

<img width="167" alt="Capture" src="https://user-images.githubusercontent.com/49173979/58141199-64376000-7bf7-11e9-8c60-3e0a5d519dce.PNG">

Expected: The decoration range(s) should get adjusted based on the pending edits.
Repository: flutter
Issue: flutter_tools test/commands.shard/permeable/create_test.dart takes over 6 minutes
Labels: a: tests,tool,P2,team-tool,triaged-tool

We really need to make this test more efficient somehow. Is it doing something redundant? Something we can cache? (But without making it less hermetic.)
Repository: TypeScript
Issue: Missing controlsList property in HTMLMediaElement
Labels: Needs Investigation

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.4.0-dev.201xxxxx

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

controlsList HTMLMediaElement

**Code**

```ts
const video = $htmlVideoElement as HTMLVideoElement
video.controlsList.value = "nodownload";
```

**Expected behavior:**

Works so we can do things as shown https://googlechrome.github.io/samples/media/controlslist.html and as documented by https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controlsList

**Actual behavior:**

controlsList is not valid for HTMLVideoElement

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
https://www.typescriptlang.org/play/#src=interface%20HTMLMediaElement%20%7B%0D%0A%20%20%20%20readonly%20controlsList%3A%20DOMTokenList%20%0D%0A%7D%0D%0A%0D%0Aclass%20Greeter%20%7B%0D%0A%20%20%20%20greeting%3A%20string%3B%0D%0A%20%20%20%20constructor(message%3A%20string)%20%7B%0D%0A%20%20%20%20%20%20%20%20this.greeting%20%3D%20message%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20greet()%20%7B%0D%0A%20%20%20%20%20%20%20%20return%20%22Hello%2C%20%22%20%2B%20this.greeting%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Alet%20greeter%20%3D%20new%20Greeter(%22world%22)%3B%0D%0A%0D%0Alet%20video%20%3D%20document.createElement('video')%20as%20HTMLVideoElement%3B%0D%0A%0D%0Avideo.controlsList.value%20%3D%20%22nodownload%22%0D%0A%0D%0Adocument.body.appendChild(video)%3B

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
https://github.com/DefinitelyTyped/DefinitelyTyped/issues/19500

Workaround is to add and let the declarations get merged.
```ts
declare global {
  interface HTMLMediaElement {
    readonly controlsList: DOMTokenList 
  }
}
```

Or add an ambient type file
```typescript
interface HTMLMediaElement {
    readonly controlsList: DOMTokenList;
}

interface DOMTokenList {
    /**
     * Returns the associated set as string.
     * Can be set, to change the associated attribute.
     */
    value: string;
}

```
Repository: go
Issue: os: Remove and RemoveAll can't remove the current directory on AIX
Labels: NeedsInvestigation,OS-AIX

On AIX, unlinkat or rmdir syscall doesn't work on the CWD. Therefore, a program like the following one doesn't remove GOPATH.
```
$ cat removeall.go
package main

import (
	"io/ioutil"
	"log"
	"os"
)

func main() {
	GOPATH, err := ioutil.TempDir("", "TestRemoveAll")
	if err != nil {
		log.Panic(err)
	}

	if err := os.Chdir(GOPATH); err != nil {
		log.Panic(err)
	}
	if err := os.Remove(GOPATH); err != nil {
		log.Panic(err)
	}
}
$ ./removeall.go
2019/05/22 09:29:19 remove /tmp/TestRemoveAll186232865: device busy
panic: remove /tmp/TestRemoveAll186232865: device busy

goroutine 1 [running]:
log.Panic(0xa00010000088f58, 0x1, 0x1)
        /opt/freeware/src/packages/BUILD/go-root/src/log/log.go:338 +0x9c
main.main()
        /opt/freeware/src/packages/BUILD/go-root/own_test/goprogs/removeall.go:19 +0x138
exit status 2
```

There is no real documentation on that. However, rmdir seems to return EBUSY and unlinkat EPERM. So, we should be able to detect if os.Remove is failing because of that. However, what's the correct behavior if we want to fix that ? 
Do we chdir to the parentdir ? "/tmp" ? the executable folder ? anything else ? 
Or do we want to keep this behavior ?  

Note that, when calling os.Removeall, everything except the directory itself is still being removed. Therefore, only a empty directory remains. But, as most of the tests are doing a `defer os.Removeall`, /tmp is filled with empty directories...

Do some other OSes have the same problem ?  

Edit: POSIX rmdir doesn't specify which behavior must be done (cf https://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html)
> If the directory is the root directory or the current working directory of any process, it is unspecified whether the function succeeds, or whether it shall fail and set errno to [EBUSY].
Repository: pytorch
Issue: LibTorch :About torch.jit.trace generate model.pt
Labels: needs reproduction,oncall: jit,triaged

## 🐛 Bug

I use libtorch inference faceboxes,when I test generated model ,I have a problem.

1.torch.save(net1.state_dict(), \'net_params.pth\')  
2.torch.save(net1, \'net.pth\') 
The first way save the model,libtorch inference the model ,it make Incorrect result,the second way can make correct result. why?




 - PyTorch Version (e.g., 1.0):1.1.0
 - OS (e.g., Linux):ubuntu 16.04
 - How you installed PyTorch (`conda`, `pip`, source):pip
 - Build command you used (if compiling from source):no
 - Python version:python3.5
 - CUDA/cuDNN version:9.0/9.2
 - GPU models and configuration:gtx 930mx
 - Any other relevant information:
Repository: TypeScript
Issue: Move TextEncoder out of lib.dom.d.ts.
Labels: Suggestion,Awaiting More Feedback

## Search Terms
TextEncoder

## Suggestion
Put `(window|global).TextEncoder` in a library that is automatically available to both browser and nodejs.

## Use Cases
`TextEncoder` now exists on `window` in all major browsers as well as on `global` in NodeJS (as of NodeJS 11).  At the moment, the `TextEncoder` definition lives in `lib.dom.d.ts` which means it isn't available when working on a project/library that is targeting both NodeJS and Browser.


I don't mind submitting a PR, but I don't know where the appropriate location for such a change is, and how to reconcile it properly with removal from `lib.dom.d.ts`.  It isn't part of an annual ES specification, but it should go somewhere that is automatically included in both browser and node now that it is implemented by both.  The specification for it can be found at https://encoding.spec.whatwg.org/ and I believe that is what has been implemented in NodeJS.

## 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. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: node
Issue: [Documentation Suggestion] How To Contribute To Unit Tests
Labels: help wanted,doc

**Description**
I'm new to the Node project and I want to help contribute, and I've seen suggestions that a great way to contribute is to look at the [code coverage report](https://coverage.nodejs.org/), find something that doesn't have full coverage, and write/add to tests to help the coverage be more complete. 

However, the actual steps to do that are a bit vague (the code coverage website is a bit hard to understand), and this process isn't documented in this project. (I actually heard about doing this in [this medium article](https://medium.com/the-node-js-collection/interested-in-contributing-to-node-js-core-read-on-5614f60d074d).)

**Solution**
Can we add a section in one of the contributing documents (I guess either on the website or maybe a new doc (that gets referenced in [CONTRIBUTING.md](https://github.com/nodejs/node/blob/master/CONTRIBUTING.md)) to list out the steps of how to either use the code coverage tool to find code that's untested, and how to help add tests (or add to current tests) to contribute?

I'm not sure if we should treat this in two parts (one part being documentation on how to use the code coverage tool, and another on how to use contribute by using it to find untested code), or to make just one document.
Repository: svelte
Issue: Run transitions on initial rendering on a per-transition basis
Labels: feature request,awaiting submitter

I know that by default transitions do not run on the initial rendering (which is nice!) and that I can turn them on globally by setting `intro: true` when [rendering the app](https://svelte.dev/docs#Client-side_component_API).

Sometimes I can be handy to have an initial transition to create emphasize, so I am wondering if there's a way to selectively turn on initial transitions on a per-transition basis.

I am thinking about something like this:

```html
{#if visible}
  <div transition:fly={{ y: -20, init: true }}>hi there!</div>
{/if}
```

This is not a pressing issue as it's easy to work around the approach but it'd be nice to not have to add fake state to achieve this. Right now I am doing the following or is that not necessary?

[See it live](https://svelte.dev/repl/5290dd52afcc428ab8cc2f48ed9843dc?version=3.4.2)

```html
<!-- App.svelte -->
<script>
  import Test from './Test.svelte';
  let visible = true;
</script>

<label><input type='checkbox' bind:checked={visible}> visible</label>
<Test {visible}/>


<!-- Test.svelte -->
<script>
  import { onMount } from 'svelte';
  import { fly } from 'svelte/transition';

  export let visible = false;
  let init = false;
	
  onMount(() => {
    init = true;
  });
</script>

{#if init && visible}
  <div transition:fly={{ y: -20 }}>hi there!</div>
{/if}
```
Repository: neovim
Issue: Cannot set iminsert=2 in windows version
Labels: enhancement,api,has:plan,ui-extensibility

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`:
```
NVIM v0.3.5
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe /DWIN32 /D_WINDOWS /W3 /MD /Zi /O2 /Ob1 /DNDEBUG -DMIN_LOG_LEVEL=3 /W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -D_WIN32_WINNT=0x0600 -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -IC:/projects/neovim/build/config -IC:/projects/neovim/src -IC:/projects/neovim/.deps/usr/include -IC:/projects/neovim/build/src/nvim/auto -IC:/projects/neovim/build/include
Compiled by appveyor@APPVYR-WIN
Features: -acl +iconv -jemalloc +tui
```
- Vim 8.1 behaves differently?
Yes, I can set iminsert=2 in vim

- Operating system/version:
Windows 10 Home Basic 1809
- Terminal name/version:
nvim-qt.exe
- `$TERM`:
null

### Steps to reproduce using `nvim -u NORC`

```
nvim -u NORC
:set iminsert=2
```

### Actual behaviour
```
E474: Invalid argument: iminsert=2
```

### Expected behaviour
After setting iminsert=2, my chinese input method will be turned on in insert mode, and be turned off in normal mode.

I have searched in document, and found the following lines:
```
'iminsert' 'imi'        number (default 0, 2 when an input method is supported)
                        local to buffer
        Specifies whether :lmap or an Input Method (IM) is to be used in
        Insert mode.  Valid values:
                0       :lmap is off and IM is off
                1       :lmap is ON and IM is off
                2       :lmap is off and IM is ON
        2 is available only when compiled with the +multi_byte_ime, +xim
        or global-ime.
```
The return code of `has("multi_byte_ime")` is 0, and I think it should be the reason.
But I don't know how can I compile a version with `multi_byte_ime` support. In the document of `:help version`, it says I should edit the `feature.h`, but I cannot find the `feature.h` file or any code about `multi_byte_ime` in the source code.
Or maybe there is another way to archieve the behaviour I expect?
Repository: terminal
Issue: Add support for multi-param OSC sequences
Labels: Issue-Feature,Product-Conhost,Help Wanted,Area-VT

@vapier wrote:
> i don't think this correctly handles chaining to following OSC sequences.

That's correct. It doesn't handle chaining at all. It also doesn't handle color names.

Since this was my first PR, I was trying not to rewrite, but to just add a little on top of what was there and learn how things work -- I even reused the color parser that was written for OSC 4, though it won't support color names, meaning you can only set RGB values, and not just reuse colors from your base 16 for foreground and background.

The structure of the OSC handler in the State Machine seems designed on the assumption that they are single-valued (meaning one value per escape sequence), which makes chaining basically impossible.

Basically, still to do:
* [x] Rewrite the `ActionOscDispatch` to support chains of values
* [x] Make OSC 4 support setting the whole color palette at once (This was done in #7578)
* [x] Make OSC 10, 11, 12 support setting all of them at once 
* [ ] Add support for lookups ("?") to output the current value #3718
* [ ] Add support for resetting colors (OSC 104..119) #3719
* [x] Rewrite the color parser to include ~~x11 color names~~ more formats #3715
* [x] Support setting colors above index 16 #3717 (maybe #313?)
Those things are definitely needed, but didn't seem necessary for a first pass.

Somewhere along the way someone will need to decide if we're going to do _special colors_ for  bold/italic/underline/blink/reverse ... and which window properties should be settable by OSC 3 😉 @oising?

_Originally posted by @Jaykul in https://github.com/microsoft/terminal/pull/891#issuecomment-494667974_