sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: material-ui
Issue: [system] Official support for `unstable_breakpoints`-related functions
Labels: new feature,package: system

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

Hello!

We've decided to go ahead and use `@mui/system` as a base to build our custom component library.

One feature in particular we love is the responsive features of system props, for example:

```tsx
<Box sx={{ width: [100, 200] }} />
<Box sx={{ width: { xs: 100, sm: 200 } }} />
```

We would love to bring this functionality in our custom components built on top of the system, using breakpoints defined in the theme as well as the same API.

Upon investigation on how some `@mui/material` components are built, I can see some functions are imported from `@mui/system` to help accomplish this.

For example, to support the responsive `direction` prop on the `Stack` component, utilities such as `handleBreakpoints` and `unstable_resolveBreakpointValues` are used: https://github.com/mui-org/material-ui/blob/master/packages/mui-material/src/Stack/Stack.js#L47

Documentation and official support of using these exported utils from `@mui/system` would help us greatly, instead of building our own solution. The `unstable_` prefix also worries me if we were to start using some of these utils now.

### Examples 🌈

It would allow us to build custom components with responsive props that respect the breakpoints in the theme with ease.

```tsx
<CoolGraph variant={{ mobile: 'bar', desktop: 'line' }} />
```

### Motivation 🔦

Without official support of these utils and documentation, we would either:

1. Need to dig into the typing and source to figure out how to use the exported utils.
2. Risk depending on a potential future breaking change with any `unstable_` prefixed exports.
3. Build our own solution
Repository: flutter
Issue: [Window] dart.exe consuming high memory usage
Labels: engine,dependency: dart,platform-windows,perf: memory,P2,team-engine,triaged-engine

![微信截图_20211124152424](https://user-images.githubusercontent.com/24218775/143193836-965a39ce-346b-40c0-868c-ab8addcf3d63.png)
<img src="https://user-images.githubusercontent.com/24218775/143193923-4001618b-40b9-4ca1-b13c-14fe9171eaf4.png" width ="300">


When I use AndroidStudio open the flutter project ，computer's memory will go up，Cause the computer to stall， It didn't work


Version information：
[√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version 10.0.19042.1165], locale zh-CN)
    • Flutter version 2.0.5 at E:\jishuruanjian\fluttersdk\flutter
    • Framework revision adc687823a (7 months ago), 2021-04-16 09:40:20 -0700
    • Engine revision b09f014e96
    • Dart version 2.12.3
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn
Repository: pytorch
Issue: Incorrect accuracy  pytorch(1.0.1) and libtorch   because of nn.LSTM
Labels: needs reproduction,triaged

pytorch version1.0.1
libtorch version 1.0.1

```
...
self.lstm_1 = nn.LSTM(512 * 8, 100, 1, bidirectional=False)
...

traced_script_module = torch.jit.trace(net, img)
traced_script_module.save("./lstm20211124.pt")

```

and in c++ libtorch
```
torch::Tensor output = m_model->forward({tensor_input}).toTensor();
```
The output here is inconsistent with that of pytorch. 
I have tested that the output results of the upper layer of LSTM are consistent
Repository: pytorch
Issue: wait() does not block the default stream for NCCL's asynchronous P2P operations
Labels: oncall: distributed,module: nccl

According to the previous issue https://github.com/pytorch/pytorch/issues/68112 , PyTorch will block the default stream until the asynchronous NCCL's operations finish. However, our experience shows that this is not true. 


Here is the minimal reproducible code.

```py
import os
from datetime import timedelta

import torch

def main():
    local_rank = int(os.environ['LOCAL_RANK'])
    torch.cuda.set_device(local_rank)
    torch.distributed.init_process_group(
        'nccl', init_method="env://",
        timeout=timedelta(seconds=5)
    )

    rank = torch.distributed.get_rank()
    size = (1000000, )
    for _ in range(100):
        dst_rank = (rank + 1) % 2
        x = torch.ones(size=size, requires_grad=True).cuda()
        y = torch.zeros(size=size, requires_grad=True).cuda()
        send_op = torch.distributed.P2POp(torch.distributed.isend, x,
                                          dst_rank)
        recv_op = torchistributed.P2POp(torch.distributed.irecv, y,
                                          dst_rank)
        reqs = torch.distributed.batch_isend_irecv([send_op, recv_op])
        for req in reqs:
            req.wait()

        z = x + y
        assert z[0].item() == 2, "wrong"

    print("right")


if __name__ == '__main__':
    main()
```

The assert fails as shown in the figure below. 
![image](https://user-images.githubusercontent.com/25879526/143201136-0e892d1e-ab2c-462a-a1d8-715a8c9bc91d.png)

However, when we add an explicit cuda device synchronization (i.e., torch.cuda.synchronize()) before `z = x + y`, it works well. 

I notice that torch.cuda.synchronize() is added after the wait() in the downstream repo Megatron-LM (https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/p2p_communication.py#L132-L137). So I am not sure whether it is a bug or a feature. 

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: PowerToys
Issue: [PT Run][Dev] Dev docs for plugins: Implementation of settings missing
Labels: Issue-Docs,Priority-3,Run-Plugin

### Provide a description of requested docs changes

The dev docs for PT Run plugins doesn't describe how to implement custom plugin settings. (Which classes and methods are needed in the plugin code.)
Repository: PowerToys
Issue: [PowerRename] Loading files indicator
Labels: Product-PowerRename,Area-User Interface,Priority-3

### Description of the new feature / enhancement

When loading multiple files, PowerRename is sometimes unresponsive and as a user it is hard to see what's happening. Therefore, we could polish the UI by adding a loading indicator that provides feedback that files are loading.

### Scenario when this would be used?

Loading files in PowerRename

cc @stefansjfw
Repository: scrcpy
Issue: TAB Browser fonction to launch SCRCPY please ! in CHROME and EDGE
Labels: feature request

Dear,

Please, could you add the possibility to launch scrcpy like an "new Tab" in EDGE and CHROME Browser ? It is a real need in order to have "all under eyes" when you work on browser now, like a lot of person withtout going to taskbar at bottom of screen searching the icon scrcpy.

Vysor, i was a Vysor user, offer this way and it is a "revolution" really !

have a nice day.

Alain
Repository: pytorch
Issue: [LibTorch-Lite] Add a custom flag to build LibTorch-Lite with LAPACK included
Labels: enhancement,oncall: mobile,module: ios

## 🚀 Feature
Add a custom flag to build LibTorch-Lite with `LAPACK` to `./scripts/build_ios.sh` (and `./scripts/build_android.sh`).

## Motivation
There are many issues caused by error
```
RuntimeError: <some_function>: LAPACK library not found in compilation
```
when trying running TorchScript on mobile devices.
Since LibTorch-Lite from Cocoapods does not include `LAPACK`, the only option is to build it from source.

## Pitch
We can build LibTorch-Lite from source with `LAPACK` included by setting the environment variable `USE_LAPACK=1`

## Alternatives
Include `LAPACK` into LibTorch-Lite from Cocoapods

## Additional context
I tried to build LibTorch-Lite for iOS from source with LAPACK included. 
Some answers found on the internet suggest adding `CMAKE_ARGS+=("-DUSE_LAPACK=ON")` to the build script. 

But it did not work in my case because in the file [Dependencies.cmake#L1580](https://github.com/pytorch/pytorch/blob/7d8a79b6f31eccb94aa8ce38935917f476b534d5/cmake/Dependencies.cmake#L1580) `USE_LAPACK` is first disabled with `set(USE_LAPACK 0)` then later in [Dependencies.cmake#L1771](https://github.com/pytorch/pytorch/blob/7d8a79b6f31eccb94aa8ce38935917f476b534d5/cmake/Dependencies.cmake#L1771) enabled if `LAPACK_FOUND` is true. And somehow it could not find `LAPACK` on my Mac.

My workaround for now is just comment out that line `#set(USE_LAPACK 0)` then the build run successfully with `LAPACK` included (no error when running on iOS).

Some related issues are: 
* https://github.com/pytorch/pytorch/issues/66543
* https://github.com/pytorch/pytorch/issues/61693
* https://discuss.pytorch.org/t/lapack-library-not-found-in-compilation-pytorch-mobile-android-java/126849
* https://discuss.pytorch.org/t/problems-with-lapack-on-ios/69240
Repository: electron
Issue: [Feature Request]: Support MacOS native share extensions
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 would like to use a built-in feature in MacOS to share content **with** an electron app.

for example: sharing a file from finder (file explorer) to a signal (communicator app which uses electron)

### Proposed Solution

There is a developer guide to implement it on MacOS:
https://developer.apple.com/design/human-interface-guidelines/macos/extensions/share-extensions/

### Alternatives Considered

I'm not aware of alternative

### Additional Information

It is **not** a duplicate of https://github.com/electron/electron/issues/6330 which was about sharing content from the electron app to other apps.

Two messaging applications: Element and Signal were discussing this and came to the same conclusion:
vector-im/element-desktop#737
signalapp/Signal-Desktop#1905
Repository: create-react-app
Issue: "Edit this page" documentation link is broken
Labels: needs triage,issue: bug report

### Describe the bug

I wanted to help improve the documentation.

On  this page: 

https://create-react-app.dev/docs/analyzing-the-bundle-size/

I clicked "Edit this page", but I get a github 404.
Repository: deno
Issue: Calling `Deno.exit` inside top level `deno test` isolates exits the process
Labels: bug,testing

```
~/p/g/d/deno ❯❯❯ cat test.ts
Deno.test("fail", () => {
  throw new Error("fail");
});

self.onunload = () => {
  Deno.exit(0);
};

~/p/g/d/deno ❯❯❯ deno test test.ts
Check file:///Users/lucacasonato/projects/github.com/denoland/deno/test.ts
running 1 test from file:///Users/lucacasonato/projects/github.com/denoland/deno/test.ts
test fail ... FAILED (9ms)
~/p/g/d/deno ❯❯❯ echo $status
0
```

Instead of actually exiting we should record the exit code, then terminate the isolate, and then mark the isolate as either passed or failed based on if the status code is 0, or something else.
Repository: godot
Issue: Known built-in script limitations
Labels: discussion,topic:gdscript,topic:editor,documentation

### Godot version

efd0db8

### System information

W10

### Issue description

Here's a list of known limitations of built-in scripts. It might not be complete, because built-in scripts have more issues, but the others I found seem fixable. If they turn out otherwise, I will add them here later.

We should make sure that the users know these limitations. My idea was to add a big tooltip/dialog in the script creation dialog when you click something, e.g. a button next to this warning:
![image](https://user-images.githubusercontent.com/2223172/143243377-fd034f13-f423-43f3-9fac-403999094e56.png)

The list is (including explanations and theoretical fixes):

1. _Can't open built-in scripts in external editor._ They are saved inside scene, so to edit them, you need to edit scene file.

It *is* possible to extract built-in script into temporary file and synchronize with the scene, but it's ultra hacky and overkill to implement.

2. _Can't use `class_name` in bult-in scripts._ Class names are registered as references to script files, so in this case the class would need to point to a resource inside scene. Even if it was possible, you'd need to load the whole scene each time you want to parse it.
3. _Can't create script documentation for built-in scripts._ Same reason as above. Docs are created based on script files.
4. _Built-in scripts don't list in scene dependencies if they preload something._ Again, same as above. The ResourceLoader will parse every external script referenced in the scene looking for preloads. But built-in scripts require parsing the scene itself.
5. _Built-in scripts can't be extended nor preloaded._ You can't do `extends Scene.tscn::scriptid`. Same reason as above. Parser doesn't recognize internal paths. Interestingly, using `load()` will work.

2, 3, 4 and 5 could be fixed if we had a way to partially parse a scene to load a built-in resource. For text scenes it might not be a problem, but binary scenes could be more problematic, idk. Also internal resource paths need to be recognized by the parser (right now it assumes actual file paths for `extend`, `preload` etc).
But even then, fixing 2 and 3 could cause performance issues, because every scene would need to be parsed in search of built-in scripts, so it's likely not feasible.

6. _Only GDScripts and VisualScripts can be built-in._ Not sure about GDNative, but C# requires actual script file to compile it. Maaybe it could use a fix similar to 1., i.e. save the script as temporary file and compile it, but it's not worth it, as other languages aren't supported by the script editor anyways.

EDIT:
7. _Built-in scripts don't support remote sync_ - When you edit built-in script, the changes won't be synced to the running project. Also (likely due to preload shenanigans) updating the script requires a project restart. Reloading the scene won't work.
This one is probably fixable, but right now it's a limitation.

### Steps to reproduce

1. Create built-in script.

### Minimal reproduction project

_No response_
Repository: material-ui
Issue: [Button] styled overrides of variants as generated by the jss-to-styled codemod is not applied
Labels: out of scope,new feature,package: codemod

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Style overrides made with the [styled](https://mui.com/system/styled/#introduction) function are not applied to the Button component when the styles are specified with the button class name with the variant suffix, like the `& .MuiButton-contained` selector.

```tsx
const StyledButton = styled(Button)<ButtonProps>(
  ({ theme, color = "primary" }) => ({
    "& .MuiButton-contained": {
      backgroundColor: "red",
      "&:hover": {
        color: theme.palette[color].main,
        backgroundColor: "white"
      }
    }
  })
);

export default function MyButton(
  props: Pick<ButtonProps, "variant" | "color" | "children">
) {
  return <StyledButton {...props} />;
}
```
This is how the jss-to-styled code mod genreates the upgrade from the old JSS solution. With the difference of the class name prefix is matching the created component name, in this case `MyButton` instead of `MuiButton`, but this does not work either. 



### Expected behavior 🤔

The styles should be applied to the contained variant. In the example this means that the background color should be red and the hover color white. 

### Steps to reproduce 🕹

See codesandbox example: https://codesandbox.io/s/mui-v5-styled-button-override-probs-hdr79

Edit1: 
* This is a working example with JSS: https://github.com/Lani/mui-jss-styled-example/tree/working-jss-code
* The main branch contains the result after the `v5.0.0/jss-to-styled` codemod: https://github.com/Lani/mui-jss-styled-example/commit/a0b777d4353b9b1e7894b606a5bc8111602b1dc6

### Context 🔦

I'm trying to run the jss-to-styled codemod to minimize the manual work that needs to be done when upgrading from Material-UI v4 to MUI v5.

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
 System:
    OS: Windows 10 10.0.19042
  Binaries:
    Node: 14.15.4 - C:\Tools\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.14.10 - C:\Tools\nodejs\npm.CMD
  Browsers:
    Chrome: 95.0.4638.69
    Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.29)
  npmPackages:
    @emotion/react: ^11.5.0 => 11.5.0
    @emotion/styled: ^11.3.0 => 11.3.0
    @mui/icons-material: ^5.1.0 => 5.1.0
    @mui/lab: ^5.0.0-alpha.56 => 5.0.0-alpha.56
    @mui/material: ^5.1.0 => 5.1.0
    @mui/styles: ^5.1.0 => 5.1.0
    @mui/system: ^5.1.0 => 5.1.0
    @mui/types:  7.1.0
    @types/react:  17.0.34
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    typescript:  4.4.4
```
</details>

Note: Local MUI version tested is v5.1.0, but the codesandbox is using v5.2.0.

Tested on Windows in:
Microsoft Edge: 96.0.1054.29 (Official build) (64-bit)
Firefox: 94.0.2 (64-bit)
Repository: pytorch
Issue: Stop gradient option for padding
Labels: module: autograd,module: nn,triaged,enhancement,needs research,Stale

## 🚀 Feature

I'd like to propose an option to disable the gradient computation through padding pixels. Such that all source pixels get the same "weight". I propose an boolean option `detach_padding` that by default is set to `False` for backwards compatibility, but if set to true, the replicated pixels in the padding should not be considered in the gradient computation. This concerns all functions and modules that contain a padding option like `torch.nn.functional.pad, torch.nn.ReflectionPad1d, torch.nn.ReplicationPad2d, torch.nn.Conv3d` etc.

## Motivation

Currently if we use padding options that reuse values from within the image, some pixels get considered multiple times in the gradient computation. This causes edge artifacts and is especially inconvenient with the `circular` options. If we use the `circular` padding mode we usually want toroidal topology (a.k.a. wallpaper tiling) where we just consider one patch of a repeating pattern. In that case we _definitely_ don't want certain pixels to be considered different from the rest. But if we observe what the gradient looks like we see that this is not the case, the gradient computation also goes through the replicated pixels:

```
import torch
x = torch.zeros((1, 1, 6, 6), requires_grad=True)
conv = torch.nn.Conv2d(1, 1, 1, 1, 1, bias=False, padding_mode='circular') #same problem for other modes
with torch.no_grad():
    conv.weight[:] = 1
y = conv(x).sum()
y.backward()
print(x.grad)
```
I'd expect the gradient to be all ones, but this is not the case:

```
tensor([[[[4., 2., 2., 2., 2., 4.],
          [2., 1., 1., 1., 1., 2.],
          [2., 1., 1., 1., 1., 2.],
          [2., 1., 1., 1., 1., 2.],
          [2., 1., 1., 1., 1., 2.],
          [4., 2., 2., 2., 2., 4.]]]])
```

I claim that this behaviour is also not really wanted for the other padding modes, as it can cause artifacts at the edges of the images. 

## Pitch

Add an option to disable gradient through padding pixels in the various padding functions and modules.



cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7 @mruberry @jbschlosser @walterddr @kshitij12345
Repository: rust
Issue: Better error message for attempting to use an associated type as a TypeParamBound
Labels: A-diagnostics,T-compiler

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: <!-- Please provide a link to play.rust-lang.org -->

```rust
trait A: Self::X {
    type X;
}
```

The current output is:

```
error[E0405]: cannot find trait `X` in `Self`
 --> x.rs:1:16
  |
1 | trait A: Self::X {
  |                ^ not found in `Self`
```

<!-- The following is not always necessary. -->
Ideally the output should look like:

```
error: expected identifier, found keyword `Self`
 --> x.rs:1:16
  |
1 | trait A: Self::X {
  |          ^^^^ expected identifier, found keyword
```

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions. The output might also be
different depending on the Edition.
-->


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"BGR360"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: material-ui
Issue: [system] `component` prop lost when wrapping with `styled`
Labels: typescript,package: system

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

I discovered this while trying to override `component` for a styled `ListSubheader` in our app. I tried it for `ListItem` as well but not others - it seems that when wrapping a component with `styled`, the `component` prop is lost and TS errors out.



### Expected behavior 🤔

`component` prop is not lost

### Steps to reproduce 🕹

See [codesandbox](https://codesandbox.io/s/styled-component-prop-lost-druyq?file=/src/App.tsx)

### Context 🔦

_No response_

### Your environment 🌎

_No response_
Repository: next.js
Issue: Custom _error.js page context is missing locale info
Labels: Navigation

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

12.0.1

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

14.17.4

### What browser are you using?

Chrome

### What operating system are you using?

Windows

### How are you deploying your application?

local dev environment

### Describe the Bug

I want to internationalize custom `_error.js` page. Expected to get `locale` from page context in `Error.getInitialProps` but got `undefined`.

### Expected Behavior

__error.tsx_

```
Error.getInitialProps = (context: NextPageContext) => {
  const { locale } = context; // expected to get locale here, but got undefined
  ...
  return { statusCode };
}
```

### To Reproduce

1) Create nextjs project with `typescript` template
2) Include i18n options in `next.config.js` file.
3) Create custom `_error.tsx` file as described in nextjs docs [Custom Error Page](https://nextjs.org/docs/advanced-features/custom-error-page)
4) `npm run build`
5) `npm run start`
6) Get unhandled exception client side
7) Check locale value in `Error.getInitialProps`