sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Detect "only written" value for values only accumulated into but never otherwise read
Labels: A-lints,A-diagnostics,T-compiler

Rust has a useful warning for values that only ever get written, but never read.

However, if a value gets read as part of accumulating into it, that read will suppress the warning.

Sample code:

```rust
fn main() {
    let mut total1 = 0;
    let mut total2 = 0;
    let mut max1 = 0;
    let mut max2 = 0;
    for i in 0..1000 {
        total1 = total1 + i;
        total2 += i;
        max1 = std::cmp::max(max1, i);
        if i > max2 {
            max2 = i;
        }
    }
}
```

Logically, all four variables are never usefully read. However, the Rust compiler only manages to flag `total2`, because the accumulation uses the `+=` operator.

It seems feasible to detect at least *simple* cases here:

We could assume operators like `+` don't have side effects, the way we currently assume OpAssign operators like `+=` don't have side effects, and detect cases where a value is only read to be accumulated back into the same value. This seems similar to the current logic that propagates unused-ness backwards from other unused things; `total1 = total1 + i` would only count as a use of `total1` if `total1` was otherwise used, meaning `total1 = total1 + i` has no net effect on whether `total1` is used.

Similarly, though it may be a bit more difficult, we could treat `std::cmp::max` and similar hand-rolled code as not constituting a use if they're just accumulating back into the same value.

Note: this only seems worth doing if it costs almost nothing. I'm hoping that it may be possible as part of an existing pass without much added cost.
Repository: next.js
Issue: Fast refresh not working properly with MDX
Labels: Webpack

### Run `next info` (available from version 12.0.8 and up)

    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000
    Binaries:
      Node: 17.2.0
      npm: 8.1.4
      Yarn: 1.22.17
      pnpm: N/A
    Relevant packages:
      next: 12.0.10
      react: 17.0.2
      react-dom: 17.0.2

### What version of Next.js are you using?

v12.0.10 (replicated on v12.0.11-canary.12)

### What version of Node.js are you using?

17.2.0

### What browser are you using?

Chrome

### What operating system are you using?

macOS Monterey

### How are you deploying your application?

N/A (reproducible in dev mode)

### Describe the Bug

Per suggestion from @ijjk in #31827, I created a simple repo based on a small modification to the official "with MDX" example to demonstrate how "Fast refresh" is not working properly at times, as it and keeps triggering the big, blocking "About to perform a full refresh" warning panel.

The repo is a simple blog example, with one single post in MDX format.

Whenever I make a modification to the MDX file, I would expect auto-refresh to kick in and Chrome to display my modification. In almost all situations (but not always), it displays a big warning instead. While I can click on the "Reload" button, this is definitely creating friction (but an option to disable that big warning panel would be great too).

<img width="986" alt="image" src="https://user-images.githubusercontent.com/329967/153525893-2c9e6ad4-5178-470d-b14a-7f297c65d39f.png">


### Expected Behavior

I would expect simple saving the file in my `pages/` directory to automatically re-compile and refresh it in Chrome without warning, as opposed to displaying the big panel.

### To Reproduce

Here is the repo:
https://github.com/sebastienbarre-forks/next.js-examples-with-mdx

To reproduce:
* `npm run dev` in a terminal
* in Chrome, refresh http://localhost:3000/ to display the index page, which has a link to the blog post
* click on the link to the blog post to display it.
* in an editor, edit the blog post, and save it
=> the "About to perform a full refresh" *should* appear. It doesn't always, but more often than not it does, and certainly when I have just re-run `npm run dev`.

Here is a video capture:

https://user-images.githubusercontent.com/329967/153526122-ef9bd687-9ebd-416f-8d46-fb3e06f5da66.mov
Repository: vscode
Issue: Task that runs on folderOpen also always opens new terminal
Labels: bug,tasks,confirmed


Issue Type: <b>Bug</b>

If I add this to `.vscode/tasks.json`:

```json
{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "npm",
			"script": "watch",
			"group": "build",
			"problemMatcher": [],
			"label": "npm: watch",
			"detail": "tsc --watch",
			"runOptions": {
				"runOn": "folderOpen"
			}
		}
	]
}
```

And I open a new window:

1. The task starts (great)
2. A new terminal also always opens (not great)

VS Code version: Code 1.64.2 (f80445acd5a3dadef24aa209168452a3d97cc326, 2022-02-09T22:02:28.252Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No


<!-- generated by issue reporter -->
Repository: ant-design
Issue: chrome86及以下版本，在scroll.x=max-content下，设置任意一列ellipsis=true时，会无法计算单元格长度，并且表格不展示横向滚动条
Labels: 🐛 Bug,Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[https://github.com/Renderz/table-test](https://github.com/Renderz/table-test)

### Steps to reproduce
```
pnpm install
pnpm start
```

### What is expected?
表格能正确计算nowrap下单元格长度，并显示横向滚动条

### What is actually happening?
表格并没有计算nowrap下单元格长度，没有显示横向滚动条

| Environment | Info |
|---|---|
| antd | 4.18.6 |
| React | 17.0.2 |
| System | macOS |
| Browser | chrome86.0.4240.75 |

---
1. 目前看其他issue了解到不建议在max-content下使用ellipsis，本issue只是想确认查看特定场景下，浏览器显示不一致的问题。
2. 测试了出现问题的浏览器版本，max-content和nowrap功能都是ok的。那么问题应该是出现在其他地方？
3. 86-89chrome版本因为找不到安装包，没有测试，但是确认90版本是OK的
4. [安装包下载地址](https://www.slimjet.com/chrome/google-chrome-old-version.php)

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: PowerToys
Issue: Digit grouping for large numbers - PowerToys Run's Calculator and Unit Converter plugins
Labels: Idea-Enhancement,Product-PowerToys Run,Run-Plugin

### Description of the new feature / enhancement

Currently, when you use the Calculator or Unit Converter plugins for PowerToys Run, if the result is **a large number, it will display all the digits of that number in one string without any spaces**. 

For example, try typing "2 megatonne in kg" in PowerToys Run and you'll get 2000000000 kg. This is a number that is very annoying to parse for a human since there are no spaces or commas every three digit, like there are when using Window's calculator app.

It would be great if the Calculator/Unit Converter plugins had **an option to show results with the digits grouped in groups of 3**. _Ideally_, this option would also let us choose what our separating character is _(a space, a comma, or maybe whatever we want)_. 

Another important factor is that some people might want the result **displayed** with a separator character but want the result **added to the clipboard** without said character, as some other programs that can use that result might not accept a string with the separator character _(for example, Google Sheets sometimes won't accept numbers that are comma-separated)_

### Scenario when this would be used?

I always use PowerToys Run to make calculations/unit conversions instead of using the calculator as it's just MUCH faster to alt+space and type the equation than going to fetch the calculator app. 

But parsing the results when there are lots of digits can waste that productivity improvement and ends up making using the Calculator/Unit Converter plugins a "trap" since the time it took me to count the number of 0s ended up making the use of PowerToys Run not worth it

### Supporting information

See how Window's own Calculator app shows results in a much more readable way
Repository: flutter
Issue: [ios_platform_images] Support for macOS
Labels: c: new feature,platform-mac,package,c: proposal,a: desktop,P3,p: ios_platform_images,team-macos,triaged-macos

## Use case

Adding macOS support to ios_platform_images would greatly simplify retrieving images from an asset bundle on macOS. 

Perhaps more importantly, with the advent of https://flutter.dev/go/sf-symbols likely depending on ios_platform_images, macOS support is critical for Flutter mac apps to have a native feel with the proper symbols.

## Proposal

Since ios_platform_images is already a part of Flutter, it makes sense that it would expand to desktop along with the framework since it still has value in that domain.
Repository: PowerToys
Issue: More BIG and small units for Unit Converter - PowerToys Run
Labels: Idea-Enhancement,Run-Plugin

### Description of the new feature / enhancement

It would be really nice to have **more units for the Unit Converter plugin of PowerToys Run**. There are many in there but some of the more extreme units in terms of scale (like gigatonnes, femtograms, megagram, etc) are not included. 

In fact, a megagram, abbreviated Mg, is confused by PowerToys Run with milligrams, abbreviated mg, which is a problem. Case sensitivity should definitely be detected by this plugin.

### Scenario when this would be used?

I often make conversions between very extremely large units related to space research and being able to convert solar system-scale or galaxy-scale units to human-scale units is handy to help understand some of the concepts. I don't want to have to go to a website to do those conversions.

### Supporting information

_No response_
Repository: material-ui
Issue: skipSx should update shouldForwardProps
Labels: discussion,package: system

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

The `skipSx` doesn't work as expected when `shouldForwardProp` default mechanism is overwritten and does not include `'sx'` directly

```tsx
shouldForwardProp: (prop) => !["isEven"].includes(prop as string),
skipSx: true
```
This will send `sx` to the underlying component

### Examples 🌈

I made a code sandbox using the latest released material

https://codesandbox.io/s/goofy-phoebe-xc99x


### Motivation 🔦

making a custom component that only changes in CSS layer duo to props is a common practice
also, sx seems to be a little bit slow, and skipping it may gain some performance tips

so because we are working mostly with the Mui component and they pass the props to the underling dom node, it makes sense to have it as a core feature of the material

---

I seared on `skipSx` tags in the issue list and could not find an open issue, so posted a new one.
Repository: material-ui
Issue: [Rating] Rating with value=null shows the selected value
Labels: bug 🐛,component: rating

### Duplicates

- [x] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

click the [no rating given] rating component.
click another brower tab to show other page
return the page, the raring will show the value you last clicked
![image](https://user-images.githubusercontent.com/25702295/153548005-0ed71d26-af0e-45df-9f84-df8f4315db16.png)


### Expected behavior 🤔

the rating will always show 0

### Steps to reproduce 🕹

https://codesandbox.io/s/ivct8?file=/demo.js

Steps:

1. add the component <Rating name="no-value" value={null} />
2. click the rating
3.click the tab to another web page
4. back to the page to see the rating


### Context 🔦

_No response_

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>
Repository: PowerToys
Issue: Please allow to minimize, and also to NOT exit color picking tool when hitting ESC
Labels: Idea-Enhancement,Product-Color Picker

### Description of the new feature / enhancement

There are two suggestions.

First, I would like an option to minimize the color picker tool.  This is honestly the main thing I use.  However, it is always in the way.  Please allow a way to minimize it, or make it like most other Windows applications, that disappear when they are in the background.  A toggle would be nice to keep it on top, as I use that sometimes, but other times I have to close it or move it, as it obstructs the view of what is behind it.

Secondly, when another program is in the foreground, and I hit ESC for THAT program, the color picker window automatically closes, and there is no easy way to reopen it without the keyboard shortcut, and then repick a color again, which is not what I want.  Please add a toggle that will allow or disable this functionality.  I'm sure for some, it is great, but for me, I hate it, and can't use it.  I've accidentally closed out of it fifty times today by mistake.

Finally, sometimes when point two above happens, and I reopen it with the keyboard shortcut, I am unable to remove the most recently added color by right clicking on it.  Sometimes I can remove it which I like, and other times, I am unable to, as right-clicking literally seems to do nothing.

Finally, it would be nice to be able to drag the color picker edit window, to show more or less colors.  Sometimes I want seven colors to be shown, sometimes I might want 5, and being able to resize the height to do that would be nice, especially if I can't remove colors, and I am only working with five colors.  I know I can scroll, but this would be nice as well.

### Scenario when this would be used?

See above notes

![image](https://user-images.githubusercontent.com/41529240/153549541-5c7e65f8-243d-4512-b627-0c4f7a4b71ed.png)
This shows the right-click option to remove a color.  Sometimes right-clicking does literally nothing.



### Supporting information

_No response_
Repository: PowerToys
Issue: [Feature Request] Copy utility : copy text only + auto trim on copy content
Labels: Idea-Enhancement,Product-Advanced Paste

### Description of the new feature / enhancement

That would be nice to have a utility to alter the copy"Ctrl+C" behaviour.
That could be another shortcut such as "Win +C".
Microsoft started something with Clipboard options in Windows 10, that could complement it.

The features I have in mind:
* Copy text only (no styles)
* Auto trim
* Copy paste history
* Control copy cache time / auto clear after X min


### Scenario when this would be used?

When copying commands from a terminal to a document, when writing technical documentation.
When copying code samples from an IDE to a document, when writing technical documentation.
When copying content between two documents in differents tools (word, confluence, sharepoint, vscode ...).
When copying from a tool in dark mode to a tool in clear mode (copy white text to white background 😅)
When copying text from outlook email because outlook tends to add an extra space at the end of the selection.
When copying password that stays indefinitely in clipboards. (some password managers handle that, some others don't)

### Supporting information

_No response_
Repository: PowerToys
Issue: Show the assigned hotkey in the layout overview of FancyZones
Labels: Idea-Enhancement,Product-FancyZones,Status-In progress

### Description of the new feature / enhancement

In the overview window it's not easy to find out which hotkey was assigned to a layout.
You need to click the edit symbol to see it.

It would be nice if it was already visible from the layout editor overview.

### Scenario when this would be used?

Whenever adding new layouts.

### Supporting information

_No response_
Repository: pytorch
Issue: Feature: Use iterative refinement algorithm from cuSOLVER for the least-squares solver on CUDA
Labels: feature,module: cuda,triaged,module: linear algebra

### 🚀 The feature, motivation and pitch

The cuSOLVER library has a function ([cusolverDnIRSXgels()](https://docs.nvidia.com/cuda/cusolver/index.html#cusolverDNXgels)) for solving least-squares problems using an iterative refinement algorithm that might provide 4x-5x speedup (according to docs) on recent GPUs that support mixed-precision.

There are two functions `cusolverDnIRSXgels` and `cusolverDn<t1><t2>gels`, the former allows better control and fallback to full precision if iterative refinement doesn't converge. Both are available only from CUDA Toolkit 11+.

- [ ] Implement `apply_gels` using `cusolverDnIRSXgels` or `cusolverDn<t1><t2>gels`.
Check out `lstsq_kernel` from `aten/src/ATen/native/cuda/BatchLinearAlgebra.cpp`.
- [ ] Determine for which dtypes and sizes `cusolverDn<t1><t2>gels` is faster than current approach.
- [ ] Determine for which dtypes and sizes a for loop of `cusolverDn<t1><t2>gels` is better than the `Batched` variant.
- [ ] Implement the necessary dispatch logic for `torch.linalg.lstsq`.








### Alternatives

_No response_

### Additional context

_No response_

cc @ngimel @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano
Repository: rust
Issue: rustdoc: "All items" page does not show associated items
Labels: T-rustdoc,A-docs

Rustdoc-generated documentation has an "all items" page. The problem is that it does not include any methods, because methods aren't "items" per Rust terminology. However, in colloquial English "item" has a broader meaning, and the page could be interpreted as an index of all things/definitions/whatchamacallits in the crate.

For example: "all items" in Tokio: https://docs.rs/tokio/latest/tokio/all.html does not include `block_on`, which is surprising to users who don't know that it's a method, and methods aren't items.
Repository: neovim
Issue: nvim_replace_termcodes() escaping K_SPECIAL bytes is sometimes not expected
Labels: enhancement,needs:decision,api

`nvim_replace_termcodes()` escapes `K_SPECIAL` bytes in the string. This is usually not the expected behavior, as most other APIs and functions do not expected a string with `K_SPECIAL` bytes already escaped. For example, `nvim_input()` and the evaluation of `<expr>` mappings do `K_SPECIAL` escaping themselves. There only API that accepts a string with `K_SPECIAL` bytes escaped is `nvim_feedkeys()` with the third parameters being `false`, and yet the third parameter of `nvim_feedkeys()` can be a bit hard to understand. Actually, the third parameter of `nvim_feedkeys()` was added so that one can pass a string produced by `nvim_replace_termcodes()` to it, but it has been poorly documented, so many people use it incorrectly.

Now with Lua mappings, especially Lua `<expr>` mappings, there is an actual case where `nvim_replace_termcodes()` escaping `K_SPECIAL` bytes isn't expected. Consider the following mapping:
```lua
vim.keymap.set('i', 'a', function() return 'π' end, {expr = true})
```

One would expect pressing `a` in Insert mode to produce `π` here, but it actually produces `πþX`.

There are several solutions here:
1. Don't change any behavior. Just add a warning in the documentation of `vim.keymap.set()`.
2. Change the behavior of `nvim_replace_termcodes()` so that it no longer escapes `K_SPECIAL` bytes.
3. Add a new API that replaces keycodes without escaping `K_SPECIAL` bytes.
Repository: material-ui
Issue: [Autocomplete] Voiceover only announces selected option when selecting another option
Labels: accessibility,component: autocomplete

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

I navigate to the Autocomplete component with Voiceover active and select an option. I then press the down arrow and the combox opens again and I can then navigate through the list of options. As I navigate through the list of options, Voiceover begins to announce the currently highlighted option but immediately stops and reannounces the option that I had selected previously. This means that a user using Voiceover cannot know what the currently highlighted option is.

### Expected behavior 🤔

I navigate to the Autocomplete component with Voiceover active and select an option. I then press the down arrow and the combox opens again and I can then navigate through the list of options. As I navigate through the list of options, Voiceover  announces the currently highlighted option and does not interrupt with my previous selection.

### Steps to reproduce 🕹

Code Sandbox Link: https://codesandbox.io/s/combobox-material-demo-forked-8sqop?file=/demo.tsx
Screen Reader: Voice Over on Mac 11.6.1
Steps:

1. Turn on Voiceover
2. Go to the above code sandbox
3. Navigate to the autocomplete component
4. Type "The"
5. Navigate through the options until you reach The Godfather
6. Press space to select the option
7. Press down arrow to reopen the combox
8. Navigate through the options
9. Listen to hear the Godfather repeated for each option


### Context 🔦

I would like screen reader users to be able to use our website without an issue and be able to change their selection if we use the Autocomplete component

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
  System:
    OS: macOS 11.6.1
  Binaries:
    Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
    Yarn: Not Found
    npm: 6.14.15 - ~/.nvm/versions/node/v14.18.1/bin/npm
  Browsers:
    Chrome: 98.0.4758.80
    Edge: Not Found
    Firefox: Not Found
    Safari: 15.2
  npmPackages:
    @emotion/react: latest => 11.7.1
    @emotion/styled: latest => 11.6.0
    @mui/base:  5.0.0-alpha.68
    @mui/material: latest => 5.4.1
    @mui/private-theming:  5.4.1
    @mui/styled-engine:  5.4.1
    @mui/system:  5.4.1
    @mui/types:  7.1.1
    @mui/utils:  5.4.1
    @types/react: latest => 17.0.39
    react: latest => 17.0.2
    react-dom: latest => 17.0.2
    typescript: latest => 4.5.5
```
</details>
Repository: go
Issue: proposal: x/text/cmd/gotext: support extracting literals from templates
Labels: Proposal

I'm working on a simple web app that uses `html/template` to generate and serve HTML files. The HTML templates include text that we want to internationalize, and I was trying to use `x/text` and its `gotext` command tool to do that.

### This what I'm trying to do
My goal was to define some kind of function to translate the text:
```html
<button>{{i18n "Sign in"}}</button>
```

The `i18n` function just calls `printer.Sprintf(key, args...)`
```go
funcs["i18n"] = func(key string, args ...interface{}) string {
    return printer.Sprintf(key, args...)
}
```
So I had a little bit of hope that `gotext` tool would extract the literals for me. **But it did not work**.
```json
{
    "language": "en",
    "messages": null
}
```

**This is understandable** as there's no direct relation between the template function and the call to `Sprintf`. So **I just created the `messages.gotext.json` manually and tried to use the `gotext` tool to generate the catalog with all translations. But that does not work either**.

I took a quick look at `gotext` code, and I think that it is always extracting messages from code, and then [removes the ones it thinks are unused before generating the catalog file](https://github.com/golang/text/blob/d1c84af989ab0f62cd853b5ae33b1b4db4f1e88b/message/pipeline/generate.go#L123).

This means that unless I move all the texts to Go, there's no way I can use `gotext` to generate a catalog for me.

### Feature request
It would be nice to add automatic text extraction from templates to `gotext`. Most web applications are probably going to use templates to render the HTML, and most of the strings that will need translation belong there.

In the meantime, as a workaround (probably also easier to implement), it would be nice to provide a way to generate the catalog without removing unused messages. `gotext` cannot detect if messages from a template are being translated or not, so let me just generate a catalog with all the messages I have in the `messages.gotext.json` file.