sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: What is the expected testing strategy for system channels?
Labels: a: tests,framework,d: api docs,P2,team-framework,triaged-framework

Super Editor contains various tests that require confirmation that Flutter's text input channel received a message from us, or tests that need to simulate the platform sending a message to Flutter. 

What is the canonical mode for testing such behavior?

The current approaches that I've found seem to be overly verbose, fragile to Flutter changes, and they require digging through Flutter implementation details to get them working in the first place.

For example, we need to make sure that Super Editor responds to IME actions, e.g., `performAction()` within the `TextInputClient`. Here is a snippet of a test that simulates an action coming from the platform:

```dart
// Simulate a "Newline" action from the platform.
await TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger.handlePlatformMessage(
  SystemChannels.textInput.name,
  SystemChannels.textInput.codec.encodeMethodCall(
    const MethodCall(
      "TextInputClient.performAction",
      [-1, "TextInputAction.newline"],
    ),
  ),
  null,
);
```

## Fragile
We pass magic strings. Namely "TextInputClient.performAction" and "TextInputAction.newline". These magic strings don't appear to have any public definition within Flutter. The same magic strings appear within the `TextInput` channel implementation. If Flutter ever changes these strings for any reason, all such app and package usage will be broken, and it will probably break silently.

## Implementation Digging
In addition to the fragility of magic strings, the only way to find these strings is to dig through Flutter's `TextInput` channel implementation. It's not always quick or easy to locate these details.

## Verbose and Requires Extra Knowledge
In this example, we want to simulate an action from the IME. Namely, the IME sending Flutter a newline signal. Ideally, the only two pieces of information that we'd need to orchestrate this simulation is the knowledge of a `performAction` behavior, and the knowledge of a `TextInputAction.newline` enum.

Instead we need to also know about `SystemChannels.textInput.name`, how and why to use a `SystemChannels.textInput.codec.encodeMethodCall()`, the magical presence of a `-1` as the first argument in the call, the appropriateness of passing `null` for the callback, and the need to call all of this on `TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger`.

That's **a lot** of cognitive overhead just to make sure that an IME newline does what it's supposed to.

The system channel testing APIs in the reverse direction aren't a whole lot better.

## Conclusion
If there's a more appropriate way to simulate such behavior, please let me know. Otherwise, I suggest defining an intentional testing API that exposes what developers need to orchestrate in a test, without exposing so many implementation details that aren't relevant, and which could change at any time.
Repository: storybook
Issue: Document preview.js / manager.js improvements
Labels: api: addons,documentation

### Is your feature request related to a problem? Please describe

_No response_

### Describe the solution you'd like

In 6.5 we added the ability to define a manager and preview entry points that can be used more conveniently than the managerEntries and previewEntries presets. 

This needs:
- [ ] An entry in MIGRATION.md since there's a [corner case where code gets executed twice](https://discord.com/channels/486522875931656193/1062539775929761813/1062571134194823188) 
- [ ] An update to the [Addons migration guide](https://chromatic-ui.notion.site/Addon-migration-for-Storybook-7-002f2f627c1d470298ca94894ab8a040)
- [ ] Updates to the Addons docs
- [ ] Updates to the addon-kit

### Describe alternatives you've considered

_No response_

### Are you able to assist to bring the feature to reality?

yes, I can

### Additional context

_No response_
Repository: pytorch
Issue: Torch's affinity setting lead to openvino using only one core.
Labels: triaged,module: intel,intel priority

### 🐛 Describe the bug
Torch's affinity setting lead to openvino using only one core. 
I export a pytorch resnet50 model to OpenVINO IR Model with following steps.
1. export resnet50 to onnx model
```
from torchvision.models import resnet50
from openvino.runtime import Core
import torch
from pathlib import Path

model = resnet50()
model.eval()

dummy_input = torch.randn((1, 3, 224, 224),
                             generator=None,
                             device="cpu",
                             dtype=torch.float32)
onnx_path = Path("resnet50.onnx")

if not onnx_path.exists():
   torch.onnx.export(
           model,
           dummy_input,
           onnx_path,
           opset_version=11,
           do_constant_folding=False,
       )
```
2. Convert onnx model to openvino IR model：
```
mo --input_model "resnet50.onnx" --input_shape "[1,3, 224, 224]" --mean_values="[123.675, 116.28 , 103.53]" --scale_values="[58.395, 57.12 , 57.375]" --data_type FP32 --output_dir model
```
3. Export Intel KMP affinity env:
```
export LD_PRELOAD=conda_env_home/lib/libiomp5.so # like /usr/local/envs/test/lib/libiomp5.so
export KMP_AFFINITY=granularity=fine,compact,1,0
```

4. At last, run openvino inference:
```
from openvino.runtime import Core
from pathlib import Path
import numpy as np

dummy_input = np.random.randn(1, 3, 224, 224)

config = {
        "CPU_THREADS_NUM": "48"
    }

ie = Core()
classification_model_xml = "model/resnet50.xml"
model = ie.read_model(model=classification_model_xml)

import torch # if import torch here, openvino will use only one core.

compiled_model = ie.compile_model(model, "CPU", config)

# import torch # if import torch here, openvino will use 48 cores.

input_layer = compiled_model.input(0)
output_layer = compiled_model.output(0)
ir = compiled_model.create_infer_request()
import time
s = time.time()
for i in range(200):
    ir.infer(inputs={input_layer.any_name: dummy_input})

print("time cost: " + str(time.time() - s))
```

BTW: gomp affinity `export OMP_PROC_BIND=CLOSE` has the same hehaviour.

### Versions

torch: 1.13.1
python: 3.7.10
cpu: Intel(R) Xeon(R) Gold 6252 CPU @ 2.10GHz
Set up env with 
```
conda create -n test -y python==3.7.10 setuptools==58.0.4 
conda activate test
conda install intel-openmp
pip3 install torch torchvision
pip3 install openvino openvino-dev
```

cc @frank-wei @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10
Repository: stable-diffusion-webui
Issue: [Feature Request]: Create a text file per batch with generation parameters.
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

In the settings, there's an option to "Create a text file next to every image with generation parameters."
My request is to create a text file per batch, not per image. (because I have to delete the extra text files manually every time).
It makes sense to me, since all of the images from the same batch use the same parameters.

### Proposed workflow

Add a new option "Create a text file per batch with generation parameters."

### Additional information

_No response_
Repository: stable-diffusion-webui
Issue: [Bug]: Saving an image while generating new ones stops updating progress bar
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

When a set of images is currently generated in the preview window (txt2img) and a new batch is running ("generate" button has been pressed, status bar is filling up), saving an image from the preview window will unlink the progress bar in the web UI from the CLI, as if nothing was running.

### Steps to reproduce the problem

1. Open txt2img (main tab)
2. Generate 1+ images
3. Generate another 1+ images
4. While second generation is occurring, save one of the current images from the image viewer
5. Notice the status bar has disappeared and is replaced by "loading..." or similar

### What should have happened?

Progress bar should have remained visible

### Commit where the problem happens

2b94ec78869db7d2beaad23bdff47340416edf85

### What platforms do you use to access UI ?

Windows

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
xformers and medvram I think they are called
```


### Additional information, context and logs

_No response_
Repository: pytorch
Issue: export does not support boolean tensor indexing
Labels: triaged,enhancement,module: dynamic shapes,module: dynamo

```
import torch._dynamo
torch._dynamo.config.dynamic_shapes=True
def foo(images, handedness):
    right_hand_mask = handedness == 1
    images[right_hand_mask] = images[right_hand_mask].flip(-1)

torch._dynamo.export(foo, torch.randint(0, 256, (512, 1, 1, 96, 96)), torch.randint(0, 1, (512, 1, 1)))
```
raises:
```
dynamic shape operator: aten.index.Tensor
```

My ideal behavior would be that we are capable of returning a tensor with "new" shapes that are unbacked symints, similar to what we want from nonzero. 

Internal command to reproduce the issue: P595150412

cc @ezyang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @aakhundov @kadeng @mlazos @soumith @yanboliang @anijain2305 @chunyuan-w @Xia-Weiwen @desertfire
Repository: next.js
Issue: Using generateStaticParams with next/headers causes dynamicParams ignored in production
Labels: bug,linear: next

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

    Operating System:
      Platform: linux
      Arch: x64
      Version: #1 SMP PREEMPT_DYNAMIC Sat, 07 Jan 2023 15:10:07 +0000
    Binaries:
      Node: 19.4.0
      npm: 8.19.2
      Yarn: 1.22.19
      pnpm: 7.22.0
    Relevant packages:
      next: 13.1.2-canary.4
      eslint-config-next: 13.1.1
      react: 18.2.0
      react-dom: 18.2.0


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

### Link to the code that reproduces this issue

https://github.com/myl7/next-ignore-dynamic-params-mre

### To Reproduce

The MRE repo contains the code to reproduce the error.

- `pnpm run build && pnpm run start`
- `curl -I http://localhost:3000/posts/1`, returns 200 correctly
- `curl -I http://localhost:3000/posts/2`, return 200 wrongly, expecting 404

### Describe the Bug

When using `generateStaticParams` with `next/headers`, Next.js will return an unexpected error: `Error: Dynamic server usage: headers`. The error can be avoided by disable either `generateStaticParams` or `next/headers` in the development mode. Related https://github.com/vercel/next.js/issues/43427 https://github.com/vercel/next.js/issues/43392 .

But after disabling one of them in development, the app ignore `dynamicParams = false` in the production mode. That means, even using `dynamicParams = false` with `generateStaticParams` to limit available params, the app would still accept dynamic params. In the MRE, even when `slug` of `/posts/[slug]` is limited to `1`, `/posts/2` still returns 200.

### Expected Behavior

`dynamicParams = false` works as expected, which means in the MRE `/posts/2` should return 404.

### Which browser are you using? (if relevant)

Firefox 108.0.2-1 in Arch Linux pacman source

### How are you deploying your application? (if relevant)

Vercel

<sub>[NEXT-1379](https://linear.app/vercel/issue/NEXT-1379/using-generatestaticparams-with-nextheaders-causes-dynamicparams)</sub>
Repository: ant-design
Issue: [Bug][Table][antd官网可复现]：Table performance issue causes the browser broken； Table 性能问题导致浏览器崩溃
Labels: Inactive

### Reproduction link

[https://ant.design/components/table-cn#components-table-demo-fixed-columns-header](https://ant.design/components/table-cn#components-table-demo-fixed-columns-header)

### Steps to reproduce

【English】

1、click https://ant.design/components/table-cn#components-table-demo-fixed-columns-header

2、scroll the Table, left to right, right to left，repeat servel times 

3、chrome broken
![image](https://user-images.githubusercontent.com/23659716/211723128-5cce862e-4248-4bec-857a-540f46ad8a7a.png)

【中文】

1、点击  https://ant.design/components/table-cn#components-table-demo-fixed-columns-header

2、滚动table，左到右，右到左，重复操作

3、浏览器崩溃

### What is expected?

正常使用

### What is actually happening?

浏览器崩溃

| Environment | Info |
| --- | --- |
| antd | 5.1.4 |
| React | 18 |
| System | Macos |
| Browser | Chrome latest |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: neovim
Issue: fillchar: customize `statuscolumn`'s fold level char in `%C`
Labels: enhancement,folds,statusline

### Problem

![image](https://user-images.githubusercontent.com/97107165/211726942-1a5b5190-fec7-4b53-bdb3-2e4e2285926d.png)
seems we can't customize the fold level ( the `2` in the picture) through the `fillchar`

maybe it's the new option `statuscolumn`'s `%C` related?

is it possible to customize it?
Repository: godot
Issue: Deleting a folder containing assets with godot turned off will irreparably brick a scene
Labels: bug,topic:editor

### Godot version

4.0 beta 10

### System information

Windows 11

### Issue description

I found a fun one. I had a placeholder AnimatedSprite2D for a loading screen, and kept my temporary assets in a folder (called BadAssets). Once I felt ready to actually make the assets I needed, while Godot 4 beta 10 was offline, I deleted the BadAssets folder in preparation for making the actual assets I needed.

Except the next time I opened Godot, I was no longer able to load my scene, and was greeted with the following stacktrace on Output, shortened for your convenience (it has 120 frames, so it errored once per frame).

```
  modules/gltf/register_types.cpp:61 - Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
  scene/resources/resource_format_text.cpp:452 - res://Scenes/LoadingScreen/LoadingScreen.tscn:3 - ext_resource, invalid UUID: uid://cm64qoa6vgjq8 - using text path instead: res://BadAssets/image-0.png
  Resource file not found: res://BadAssets/image-0.png.

Stacktrace shortened for your convenience

  scene/resources/resource_format_text.cpp:452 - res://Scenes/LoadingScreen/LoadingScreen.tscn:123 - ext_resource, invalid UUID: uid://j2ai85mhhlty - using text path instead: res://BadAssets/image-119.png
  Resource file not found: res://BadAssets/image-119.png.
  scene/resources/resource_format_text.cpp:178 - res://Scenes/LoadingScreen/LoadingScreen.tscn:128 - Parse Error: [ext_resource] referenced non-loaded resource at: res://BadAssets/image-0.png
  scene/resources/resource_format_text.cpp:178 - res://Scenes/LoadingScreen/LoadingScreen.tscn:128 - Parse Error: [ext_resource] referenced non-loaded resource at: res://BadAssets/image-1.png
  scene/resources/resource_format_text.cpp:623 - res://Scenes/LoadingScreen/LoadingScreen.tscn:128 - Parse Error: [ext_resource] referenced non-loaded resource at: res://BadAssets/image-1.png
  Failed loading resource: res://Scenes/LoadingScreen/LoadingScreen.tscn. Make sure resources have been imported by opening the project in the editor at least once.
```

As far as I can tell, there is no way for me to recover my scene through Godot, as it simply refuses to be edited.

I did, fortunately, manage to recover my scene thanks to the live backups of everything in my machine that I keep on my NAS, which allowed me to restore the folder. That being said, this does seem like a pretty important one, as it would've ruined potentially quite a lot of work for anyone not running extensive live backups of everything.

### Steps to reproduce

step 1) make a scene

step 2) add an image to the scene

step 3) close godot

step 4) delete the image (and image folder, not sure if it makes a difference) with godot offline

step 5) reopen the project, you can no longer access that scene

### Minimal reproduction project

N/A
Repository: storybook
Issue: [Feature Request]: addon-a11y make colorblindness filter feature optional
Labels: feature request,needs triage

### Is your feature request related to a problem? Please describe

Currently, I'm using addon-a11y for Accessibility testing, but we don't need a vision simulator. I can't find a way to hide. If there are, please provide the documentation. 

### Describe the solution you'd like

I would like to have an option like for backgrounds ->
```
export const parameters = {
    backgrounds: {
        disable: true,
     },
    visionSimulator: {
        disable: true,
     },
...other parameters,
}
```

### Describe alternatives you've considered

_No response_

### Are you able to assist to bring the feature to reality?

no

### Additional context

the issue remains unresolved #11059
Repository: rust
Issue: Cow<'a, T> isn't specializable while FooCow<'a, T> is
Labels: A-specialization,C-bug,F-specialization,requires-incomplete-features

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=60bb0c925354009304afd4b84aa2e8e6

I tried this code:

```rust
#![feature(specialization)]

use std::borrow::Cow;
use std::clone::Clone;
use std::ops::Deref;
use std::fmt::Debug;

trait Example {
    fn example(); 
}

struct UserDefinedCow<'a, T> {
    aa: &'a T,
}

impl<T: Sized> Example for T {
    default fn example() {
        println!("default impl: {}", std::any::type_name::<Self>());
    }
}

trait JJ {
}

impl<'a, T: Example /*+ Clone */ +'a> Example for Cow<'a, T> {
    fn example() {
        println!("specialized impl (Cow): {}", std::any::type_name::<Self>());
    }
}

impl<'a, T: Example + /*JJ +*/ 'a> Example for UserDefinedCow<'a, T> {
    fn example() {
        println!("specialized impol (UserDefinedCow): {}", std::any::type_name::<Self>());
    }
}
/*
impl<T: Example> Example for Box<T> {
    fn example() {
        println!("Example from Box<T> impl: {}", std::any::type_name::<Self>());
    }
}

impl<'a, T: Example + 'a> Example for Vec<&'a T> {
    fn example() {
        println!("Example from Vec<T> impl: {}", std::any::type_name::<Self>());
    }
}
*/

fn main() {
    usize::example();
    //<Vec<&u8>>::example();
    //<Box<&u8>>::example();
    <Cow<'_, &u8>>::example();
    <UserDefinedCow<'_, &u8>>::example();
}

```

I expected to see this happen:

no compilation error and the output should be like this:

```
default impl: usize
specialized impl (Cow): alloc::borrow::Cow<&u8>
specialized impol (UserDefinedCow): playground::UserDefinedCow<&u8>
```

Instead, this happened: 

```
error[[E0119]](https://doc.rust-lang.org/nightly/error-index.html#E0119): conflicting implementations of trait `Example` for type `Cow<'_, _>`
  --> src/main.rs:25:1
   |
16 | impl<T: Sized> Example for T {
   | ---------------------------- first implementation here
...
25 | impl<'a, T: Example /*+ Clone*/ +'a> Example for Cow<'a, T> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Cow<'_, _>`
```

Oddly enough, I found that you can specialize `Cow` if it's further bound with `+ Clone`. (try to comment in), after fiddling with the code a bit.

Also, another specialization for identical type shape is allowed if it's user defined. so, i guess `Cow` is specially treated internally?

### Meta

```
Nightly channel

Build using the Nightly version: 1.68.0-nightly

(2023-01-10 0442fbabe24ec43636a8)
```

originally found and reduced to a minimal test case above: https://github.com/solana-labs/solana/pull/29596
Repository: vscode
Issue: Allow to use TextMate scope in `notIn` property of `autoClosingPairs`
Labels: feature-request,editor-autoclosing

<!-- ⚠️⚠️ 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. -->

I would like to define an auto-closing pair `<`, `>` that _only happens when not in an expression_, because `<` is used as an operator in that situation.

When defining an [auto-closing pair](https://code.visualstudio.com/api/language-extensions/language-configuration-guide#autoclosing), it is possible to specify whether this should _not_ happen when writing in a `string` or when writing a `comment`, e.g.,
```
{
  "autoClosingPairs": [
    { "open": "<", "close": ">", "notIn": ["string", "comment"] },
  ]
}
```
However, it would be more powerful if I could specify a TextMate scope there. In my language, I have a scope `meta.expression` for all expressions, so then I could do something such as
```
{
  "autoClosingPairs": [
    { 
        "open": "<",
        "close": ">",
        "notIn": {
            "scopes": ["meta.expression"]
        }
    },
  ]
}
```
Repository: vscode
Issue: Command Center does not work well with default window title
Labels: under-discussion,command-center

<!-- ⚠️⚠️ 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
Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.74.3
- OS Version: Windows 10 21H2

Steps to Reproduce:

if you have changed it, the default title is: `${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}`
title settings path is "window->title"

1. right click on the title bar and disable Command Center
2. open settings and change the title to this default
3. open a folder, and observe the title shows the "Settings - folder name - Visual Studio Code"
4. right click title bar, enable CC and observer it shows only the folder name.
5. get back to title setting and add a single letter or symbol to the beginning and observe CC now shows full title
6. remove that addition and observe CC does not respect the default title

When I run 1.74.3 for the first time to test some other bugfix, as portable, I thought VSCode started deviating from distributing same settings. It was my first time seeing CC. Then saw a "show together with title" and then thought title bar does not even show up. Some thinkering and I got to these steps to reproduce the issue.

most of VSCode users do not tamper with settings until they really need, this issue poses a threat to un-suspecting. as CC now seems to come enabled by default, so it really is important to fix this annoying issue as soon as possible.