sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Negative Exponents of Int tensors result in output of zero
Labels: module: docs,triaged

### 🐛 Describe the bug

Here is an example:

```
expo=torch.tensor([-1])
base=torch.tensor([10])
print(base**expo)

tensor([0])
```

### Versions

Version 1.9.0+cu111
Windows 10, 64 bit
Python 3.7

cc @ezyang @gchanan @zou3519 @bdhirsh @brianjo @mruberry
Repository: neovim
Issue: Supply a side argument to resize
Labels: enhancement

### Feature already in Vim?

_No response_

### Feature description

It would be great to have the possibility to supply a `side` argument to the `resize` command.
E.g. `resize left +10` which would increase the left side of the buffer. If the buffer is already on the left side, nothing should happen.
This would allow for nicer resize mappings, where the buffer size could be increased with `h,j,k,l` and decreased with `H,J,K,L` for example.
Repository: yt-dlp
Issue: Output Template Types: could you please add `AudioFile:` and `VideoFile:`?
Labels: enhancement,triage

### Checklist

- [X] I'm reporting a feature request
- [X] I've verified that I'm running yt-dlp version **2022.01.21**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Description

Hello
**Thank you very much for sharing your great work!**,
I use yt-dlp to allow people without / with slow internet to access study content offline.

I have a probably small feature request 😃:  

### The issue:
In the following example, we must add the `%(format_id)s` property because otherwise the audio and video files will overwrite each other:

`$ yt-dlp -f "bv,ba" -o "%(title)s.f%(format_id)s.%(ext)s"`

Unfortunately, this just moves the real problem one step further, because of the `format_id`:

- most end-users don't know what e.g. `Lecture.f160.webm` and `Lecture.f250.webm` means, 
   - therefore, we must post-process file names to give them a comprehensible name
- when we try to post-process the files via script, 
  - then the script must know the format_id to distinguish between audio and video files


### Request: could you please offer output template types to distinguish between audio and video Files?

That's why it would be useful tho have this option, e.g.:

- `-o "audiofile:%(title)s-Audio.%(ext)s" -o "videofile:%(title)s-Audio.%(ext)s"`
or, maybe:
- `-o "audio:%(title)s-Audio.%(ext)s" -o "video:%(title)s-Video.%(ext)s"`


This would allow that:
- one does not have to edit the filenames at all 
- that subsequent scripts can distinguish the files very easily

Thanks a lot, kind regards,
Thomas
Repository: pytorch
Issue: `torch.nn.functional.{instance, batch}_norm` trigger INTERNAL ASSERT FAILED when input is empty tensor with `complex32`
Labels: triaged,module: complex,module: half

### 🐛 Describe the bug

`torch.nn.functional.{instance, batch}_norm` trigger INTERNAL ASSERT FAILED when input is empty tensor with `complex32`

```python
import torch
input  = torch.rand([1, 0, 2], dtype=torch.complex32)
running_mean = torch.rand([])
running_var = torch.rand([])
torch.nn.functional.instance_norm(input)
# RuntimeError: falseINTERNAL ASSERT FAILED at "../aten/src/ATen/AccumulateType.cpp":16, please report a bug to PyTorch. Unrecognized ScalarType: ComplexHalf
torch.nn.functional.batch_norm(input, running_mean, running_var)
# RuntimeError: falseINTERNAL ASSERT FAILED at "../aten/src/ATen/AccumulateType.cpp":16, please report a bug to PyTorch. Unrecognized ScalarType: ComplexHalf
```

### Versions

pytorch: 1.10.1

cc @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved
Repository: pytorch
Issue: `torch.median` will return -2147483648 when input is an empty tensor
Labels: module: error checking,triaged

### 🐛 Describe the bug

`torch.median` will return -2147483648 when input is an empty tensor with `int32`. By contrast, `torch.min` will raise an error, which I think is a better behavior.

```python
import torch
input = torch.randint(-2,2,[0], dtype=torch.int32)
print(torch.median(input))
# tensor(-2147483648, dtype=torch.int32)
torch.min(input)
# RuntimeError: min(): Expected reduction dim to be specified for input.numel() == 0. Specify the reduction dim with the 'dim' argument.
```

### Versions

pytorch: 1.10.1
Repository: neovim
Issue: `helptags ALL` doesn't reload previously loaded help buffer
Labels: bug-vim,needs:discussion

### Neovim version (nvim -v)

NVIM v0.7.0-dev+908-g431915fe6 (also happens in 0.6.0)

### Vim (not Nvim) behaves the same?

No, Vim 8.2.4051 works as expected

### Operating system/version

Ubuntu 20.04

### Terminal name/version

kitty 0.23.1

### $TERM environment variable

xterm-kitty

### Installation

appImage

### How to reproduce the issue

When help file is updated outside of current Neovim instance, `:helptags ALL` updates tags but doesn't update previously loaded help buffer (even if unlisted). This situation arises frequently if help file was generated automatically and leads to inability to see updates right away.

The following assumes Unix-like system:
1. Create file `~/doc/my_help.txt` with the following content: `*test-tag-manual*`.
2. Run `nvim --clean -u NONE`.
3. `:set rtp=~`.
4. `:helptags ALL` (this should generate `tags` file in `~/doc`).
5. `:h test-tag-manual` (this should open window with `~/doc/my_help.txt`).
6. `:q` (close window with help file; this makes its buffer unlisted).
    6.1 If want to see that everything works when help buffer is wiped out, run `:%bwipe`.
7. Outside of currently running Neovim instance update `~/doc/my_help.txt` to be `*test-tag-manual-new*`.
8. `:helptags ALL` (this should regenerate `tags` file).
9. `:h test-tag-manual-new` (should recognize as valid tag; tab-completion works).
10. See error `E434: Can't find tag pattern.`. Help file opened with previous tag. Updates to current one if run `:edit`.

### Expected behavior

All help pages are reloaded after `:helptags ALL` to be aligned with `tags` files.

### Actual behavior

`E434: Can't find tag pattern.` is given and previous version of help file is shown.

Here are animations of behavior. Left pain is "current Neovim instance", top-right - another instance of Neovim to update help file "outside of current instance", top-left - watching `~/doc/tags` file to see that it actually updates.

<details> <summary>Actual usage which gives error</summary>

![neovim_helptags-all-issue](https://user-images.githubusercontent.com/24854248/150551379-43ab5ae9-a771-4d85-a89d-62a868da637f.gif)

</details>

<details> <summary>Usage with wiped out help buffer without error</summary>

![neovim_helptags-all-issue_bwipeout](https://user-images.githubusercontent.com/24854248/150551405-6a485177-1df5-4a77-95e6-0adca39275bb.gif)

</details>

<details> <summary>Vim behavior without error</summary>

![neovim-helptags-all-issue_vim](https://user-images.githubusercontent.com/24854248/150551442-c0ee09e9-65ed-40fd-b691-4591291ff726.gif)

</details>
Repository: tauri
Issue: [refactor] replace command macro
Labels: scope: core,type: feature request,type: breaking change

## Describe the problem
I noticed a recurring theme among discord questions: Issues with commands.

Here is a short list of the most common ones:
- Async cmds must return Result (throws a lifetime error otherwise) see #2533.
- What parameters are available to commands?
- `__cmd__<command name> is not defined` / `__cmd__my_<command name> must be defined only once`
- macros are arcane magic, especially for rust beginners

## Describe the solution you'd like

While most of this can be addressed through docs, I wanna propose a in-code solution:

> rust pseudocode
```rust
struct Ctx {
   app: AppHandle,
   window: Window
}

type CmdFn = dyn Fn(InvokeMessage);

fn cmd_sync<F,A,R>(cmd_fn: F) -> Box<CmdFn>
where 
   F: Fn(Ctx, A) -> Result<R, Error> + 'static
   A: DeserializeOwned
   R: Serialize + 'static

fn cmd_async<F,A,R,RV>(cmd_fn: F) -> Box<CmdFn>
where
   F: Fn(Ctx, A) -> R + 'static,
   A: DeserializeOwned,
   R: Future<Output = Result<RV, Error>>,
   RV: Serialize + 'static
```

Usage example (using the plugin builder proposal #2959 ):
```rs
async fn foo(ctx: Ctx, arg: String) -> Result<(), Error> {
   println!("{}", arg);
   Ok(())
}

pub fn init() -> Plugin { // not the Plugin trait
   PluginBuilder::new("example")
      .commands([
         // This is where the above function comes into play
         cmd_async(foo)
      ])
}
```

This has several advantages over the current situation:
1. It enforces users to return `Result`, clearly mapping to frontend promise states.
2. Doesn't produce weird lifetime, or variable errors
3. Handlers are heap allocated, this paves the way for one time commands. (A variation of the above allowing `FnOnce` as arguments)
4. It's easier to both export functions (for rust users) and making them available through IPC.

### Incremental Adoption
The command macro can trivially use this new system under the hood, so we don't break existing code. 
We could then mark it as deprecated and remove it with v3.

## Alternatives considered

## Additional context

This heavily inspired by denos op functions: https://github.com/denoland/deno/blob/main/core/ops_json.rs

Related issues:
#3255
#2533
#3029

### Features/Use cases to consider

- One time commands
- Abortable commands
- Proper namespacing (`<module>.<command>`)
- Commands callable from Rust
- Command Scoping (allowing only certain contexts to access certain commands)
- IPC middleware
Repository: storybook
Issue: Build ignores argTypes/PropTypes to create controls table
Labels: bug,react,argtypes

When creating a new component and its stories in Storybook, I can configure the controls table using PropTypes and argTypes and see it working as expected using the `yarn storybook`. However, when compiling the project with `yarn build-storybook` the behavior is different, all the props imported from the component are displayed.

In the image below, the `yarn storybook` behavior is on the left and the `yarn build-storybook` behavior is on the right.

![storybook-compare](https://user-images.githubusercontent.com/30848833/150558891-54fca9d6-d9aa-481f-9b5c-06a00bcca1ae.png)

The component and story file code is described below.

`Button.tsx`
```typescript
import { Button as MUIButton, ButtonProps } from '@mui/material';
import PropTypes from 'prop-types';

export const Button = ({ variant, size, ...props}: ButtonProps) => {
    return <MUIButton variant={variant} size={size} {...props} />
};

Button.propTypes = {
    variant: PropTypes.string,
    size: PropTypes.string,
};

Button.defaultProps = {
    variant: 'contained',
    size: 'large',
}
```

`Button.stories.tsx`
```typescript
import { Button } from './Button';

export default {
    title: 'Button',
    component: Button,
    argTypes: {
        disabled: {
            control: { type: 'boolean' },
        },
    },
};

export const Default = ({ ...args }) => <Button {...args} />;
Default.args = {
    children: 'Default',
    disabled: false,
};
```
Repository: rust
Issue: "temporary value dropped while borrowed"-checker does not use NLL
Labels: A-borrow-checker,A-NLL

A slightly modified version of Example 2 from [here](https://rust-lang.github.io/rfcs/2094-nll.html#reborrow-constraints) fails:
```rust
fn main() {
    let foo: &mut i32       = &mut 22;
    let mut r_a: &&mut i32  = & foo;
    let r_b: &mut &&mut i32 = &mut r_a;
    let r_c: &&mut i32      = & **r_b;

    // What is considered borrowed here?
    *r_b = &&mut 0;

    println!("{}", r_c);
}
```
with the following error:
```
error[E0716]: temporary value dropped while borrowed
  --> src/main.rs:8:13
   |
8  |     *r_b = &&mut 0;
   |             ^^^^^^- temporary value is freed at the end of this statement
   |             |
   |             creates a temporary which is freed while still in use
9  | 
10 |     println!("{}", r_c);
   |                    --- borrow later used here
   |
   = note: consider using a `let` binding to create a longer lived value
```
However, clearly `r_c` does not reborrow from `r_a` nor from `r_b`. Therefore, using it at the end should not affect either of these, but as we can see this is not the case. If one comments out the `println!` on line 10, then compilation succeeds as expected. Playground link [here](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=aed343ce90ea76a5728ef67885f5a6b4)
Repository: yt-dlp
Issue: idollive
Labels: site-request,geo-blocked

### Checklist

- [X] I'm reporting a new site support request
- [X] I've verified that I'm running yt-dlp version **2022.01.21**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that none of provided URLs [violate any copyrights](https://github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and am willing to share it if required

### Region

South Korea

### Example URLs

Single:https://idollive.tv/watch?id=M0121CN063PPV00
Playlist:https://idollive.tv/category?id=C000258340

### Description

Restricted access to South Korea

### Verbose log

```shell
C:\Users\yerin>yt-dlp https://idollive.tv/watch?id=M0121CN063PPV00 --verbose
[debug] Command-line config: ['https://idollive.tv/watch?id=M0121CN063PPV00', '--verbose']
[debug] Encodings: locale cp936, fs utf-8, out utf-8, err utf-8, pref cp936
[debug] yt-dlp version 2022.01.21 [f20d607] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19043-SP0
[debug] exe versions: ffmpeg n4.4-177-gc989427c16-20211008 (setts), ffprobe n4.4-177-gc989427c16-20211008
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {'https': 'http://127.0.0.1:10081', 'http': 'http://127.0.0.1:10081'}
[debug] [generic] Extracting URL: https://idollive.tv/watch?id=M0121CN063PPV00
[generic] watch?id=M0121CN063PPV00: Requesting header
WARNING: [generic] Falling back on generic information extractor.
[generic] watch?id=M0121CN063PPV00: Downloading webpage
[generic] watch?id=M0121CN063PPV00: Extracting information
[debug] Looking for video embeds
ERROR: Unsupported URL: https://idollive.tv/watch?id=M0121CN063PPV00
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1367, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1437, in __extract_info
  File "yt_dlp\extractor\common.py", line 612, in extract
  File "yt_dlp\extractor\generic.py", line 3966, in _real_extract
yt_dlp.utils.UnsupportedError: Unsupported URL: https://idollive.tv/watch?id=M0121CN063PPV00
```
Repository: vscode
Issue: Trimming final newline is not POSIX standards compliant
Labels: debt,under-discussion

<!-- ⚠️⚠️ 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

<!-- 🪓 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.63.2
- OS Version: Ubuntu 20.04

Steps to Reproduce:

1. Type anything in the editor and save it to a file
2. Run `cat` to read the file

I am becoming increasingly annoyed by Visual Studio Code users because files are created without final newline.

![Screenshot from 2022-01-21 19-23-19](https://user-images.githubusercontent.com/194685/150572492-fb0499a8-d917-4e82-afcf-823a33aa6162.png)

This results in mangled shell prompt as shown above. In a sane world shell prompt starts on a new line.

Feel free to do this on Windows, but don't bring this madness to Linux and Mac. You're just wasting our time explaining how to turn off trimming and why trimming is bad.

In POSIX line ends with newline:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
and text file consists of 0 or more lines: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_403
Hence text file ends with a newline character
Repository: go
Issue: cmd/go: provide a convenient way to iterate all packages in go.work workspace
Labels: NeedsDecision,FeatureRequest,modules

`go.work` makes it easier to work with multiple modules.

Often users want to run tests or analysis for all packages in their workspace. For a single module case, this can be easily achieved by using `./...` pattern. Currently, however, there is no equivalent of `./...` in workspace mode. So users need to run go commands from inside of each individual module, or supply the paths for each module directories listed in `go.work`. (e.g. `go test -v  $(go list -f '{{.Dir}}/...' -m | xargs)`).

We need to figure out how to offer `./...`-equivalent behavior when working with `go.work.

My personal preference is to reuse`./...` (VSCode Go uses `./...` pattern to implement workspace-wide test, lint, coverage computation, etc).

p.s. I noticed the issue about clarifying the meaning of `...` in module mode is still open https://github.com/golang/go/issues/37227
Repository: vscode
Issue: Tangle in `/editor/`
Labels: debt,editor-core,engineering

ref #140874

![image](https://user-images.githubusercontent.com/5047891/150581753-4bf9d521-ee89-4eb1-a4c7-a1b0e60e7a47.png)
Repository: opencv
Issue: Failed nightly build master_noOCL_noICV_noSSE-win64-vc14-debug (2022-12-25)
Labels: bug,category: dnn

[Nightly build](http://pullrequest.opencv.org/buildbot/builders/master_noOCL_noICV_noSSE-win64-vc14-debug/builds/11775).

Caused by stack overflow in these tests:
- Test_Int8_nets.EfficientDet/0
- Test_TensorFlow_nets.EfficientDet/0

Message:

```
unknown file: error: SEH exception with code 0xc00000fd thrown in the test body.
```

Recursion is not infinite but it is large.
Primary recursion code (`getLayerShapesRecursively` call): https://github.com/opencv/opencv/blob/4.5.5/modules/dnn/src/dnn.cpp#L3853
Repository: rust
Issue: Rust's LLVM coverage map generation should not add an unused function that doesn't have counter regions
Labels: C-cleanup,A-code-coverage

#93144 addressed an issue where some uncallable functions could show up in the list of unused functions. The coverage map generator adds coverage regions for unused functions (so coverage reports show these functions are not covered) and generates a function stub required by LLVM, and associates the coverage regions computed from the MIR.

Certain types of functions generate no coverage regions. This only seems to be the case for functions that are never called, so they are always in the unused function list.

#93144 fixed the main issue, so we no longer include those functions in the coverage map, but we are still generating the unused function stub.

What we should do, instead, is: In `add_unused_functions()` check if an unused function has `counter_regions`, and don't call `define_unused_fn()` if there are none.

Then, in the `finalize()` loop on the function_coverage_map, we should never see unused functions with no coverage. If we do, that's an error. So we can change the `if coverage_mapping_buffer.is_empty()` block to just assert that it is never empty:

```rust
        assert!(
            !coverage_mapping_buffer.is_empty(),
            "Every `FunctionCoverage` should have at least one counter"
        );
```

The reason we chose not to do this in #93144 is, computing the `counter_regions` variable is a non-trivial process, implemented in the function `get_expressions_and_counter_regions()`. We don't want to perform that process more than once per function, and `add_unused_functions()` only needs to know if counter_regions *would be returned*, without actually returning them.

I'd like to work out a clean way to find this out without duplicating too much of the decision logic used to generate that `counter_regions` iterator.
Repository: go
Issue: cmd/go: `go mod tidy` ignores `go.work` file
Labels: Thinking,NeedsDecision,GoCommand,modules

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.18beta1 linux/amd64
</pre>

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/bozaro/.cache/go-build"
GOENV="/home/bozaro/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/bozaro/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/bozaro/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go-1.18"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.18/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18beta1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/bozaro/github/go-work-play/tools/go.mod"
GOWORK="/home/bozaro/github/go-work-play/go.work"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4292218461=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

Minimal reproducing repository: https://github.com/bozaro/go-work-play/tree/go-mod-tidy

Full script:
```
$ git clone https://github.com/bozaro/go-work-play.git -b go-mod-tidy
$ cd go-work-play/tools
$ go mod tidy
go: finding module for package github.com/bozaro/go/go-work-play/shared/foo
github.com/bozaro/go/go-work-play/tools/hello imports
	github.com/bozaro/go/go-work-play/shared/foo: module github.com/bozaro/go@latest found (v0.0.0-20200925035954-2333c6299f34), but does not contain package github.com/bozaro/go/go-work-play/shared/foo
```

### What did you expect to see?
I expect `go.mod` and `go.sum` updated with current working copy state.

### What did you see instead?
I see that `go mod tidy` try to get modules for `shared` go modules from repository ignoring `go.work` content.