sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: syscall/js: remove Func.Release()
Labels: Proposal,OS-JS

I propose we remove the [js.Func.Release()](https://pkg.go.dev/syscall/js#Func.Release) method.

# Problem
Currently, js.Func's are very prone to bugs. Developers have to manually call Release() on allocated js.Func's after they are sure there are no references. But, releasing funcs too early leads to errors when called again from the js side. On the other hand, never releasing funcs (although safer) results in memory leaks.

Unlike OS files, socket connections, and other manually freed resources, the lifetime of js.Func's are sometimes unclear, making them a good candidate for automatic collection.

# Solution
In 2021, JavaScript added a new [FinalizationRegistry](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry) class where a function may be called when an object is cleaned up by the garbage collector. Using this, we can clean up the func's resources when they are gc'd on the JavaScript side.

# Compatibility
syscall/js is not covered by the go compatibility promise.

Alternatively, to not break current apps, Func.Release() can be turned into a no-op or work as usual alongside the new auto gc.

Most modern versions of major browsers support FinalizationRegistry, which is the current precedent for implementing changes to the wasm backend ([see comment](https://github.com/golang/go/issues/28360#issuecomment-1287760265)). In the event of incompatibility, the js.Func can be leaked, still allowing the program to run as normally as possible.
Repository: flutter
Issue: [Impeller] Flutter GPU: Deserialize ipscene assets in Flutter UI
Labels: engine,P3,e: impeller,team-engine,triaged-engine

An ipscene flatbuffer asset (root: `fb::Scene`) is able to be directly deserialized into an `std::shared_ptr<impeller::scene::Node>` within UI, which can then be passed to Impeller through a DisplayList op.
* Load the ipscene flatbuffer file.
* Decode all texture assets in the `Scene`->`textures` list through the normal image decoder flow to produce DlTextures.
* Fire off a raster task to deserialize the scene by calling `scene::Node::MakeFromFlatbuffer` with the ipscene flatbuffer, the list of decoded Impeller texture handles (which should match the exact order of `Scene`->`textures`; pass `nullptr` for any images that failed to decode), and the allocator from the Impeller context (`UIDartState::Current()->GetIOManager()->GetImpellerContext()`).
Repository: TypeScript
Issue: Promise.all and Promise.allSettled infer incorrect types from Array subclasses
Labels: Bug

# lib Update Request
## Configuration Check
My compilation *target* is `ES2020` and my *lib* is `the default`.

## Missing / Incorrect Definition

`Promise.all`
`Promise.allSettled`

## Sample Code
```ts
declare class ArrayChild<T> extends Array<T> {}

declare const array: Array<Promise<number>>
declare const child: ArrayChild<Promise<number>>

Promise.all(array).then(a => a /* number[] */) 
Promise.allSettled(array).then(a => a /* PromiseSettledResult<number>[] */)

Promise.all(child).then(a => a /* {[K in keyof ArrayChild]: number} */) 
Promise.allSettled(child).then(a => /* {[K in keyof ArrayChild]: PromiseSettledResult<number>} */) 
```
[Playground link](https://www.typescriptlang.org/play?target=7#code/CYUwxgNghgTiAEkoGdnwIIxlAngYQAsBLCYAHgBUA+eEADwBcQA7YNTbHSmgbwF8AUANBI4iAPbNkDeLE4AuDFlxkACjHEBbIshBlmAV00AjEDCpVh4aGLCTpiYqUUdchEuXVadewybMWVqIIdlIyREzYxhAgijwA2gDKOCbiEAB0EWZQDOIwALqKABQAlPAAvDQAkpE5efpGpuYANPDxzIp+TYXwXtq6Df7mggJ9PulQEBBFcrgl6QwELDMVNFAlAgD0m-C7e-sHh4cAegD8oxr9IBNTiSAMDDHAM8o484vLUKuyG9tH-wDAWchH8atloggIOJxABrNAAc2hwHgF28uhu0yyURi7yWzBWlR+Wx2gNJ-2BY3RkwgdweTyKWKgENxn2+62JZM5ZOBIJ2rhwjg8iGgqHgwHEIGQzAA5DJ4fd4B94DAiPCCDIGDgAA5EZjw1FXDFFMBOYAs-FfQnsv5c7nnSnXam0x4gZ4mjzmglrX4k21++BnIA)
## Documentation Link
[Promise.all](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all)
[Promise.allSettled](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled)

## Possible fix
The inferred value should be of type `number[]` exactly like what happens with normal `Array` class. In the linked playground, It can be seen that `Promise.all` and `Promise.allSettled` infer the correct type with an `Iterable` type of object. This undesired behavior just happens with `Array` subclasses. I have quickly tried changing the signature from the original:
```ts
allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>> }>;
all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]> }>;
```
to
```ts
allSettled<T extends Promise<unknown>[]>(values: T): Promise<T extends Promise<infer S>[] ? PromiseSettledResult<S>[] : never>
all<T extends Promise<unknown>[]>(values: T): Promise<T extends Promise<infer S>[] ? S[] : never>
```
and it works as expected: [Playground link](https://www.typescriptlang.org/play?target=7#code/CYUwxgNghgTiAEkoGdnwIIxlAngYQAsBLCYAHgBUA+eEADwBcQA7YNTbHSmgbwF8AUANBI4iAPbNkDRMVIAuDFlyES5AAoxxAWyLIQZZgFdtAIxAwqVISOhiAZkeZgGRSfCgQIlWoxZt4TR09AycAa2ZxAHdmKgBtAF0qAAoAN08jEGRFCgBKRSDdfR96JlY0QpCyImZ7C3gAZXiE+AB+RsT4RWYQVItrW1gER2dXd08IBpAGBggQcgpfMoDK4vDImOaU9IhM7Pg8gq0ig0XS-wrjqpq6mEbmtsCr-SmZueAAJSyjCAYyJs63V6-SEE2SYDkwFyADoGAQWMkoPAALw0KC5AQAekx8FxePxBPxAD1WgIJq9ZvNwZCYXCEWAUTQwBjsYS2eyCSSBBygA)
Repository: kubernetes
Issue: Job failure back-off delay and limit are not configurable
Labels: kind/feature,lifecycle/stale,needs-triage,wg/batch

### What happened?

The job failure back-off parameters are computed based on the [hardcoded constants in job controller](https://github.com/kubernetes/kubernetes/blob/a6d66d15f691cb6473f1361caed08e5bd7eae68b/pkg/controller/job/job_controller.go#L75-L77). There is no way to override these back-off parameters at Job level

### What did you expect to happen?

The user should have the ability to provide back-off parameters as part of the Job Spec

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

NA

### Anything else we need to know?

_No response_

### Kubernetes version

NA

### Cloud provider

NA

### 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: flutter
Issue: [go_router] Check if route exists
Labels: c: new feature,package,c: proposal,P3,p: go_router,team-go_router,triaged-go_router

## Use case

I apologize if this already exists, I haven't been able to find anything about it!

I'd like to be able to check if a route (path?) exists. For example, I want to be able to check if `'/home'` is a route that is configured in my GoRouter.

Our app has banners that have links attached to them. We get these banners + links from the server and they're the same for our web app and mobile app. The mobile app is using GoRouter and I want to check if the path in the link is a valid route in our GoRouter. If it is a valid path, we can .go to it, and if it isn't a valid path we can just open the link in web view.

I've found that I can use `routerInformationParser.matcher.findMatch(path)` to do this. Currently, findMatch will throw an exception if the path doesn't exist so I can catch the exception and handle the non-valid path case there. I'm okay with using this for now, but I'm afraid that if findMatch changes in the future to not throw an exception (perhaps it will just return an empty list), my code will break.

If there is a better way to handle this already, please let me know!

## Proposal

Add a `.hasRoute(String route)` method to GoRouter.
Repository: vscode
Issue: When in debug REPL, tab key changes focus instead of indents
Labels: feature-request,debug,accessibility,debug-console

<!-- ⚠️⚠️ 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. -->
ersion: 1.74.2
Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161
Date: 2022-12-20T10:26:09.430Z (1 day ago)
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 21.6.0
Sandboxed: No

Steps to Reproduce:

1. Put the cursor into the Debug REPL
2. Press the tab key. The focus will change to the bottom bar instead of adding an indentation

Is there any way to change this behavior so that the tab key adds an indent?
Repository: pytorch
Issue: torch.fx tracer emits type error when tracing module that directly contains and uses the torch.cat() function
Labels: oncall: fx

### 🐛 Describe the bug

### Problem:
When I use torch.fx's tracer to trace an `nn.Module` that uses the `torch.cat()` function directly (please see the `MyCat` module below), the tracing fails with the following type error message:
```
TypeError: cat() received an invalid combination of arguments - got (Proxy, int), but expected one of:
 * (tuple of Tensors tensors, int dim, *, Tensor out)
 * (tuple of Tensors tensors, name dim, *, Tensor out)
```
Interestingly however, when I use the torch.fx tracer to trace a nested `nn.Module` that uses `torch.cat()` both in the module itself as well as in the child module nested within (please see the `NestedCat` module below), the tracing completes with no error messages emitted. I am not sure if this is the expected behavior (and if so, the reasoning and mechanism behind this), or if this is a bug. I have also found that others seem to have very similar issues, and a fix in one GitHub issue ([https://github.com/pytorch/pytorch/issues/34294](https://github.com/pytorch/pytorch/issues/34294)) seems to address this problem; however, when the following code is run, I observed the aforementioned behavior and the problem still persists. If I understand correctly, I think the correct behavior should be that the tracing for both of the following modules should complete without emitting any error messages.

### Related issues:
[https://github.com/pytorch/pytorch/issues/79715](https://github.com/pytorch/pytorch/issues/79715)
[https://github.com/pytorch/pytorch/issues/34294](https://github.com/pytorch/pytorch/issues/34294) (Seems to contain an (incomplete) fix?)
[https://github.com/pytorch/pytorch/pull/43248](https://github.com/pytorch/pytorch/pull/43248)

### Code for reproducing the issue:
The `graph = tracer.trace(nested_cat)` line completes successfully with no problem, but the `graph = tracer.trace(my_cat)` line emits the type error messages.
```py
import torch
from torch import nn
from torch import fx

class MyCat(nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, inputs):
        cat = torch.cat(inputs, 1)
        return cat

class NestedCat(nn.Module):
    def __init__(self):
        super().__init__()
        self.my_cat_0 = MyCat()

    def forward(self, x):
        my_list = [self.my_cat_0([x])]
        cat = torch.cat(my_list, 1)
        return cat

tracer = fx.Tracer()

nested_cat = NestedCat()
graph = tracer.trace(nested_cat)

my_cat = MyCat()
graph = tracer.trace(my_cat)
```

### Versions

```
Windows 10

Python 3.9.10

CUDA 11.6

torch              1.13.1+cu117
torchaudio         0.13.1+cu117
torchvision        0.14.1+cu117
numpy              1.22.3
```

cc @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv
Repository: storybook
Issue: [Bug]: Setting decorators on the StoryFn function doesn't seem to work
Labels: bug

### Describe the bug

Setting the decorator dynamically using the StoryFn.decorators option does not work. 

```
let decorator = story => html`<section>${story()}</section>`;

const Template: StoryFn<Component> = args => html`<component color=${args.color} count=${args.count}></component>`;
const Contracted: StoryFn<Component> = (args, context) => Template(Object.assign({}, args, {count: 0}), context);
const Expanded: StoryFn<Component> = (args, context) => Template(Object.assign({}, args, {count: items.length}), context);
const Dynamic: StoryFn<Component> = (args, context) => Template(args, context);
const Danger: StoryFn<Component> = (args, context) => Template(Object.assign({}, args, {color: 'danger'}), context);
const Link: StoryFn<Component> = (args, context) => Template(Object.assign({}, args, {color: 'link'}), context);

export const Default: StoryFn<Component> = (args, context) => html`${
  [Contracted, Expanded, Dynamic, Danger, Link].map(story => {
    // story.decorators = [ decorator ];   <-- This doesn't seem to work
    return decorator(() => html`.            <-- Have to call it manually this way
      <h4>${story.name} Mode</h4>
      ${story(args, context)}
    `);
  })
}`;
```

### To Reproduce

_No response_

### System

Environment Info:
```
  System:
    OS: macOS 12.5.1
    CPU: x64 Intel(R) Core(TM) i7-9750H
  Binaries:
    Node: 18.5
    npm: 8.12.1
  Browsers:
    Chrome: 108
    Safari: 15
```

### Additional context

package.json
```
  "dependencies": {
    "lit": "^2.5.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.7",
    "@storybook/addon-actions": "^7.0.0-beta.13",
    "@storybook/addon-console": "^1.2.3",
    "@storybook/addon-essentials": "^7.0.0-beta.13",
    "@storybook/addon-links": "^7.0.0-beta.13",
    "@storybook/web-components": "^7.0.0-beta.13",
    "@storybook/web-components-vite": "^7.0.0-beta.13",
    "lit-html": "^2.5.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "rollup": "^2.79.1",
    "storybook": "^7.0.0-beta.13",
    "typescript": "^4.9.4",
    "vite": "^3.2.5",
    "yup": "^0.32.11"
  }
  ```

_No response_
Repository: vscode
Issue: Outline View line wrap
Labels: feature-request,outline

It would be nice to see the whole line in outline view. Here's the screen where you can see that function signature isn't visible. Can we add setting for word wrapping here like we have for editor?

![Screenshot from 2022-12-22 08-27-32](https://user-images.githubusercontent.com/6453537/209064076-02be5517-2da7-44f7-ab7b-bb0a391c5ae2.png)
Repository: godot
Issue: Context menus not behaving as expected in macOS when holding down right mouse button
Labels: bug,platform:macos,topic:porting,topic:gui

### Godot version

4.0.beta9.mono.official [e780dc332]

### System information

macOS Ventura 13.1, MacBook Pro M1 2021

### Issue description

The contextual (right-click) menu doesn't work as expected on macOS when holding down the right mouse button and releasing the button on the selected menu item.

When you hold down the right mouse button in macOS, you can normally keep holding it down while selecting a menu item in the context menu, and then release the right mouse button when your cursor is over the item you want to select.

In version 3 stable, this functions normally, however in 4 (beta 9) no item is highlighted in the context menu until you release the right mouse button. You then have to select an item in the menu by left clicking on it (I believe this is expected behaviour in Windows).

### Steps to reproduce

- Right click to create a context menu anywhere in Godot but do not release the right mouse button.
- Hover your mouse over a menu item - you will notice nothing has become highlighted
- Release the right mouse button over an item. Nothing happens.

Expected behaviour in macOS:
- Right click to create a context menu and do not release the right mouse button
- Hover oven an item in the menu. The item will become highlighted
- Release the right mouse button to select the highlighted item

### Minimal reproduction project

N/A (applies to any and all projects)
Repository: pytorch
Issue: [🚀 Feature Request] pdf and sampling from Alpha-stable distribution 
Labels: module: distributions,feature,triaged

### 🚀 The feature, motivation and pitch

I'm a long-time user of pytorch but a first-time contributor, and this is my first issue. I propose the implementation of the pdf and sampling of alpha-stable distribution into Pytorch. 

Recently, my team published a paper on the Neurips 2022 Workshop titled [Score-Based Generative Models using Lévy Processes](https://openreview.net/forum?id=ErzyBArv6Ue). In this study, gaussian noise on diffusion model is replaced with  alpha stable noise. Alpha-stable distribution is unfortunately not supported by PyTorch. Therefore, I implemented this feature to a different repository named [torchlevy](https://github.com/UNIST-LIM-Lab/torchlevy). However, it will be preferable if the pdf and sample features are included in PyTorch so that other AI researchers may quickly and readily utilize them.

### How to implement

- Implementation of pdf and sampling method is based on Zolotarev thm([Stable Diffusion](https://papers.ssrn.com/sol3/Delivery.cfm/SSRN_ID2894444_code545.pdf?abstractid=2894444&mirid=1), page 7.)
- I want to add new file on `torch/distribution` for these features.

### Issue

- Pdf caculation requires numerical integration which is not supported on Pytorch. In [torchlevy](https://github.com/UNIST-LIM-Lab/torchlevy), I’ve used another python module called torchquad for efficient numerical integration. But I’m not sure I can use this module on Pytorch. If I cannot use this module, I want to implement only sampling from alpha stable distribution.

cc [@fritzo](https://github.com/fritzo) [@neerajprad](https://github.com/neerajprad) [@alicanb](https://github.com/alicanb) [@nikitaved](https://github.com/nikitaved)

### Alternatives

_No response_

### Additional context


I would be happy to work on solving this when the issue has been discussed further.

cc @fritzo @neerajprad @alicanb @nikitaved
Repository: storybook
Issue: [Feature Request]: Touch friendly Storybook top panel
Labels: feature request,needs triage

### Is your feature request related to a problem? Please describe

When I tried Storybook in my new project, I found the current Storybook top panel UI and tree view (side bar) could be improved.

### Describe the solution you'd like

1) "Change the size of the preview" is a drop-down list which is a hassle to change different screen, can be replace with tab bar of "[ mobile | table | computer ]" icons which is commonly used in most site/page builder.

2) Enlarge icons. The default controls UI sizing are too small for a large display screen. I love how Twitter UI is easy to navigate and is easy for touch screen, especially on mobile devices and monitor with touch screen. https://twitter.com

3) Improve Storybook treeview UI.

### Describe alternatives you've considered

_No response_

### Are you able to assist to bring the feature to reality?

no

### Additional context

_No response_
Repository: vscode
Issue: Allow setting invert indent for `editor.wrappingIndent`
Labels: feature-request,editor-wrapping

<!-- ⚠️⚠️ 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. -->
![image](https://user-images.githubusercontent.com/21006190/209083032-e04e2126-905d-41ac-bd2e-710048725af7.png)
I noticed that the "wrapping indent" option can be set to the "Indent" option, which will relatively indent the wrapped line to the width of one tabs.Can we add an option to indent the wrapped line to the width of **-1** tabs.

Just like this: 
![image](https://user-images.githubusercontent.com/21006190/209086802-b181b52d-7b5e-4d99-8670-f76da422f153.png)

One reason is that this is the layout followed by the Chinese text, as follows:
![image](https://user-images.githubusercontent.com/21006190/209087585-156c3b40-cf72-439b-9851-0996a34b6a51.png)

A similar request #152755 was made and closed before, and I would like to re-vote on this suggestion.
Repository: vscode
Issue: Compound launch configuration: add abiliity to ignore preLaunchTask of launch configurations.
Labels: feature-request,debug

<!-- ⚠️⚠️ 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. -->


The issue:
I use a compound task to launch my microservices dotnet project. I have 7 microservices + 1 api gateway. (In compound I use only 3 of microservices + 1 gateway)
For each microservice and a gateway I have a launch configuration, which has preLaunchTask to build it (`dotnet build <csproj file>` task).
When I launch all configurations, each launch configuration starts it's preLaunchTask, which results in failure of `dotnet build` command. Command fails to IO write issue (file is already open by another process), as some microservices share same classlibs.

I have solved this issue by duplicating all configurations project without preLaunchTask. Instead I have added preLaunchTask to compound itself and it builds the whole project (.sln file) before launch configurations execution.

The **duplication** of configurations is the issue. `launch.json` file becomes bloated, hard to read and maintain.

The solution:
Would be cool to have a flag inside of compound to decide should configurations run their preLaunchTask (`"ignoreConfigurationsPreLaunchTasks"`). So I dont have to duplicate each configuration and make a "(NOBUILD)" one.

```json
  "compounds": [
    {
      "name": "Microservices Compound",
      "preLaunchTask": "build all",
      "configurations": [
        "ApiGateway",
        "Checkin",
        "Management",
        "ChatBot"
      ],
      "ignoreConfigurationsPreLaunchTasks": true // <-- this, default value: false
      "stopAll": true
    }
  ],
```

Alternatively `"configurationsPreLaunchTasksMode": "ignoreAndLaunchAllTogether" | "sequenceAndLaunchImmediatelly" | "sequenceAndLaunchAllTogether" | "parallelAndLaunchImmediatelly" | "parallelAndLaunchAllTogether" `.

Alternatively 2: (might be a breaking change)
Make `configurations` not a list, but a dictionary (obj), where keys are name of the configuration, and value is some object with parameters (like `ignorePreLaunchTask: true`, or values to pass to `${input:SomeInput}` templates, or anything else just imagine).