sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Our help around using "sdkmanager" could be improved
Labels: platform-android,tool,a: first hour,P2,team-android,triaged-android

When the Android toolchain setup is broken, our advice is something like:

```
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /home/ianh/Android/Sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
```

There are several opportunities to improve this:

- [ ] We say to run `path/to/sdkmanager --install "cmdline-tools;latest"` without giving the actual path. The user has to find their `sdkmanager` command to run it. We could find the path for them and suggest it here directly.
- [ ] When you run `sdkmanager` directly, it'll probably fail because you need a specific Java instance that Android Studio installs. We don't give you any advice on how to make that work.
- [ ] We don't show the Java instance Android Studio has, even if Android Studio is installed, which could help. We do have that information, or at least, once I fixed the `sdkmanager` issue `flutter doctor -v` was able to give me that information.
- [ ] It turns out the easiest way to actually solve this problem if you can't get your java setup working is using the UI in Android Studio. We could suggest doing that.
- [ ] We could have a command like `flutter doctor --android-licenses` that does this for you.
Repository: opencv
Issue: Python's cv2.cuda.GpuMat assignTo is not modifying target variable
Labels: bug,category: python bindings,category: gpu/cuda (contrib),RFC

### System Information

OpenCV python version: 4.6.0-dev
Operating System / Platform: Ubuntu 20.04.5 LTS
Python version: 3.8.10
CUDA 11.4.4

### Detailed description

On IRC (#opencv), a user reported to me that `assignTo` on `cv.cuda.GpuMat` does not modify the target object.

`a.assignTo(b)` 

We could change this to work as resize which returns the modified object:

`b = cv.resize(a, (0,0), b, 2, 2)`

But after thinking, do we really need to expose `assignTo` to Python ? as the doc says "Provides a functional form of convertTo."

If you think that we should correct it, I have a patch to be able to write:

`b = a.assignTo(b)`



### Steps to reproduce

```python
import cv2 as cv
import numpy as np


a = cv.cuda.GpuMat()
a.upload(np.ones((1,1)))
b = a.clone()
b.setTo(0)
b.assignTo(a)
print(a.download(), b.download())
print(a.cudaPtr(), b.cudaPtr())

# output: [[1.]] [[0.]]
# expected: [[0.]] [[0.]]
# pointers expected to be the same
```


### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: vscode
Issue: Tasks use Windows instead of WSL env on WSL
Labels: bug,help wanted,tasks,WSL,terminal-process

     

   That is unexpected and looks like a bug on our side - specifically here. It does not look like a new issue/regression to me

https://github.com/microsoft/vscode/blob/7df4fd594f047d2a6c8b884d6bfb985d6e2a468c/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts#L1075-L1086

_Originally posted by @meganrogge in https://github.com/microsoft/vscode-docker/issues/3722#issuecomment-1335869829_
Repository: PowerToys
Issue: Open Color Picker editor with accelerator key if 'Activation behavior' is set to 'Only pick a color'
Labels: Needs-Triage

### Description of the new feature / enhancement

80% of the time, I don't want the color editor to appear when picking a color. Other times, though, it would be useful; the options, though, only allow for always or never. I would like if there were a way to summon the editor upon picking, perhaps by holding Alt, Shift, or Ctrl while clicking.

### Scenario when this would be used?

Used when the user wants the editor to appear only on demand without having to go into settings every time.

### Supporting information

_No response_
Repository: go
Issue: cmd/vet: don't complain about innocent newlines.
Labels: NeedsDecision

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
1.20
</pre>

### Does this issue reproduce with the latest release?
Yes

https://go.dev/play/p/_TMofzRghNL

```
package main

import "fmt"

const hello = `hello
`

func main() {
	fmt.Println(hello)
}
```



./x.go:9:2: fmt.Println arg list ends with redundant newline

I understand the desire to complain if there is an explicit newline in the text to fmt.Println, but when it's coming from a constant like this, I need to change the constant or use Print instead of Println. I keep hitting this problem with old code that has a nice header to be printed that desires a blank line. Requiring me to close the constant before the newline seems excessively fussy to me.
Repository: stable-diffusion-webui
Issue: [Bug]: couldnt clone taming transformers
Labels: asking-for-help-with-local-system-issues

### Is there an existing issue for this?

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

### What happened?

trying to install stable diffusion and automatic1111 for the first time, but it keeps showing me this error even after restarting my pc

### Steps to reproduce the problem

1. Go to stable-diffusion-webui in User
2. Press webui.bat
3. wait for cloning taming transformers to start

### What should have happened?

should have continued to install the Stable diffusion UI

### Commit where the problem happens

4b3c5bc24bffdf429c463a465763b3077fe55eb8

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

Windows

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

Google Chrome

### Command Line Arguments

_No response_

### Additional information, context and logs

venv "C:\Users\Riyad2\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 4b3c5bc24bffdf429c463a465763b3077fe55eb8
Cloning Taming Transformers into repositories\taming-transformers...
Traceback (most recent call last):
  File "C:\Users\Riyad2\stable-diffusion-webui\launch.py", line 293, in <module>
    prepare_enviroment()
  File "C:\Users\Riyad2\stable-diffusion-webui\launch.py", line 237, in prepare_enviroment
    git_clone(taming_transformers_repo, repo_dir('taming-transformers'), "Taming Transformers", taming_transformers_commit_hash)
  File "C:\Users\Riyad2\stable-diffusion-webui\launch.py", line 100, in git_clone
    run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}")
  File "C:\Users\Riyad2\stable-diffusion-webui\launch.py", line 49, in run
    raise RuntimeError(message)
RuntimeError: Couldn't clone Taming Transformers.
Command: "git" clone "https://github.com/CompVis/taming-transformers.git" "repositories\taming-transformers"
Error code: 128
stdout: <empty>
stderr: Cloning into 'repositories\taming-transformers'...
error: 8004 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output


Press any key to continue . . .
Repository: go
Issue: cmd/compile: optimize reflect.Value.Set with short-lived Values
Labels: Performance,NeedsInvestigation,compiler/runtime

Some accessor `reflect.Value` methods must allocate since they return value that references an underlying value that must be heap allocated.

Such patterns include:
```go
v1.Set(v2.MapIndex(...))
v1.Set(v2.Slice(...))
v1.Set(v2.Slice3(...))
```

In such a usage, the generated value could be stack allocated since it only used as an intermediate storage before the value is stored into `v1`.
Repository: go
Issue: proposal: reflect: add Value.SetMapIndexOf
Labels: Performance,Proposal

For most reflection operation, there is an allocation free way to walk a value tree. At present, there is no way to obtain the value of a map entry without allocating since `reflect.Value.MapIndex` allocates the underlying value on the heap (since map entries are unaddressable).

Assuming we can't do #57060, I propose an explicit API for setting an addressable value with the value of a map entry:
```go
// SetMapIndexOf is equivalent to v.Set(m.MapIndex(k)).
func (v Value) SetMapIndexOf(m, k Value)
```

The method is so named because the `SetMapIndex` method is already taken up for the operation equivalent to `v[key] = elem`. Alternative suggest names welcome.
Repository: rust
Issue: GAT: spurious "first borrow might be used here, when `...` is dropped and runs the destructor for type `...`"
Labels: A-borrow-checker,T-compiler,C-bug,A-GATs

This code doesn't compile (borrowck error on `main.mutate()`), but I think it should, since the borrow on `main` should end after `sub.consume()` with NLL (and the destructor for Option can't possibly run, since the contents have been moved out):
```rust
pub trait Sub
{
    fn consume(self);
}

pub trait Main
{
    type Sub<'a>: Sub where Self: 'a;

    fn mutate(&mut self);
    fn sub<'a>(&'a mut self) -> Option<Self::Sub<'a>>;
}

pub fn test(main: &mut impl Main)
{
    match main.sub() {
        Some(sub) => {
                sub.consume();
                main.mutate();
        }
        None => {
                return;
        }
    };
}
```

Using a concrete type instead of a generic implementing the trait makes it compile.


This is the error the compiler gives:
```
error[E0499]: cannot borrow `*main` as mutable more than once at a time
  --> test.rs:19:3
   |
16 |     match main.sub() {
   |           ----------
   |           |
   |           first mutable borrow occurs here
   |           a temporary with access to the first borrow is created here ...
...
19 |         main.mutate();
   |         ^^^^^^^^^^^^^ second mutable borrow occurs here
...
24 |     };
   |      - ... and the first borrow might be used here, when that temporary is dropped and runs the destructor for type `Option<<impl Main as Main>::Sub<'_>>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0499`.
```

On the other hand, this compiles:
```
pub trait Sub
{
    fn consume(self);
}

pub trait Main
{
    type Sub<'a>: Sub where Self: 'a;

    fn mutate(&mut self);
    fn sub<'a>(&'a mut self) -> Option<Self::Sub<'a>>;
}

pub fn test(main: &mut impl Main)
{
    let sub = match main.sub() {
        Some(sub) => sub,
        None => {
                return;
        }
    };

    sub.consume();
    main.mutate();
}
```
Repository: HelloGitHub
Issue: 【开源自荐】npm-deprecated-check 检查项目中弃用依赖，并通过 chatgpt 推荐可替代 package
Labels: JavaScript 项目

## 推荐项目

- 项目地址：https://github.com/KID-joker/npm-deprecated-check

- 类别：JS

- 项目标题：npm-deprecated-check 检查项目中弃用依赖，并通过 chatgpt 推荐可替代 package

- 项目描述：只有在安装依赖的时候，才会提示该安装包已被弃用，而在运行项目的无法获知是否改用新的解决方案。

- 亮点：
1. 检查多个来源的安装包情况
2. 根据lockfile和package.json确定当前安装的版本，更为准确
3. 通过chatgpt推荐可替换package

![preview](https://github.com/KID-joker/npm-deprecated-check/raw/main/assets/preview.png)

- 后续更新计划：
1. 支持monorepo
Repository: deno
Issue: [NPM Specifiers] Allow Loading Assets from npm packages via Deno File APIs
Labels: suggestion,node compat

I want to do the following: 

```ts
const indexCss = await Deno.readTextFile(
  "npm:open-props@1.5.1/open-props/postcss/index.css",
);
```

I know that the css file exists in this package and since Deno.readTextFile() is already a deno-specific api, i would like to be able to load files from npm packages this way. 

Another solution would be to use the `--node-module-dir` flag, but I would like to avoid that as far as possible.
Repository: stable-diffusion-webui
Issue: [Feature Request]: allow img2img to use (some of) original PNG Info (generation parameters) from file
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 ?

(note if it's a custom script etc this should also theoretically work for the single img2img tab)

It would be useful to be able to run `Batch img2img` on some already generated images but use the PNG Info feature to grab the various parameters from the original generation to use for the new one

The new feature (potentially via a Custom Script) would then allow different parameters to be overridden. If there were checkboxes for each of these that could then allow it to either use the value specified in the UI or the value from the file, it would give a lot of possibilities

* Prompt
* Negative Prompt
* Sampling Steps
* Sampling Method (Sampler)
* Size 
* Restore Faces
* CFG Scale
* Denoising Strength



### Proposed workflow

1. Go to Batch img2img tab
2. specifiy input/output folders
3. set default parameters in the UI
4. load custom Script for this new feature
5. tick options that you want to keep from the file to override defaults in the UI
6. Generate


### Additional information

_No response_
Repository: PowerToys
Issue: 希望加入将Win11右键菜单转换回Win10及之前旧风格右键菜单的功能
Labels: Needs-Triage

### Description of the new feature / enhancement

一些快捷功能无法附加到新风格右键菜单中，使用起来很不方便，希望能加入一个快捷切换右键菜单风格的功能，将shift+右键的菜单设置成为默认。

### Scenario when this would be used?

在将一些第三方功能的快捷方式加入右键菜单的时候，比如快速的调用打开，批量重命名等功能的时候，旧风格右键菜单的效率要高于新的win11右键菜单风格。

### Supporting information

_No response_
Repository: go
Issue: cmd/vet: disable checks based on go.mod go version
Labels: NeedsDecision,Analysis

New vet checks can make old code's tests stop passing. An example is #57059, where the printf format checker got more precise in Go 1.18. Code that tested fine with Go 1.17 stops passing tests in Go 1.18.

Vet needs to know which Go version each package was written for anyway. Perhaps it should use that information to disable checks that are newer than that version, so that tests don't start failing due to new vet reports until you update the go.mod go line.

(Related to #56986.)
Repository: node
Issue: Partially consuming fs.ReadStream closes file handle despite `autoClose: false`
Labels: fs,stream

### Version

v19.2.0, v14.21.1

### Platform

Linux wolf-x1c6 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

### Subsystem

_No response_

### What steps will reproduce the bug?

```js
import fsPromises from 'node:fs/promises'

const fh = await fsPromises.open('example.txt')
fh.on('close', () => {throw new Error('handle closed!')})

const stream = fh.createReadStream({
	autoClose: false,
})

for await (const chunk of stream) {
	break
}

// Give the event loop a breather: this seems to be where the close happens
await new Promise(resolve => setTimeout(resolve, 10))

console.log('fd', fh.fd) // = -1; stream closed
```

### How often does it reproduce? Is there a required condition?

Always

### What is the expected behavior?

`FileHandle.createReadStream({autoClose: false})` should result in the file handle not being automatically closed when the stream is destroyed.

### What do you see instead?

Using `fs.ReadStream[Symbol.asyncIterator]` seems to unconditionally close the file handle (after a small delay; I guess at the end of the event loop or something? but haven't dug in; just noted the `setTimeout` above is necessary to reproduce) despite `{autoClose: false}` being passed to `FileHandle.createReadStream()`.

This seems to be the result of the underlying `readable.destroy()` also closing the file handle; but it means that, as far as I can tell, there's no way to only partially consume an `fs.ReadStream` created from a file handle without either closing the handle or leaking the stream.

### Additional information

_No response_
Repository: rust
Issue: Discussion: Enforce formatting of doc comments
Labels: T-rustdoc,A-docs,A-rustfmt

Currently, the examples in the Rust documentation is inconsistent in style.  For instance, there are many examples that use 3 space tabs (probably accidentally), while most use 4.

How do we enforce that examples are formatted correctly?  We have a few options.

# Rustfmt
Use rustfmt's `format_code_in_doc_comments`.

While this initially seems like a good solution, there are a couple problems:

 - There are currently bugs in how this works that add additional whitespace, this is a problem with one correct solution (fixing the bugs).
 - Style of doc comments matches the style of the rest of the code exactly.  This would enable `use_small_heuristics = "Max"`, which is very undesirable for doc comments since shorter lines should always be preferred in doc comments.

How do we solve the second problem?  I see two possible ways this can be done (by changing rust-fmt).

## Add docs table to rustfmt.toml
Rustfmt could add support for alternate rustfmt settings for doc comments.

```toml
edition = "2021"
unstable_features = true
use_small_heuristics = "Max"
format_code_in_doc_comments = true

[docs]
use_small_heuristics = "Default"
```

## Add rustfmt-docs.toml
Add an additional file that has the same format as rustfmt.toml, but applies to docs.

-----

# What if changes aren't/can't be made in Rustfmt?

There are 3 main solutions in this category.

## Move docs out to their own folder with another rustfmt.toml file
This is something that could be done without additional tooling.

    ```rust
    #![doc = include_str!("../docs/name_of_example.rs")]
    ```

Of course, this would be a very large change from where doc comments are written today, and it could be argued that having it separated out will make things harder to follow.

## Extract docs with tooling and check against rustfmt.toml file
A tool could be made (as part of tidy) to verify docs are formatted correctly.  Rust code could be parsed for doc comments, and written into temporary files in the same directory with a .rustfmt folder.

## Extract docs with tooling and format with another rustfmt.toml file then overwrite
A tool could be made (as part of tidy) to autoformat doc comments.  Implementation details would be similar to the previous option.

-----

How should this be approached?  I see pros and cons to all solutions, but I think it's something that definitely should be solved.  Are there any approaches I missed?  I tried to list all of the ones I could think of, but could have missed some.
Repository: storybook
Issue: [Feature Request]: React.StrictMode  ，Whether to provide options to close
Labels: feature request,needs triage

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

![image](https://user-images.githubusercontent.com/67352005/205433297-18a7a6d3-789d-4c5d-8262-cb842b714280.png)

When I use Vue3+VITE, SB7.0 is built, the console will throw Strict warnings, I don’t want to see so many warnings

### Describe the solution you'd like

![image](https://user-images.githubusercontent.com/67352005/205433348-787d3abe-63fb-417e-a3e5-881a60d61ed0.png)

Can the configuration be closed here?

### Describe alternatives you've considered

_No response_

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

no

### Additional context

_No response_
Repository: flutter
Issue: Keys don't map correctly when using "Dvorak - QWERTY ⌘" layout on macOS
Labels: a: text input,platform-mac,a: desktop,P2,fyi-text-input,team-macos,triaged-macos

![Screenshot 2022-12-03 at 1 11 46 AM](https://user-images.githubusercontent.com/156888/205433468-f2e26625-38ed-46bb-b76f-560993c0714f.png)

There's a keyboard layout on macOS called "Dvorak - QWERTY ⌘". It's a Dvorak keyboard layout and the "v" key is where the "." key is for QWERTY. So in a normal Dvorak keyboard, ctrl-v, cmd-v etc all work by doing a combo with the "." physical key. But that layout is a bit annoying because one handed operations like ctrl-c, ctrl-v etc become two handed operations since c and v are on the right side of the keyboard. 

So "Dvorak - QWERTY ⌘" solves that by being a Dvorak layout most of the time, except when the command ⌘ modifier is held. Then for that duration, all keys remap to the QWERTY layout. So cmd-c is still on the "c" physical key (which normally maps to "j" on Dvorak). 

That works in all AppKit apps but doesn't work in Flutter. The macOS menu bar is actually highlighting Edit->Paste each time I press cmd-v, but there's no pasting in the Flutter app itself. Pressing the physical keys cmd-. (which is the "v" key in Dvorak layout) works.
Repository: stable-diffusion-webui
Issue: [Bug]: Glitchy undo button of  inpainting color sketch tool
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?

The undo button doesn't always properly undo any masking done on inpainting with color sketch. It will show "start drawing" as if the entire picture was removed when the only thing should have is the mask itself.

### Steps to reproduce the problem

1. Go to img2img->Inpaint
2. Press the button and make a mask(s)
3. Press the undo button

### What should have happened?

The last mask stroke should be undone.

### Commit where the problem happens

ce049c471b4a1d22f5a8fe8f527788edcf934eda

### 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 --gradio-inpaint-tool color-sketch
```


### Additional information, context and logs

_No response_