sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Design Meeting Notes, 7/19/2024
Labels: Design Notes


# Function Expression Callback Analysis and `deferred`

https://github.com/microsoft/TypeScript/pull/58729

* Story of adding `/** @deferred */` to the Node.js `.d.ts` files https://github.com/DefinitelyTyped/DefinitelyTyped/pull/70084
    * Mostly from @sandersn's perspective.
    * Asked: Is this only on parameters?
        * Yes.
    * Easy to add `/** @deferred */` incorrectly to paramerters it doesn't really apply to. Silently does nothing.
        * Maybe fine?
    * Has to be exactly where the parameter is. Can't do it like `@deferred @param {number} x */`
    * 80% of the time, `deferred` needs to be added because a function is asynchronously called.
    * Had to ask: does "not guaranteed to be called" `deferred`?
        * Not necessarily.
        * Kind of a tripping point though.
    * `deferred` had to be sprinkled over *so many* signatures in Node.js.
        * Could use `listener` as a heuristic to figure out where to put it.
* Is assuming possibly-called and needing to annotated with `deferred` the right default?
    * So `deferred` vs. `immediate`.
    * In favor of possibly-called default.
        * Collection (array, map, set) callbacks never are `deferred`. Assuming possibly-called favors APIs like this.
        * Better to be more conservative on control flow analysis.
    * In favor of deferred by default.
        * Breaks existing code more.
        * All asynchronous API callbacks (event handlers, I/O, timers) are deferred functions.
        * `immediate` might actually be inferrable!
* If we started things from scratch, it feels like `deferred` would be the right choice.
    * Have to assume lots of people have `.d.ts` files outside of their control - the only workaround is to
        * update the `d.ts` or (very challenging for a lot of devs to be honest) or
        * define a function like

          ```ts
          function deferred<T extends (...args: any[]) => any>(deferred fn: T): T {
              return fn;
          }
          ```
          
          and pepper `deferred(...)` calls around each callback that has an issue.
            * But the callbacks don't error, subsequent references to a variable error. Users are likely to just cast instead.
    * If this was behind `--strict` it would be an easier sell for many many call-sites in an update.
    * Hard to get a sense without running on bigger codebases.
* With this PR, we are generally misunderstanding more code. Doesn't seem to catch as many bugs as we would think. It does error on idiomatic code like doing some async cleanup, but using to a variable afterwards
* Swapping the default behavior is quite surprising. It's probably a better default, but is it breaks for the sake of breaks?
* What are the conclusions and next steps?
    * We don't feel comfortable merging for 5.6.
    * We do want to review the breaks.
    * Ask for feedback from partner teams - can they adopt this? Are they catching bugs?
Repository: kubernetes
Issue: system:kubelet-api-admin does not have permissions to issue checkpoint.
Labels: kind/bug,sig/node,sig/auth,triage/accepted

### What happened?

kubelet recently started expoing a new checkpoint endpoint. A user must have RBAC `nodes/checkpoint` permission to call this endpoint. I believe we missed updating the `system:kubelet-api-admin` ClusterRole.

### What did you expect to happen?

I expect `system:kubelet-api-admin` to have this permission. If this is intentional please document why?

### How can we reproduce it (as minimally and precisely as possible)?

system:kubelet-api-admin is configured here
https://github.com/kubernetes/kubernetes/blob/b3e769b72ec1eb9d5f4928259633f75d8e373cb9/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go#L392

The subject access review request for checkpoint endpoint is constructed here:

https://github.com/kubernetes/kubernetes/blob/b3e769b72ec1eb9d5f4928259633f75d8e373cb9/pkg/kubelet/server/auth.go#L108

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
# paste output here
```

</details>


### Cloud provider

<details>

</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: kubernetes
Issue: No explanation of error returned from SharedInformer.AddEventHandler
Labels: kind/bug,sig/api-machinery,triage/accepted

### What happened?

When reviewing controller code that reacts to an `error` from `SharedInformer.AddEventHandler`, I found myself unsure whether the code I was looking at is correct. The comments do not explain why the `AddEventHandler` method of `SharedInformer` can return an `error`. No mention of what errors can appear, what such an appearance would mean. The caller gets no clue about how to react to an error.

### What did you expect to happen?

I expected the interface to give enough information to write/evaluate calls to this method.

### How can we reproduce it (as minimally and precisely as possible)?

Look at the interface (e.g., https://github.com/kubernetes/client-go/blob/v0.26.0/tools/cache/shared_informer.go#L135-L140).

### Anything else we need to know?

Nope

### Kubernetes version

<details>

The `error` return has been there since release 1.26.0.

</details>


### Cloud provider

<details>
N/A
</details>


### OS version

<details>
N/A
</details>


### Install tools

<details>
N/A
</details>


### Container runtime (CRI) and version (if applicable)

<details>
N/A
</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>
N/A
</details>
Repository: PowerToys
Issue: Keyboard Mappings Issue with PowerToys in Cloud/Dev Boxes
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Needs-Triage

### Microsoft PowerToys version

 v0.82.1

### Installation method

Other (please specify in "Steps to Reproduce")

### Running as admin

Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

I am encountering an issue where keyboard mappings set via PowerToys on my local system do not carry over to cloud/dev boxes. When I set up the same settings on PowerToys in the cloud/dev boxes, they don't work if the local system keyboard manager settings are enabled.

**Steps to Reproduce:**

1. Set up keyboard mappings using PowerToys on the local system.
2. Connect to a cloud/dev box.
3. Attempt to use the same keyboard mappings in the cloud/dev box.
 
Alternatively, if I set up the keyboard mappings directly on the cloud/dev box, they still don't work if the local system keyboard manager settings are enabled.

**Workaround:**
If the keyboard manager on the local system is turned off, the mappings work correctly in the cloud boxes. This requires manually turning off the keyboard manager on the local system while using the dev box and turning it back on afterward.

**Impact:**
This issue is a significant inconvenience and impacts the usability of dev boxes, as it requires constant toggling of the keyboard manager on the local system.

**Additional Information:**
- PowerToys mappings work correctly in the cloud box when the keyboard manager is disabled on the local box.
- This issue prevents seamless switching between local and cloud/dev environments.

**Request:**
Please investigate and provide a solution that allows for consistent keyboard mappings across local and cloud/dev boxes without needing to manually toggle the keyboard manager. Ideally, I should be able to set up the keyboard mappings on my local box once and not have to configure them in both places.



### ✔️ Expected Behavior

The keyboard mappings should work seamlessly in the cloud/dev box as they do on the local system.

### ❌ Actual Behavior

The key mappings trigger functions like Sticky Keys or Start instead of the intended mappings.

### Other Software

_No response_
Repository: vscode
Issue: BREAKING BUG: Hover not working on latest build of chrome, Android.
Labels: bug,confirmation-pending,workbench-hover

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

This pertains to VS code web via tunnels. Logged in with GitHub.

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version NOT WORKING (latest chrome): 

```
Version: 1.91.1
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:08:03.155Z
Browser: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
```

- VS Code Version last working (Kiwi browser):

```
Version: 1.91.1
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:08:03.155Z
Browser: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
```

- OS Version: 

```
Lenovo P11 Gen 2, 
TB350FU_S020174_230211_ROW
Android 12 (SP2A.220505.003)
```

Hey folks, I am the kind of person that likes to work on small 11inch android tablets on the go and leave my big bulky machine at home through vs code tunnels. The bug here is with the newest build of chrome, hover no longer works at all. Which is kind of important, from error hints to definitions, all gone. 

Attached is Chrome vs Kiwi browser. Kiwk has an older version of Chrome, and hover is working fine. On the left is latest build of chrome. On the right is Kiwi, presumably chrome based.

Steps to Reproduce:

1. Be on the latest build of Chrome on Android
2. Either with Android add to home page (converted apk) or use Chrome
3. Open any project
4. Hover does not work at all.

Screen recording: 

https://github.com/user-attachments/assets/f3332942-5790-4de0-b630-3b37cc0b515f

Version comparison:

![Screenshot_20240719-171429](https://github.com/user-attachments/assets/6fcb230d-f27d-4a8e-b563-997145a05b9b)

Please help. Thanks!
Repository: vscode
Issue: Search in markdown preview panel not working in current main branch local build
Labels: bug,upstream,webview,electron

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->


Type: Bug

I recently build vscode on local with following configuration and last commit being https://github.com/microsoft/vscode/commit/61b242c67f23d24bcb9abb25bcac223547f032bd .

```
Version: 1.92.0
Commit: Unknown
Date: Unknown
Electron: 30.1.2
ElectronBuildId: undefined
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.5.0
```

I found that the search functionality is not working for markdown preview. Seems like a recently introduced issue as when I tried to perform the search operation in stable release I was able to search across markdown preview.


Steps to Reproduce:
1.  Preview a Markdown file
2. Search for any keyword present in markdown file.
3. You will see that it won't show results.

This bug could be pushed with next release and can cause issues with upcoming stable releases.


PFA: POC video for the issue.

https://github.com/user-attachments/assets/0bb47435-cbc0-4e56-a821-61d59c2db412

Would be great if @mjbvz , you can shed some light here.
Repository: ollama
Issue: Enable using llama.cpp's --model-draft <model> feature for speculative decoding
Labels: feature request,performance

Howdy fine Ollama folks 👋 ,

Back this time last year llama.cpp added support for speculative decoding using a draft model parameter. https://github.com/ggerganov/llama.cpp/issues/2030

This can _massively_ speed up inference.

I was wondering if there's any chance you could look at adding the option for llama.cpp's `--model-draft` parameter that enables this?

---

It works by loading a smaller model (with the same tokeniser/family) in front of a larger model.

I know with exllamav2 you can get 100%-200% speed increases (seriously!) and the best part is - with no loss of quality.

For example, you might have:

- Main model: Qwen 72b Q4_K_M
- Draft model: Qwen 0.5b Q4_K_M

The result would be the memory usage of main Qwen 72b model + the tiny 0.5b draft model but around 4x the tokens/s you'd see with just the main model loaded.

I've been using exllamav2 instead of Ollama for this feature (and the 4bit K/V cache #5091) recently and the performance really is astounding.

---

Parameters that can be passed to llama.cpp's server:

1. `--model-draft` (required) - the usage is the same as the existing `--model` used for loading normal models.
2. `--draft` (optional, but recommended to make available)
3. `--p-split` (optional, but recommended to make available)

There is also the following, but I think the default is probably fine 99% of the time:

- `--threads-draft`
- `--threads-batch-draft`

https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md?plain=1#L37

```
  -md,   --model-draft FNAME      draft model for speculative decoding (default: unused)
  -td,   --threads-draft N        number of threads to use during generation (default: same as --threads)
  -tbd,  --threads-batch-draft N  number of threads to use during batch and prompt processing (default: same as --threads-draft)
         --draft N                number of tokens to draft for speculative decoding (default: 5)
  -ps,   --p-split N              speculative decoding split probability (default: 0.1)
```
Repository: pytorch
Issue: An API to re-enable dynamo-disabled functions
Labels: feature,triaged,oncall: pt2,module: dynamo

### 🚀 The feature, motivation and pitch

**Motivation**
In a company-wise shared code base, some functions were dynamo-disabled by `torch._dynamo.diable`. However, they may work for some cases. Directly removing `torch._dynamo.diable` is risky, because it may not work for all cases, and we are not aware of all usage of that function. So if we can provide such an API, users can enable that function for their specific case without changing the codebase.

This could be easily done: since the disabled function has an attribute called `_torchdynamo_orig_callable`. We can just replace the disabled function with `_torchdynamo_orig_callable` to recover it. But it's better to provide a formal API to do that.

### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @anijain2305
Repository: godot
Issue: Screen will flash white on startup when the resizable window option is turned off
Labels: bug,topic:rendering

### Tested versions

Reproducible in 4.0.4, 4.1.4, 4.2.2, and 4.3 beta 3

### System information

Windows 10 - Godot 4.2.2 - Forward Plus, Mobile and Compatibility (Issue was on all renderers) - Intel UHD graphics

### Issue description

When launching the game with the resizable option turned off in window settings, the screen will flash white and then go to the boot color you selected. With resizable on, it goes straight to the color you selected.

### Steps to reproduce

Open project turn off the resizable option under window settings, click run.

### Minimal reproduction project (MRP)

N/A
Repository: godot
Issue: Errors while reimporting assets on mac 
Labels: bug,topic:editor,needs testing,topic:import

### Tested versions

4.2.2 stable - 4.3 beta 3 Mac

### System information

macOS Sonoma 14.0

### Issue description

Video of issue - https://youtu.be/7mLSqk4VTVs?si=4MhDCM2lhDC7SqlR .

We have big project in godot on version 4.2.2. Using git VCS. 3 Windows system, 1 Android. 

Today I tried to install Godot 4.2.2 on a clean Mac. I downloaded the current version of our game from GitHub, and it seems that every time the file system is scanned, what happens is shown in the video. We've never encountered this before. In some discussions, it was advised to update Xcode and download additional components (although I didn't quite understand why) - I did, but it didn't help. Deleting the .godot and hidden folders was also recommended, but that didn't help either. Notably, the game runs, but upon stopping it, a bunch of errors are thrown and it crashes. We have proper gitignores in place, four devices work perfectly. When connecting a Mac with an M1 chip, there are problems. If I create a new project and transfer some assets there for testing, everything is fine.

### Steps to reproduce

-

### Minimal reproduction project (MRP)

-
Repository: neovim
Issue: nvim_buf_get_mark returns incorrect value of `'` mark
Labels: bug,api,marks

### Problem

for `'` mark, nvim_buf_get_mark always returns the position based on curwin and curbuf, no matter which bufnr is given.

### Steps to reproduce

* `$ seq 10 > 10; seq 20 > 20`
* `$ nvim --clean -u NONE`
* `:e 10`, `10ggm'` # curbuf=1, curwin=1000
* `:vs 20`, `20ggm'` # curbuf=2, curwin=1001
* we are in buf#2 win=1001
* `:lua =vim.api.nvim_buf_get_mark(1, "'")` # seeing '{20, 0}', which is supposed to be `{10, 0}`

### Expected behavior

for `'` mark, nvim_buf_get_mark honors the bufnr param, and maybe accept a winid param.

### Neovim version (nvim -v)

nvim 0.10

### Vim (not Nvim) behaves the same?

N/A

### Operating system/version

archlinux

### Terminal name/version

st 0.9

### $TERM environment variable

st-256color

### Installation

pacman
Repository: PowerToys
Issue: ProcessExplorer-ish
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

The app should provide the ability to track which process is running the UI selected by mouse.
Something like Snoop does with WPF.

### Scenario when this would be used?

It could help understand which process is doing bad on your screen.
Use case:
1. Launch the app.
2. Click on a UI you are interested in.
3. A window with arbitrary info opens. (e.g. PID, exe path, etc.)
And it could help finding malicious processes if someone needs.
Example:
![Which process did THIS?](https://github.com/user-attachments/assets/fb26c8ba-022f-454c-9bf9-0081141d9a13)
I have no information about the app, but I'm sure I need to offer my help to it!


### Supporting information

_No response_
Repository: TypeScript
Issue: Allow customization of type display format in hover tooltips
Labels: Suggestion,Awaiting More Feedback

### 🔍 Search Terms

- customization type display
- Array<T> or T[]

### ✅ Viability Checklist

- [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, new syntax sugar for JS, etc.)
- [X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

In TypeScript, when hovering over a variable, the inferred type is displayed in a specific format.
For instance, an array of numbers is shown as number[].
However, some developers, including myself, prefer the alternative format `Array<number>` for readability and consistency with other generic types.


### 📃 Motivating Example

I have noticed that there is an `WriteArrayAsGenericType` flag in the Abstract Syntax Tree (AST) that can convert `T[]` to `Array<T>`.

I would like to request the addition of a configuration option in tsconfig.json to enable this flag, allowing developers to choose their preferred format for array types in hover tooltips.

For example:

```json
{
  "compilerOptions": {
    "typeDisplayFormat": "generic" // Options could be "generic" for Array<number> or "shorthand" for number[]
  }
}
```


### 💻 Use Cases

Complex Type Readability: I frequently write functional code that can lead to complex types like `Task<Maybe<Task<Maybe<T[]>>[]>>[]`. The shorthand `[]` notation can make it difficult to understand the nested generic relationships. Displaying these types as `Array<T>` would significantly improve readability and comprehension.

Consistency: Most other generic types use angle brackets (e.g., `Promise<T>`, `Map<K, V>`), and only array types use the special shorthand (`number[]`). Aligning array types with this convention would ensure consistency across all types and improve clarity.
Repository: deno
Issue: deno support declare module keyword
Labels: needs investigation

I am trying to use deno to develop vscode extensions

first I run command

```bash
deno add npm:@types/vscode
```

but seems deno cannot recognize the package. this package do not have main in package.json, but contains a 'types' keyword. and it uses `declare keyword` to describe all objects in vscode . So I think if deno can support `declare module`, and I think maybe that will be possible to use deno develop vscode plugin ..