sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: VSCode’s renderer helper process using 100% of CPU
Labels: bug,macos,perf

<!-- ⚠️⚠️ 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/No

<!-- 🪓 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:1.66.2
- OS Version: Darwin arm64 21.4.0
- 
提交: dfd34e8260c270da74b5c2d86d61aee4b6d56977
日期: 2022-04-11T07:47:29.396Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0

<img width="912" alt="image" src="https://user-images.githubusercontent.com/56670467/165425065-a5d20b8d-d916-46ca-88d6-8926b3bf84c2.png">
<img width="1140" alt="image" src="https://user-images.githubusercontent.com/56670467/165425121-24024f43-7bd4-4115-91c7-40af47685146.png">

The vscode Code Helper (Renderer) process consumes a lot of cpu and causes a very high processor temperature, closing vscode and disabling all extensions will not solve the problem.
After a clean reinstall the problem persisted. The way to reproduce is to open vscode and use the search function will appear, and vscode's own process manager does not show this abnormal process, you need to manually go to apple's process manager to end the task.
Repository: rust
Issue: GAT combined with HRTB doesn't work and has confusing diagnostics
Labels: A-lifetimes,A-associated-items,T-compiler,A-GATs,A-higher-ranked

I tried this code:

```rust
#![feature(generic_associated_types)]

use std::marker;

trait Trait {
    type Gat<'this>
    where
        Self: 'this;

    fn function<F>(self, _: F)
    where
        F: FnOnce(Self::Gat<'_>);
}

struct Struct<T>(marker::PhantomData<T>);

impl<T> Trait for Struct<T> {
    type Gat<'this> = &'this mut T where Self: 'this;

    fn function<F>(self, _: F)
    where
        F: FnOnce(Self::Gat<'_>),
    {
    }
}
```

[Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=9253295e89a1d8acba4ed1840ddde70b)

I expected to see this happen: Since the GAT has the `Self: 'this` bound I'd expect `T` as being part of `Struct<T>` which is `Self` to outlive `'this` and compile.

Instead, this happens and we get a (confusing) lifetime error which proposes to add a bound for a type `'a` which isn't specified in the code:

```text
error[[E0311]](https://doc.rust-lang.org/nightly/error-index.html#E0311): the parameter type `T` may not live long enough
  [--> src/lib.rs:20:8
](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=fbd726c1f1bd90e514358a91016581ec#)   |
17 | impl<T> Trait for Struct<T> {
   |      - help: consider adding an explicit lifetime bound...: `T: 'a`
...
20 |     fn function<F>(self, _: F)
   |        ^^^^^^^^ ...so that the type `Struct<T>` will meet its required lifetime bounds
```

I'm assuming this is a name for the HRTB `'_` but I'm not sure. However, this bound should not be necessary since `T` is part of the impl associated with `Struct<T>`. This HRTB working w/o complaints making me unsure what `'a` is referring to:

```rust
use std::marker;

struct Struct<T>(marker::PhantomData<T>);

impl<T> Struct<T> {
    fn function<F>(self, _: F) where F: FnOnce(&T) {}
}
```

#### Related issues

At first seemed to be related to #95331 but I was unable to reproduce without GATs. I.e. this compiles:

```rust
trait FooBad: for<'a> TheItem<'a>  {
    fn items<F>(walker: F) where F: FnOnce(<Self as TheItem<'_>>::Item);
}

trait TheItem<'a> {
    type Item;
}
```

[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=01c01049a4f0f3763354db2211834c82)

### Meta
`rustc --version --verbose`:
```
rustc 1.62.0-nightly (de1026a67 2022-04-23)
binary: rustc
commit-hash: de1026a67b0a3f5d6b61a1f77093af97d4799376
commit-date: 2022-04-23
host: x86_64-pc-windows-msvc
release: 1.62.0-nightly
LLVM version: 14.0.1
```
Repository: rust
Issue: Tracking Issue for socket `set_mark`
Labels: T-libs-api,C-tracking-issue

This is a tracking issue for the socket `so_mark` new function for [this PR](https://github.com/rust-lang/rust/pull/96334)

<!--
A handful of oses can mark a socket for mainly for network filtering purpose here Linux using `SO_MARK` and FreeBSD `SO_USER_COOKIE`
-->

### Public API

```rust
// core::magic

fn main() -> std::io::Result<()> {
   let sockid: u32 = 32;
   let socket = UnixDatagram::unbound()?;
   socket.set_mark(sockid)
   Ok(())
}
```


- [x] Implementation: #...
- [ ] Final comment period (FCP)
- [ ] Stabilization PR
Repository: rust
Issue: Conditionally obtaining a function, then calling, emits suboptimal indirect calls (that can be direct)
Labels: A-LLVM,I-slow,T-compiler

This seems more like an LLVM issue?

https://rust.godbolt.org/z/TEncx3h5G

The simplest case of this issue is that, when conditionally choosing a function pointer (or closure), then calling it, the codegen will emit code to obtain one of the branches, then indirectly dispatch to the function pointer (as opposed to using a direct call).

For small functions, this codegen is noticeably worse, as the pattern always denies inlining.

Consider these trivial examples:
```rs
let rounding_mode = if condition {
 f64::floor
} else {
 f64::ceil
};

rounding_mode(x)
```
Generally, both branches would be evaluated, and then the result would be chosen based on the condition. Here, instead, a full function call is required to round the float.

```rs
let rounding_mode = if condition {
 f64::floor
} else {
 f64::ceil
};

rounding_mode(0.0)
```
Here, the value should always be 0.0, yet it too requires a function call, passing the zero back and fourth.
Repository: angular
Issue: Animated elements with structural directives are duplicated when moving parent between ViewContainerRefs
Labels: area: animations,P3,bug

### Which @angular/* package(s) are the source of the bug?

animations, core

### Is this a regression?

No

### Description

Reproduction steps (see link below):
- click "change state", an animation will run and the text will appear
- click "change state", the old text will animate out, and the new text will animate in. This is fine
- click "move me to B", the entire component will be moved to the other ViewContainerRef. Note that the leave animation on the text will run
- click "change state". Instead of the old text being animated out and then removed, only the new text is inserted. We end up with both states visible at the same time!

Every time the component is moved to the other ViewContainerRef and the number changes, another duplicated text appears.

No duplications occur if the animations are removed. I'm assuming the animation "forgets" to remove the old element from the DOM.

-----

There are two components, each with a ng-container inside. Another component is dynamically created, and inserted into the ViewContainerRef of one of these ng-containers. This dynamic component is moved between the containers via a button click, which just does detach() on the current ViewContainerRef, and insert() on the new ViewContainerRef.

The component being moved contains a subject with a number. In the template, a structural directive is used to show a different text for each number (the bug appears with ngIf as well as ngSwitch, the reproduction uses ngIf). The texts have an enter/leave animation.



### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-ivy-wm7e9e?file=src%2Fapp%2Fcomponent-to-move%2Fcomponent-to-move.component.ts

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 13.3.3
Node: 16.13.1
Package Manager: npm 8.1.2
OS: linux x64

Angular: 13.3.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1303.3
@angular-devkit/build-angular   13.3.3
@angular-devkit/core            13.3.3
@angular-devkit/schematics      13.3.3
@angular/cli                    13.3.3
@schematics/angular             13.3.3
rxjs                            7.5.5
typescript                      4.6.3
```


### Anything else?

There is another issue relating to animations and ViewContainerRefs (https://github.com/angular/angular/issues/35959), but in that one only the animations are broken. Here the animations run fine, it's the duplicated DOM elements that are the problem.
Repository: rust
Issue: Codegen features are no longer recognized by rustc
Labels: T-compiler,C-bug,D-confusing


On stable, giving additional codegen features to rustc works as expected, for example:

```sh
$ rustc --target=wasm32-unknown-unknown -C target-feature=+bulk-memory test.rs --crate-type=cdylib
```
On beta and nightly, compiling with the same options works too, but warns that the feature is not recognized.

```
$ rustc +nightly --target=wasm32-unknown-unknown -C target-feature=+bulk-memory test.rs --crate-type=cdylib
warning: unknown feature specified for `-Ctarget-feature`: `bulk-memory`
  |
  = note: it is still passed through to the codegen backend
  = note: consider filing a feature request

warning: 1 warning emitted
```

Target features work well.
This *may* be caused by #95202.

### Version it worked on

It most recently worked on: 1.60

### Version with regression

Beta (1.61)

`rustc --version --verbose`:
```
rustc 1.61.0-beta.4 (69a6d12e9 2022-04-25)
binary: rustc
commit-hash: 69a6d12e9f0372e3c6d82bc7c7e410dab02d0500
commit-date: 2022-04-25
host: x86_64-unknown-linux-gnu
release: 1.61.0-beta.4
LLVM version: 14.0.0
```

@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged
Repository: electron
Issue: [Bug]: Using webdriverio automation testing unable to Maximize / Unmaximize / Set Window
Labels: bug :beetle:

### 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 bug report that matches the one I want to file, without success.

### Electron Version

18.0.0

### What operating system are you using?

Windows

### Operating System Version

Windows 10

### What arch are you using?

x64

### Last Known Working Electron version

none

### Expected Behavior

Expected Behavior -
Maximize / Unmaximize / Set Window Position should work as expected.
Actual Behavior -
Error: unknown command: 'Browser.getWindowForTarget' wasn't found
Steps to reproduce -
Run automation test with webdreverio to set and get window size.
Machine: Windows 10


### Actual Behavior

Error: unknown command: 'Browser.getWindowForTarget' wasn't found

### Testcase Gist URL

_No response_

### Additional Information

I see that this issue was opened in 2017 as well 
https://github.com/SeleniumHQ/selenium/issues/4504

Is there a resolution for this? Currently automation tests for changing window size can't be done.
Repository: neovim
Issue: decorations (virt_lines, conceal, anti-conceal, etc) to respect `wrap`
Labels: enhancement,api,marks

### Feature already in Vim?

NA

### Feature description

Virtual lines do not respect `wrap`. It would be good if it did, either by default or by opt-in when setting the extmark.
Repository: pytorch
Issue: Remove _log_softmax/_softmax in favor of log_softmax and softmax respectively.
Labels: module: internals,triaged

### 🚀 The feature, motivation and pitch

Similar rationale to https://github.com/pytorch/pytorch/issues/73135

The only difference between `_softmax` and `softmax` is that `softmax` takes an optional dtype argument, while `_softmax` takes a `half_to_float` argument. However, this `half_to_float` arg is not needed in the backwards pass, and even if it were, we could simply reconstruct it from the argument dtypes.

https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/SoftMax.cpp#L427

So, to remove these, we can simply turn the current `_softmax` and `_log_softmax` into C++ functions (not operators), and mostly preserve the same logic as today. The backwards pass would need to be modified slightly to take account of the cast.

cc: @albanD  @zou3519 @ngimel @ezy

### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh
Repository: neovim
Issue: Setting winhighlight on a floating window leaks into quickfix windows
Labels: bug,highlight,options

### Neovim version (nvim -v)

v0.8.0-dev+9-g1facad234

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

n/a

### Operating system/version

Linux

### Terminal name/version

Happens in both alacritty (latest) and kitty (latest)

### $TERM environment variable

tmux-256color, xterm-kitty

### Installation

AUR: neovim-git

### How to reproduce the issue

1. `nvim --clean`
2. `:lua vim.api.nvim_win_set_option(vim.api.nvim_open_win(vim.api.nvim_create_buf(false, true), false, { relative = "editor", width = 1, height = 1, row = 1, col = 1 }), "winhighlight", "Normal:Search")`
3. `:copen`


### Expected behavior

![2022-04-27_02-27-52_Alacritty](https://user-images.githubusercontent.com/21299126/165487729-be1776e2-6b6e-456f-8302-b5a90d5a4f05.png)

Focus quickfix window, `:echo &winhighlight` should be blank

### Actual behavior

![2022-04-27_02-27-03_Alacritty](https://user-images.githubusercontent.com/21299126/165487574-e0016132-e2b1-4ea7-8874-0ab5040b00d6.png)

Focus quickfix window, `:echo &winhighlight` is `Normal:Search`

Also happens with loclist window.
Repository: flutter
Issue: flutter_localizations dependency issue due to collection dependecy
Labels: framework,a: internationalization,P2,team-framework,triaged-framework

Because geography >=1.1.4 depends on collection ^1.16.0 and every version of flutter_localizations from sdk depends on collection 1.15.0, geography >=1.1.4 is incompatible with flutter_localizations from sdk.
Repository: godot
Issue: Alt + 3 should open external editor
Labels: enhancement,topic:editor

### Godot version

3.4

### System information

Any

### Issue description

There is a shortcut for "Open Script Editor".
However, when using an External Editor, pressing Alt + 3 still opens the build-in editor.
Either Alt + 3 should open the external editor if set, or there should be *another* shortcut for opening the external editor, if set.
Though personally I would prefer if Alt + 3 opens external editor if set for consistency reasons.

### Steps to reproduce

1) Open Editor
2) Set External Editor to VS Code or something else
3) Press Alt + 3

### Minimal reproduction project

_No response_
Repository: TypeScript
Issue: Contextual type of a property type not inferred with key remapping
Labels: Bug

# Bug Report

### 🔎 Search Terms

contextual, template literal, key remapping, object property

### 🕗 Version & Regression Information

- This is the behavior in every version I tried

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.7.0-dev.20220427#code/JYOwLgpgTgZghgYwgAgLKIBaggYQPYgzADmAPACoCiAbhOMhAB6QgAmAzsgN7JgCeABwgAuZOzBRQxZAF8AfNwBQyMQgwQAtnAD8orspUNa4druRVjYANwGZNlQTP7DyANoBpZKHM06YVwBE-EIBALrIcJwABgQAJFzuMlGhZgAUBi4Q1KIWfgzMdBzcvIIiyJ4yyNo+lsiiIFnQGcgAlMgAvArUeMCs9rI2MoqKrBAIADZwUCgwAK4gCGDABMgI03CQ6GrYFL70TCxFPMFl4pIg0vLpKggERMSiW1gN+IQku5Zyii2i3b02iiYAjwUDAyFG8Fm4zBawgGwgT2wqWcqnUWj0zUaJj0lUixROogCADEAPIkgKyAA0tmpDhAGJcBFJJNEqSybU6ShcKiyADoTlZkAB6IViDB4KGsZAAIxQUWZUUpMtmYKiWSiXk4cBAXg0AnGwAQwFV2r4UWaMlpVMUMhaNiAA)

### 💻 Code

```ts
interface MachineConfig<TEvent extends { type: string }> {
  schema?: {
    events?: TEvent;
  };
  on?: {
    [K in TEvent["type"] as `on${K}`]?: (
      ev: TEvent extends { type: K } ? TEvent : never
    ) => void;
  };
}

declare function createMachine<TEvent extends { type: string }>(
  config: MachineConfig<TEvent>
): void;

export default createMachine({
  schema: {
    events: {} as { type: "FOO" },
  },
  on: {
    onFOO: (ev) => {
      ev.type; // should be `FOO`, but `ev` is an implicit `any`
    },
  },
});
```

### 🙁 Actual behavior

Implicit any is reported

### 🙂 Expected behavior

`ev` should get inferred as `{ type: 'FOO' }`

--- 

`getTypeOfPropertyOfContextualType` explicitly~ ignores this case:
```ts
if (isGenericMappedType(t) && !t.declaration.nameType) {
    const constraint = getConstraintTypeFromMappedType(t);
    const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
    const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
    if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
        return substituteIndexedMappedType(t, propertyNameType);
    }
}
```

Note that `nameType`comes from an argument provided by this call within `getContextualTypeForObjectLiteralElement` but it's `undefined`:
```ts
getTypeOfPropertyOfContextualType(type, symbol.escapedName, getSymbolLinks(symbol).nameType);
```

I guess the fix here would be to **not** ignore this potential substitution based on `!t.declaration.nameType` and construct the possible `K` constraint based on the `t.declaration.nameType` and `name`. I don't know how to do this in a sufficiently generic manner though.
Repository: ant-design
Issue: [Feature Request] Custom form component with children render props miss `onChange` prop when has `dependenices`. 
Labels: Inactive

### What problem does this feature solve?

https://codesandbox.io/s/custom-form-component-5gm8i1

If I want to custom a form component, at now, I can create it and put it into the `Form.Item`. Just like

```
const CustomFormComponent = ({ onChange }) => ...

<Form.Item ...><CustomFormComponent /></Form.Item>
```

But if the `CustomFormComponent` need some other forms value, I need to set the `dependencies` prop.

```
<Form.Item name="bar" label="bar" dependencies={ ["foo"]} >
  <CustomFormComponent t="t1" />
</Form.Item>
```

But this is not work, because `CustomFormComponent` **won't re-render when `foo` updates**.

You need to do this:

```
<Form.Item label="bar" dependencies={ ["foo"]} >
  { () => <CustomFormComponent t="t1" /> }
</Form.Item>
```

But if you use Children of render props like this, the `CustomFormComponent` will not receive the `onChange` prop, **I know that's because there is no`name` prop on Form.Item because it's not a valid usage**.

But if I want to store the value of  `CustomFormComponent` into the `form`, and trigger the `onValuesChange` when `CustomFormComponent` updates its value(Because it's a custom **form** component, so sure its value should be stored in the form). 

How could I do that?

### What does the proposed API look like?

I don't know for now.

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: ant-design
Issue: 日历切换月份时不要高亮选择新的日期
Labels: Inactive

### Reproduction link

[https://ant.design/components/calendar-cn/](https://ant.design/components/calendar-cn/)

### Steps to reproduce

切换日历月份，会高亮上一个月份的日期

### What is expected?

取消高亮

### What is actually happening?

依然高亮

| Environment | Info |
| --- | --- |
| antd | 4.20.1 |
| React | 17.0.2 |
| System | Macos |
| Browser | Chrome |

---
此问题3年前已有相似issue：
https://github.com/ant-design/ant-design/issues/17436
https://github.com/ant-design/ant-design/issues/19237

貌似官方回复是已修复，但是目前依然不行。

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: next.js
Issue: Unused Server-Only Dynamic Import Inside `typeof window === 'undefined'` Causes Error
Labels: SWC

### Verify canary release

- [X] I verified that the issue exists in Next.js canary release

### Provide environment information

```bash
$ npx --no-install next info

    Operating System:
      Platform: linux
      Arch: x64
      Version: #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022
    Binaries:
      Node: 14.18.1
      npm: 6.14.15
      Yarn: 1.22.17
      pnpm: N/A
    Relevant packages:
      next: 12.1.6-canary.9
      react: 18.0.0
      react-dom: 18.0.0
```

### What browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_

### Describe the Bug

Hi there! First of all, thanks for your continued effort on Next.js! 🙌 Really amazing framework.

Importing a client-only function in a Next.js page causes bundling of the server-only code contained within the `typeof window === 'undefined'` check:

```js
// pages/index.js
import { usedClientExport } from "../util/shared";

export default function IndexPage() {
  usedClientExport();
  return <div>Hello World</div>;
}
```

```js
// util/shared.js
export async function unusedServerExport() {
  if (typeof window === "undefined") {
    await import("fs");
  }
}

export function usedClientExport() {
  console.log("yay");
}
```

Error:

<img width="690" alt="Screen Shot 2022-04-27 at 16 36 32" src="https://user-images.githubusercontent.com/1935696/165544897-19376853-ebaa-4b89-8627-390d8cad3c25.png">


```
./util/shared.js:3:10
Module not found: Can't resolve 'fs'
  1 | export async function unusedServerExport() {
  2 |   if (typeof window === "undefined") {
> 3 |     await import("fs");
    |          ^
  4 |   }
  5 | }
  6 | 
```

Sandbox: https://codesandbox.io/s/recursing-lalande-k3w986?file=/util/shared.js

cc @balazsorban44 @sokra 


### Expected Behavior

1. Any unused functions (in my example, `unusedServerExport`) are removed using tree shaking or dead code elimination and not included in the client bundle
2. Any code in `typeof window === 'undefined'` is not included in the client bundle
3. No errors appear for any code that will not be included in the bundle (in either of 1 or 2)

### To Reproduce

https://codesandbox.io/s/recursing-lalande-k3w986?file=/util/shared.js

‼️ This also occurs when using Babel instead of SWC:

https://codesandbox.io/s/unruffled-fire-jrkz7x?file=/pages/index.js (also here on StackBlitz: https://stackblitz.com/edit/nextjs-wmguir?file=pages%2Findex.js)

### Potentially Related Issues

- #30892
- #33791