sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: scatter_ op after permute op not working correctly on mps device
Labels: triaged,module: scatter & gather ops,module: mps

### 🐛 Describe the bug

When I try to use scatter_ op after permute op, The resulting matrix is always zero. Following is the script for reproduction

```python

import torch

device = torch.device("mps")


def test_topk_selection():
    random_matrix = torch.randn((8, 200, 100), device=device)
    random_matrix = torch.permute(random_matrix, (0, 2, 1))

    ret = torch.topk(random_matrix, k=int(0.1 * random_matrix.size(2)), sorted=False)
    ret.indices.to(device)
    ret.values.to(device)

    res2 = torch.zeros_like(random_matrix, device=device)
    res2.scatter_(2, ret.indices, ret.values)

    res1 = torch.zeros_like(random_matrix, device=device)
    for i in range(ret.indices.size(0)):
        for j in range(ret.indices.size(1)):
            for k in range(len(ret.indices[i][j])):
                res1[i][j][ret.indices[i][j][k]] = ret.values[i][j][k]

    print(torch.count_nonzero(res1), torch.count_nonzero(res2))
    assert torch.all(torch.eq(res1, res2))


test_topk_selection()
```

### Versions


```

Collecting environment information...
PyTorch version: 2.2.0.dev20231128
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 13.0 (arm64)
GCC version: Could not collect
Clang version: 14.0.3 (clang-1403.0.22.14.1)
CMake version: version 3.23.2
Libc version: N/A

Python version: 3.10.12 (main, Jul 28 2023, 18:34:01) [Clang 14.0.3 (clang-1403.0.22.14.1)] (64-bit runtime)
Python platform: macOS-13.0-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Apple M2 Pro

Versions of relevant libraries:
[pip3] numpy==1.26.2
[pip3] torch==2.2.0.dev20231128
[pip3] torchaudio==2.2.0.dev20231128
[pip3] torchvision==0.17.0.dev20231128
[pip3] torchviz==0.0.2
[conda] Could not collect

```

cc @mikaylagawarecki @kulinseth @albanD @malfet @DenisVieriu97 @razarmehr
Repository: material-ui
Issue: Add support for CSS `color-mix()` in theme palette
Labels: customization: theme,enhancement,customization: css

### Summary 💡

I wanted to use CSS's `color-mix` function for my theme palette colors to simplify the process of creating all of the main/light/dark variants. However, it appears that the `decomposeColor` function doesn't yet support this.

### Examples 🌈

```ts
const DARKEN_PERCENT = 33;
const LIGHTEN_PERCENT = 33;

const makeColor = (color: string, contrast: string) => ({
    main: color,
    light: `color-mix(in hsl, ${color} ${LIGHTEN_PERCENT}%, #fff)`,
    dark: `color-mix(in hsl, ${color} ${DARKEN_PERCENT}%, #000)`,
    contrastText: contrast,
});

export const theme = createTheme({
    palette: {
        mode: 'dark',
        primary: makeColor(..., '#fff'),
        secondary: makeColor(..., '#000'),
        error: makeColor(..., '#000'),
        warning: makeColor(..., '#000'),
        info: makeColor(..., '#000'),
        success: makeColor(..., '#fff'),
    },
    ...
});
```

### Motivation 🔦

Allowing us to use the native `color-mix` CSS function simplifies the creation of new themes.
Repository: TypeScript
Issue: Class generics not evaluated properly in JSDoc
Labels: Needs Investigation

### 🔎 Search Terms

jsdoc generics

### 🕗 Version & Regression Information

This is the behavior in every version I tried *(i.e. at random from 3.6.3 to nightly)*, and I reviewed the FAQ for entries about *jsdoc and generics*


### ⏯ Playground Link

https://www.typescriptlang.org/play?ts=5.4.0-dev.20231205&filetype=js#code/PQKhAIAEBcFMFsAOAbAhncAVcJgCgBjNAZ2PABEB7ecAbz3EfFAhgE9FY6B5AIwCtYBaAB5i0AE4BLAHYBzADRYAfAF8c+JuBmUAJrGIAhNgEld4ALx1VAbgZM5saAGEAFlOS6JsGQAoAlHTe0ACuEjLg0O7EAHQ6+kamuqp4KXgsUNAcXLRU8CIyIfC8sBJqGoSUMuLaelxWMrAA7hTUAXYEVTUE7p7eEQ11MY4uvV4+7UA

### 💻 Code

### (not working): TypeScript in JSDoc ([playground link](https://www.typescriptlang.org/play?ts=5.4.0-dev.20231205&filetype=js#code/PQKhAIAEBcFMFsAOAbAhncAVcJgCgBjNAZ2PABEB7ecAbz3EfFAhgE9FY6B5AIwCtYBaAB5i0AE4BLAHYBzADRYAfAF8c+JuBmUAJrGIAhNgEld4ALx1VAbgZM5saAGEAFlOS6JsGQAoAlHTe0ACuEjLg0O7EAHQ6+kamuqp4KXgsUNAcXLRU8CIyIfC8sBJqGoSUMuLaelxWMrAA7hTUAXYEVTUE7p7eEQ11MY4uvV4+7UA))

```js
/** @template T */
class Dom {
    /** @type {Object<string, T>} */
    nodesById = {};
    getChildren() {return this.nodesById}
}

/** @type {Dom<number>} */
const node = new Dom();
const children = node.getChildren(); // type is {[id: string]: T}
```

### (working): TypeScript ([playground link](https://www.typescriptlang.org/play?ts=5.4.0-dev.20231204&filetype=ts#code/MYGwhgzhAEAiD2BbAPAFQHzQN4Chr+gDt4ATAUwgCEBPASRIC5sBtAS0eggBcAnVwgOYBdJqgC+0ALzYxAbjwEBZLgGEAFqxAkeZQgAoAlNh1cArj0LQuGiADpi5KnRJicrnMHiFuRUmSlEZADucEjIhKaIAEZkPOiG8p7eXNDAGlo6ltIOZLZKqunauglAA))

```ts
class Dom<T> {
    nodesById: {[id: string]: T} = {};
    getChildren() {return this.nodesById}
}

const node = new Dom<number>();
const children = node.getChildren(); // type is {[id: string]: number}
```


### 🙁 Actual behavior

With TypeScript in JSDoc, `children` has the type `{[id: string]: T}`, i.e. `T` is not resolved, although `node` has the type `Dom<number>`.

### 🙂 Expected behavior

With TypeScript, `children` has the type `{[id: string]: number}`, i.e. `T` is taken correctly from `Dom<number>`. The same is expected for TypeScript in JSDoc.

### Additional information about the issue

Obviously, this is just a minimal working example. We have a large legacy codebase where we introduce TypeScript gradually via JSDoc comments (a nuke-everything TypeScript rewrite would not be feasible).
Repository: vscode
Issue: Git - compare the working tree with other revisions
Labels: feature-request,git

<!-- ⚠️⚠️ 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. -->

In order to compare some file/folder in the workspace with origin/master / a specific branch / some git commit, it currently is required to install a plugin (Gitlens/GitGraph/You name it) and jump through some hoops (`gitlens`--> (long list) ---> ` Search & Compare` -->  `Compare References` --> and so on)

Comparing revisions is a very fundamental and practical thing, and coming from eclipse (egit) I hate that it is that cumbersome and time-consuming via vs-code.

In eclipse-egit it was simple like that:
Right-click some file or folder --> `compare with `--> `Each other` / `HEAD` / `index` / `previous revision` / `branch/tag/commit` / more options

The current `select for compare`/`compare with selected` context menu options in visual studio are rather poor, and only seem to be usable for comparison of multiple files on the current working tree. Something I seldom need to do as a dev.

I would love to see the eclipse-egit `compare with` functionality as well in the right-click context menu of vs-code.

Since IMO it is a very basic and important functionality, I think it makes sense to implement it in  vs-code itself, instead of relying on some plugin to implement it.
Repository: godot
Issue: Quick load does not show derivative custom resources
Labels: bug,topic:editor

### Tested versions

reproducible in version 4.1.2

### System information

Windows 10

### Issue description

in the inspector, when an exported var of a custom resource or array of such is defined, the quick load function will only show resources which are defined as the base class of said resource and not derivative

### Steps to reproduce

- Create a custom resource (base.tres) with a script (base.gd) defining it's class_name
- Assign base.tres with the script base.gd
- Create a new resource (derivative.tres) that inherits from the resource base.tres
- Createa new script (derivative.gd) to it that inherits from the script base.gd
- Assign derivative.tres with the script derivative.gd
- Create any node and attach a new script to it (test.gd)
- Create an exported var from the type of the base resource
- In the inspector, go to the exported var and select quick load
- Quick load will only show base resource and not derivative

### Minimal reproduction project (MRP)

https://github.com/FluffyBunnyO/GodotQuickLoadBug
Repository: godot
Issue: Godot Mac - freezes after open any projects 
Labels: bug,platform:macos,topic:editor,topic:porting,needs testing

### Tested versions

stable 4.2
Stable 4.1x

### System information

Godot v4.2.stable - macOS 14.0.0 - Vulkan (Mobile) - integrated Intel(R) Iris(TM) Plus Graphics - Intel(R) Core(TM) i7-1060NG7 CPU @ 1.20GHz (8 Threads)

### Issue description

after downloading Mac Binars from the official source, after launching the Godot app, a window for selecting a project will open. If the project exists, just open any project or create a new one. Then the editor will open and godot will stop responding to any imputation to the editor. 

The godot editor process does not freeze, but it does not react to strange input from the keyboard or mouse.
Default lang was selected [SK] Slovak after clean first start by app.

### Steps to reproduce

clean install / create new project 
in project window is as default lang [SK] slovak 
after open any project or create one and open editor stop responding or accept any input. 
The godot editor process does not freeze, but it does not react to  input from the keyboard or mouse.
this happened always when godot is opened. 

when is editor terminated and godot reopen select lang [EN] English and problem is resolved , you can open project , after restart is posible to select again SK and all is ok 

Default lang was selected [SK] Slovak after clean first start by app.

Solution to workaround : in the introductory window where the project is selected because the project is created it is necessary to select - switch to ENGLISH if ENGLISH is not selected as the language of the editor, with the language Slovak in my casegodot stops responding after selecting the project. 

then the problem was fixed and it is possible to select SK Slovak again and the editor responds correctly 

### Minimal reproduction project (MRP)

clean install / create new project 
in project window is as default lang [SK] slovak 
after open any project or create one and open editor stop responding or accept any input. 
when is editor terminated and godot reopen select lang [EN] English and problem is resolved , you can open project , after restart is posible to select again SK and all is ok
Repository: electron
Issue: [Feature Request]: Hide share button under win.previewFile support and Open application quickly
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

I hope win.previewFile can support hiding the share button

### Proposed Solution

https://github.com/electron/electron/blob/ee8d97d7febb70ace0da79fda476a6d0513335fe/shell/browser/native_window_mac.mm#L1709
Add a parameter so that it will not be displayed when hidden sharing and other applications are opened.

### Alternatives Considered

none

### Additional Information

_No response_
Repository: excalidraw
Issue: Ability to rotate canvas for drawing
Labels: enhancement

Whenever I am drawing in excalidraw and I want to draw something slanted I am unable to rotate canvas in any way so it would be a massive improvement in experience of people who draw a lot in excalidraw 
```[tasklist]
### Tasks
```
Repository: angular
Issue: Possibility to configure `Validators.required` behavior or new `Validators.strictlyRequired` validator
Labels: area: forms

### Which @angular/* package(s) are relevant/related to the feature request?

forms

### Description

Currently `Validators.required` allows the entry of a `space` character, making the form valid. Therefore, we need to use a custom `required` validator.
```ts
public static required({ value }: AbstractControl): ValidationErrors | null {
    return String(value ?? '').trim() ? null : { required: true };
}
```

However, this is causing problems with material form fields as the required asterisks are not displayed next to the label due to the failure of this check.
![image](https://github.com/angular/angular/assets/32300784/fe9aac08-ef3a-43c2-affb-cb28061125df)

### Proposed solution

Could you consider adding an option to pass a boolean flag (e.g., `ignoreSpaces`) during the initialization of this validator? Alternatively, you could introduce a new `strictlyRequired` validator to address this concern, allowing users to choose without modifying the existing one.

### Alternatives considered

Currently we have to use this work-around simply to override `required` attribute value to display asterisks.
```ts
public get hasRequiredValidator(): boolean {
    return this.control.hasValidator(CmValidators.required) || this.control.hasValidator(Validators.required);
}
```
Repository: svelte
Issue: Svelte 5: Support passing of snippets or components?
Labels: needs discussion

### Describe the problem

This came up in Discord:
It might be useful for library components to accept either a snippet or a regular component as input.

```svelte
<!-- Snippet allows for adding additional content besides component/s -->
<List {items}>
	{#snippet item(data)}
		<ListItem {...data} />
	{/snippet}
</List>

<!-- Passing just a component -->
<List {items} item={ListItem} />
```


### Describe the proposed solution

There would have to be a way to either:
- Render a snippet or component regardless of what it is, e.g. make `@render` accept components.  
  The first argument (in case #9672 is implemented) to the called function would then be considered the props in case of a component.
- Add built-in functions to determine if something is a component/snippet. E.g.
    ```svelte
    {#if isSnippet(item)}
      {@render item(args)}
    {:else if isComponent(item)}
      <svelte:component this={item} {...args} />
    {/if}
    ```

### Alternatives considered

Always require the use of snippets, which can just use the desired component internally.
Potentially add a conversion utility from component to snippet:
```svelte
<List {items} item={asSnippet(ListItem)} />
```


### Importance

nice to have
Repository: angular
Issue: Consider sharing partial output interfaces between linker and JIT
Labels: area: compiler

### Which @angular/* package(s) are the source of the bug?

compiler-cli

### Is this a regression?

No

### Description

Currently, there are three places where the structure of e.g. `declareDirective` is maintained:

1. JIT compiler facade in core
2. JIT compiler facade in compiler
3. Semi-output AST interface in the `linker`.

The confusing part is that the interface in the linker only partially deals with the output AST, and uses literal types in some places. Overall, the interface seems pretty mixed and inconsistent and **also** there is **no type-safety** where the definitions map values are checked for type assignability. In practice the interface is only used for validating that certain keys are set in the definition map. For this, the JIT facade interfaces could also be used more effectively and safe.

It's unclear if we can do better, but right now- it seems like a lot of duplication for no benefit? (except for potentially documenting the emitted structure better)

### Please provide a link to a minimal reproduction of the bug

_No response_

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

_No response_

### Anything else?

Related internal discussion:
https://angular-team.slack.com/archives/C4WHZQMRA/p1701774881545059
Repository: PowerToys
Issue: Low FPS in settings
Labels: Issue-Bug,Product-Settings,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.76.0

### Installation method

Microsoft Store

### Running as admin

None

### Area(s) with issue?

Settings, Welcome / PowerToys Tour window

### Steps to reproduce

on my laptop i got 120 frames, but on pc -- that looks really ugly cuz of 1 fps

### ✔️ Expected Behavior

60 FPS UI

### ❌ Actual Behavior

it's going like 1 FPS

### Other Software

_No response_
Repository: react-native
Issue: Not able to proceed with TextInput || iOS release
Labels: Platform: iOS,Component: TextInput,Needs: Author Feedback,Needs: Repro,Type: Upgrade Issue,Type: Unsupported Version

### New Version

0.72.0

### Old Version

0.68.5

### Build Target(s)

iOS simulator release mode

### Output of `react-native info`

System:
    OS: macOS 14.1.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 77.88 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
    Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
  Languages:
    Java: 17.0.7 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.72.0 => 0.72.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

### Issue and Reproduction Steps

Hi! I have updated the react native version from `0.68.5` to `0.72.0` the flipper and other dependencies are updated successfully. 

I am facing this issue 

`-[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:]  perform input operation requires a valid sessionID`

while I am running the iOS app in release mode in Simulator (iPhone 15 - iOS 17.0), due to which I am not able to proceed further in the application.

The debug build works fine.

Attached screenshot is of the log that I am getting while clicking on a button after giving input to a TextInput

<img width="601" alt="Screenshot 2023-12-05 at 5 05 23 PM" src="https://github.com/facebook/react-native/assets/17410343/604a4174-6814-4aa0-86d2-dbfb5c5170c3">
Repository: vscode
Issue: Diagnostic Invalid Position
Labels: bug,typescript,languages-diagnostics

When adding/inserting lines, sometimes the diagnostics jump to the wrong line (notice the squiggle on `ster(a`):

![Image](https://github.com/microsoft/vscode/assets/2931520/9158a774-8786-4c56-98b9-026822661360)

Originally this diagnostic has been reported for `cursor`:

![Image](https://github.com/microsoft/vscode/assets/2931520/97705d1f-1ccb-493e-832c-bb3ce925cf9b)

@jrieken mentioned that diagnostics track the model version id at the point they are created.
I believe that typescript probably uses model version n₁ to compute diagnostics and creates/reports the diagnostics when the model version is n₂ > n₁.

Maybe this can be fixed by typescript not reporting diagnostics when the model changed during computation.
Repository: material-ui
Issue: [base-ui] Provide a plain CSS theme
Labels: docs,umbrella,design,package: base-ui

### Objective

This initiative aims to teach developers how to build a styled design system using the Base UI components, providing a stylesheet with plain CSS. 

### Steps
The planned steps according to [First-class support for plain/vanilla CSS (i.e., not CSS-in-JS)](https://www.notion.so/mui-org/First-class-support-for-plain-vanilla-CSS-i-e-not-CSS-in-JS-85977f4564df4c729387ef9e5a039eb1?pvs=4) are:
- [x] Extract the current Base UI demos theme to a single CSS stylesheet https://github.com/mui/material-ui/pull/39694
- [x] Set up a page as an exporter & show-case how it can work https://github.com/mui/material-ui/pull/39884
- [x] Define design system tokens for the theme https://github.com/mui/material-ui/pull/40113
- [ ] Build a page to showcase the components and customization of the theme, with a way to provide it to users

👉  https://master--material-ui.netlify.app/experiments/base/components-gallery/
Repository: godot
Issue: Script Editor's folded lines are oftentimes forgotten between editor restarts.
Labels: bug,topic:editor,needs testing

### Tested versions

v4.2.stable.official [46dc27791]
Doesn't seem to be present in 4.1.2

### System information

Windows 10

### Issue description

I was waiting to see if anyone would talk about this, but I'm just going to bite the bullet.

**All** folded lines of any given script may randomly be completely forgotten about between editor restarts. It may be it's the most recently loaded script, sometimes it's a previously opened script. It looks quite inconsistent and I cannot help but just notice it does happen.

Do note that I have the Editor Setting `text_editor/behavior/files/restore_scripts_on_load` enabled (as by default).

### Steps to reproduce

Open any project with scripts, code. Select one or more script and fold lines as you wish. Then restart the editor. You may notice that sometimes the folded lines are lost.

### Minimal reproduction project (MRP)

No need.
Repository: angular
Issue: Add failing CI safety checks to the release tooling
Labels: area: dev-infra

### Which @angular/* package(s) are the source of the bug?

Don't known / other

### Is this a regression?

No

### Description

Currently the dev-infra releasing tooling allows us to release framework even if the CI build is red. This was noticed during the v17 major release that was published despite the legitimate failing build (see https://github.com/angular/angular/commit/fecd141dfa541eb3e1c62767820474265e9a2443 and the failing commit prior to the release: https://github.com/angular/angular/commit/6b83328577867783b242abf07b4edd5eb57ea58f).



### Please provide a link to a minimal reproduction of the bug

Link to the failing job: https://github.com/angular/angular/actions/runs/6778078484/job/18481969411

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

_No response_

### Anything else?

Suggest that the tooling should prevent and / or clearly warn about the failing build prior to releasing.