sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: yt-dlp
Issue: stdout & throttled-rate: broken output
Labels: enhancement,core:downloader

I noticed that when passing the `--throttled-rate` argument, in case of low download limit yt-dlp will restart the download and start writing to the stdout again from the beginning of the video!
This can lead to a broken file when naively dumping the stdout!

Can be tested by using either a slow connection or a slow proxy and running n downloads in parallel:

- `yt-dlp <VIDEO> -f best --throttled-rate 2M --proxy "$proxy" -o - > ./out1.mp4`
- `yt-dlp <VIDEO> -f best --throttled-rate 2M --proxy "$proxy" -o - > ./out2.mp4`

If one of those processes reports to the stderr
`WARNING: The download speed is below throttle limit. Re-extracting data`
then, the resulting file will be bigger (since it downloaded some bits & then started again from the beginning)

## Proposed solution
Would it be possible to star the download from the point that it was stopped and start writing to `stdout` from where it stopped?
Repository: pytorch
Issue: Normalize handling of scalar arguments
Labels: feature,module: tests,triaged,better-engineering

Currently pytorch does not have standard way of handling operations that can optionally support Tensor or Scalar arguments (such as `add`). The implementation is always the same - scalar argument is wrapped into 0-d tensor before being passed to the actual kernel, but this wrapping happens at the different levels of the stack
1) For operations in the python parser allow-list ('add' and 'mul' for example) it happens during python parsing. Note that when aliases for ops from allow-list are added to native_functions.yaml, but not to allow list, since there are no overloads accepting scalars, and no wrapping took place during python arg parsing, it results in error (see #65868)
2) Some operations have overloads in native_functions.yaml. To support scalar as either argument of a binary pointwise operation, one would need 4 overloads (or 3, if we ignore scalar-scalar) which is not ideal, and for some ops overloads are missing (e.g. there's torch.eq(tensor, scalar), but not torch.eq(scalar,tensor)). This removes the need for special handling in python arg parsing, at the cost of manually defining and implementing overloads.
3) Yet other operations wrap their arguments in other seemingly random places, e.g. indexing ops wrap their scalar arguments in python_variable_indexing.cpp

Proposal: 
We could extend native_functions.yaml syntax to indicate that Tensor arguments for functions can be scalars, and extend codegen to generate all the necessary overloads, wrapping scalar arguments and dispatching to kernels accepting tensors only. Note that this loses a bit of efficiency for kernels that could potentially have special scalar handling, as this logic would have to be implemented by inspecting arguments, but that also happens today (e.g. binary arithmetic operators on cuda have special handling for scalar arguments, but that happens inside the tensor-tensor kernel implementation, and not in the custom overload). Script wouldn't require anything additional, as there will be all the overloads that can be called as at:: functions (?)
This violates the invariant "one native_functions entry - one schema", but it's probably acceptable. 

As a second (parallel) step, we should improve testing of at least binary pointwise operations to make sure they accept scalar arguments as expected, as recently there's been at least to bugs in this behavior, with torch comparison functions, and `multiply` alias (linked above). 

cc @mruberry @ezyang, @bdhirsh, @mruberry
Repository: flutter
Issue: flutter run help offers commands not available in profile mode
Labels: c: new feature,tool,has reproducible steps,P3,found in release: 2.8,found in release: 2.9,team-tool,triaged-tool

1. run any app in profile mode: `flutter run --profile`
2. Press `h` to see a list of available commands:

```
v Open Flutter DevTools.
s Save a screenshot to flutter.png.
w Dump widget hierarchy to the console.                                               (debugDumpApp)
t Dump rendering tree to the console.                                          (debugDumpRenderTree)
S Dump accessibility tree in traversal order.                                   (debugDumpSemantics)
U Dump accessibility tree in inverse hit test order.                            (debugDumpSemantics)
P Toggle performance overlay.                                    (WidgetsApp.showPerformanceOverlay)
a Toggle timeline events for all widget build methods.                    (debugProfileWidgetBuilds)
M Write SkSL shaders to a unique file in the project directory.
h Repeat this help message.
c Clear the screen
q Quit (terminate the application on the device).
```

Some of these commands don't do anything. Namely, I tried `t` and `w`, which don't print anything useful in profile mode. They should probably be just omitted from the help text.
Repository: neovim
Issue: statusline: make strings that come from expressions not being evaluated by fillchars 
Labels: enhancement,documentation,needs:discussion,statusline

### Feature already in Vim?

No.

### Feature description

Let's start with an example, save the following to a file:
```vim
set laststatus=2
set fillchars=stl:-
function My_neat_stl()
  return "nice stl"
endfunction
let &l:stl='%{My_neat_stl()}'
```
Then do `:so %` to source that file.
You'll notice that the output will be something like `nice-stl-----(...)`.

I think this should not happen. By returning certain string from a function I expect it to be exactly as I returned it. It would be nice if it that was the case or if there was a way to at least escape that space so that it continues to be one in the statusline.
Repository: flutter
Issue: Improve handling of the Java version set by the Flutter tool
Labels: platform-android,t: gradle,P2,team-android,triaged-android

Once the Flutter template files start using Gradle/AGP 7.0.0, Java 11 is required. 
Until now, Java 8 has been the default JVM version from Android Studio.

Required changes:
1. Don't assume Android Studio is up to date. Instead, fallback to the [Android Studio version](https://github.com/flutter/flutter/blob/e6535f6da1a2649b46a3ed1318def576ad4fb87a/packages/flutter_tools/lib/src/android/android_sdk.dart#L415-L416).
2. Select the [JVM version](https://github.com/flutter/flutter/blob/e6535f6da1a2649b46a3ed1318def576ad4fb87a/packages/flutter_tools/lib/src/android/android_sdk.dart#L430) based on the Gradle version used by the project being built.
3. Add a user-friendly error message for [gradle_errors](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/android/gradle_errors.dart). Example:
```
Your build failed because you are using a version of Java that is incompatible with the Gradle version used in the current project.

To fix this problem, go to https://<download-url-for:macos|window|linux>, and install Java <version>.

Once installed, re-run this command.
```
Repository: go
Issue: net/http: TestServeHTTP10Close failure with "body not closed" 
Labels: NeedsInvestigation

```
--- FAIL: TestServeHTTP10Close (12.66s)
    serve_test.go:1096: body not closed after 5s
FAIL
FAIL	net/http	18.149s
```

`greplogs --dashboard -md -l -e '(?ms)FAIL: TestServeHTTP10Close.*body not closed after' --since=2020-10-20`

[2021-10-12T11:00:47-9c1dbdf/solaris-amd64-oraclerel](https://build.golang.org/log/bf5407defa60d82763cd7f03f64cb483257578ad)

It isn't obvious to me whether this was a test flake due to a slow builder or something more serious. But it also isn't obvious to me why the test has a 5-second timeout — the hard-coded timeout appears to date to [CL 4235056](https://golang.org/cl/4235056), and neither the code review thread nor the code indicates the logic behind it.

CC @neild
Repository: pytorch
Issue: BatchNorm runtimeError: one of the variables needed for gradient computation has been modified by an inplace operation
Labels: high priority,triage review,oncall: distributed,better-engineering,module: ddp

## 🐛 Bug

Due to broadcasting of the buffers in DDP batchnorm will throw a "gradient computation has been modified by an inplace operation" which is not very intuitive. A simple repro is to use DDP twice in the forward pass which will broadcast twice and modify the buffer in place. Example is shown below.

## Example

```python
import os
import torch
import torch.nn
import torch.distributed

os.environ["MASTER_ADDR"] = "localhost"
os.environ["MASTER_PORT"] = "45678"
world_size = 1
rank = 0

torch.distributed.init_process_group(backend='gloo', rank=rank, world_size=world_size)
device = 'cuda'

net = torch.nn.BatchNorm1d(128)
net.to(device=device)
net = torch.nn.parallel.DistributedDataParallel(
    net,
    device_ids=[rank],
    output_device=rank,
)
net.train()

input1 = torch.rand(64, 128, device=device)

o = net(input1).sum() + net(input1).sum()
o.backward()
```

## Workarounds
Any of the following options will correct the issue:
- Replace `BatchNorm` with [SyncBatchNorm](https://pytorch.org/docs/stable/generated/torch.nn.SyncBatchNorm.html)
- Set `broadcast_buffers=False` in DDP
- Don't perform double forward pass with `BatchNorm`, move within module.

cc @ezyang @gchanan @zou3519 @bdhirsh @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: storybook
Issue: Add support for configuring cache directory
Labels: feature request,core

**Is your feature request related to a problem? Please describe**

In our CI environment, we use a dedicated cache for Yarn dependencies and it's not possible for us to parallelize saving/restoring multiple caches and running build steps, while including Storybook's cache, because it's racing to write to `node_modules/`. There are also compounding issues with permissions.

**Describe the solution you'd like**

Most of the packages are now using `find-cache-dir` which permits configuring `CACHE_DIR`. This is really useful, as it allows us to hoist read/write operations outside file trees separately from Yarn to speed things up. Substituting the following with `find-cache-dir` would be very useful:

https://github.com/storybookjs/storybook/blob/db4901a052ce99211a7bf2c1a5eed83b58ee89e1/lib/core-common/src/utils/resolve-path-in-sb-cache.ts#L4-L25

**Describe alternatives you've considered**

Alternatively, just introducing support for `CACHE_DIR` would be a viable solution, if it's accepted.

**Are you able to assist to bring the feature to reality?**

Yes, I would like to implement this feature if someone can hint at what would be acceptable, either just introducing `CACHE_DIR` in place or using something like `find-cache-dir`. Storybook is listed in the section of adopters https://github.com/avajs/find-cache-dir#adopters, so there might be some historical reasons why `find-cache-dir` was abandoned. 

**Additional context**

Here is how `find-cache-dir` [currently works](https://github.com/avajs/find-cache-dir/blob/21ae9442c2188b5c6f2a22219af779a2476e77a0/index.js#L44-L67).
Repository: create-react-app
Issue: How can I set custom http headers in react app frontend?
Labels: stale,needs triage

I've already created customer headers for API calls but I need to block my website from being iframed and for this, I need to pass the X-Frame-Options header.
Repository: TypeScript
Issue: compiler option to fallback to `unknown` instead of `any` when failing to resolve a type
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms
unknown instead of any error
<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [X] This wouldn't change the runtime behavior of existing JavaScript code
* [X] This could be implemented without emitting different JS based on the types of the expressions
* [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [X] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion
currently, when a type fails to resolve, there's an error in an external lib suppressed by `skipLibCheck`, or an error suppressed by `@ts-expect-error`/`@ts-ignore`, the type falls back to `any`

it would be nice if there was a compiler option that changes this behavior to `unknown` instead of `any`. it would make [this feature](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#display-unresolved-types) even more useful too
<!-- A summary of what you'd like to see added or changed -->

## 📃 Motivating Example
currently, `@ts-ignore` and `@ts-expect-error` comments aren't exposed in `.d.ts` files. one of the concerns with changing this functionality seems to be that it can result in `any` leaking into the codebase (see https://github.com/microsoft/TypeScript/issues/38628#issuecomment-941223824).
<!--
  If you were announcing this feature in a blog post, what's a short explanation that shows
  a developer why this feature improves the language?
-->

## 💻 Use Cases
- makes it safer to use `skipLibCheck`, for example if a lib was compiled using a different version of typescript which causes errors on the version you're using
- makes it a little bit safer to use `@ts-expect-error`
<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->
Repository: TypeScript
Issue: ban usages of `@ts-expect-error` and `@ts-ignore` in places that would get stripped when emitting `.d.ts` files
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

ts-ignore ts-expect-error d.ts 

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [X] This wouldn't change the runtime behavior of existing JavaScript code
* [X] This could be implemented without emitting different JS based on the types of the expressions
* [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [X] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion
`@ts-ignore` and `@ts-expect-error` comments that end up exposed in `.d.ts` files are stripped when compiled, which results in downstream errors that can go undetected until someone tries to use your package. see https://github.com/microsoft/TypeScript/issues/38628#issuecomment-941223824

it would be nice to have an option to ban the comments in type definitions and signatures, where they'd need to be exposed in the `.d.ts` files.
<!-- A summary of what you'd like to see added or changed -->
Repository: PowerToys
Issue: WinAPI function MouseScroll doesnt work due to things like xmouse style apps
Labels: Issue-Bug,Product-Settings,Area-User Interface,Needs-Team-Response,Area-App Compat

### Microsoft PowerToys version

0.47.1

### Running as admin

- [X] Yes

### Area(s) with issue?

General, Awake, ColorPicker, FancyZones, FancyZones Editor, Image Resizer, Keyboard Manager, PowerRename, PowerToys Run, Settings

### Steps to reproduce

Use app that sends WinAPI function to the specific window. In my case - it is AutoHotkey language script.

command [(DocsMicrosoft link)](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage)
**SendMessage, 0x20A, "WheelUp", (mY<<16)|mX,, ahk_id %WinID%**

, where 
0x20A = WM_MOUSEWHEEL
WinID = windows ID (handle)


I think it was working prion 0.47 version.


### ✔️ Expected Behavior

Should scroll content in PowerToys UI 

### ❌ Actual Behavior

does nothin

### Other Software

AutoHotkey v1.1.32.00
```
#Singleinstance force
#MaxHotkeysPerInterval 800
#InstallKeybdHook
#InstallMouseHook
#NoEnv         
SendMode Input
SetTitleMatchMode, 2 

TaskBarID := WinExist("ahk_class Shell_TrayWnd")

WheelUp::  ; Volume Control by mouseweel rotation on TaskBar
    MouseGetPos,,,Hwnd
    WinGetClass, Up_Down_Win_Class, ahk_id %Hwnd% ; get window class under mouse cursor

    If Up_Down_Win_Class in Windows.UI.Core.CoreWindow,ApplicationFrameWindow
	; if it is "Start" button
	{
		Send, {WheelUp}
		Return ; finish hotkey
	}
  If(Hwnd = TaskBarID)
    {
	SoundSet, +5
	GoSub, Show_Sound
	}
  Else
    Goto, All_Up_Down
Return

WheelDown::  ; Volume Control by mouseweel rotation on TaskBar
    MouseGetPos,,,Hwnd
    WinGetClass, Up_Down_Win_Class, ahk_id %Hwnd% ; get window class under mouse cursor

    If Up_Down_Win_Class in Windows.UI.Core.CoreWindow,ApplicationFrameWindow 
	; if it is "Start" button
	{
		Send, {WheelDown}
		Return 
	}
  If(Hwnd = TaskBarID)
    {
	SoundSet, -5
	GoSub, Show_Sound
	}
  Else
    Goto, All_Up_Down
Return

Show_Sound:
return

All_Up_Down: ; Scrolling content in the window under the mouse pointer, instead of the active window.
    Critical
    If(A_ThisHotkey!=A_PriorHotkey || A_TimeSincePriorHotkey>40) 
        Scroll:= A_ThisHotkey="WheelUp" ? 120<<16 : -120<<16   
    Else                                                        
        Scroll:= A_ThisHotkey="WheelUp" ? 240<<16 : -240<<16    

    CoordMode, Mouse, Screen
    MouseGetPos, mX, mY
    mX &= 0x00000000FFFFFFFF
    Point := mX | mY<<32
    WinID:=DllCall("WindowFromPoint", "int64", Point, "ptr")   ; ID (handle) 
    Point := mX | (mY-20)<<32                                  
    NextID:=DllCall("WindowFromPoint", "int64", Point, "ptr")
    mX &= 0x0000FFFF
    SendMessage, 0x20A, %Scroll%, (mY<<16)|mX,, ahk_id %WinID%   ; 0x20A = WM_MOUSEWHEEL
    If (!ErrorLevel && (WinID != NextID))
        SendMessage, 0x20A, %Scroll%, (mY<<16)|mX,, ahk_id %NextID%
Return

```
Repository: create-react-app
Issue: SyntaxError: unexpected end of input 
Labels: stale
Repository: flutter
Issue: [cupertino] Update `CupertinoButton` & `CupertinoNavigationBar` documentation
Labels: framework,f: cupertino,d: api docs,d: examples,P2,team-design,triaged-design

 More details in https://github.com/flutter/flutter/pull/91602#pullrequestreview-777815883
 

>  A new CupertinoButton constructor for this special case may not be warranted since it's only setting the padding and minSize defaults. The docs already call out that the padding will need to be different in a CupertinoNavigationBar and it's not clear the extra constructor adds much over documentation.
> 
> Instead, we could extend the documentation on CupetinoButton.padding and CupertinoNavigationBar.leading to include a doc snippet to make it more likely that people will see it in the right context.

- [ ] Update `CupertinoButton.padding` & `CupertinoNavigationBar.leading`
- [ ] Add code snippets that show case `CupertinoButton`'s correct usage  in the `CupertinoNavigationBar`
- [ ] Add Leading/Trailing examples for `CupertinoNavigationBar` with Align Widget
Repository: terminal
Issue: `SetConptyOption` API (was: Ctrl-Backspace doesn't respect word delimiters even though normal cmd window does)
Labels: Issue-Feature,Product-Conpty,Area-Server

### Windows Terminal version (or Windows build number)

1.10.2714.0

### Other Software

cmd in a Windows Terminal profile.

### Steps to reproduce

I followed the steps [here](https://github.com/microsoft/terminal/issues/4986) (that is, I set the HKCU\Console\WordDelimiters registry key for cmd). Now if I open a regular cmd window, Ctrl-Backspace respects those word delimiters. But if I do the same in a cmd profile in Windows Terminal, it doesn't respect those delimiters. I've tried making Windows Terminal's word delimiters the same as those in that registry key, restarting Windows Terminal and restarting my machine, but it still doesn't work.

### Expected Behavior

If the cursor is at the end of the following line:

C:\>cd users\foo\bar

and I press Ctrl-Backspace, I expect it to delete just the word "bar".

### Actual Behavior

Instead, it deletes the entire string users\foo\bar. This only happens in a cmd profile in Windows Terminal. In a normal cmd window, it only deletes the word "bar" as I expect.
Repository: flutter
Issue: Deprecated member documentation links to generic deprecation documentation
Labels: framework,d: api docs,a: quality,P3,team-framework,triaged-framework

If you hover over a deprecated member in Android Studio, it shows you a hyperlink to more documentation.  For example:

<img width="603" alt="Screen Shot 2021-10-12 at 5 27 22 PM" src="https://user-images.githubusercontent.com/15253456/137046692-b47439b1-df9f-4a51-8f18-62ddde25e990.png">

However, if you click on that link, expecting to see more info about this particular deprecation, you instead get taken to https://dart.dev/tools/diagnostic-messages#deprecated_member_use, which isn't likely to be what you expected or wanted.

This can be seen in the following video: https://youtu.be/kAEodUyQIb0

We should support a documentation URL attribute to the deprecation annotation, which could then be used in the IDE to link to useful info about the deprecation they're running into.