sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Add Default Lint to Ensure Match Arm Bindings do not Shadow Local Variables.
Labels: C-enhancement,A-lints,A-diagnostics,T-compiler,D-newcomer-roadblock

Given the following code:

```rust
fn foo(x: u32) -> u32 {
  let a = 100;
  let b = 200;
  let c = 300;

  match x {
      c => 3,
      b => 2,
      a => 1,
      _ => 0
  }
}
```

we currently emit:

```rust
warning: unreachable pattern
 --> <source>:8:7
  |
7 |       c => 3,
  |       - matches any value
8 |       b => 2,
  |       ^ unreachable pattern
  |
  = note: `#[warn(unreachable_patterns)]` on by default
```

However, in this case, the developer was likely confused and thought they were matching on the value of `c`, not creating a binding of with name `c`. We should emit something more similar to:

```rust
warning: match arm binding shadows local binding
 --> <source>:8:7
  |
7 |       c => 3,
  |       ^
  = note: shadows local binding `c` declared at <source>:4:7
  = note: `#[warn(arm_binding_shadows_local)]` on by default

```
Repository: go
Issue: x/build/cmd/gopherbot: should not parse comments inside most markdown
Labels: Builders,NeedsFix

In https://github.com/golang/go/issues/36508#issuecomment-576915859 @ianlancetaylor told somebody how to remove a label later and put the instructions in backticks but gopherbot still parsed it.

It should try a bit to avoid finding directives in formatted text.

/cc @andybons @dmitshur @toothrot
Repository: pytorch
Issue: [JIT] Make `torch.jit.script` work on all objects which we can represent as IValues
Labels: oncall: jit,triaged

## 🚀 `torch.jit.script` on all representable mutable PyObjects 

In our current implementation python objects are copied between on the boundary between the JIT and python. This results in issues like https://github.com/pytorch/pytorch/issues/31129 and https://github.com/pytorch/pytorch/issues/30421, and we've had internal reports of users passing a python dictionary into a mutating method. Example
```
x = [1]
def foo(x: List[int]):
    x.append(2)
foo(x)
print(x)
# 1
```

One solution here is to make `torch.jit.script` work on all objects which we can reprsent as IValues. `torch.jit.script([1])` would return a `c10::List` with all the python bindings you would expect for a list, and the same for `c10::Dict`. 
```
x = torch.jit.script([1])
def foo(x: List[int]):
    x.append(2)
foo(x)
print(x)
# 1, 2
```

This exact api & warnings etc would still have to be figured out.




cc @suo
Repository: create-react-app
Issue: Evaluate esModule options in webpack loaders
Labels: issue: needs investigation

`css-loader` and `style-loader` now support a `esModule` option to emit to ESM instead of CJS, which can improve tree shaking/module concatenation in webpack, but I haven't had a chance to see if it's compatible with our other CSS loaders.

`file-loader` and `url-loader` now enable `esModule` by default, but have dropped support for node < `10.13.0`.

Let's see if there's any benefit to enabling these in our webpack config.
Repository: go
Issue: cmd/cover: (html output) UI accessibility issues, unfriendly to screen reader
Labels: ExpertNeeded,help wanted,NeedsInvestigation


### What version of Go are you using (`go version`)?

go 1.13, go 1.14

Recently on golang-nuts, "Is it possible to get code coverage information in a way that does not assume you can see color?"

https://groups.google.com/g/golang-nuts/c/DY4O9UXMr9M?pli=1

In this case, "see color" refers to a screen reader for a totally blind person.

This is a bug, not an enhancement, because accessibility is important.
It does need someone who knows something about UI accessibility to look at it.
Repository: flutter
Issue: CupertinoPageRoute. Left to Right Animation Transition support ?
Labels: framework,f: cupertino,f: routes,c: proposal,P3,team-design,triaged-design

## Use case

Before opening a PR, i would like to know if flutter team is interested in a flag we could pass to `CupertinoPageRoute` to decide what direction we want the animation to perform:

- Right to left (current behavior)
- Left to Right (not implemented)

I hacked around with https://github.com/flutter/flutter/compare/master...kwent:cupertino_page_route_left_to_right and it's working fine.

Thanks again for this amazing library !

Regards
Repository: storybook
Issue: Addon docs fails to render prop table correctly when type is imported from a .tsx file (.ts works as expected)
Labels: question / support,typescript,addon: docs,block: props

Works 👍  (table shows both `other` and `foo` props)


```typescript
// Bar.ts
export type BarProps = {
  foo?: string
}

// Other.tsx

import { BarProps } from './Bar'

type OtherProps = BarProps & {
 other?: number
}

const Other = (props: OtherProps) => <span {...props}>Other</span>
```

---

Doesnt work 👎🏼 (table doesnt render at all)

```typescript
// Bar.tsx
export type BarProps = {
  foo?: string
}

// Other.tsx

import { BarProps } from './Bar'

type OtherProps = BarProps & {
 other?: number
}

const Other = (props: OtherProps) => <span {...props}>Other</span>
```

---

Doesnt work 👎🏼 (table renders, but shows `foo` as type `any`)

```typescript
// Bar.tsx
export type BarProps = {
  foo?: string
}

// Other.tsx

import { BarProps } from './Bar'

type OtherProps = Pick<BarProps, 'foo'> & {
 other?: number
}

const Other = (props: OtherProps) => <span {...props}>Other</span>
```
Repository: opencv
Issue: OpenCV Seamless Clone CUDA Support
Labels: feature,priority: low,category: gpu/cuda (contrib)

`void cv::seamlessClone` works very well to blend images seamlessly. However this process takes more time than other OpenCV operation. OpenCV image processing can be accelerated using OpenCV with GPU support like `cv::cuda::resize`. All of the supported reference can be found here https://docs.opencv.org/master/d1/d1a/namespacecv_1_1cuda.html. 

As we can see, there's no support for SeamlessClone function. Is there any CUDA support for the function? If no, will there be any development for it?
Thank you
Repository: flutter
Issue: GestureDetector's velocity is always 0.0 on IOS with VoiceOver.
Labels: platform-ios,framework,a: accessibility,f: gestures,has reproducible steps,P2,found in release: 3.7,found in release: 3.8,team-ios,triaged-ios

Device: IPhone8
OS: IOS

1. Turn on VoiceOver.
2. Swipe with three fingers.

**Expected results:** 
Velocity from GestureDetector.

**Actual results:**
Velocity is 0.0.

```dart
GestureDetector(
  onHorizontalDragEnd: (details) {
    print('horizontal');
    print(details.primaryVelocity); // 0.0
  },
  onVerticalDragEnd: (details) {
    print('vertical');
    print(details.primaryVelocity); // 0.0
  },
);
```

<details>
  <summary>Logs</summary>

**flutter run --verbose**
```
[   +5 ms] flutter: horizontal
[   +1 ms] Notification from VM: {streamId: Stdout, event: {type: Event, kind: WriteEvent, isolate: {type: @Isolate, id: isolates/4114029510212103, name:
main, number: 4114029510212103}, timestamp: 1579686758678, bytes: Cg==}}
[        ] Notification from VM: {streamId: Stdout, event: {type: Event, kind: WriteEvent, isolate: {type: @Isolate, id: isolates/4114029510212103, name:
main, number: 4114029510212103}, timestamp: 1579686758678, bytes: Zmx1dHRlcjogMC4w}}
[        ] Notification from VM: {streamId: Stdout, event: {type: Event, kind: WriteEvent, isolate: {type: @Isolate, id: isolates/4114029510212103, name:
main, number: 4114029510212103}, timestamp: 1579686758678, bytes: Cg==}}
[        ] flutter: 0.0
```

**flutter analyze**
No analyze issues.

**flutter doctor -v**
```
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale ko-KR)
    • Flutter version 1.12.13+hotfix.5 at /Users/maximilian/devkit/flutter
    • Framework revision 27321ebbad (6 weeks ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/maximilian/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 33.4.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] Connected device (1 available)
    • iPhone • 5ac729d286d9125808cfeb83e9a358fd3722602e • ios • iOS 13.3

• No issues found!
```

</details>
Repository: flutter
Issue: frameBuilder or loadingProgressBuilder error handling support
Labels: framework,customer: dream (g3),c: proposal,P3,team-framework,triaged-framework

## Use case

The spec for image loading for our product specifies that there is a different placeholder image shown before an image is loaded and when the image loading fails. Let's call it an errorPlaceholder.

Implementing this with the current Image widget is not possible because there's no way to access the onError callback from the underlying ImageStream. Currently, this requires re-implementing the Image widget.

## Proposal

Add a way in frameBuilder or the loadingProgressBuilder to access the onError callback of the underlying stream.
Repository: vscode
Issue: Editor title being read out once suggestion is accepted
Labels: bug,upstream,macos,accessibility,windows

found by @pawelurbanski 

1. Open the suggest widget
2. Accept a suggestion
3. Editor aria label is begin read out :bug:

The issue I believe is that the focus moves back to the editor which makes ScreenReaders read out the editor aria label. I am not sure how to tackle this and am open to suggestions @pawelurbanski 

Assigning to January so I look into fixing this week.
Can reproduce both with NVDA and VoiceOver on mac.
Repository: go
Issue: libgo: SEGV in runtime test TestChan on ppc64le
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.14beta1 gccgo (GCC) 10.0.1 20200122 (experimental) linux/ppc64le
</pre>

### Does this issue reproduce with the latest release?
This started happening in Go 1.13 and was reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92564. Continues to happen in Go 1.14beta1


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
linux/ppc64le
</pre></details>

### What did you do?
Run the libgo tests
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->



### What did you expect to see?
No failures


### What did you see instead?
=== RUN   TestChan
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x2 addr=0x7214a61c0000 pc=0x1008eb24]

More details, stacks, and gdb information can be found in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92564
Repository: rust
Issue: Error message [E0423] "expected value, found built-in attribute `start`" is confusing
Labels: C-enhancement,A-diagnostics,A-resolve,T-compiler,D-confusing

[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d80302b4633e9c6b07744fd31e1a2330):

```rust
fn one_char_range(s: &str, offset: usize) -> &str {
    &s[start..start + 1]
}
```

```
error[E0423]: expected value, found built-in attribute `start`
 --> src/lib.rs:2:8
  |
2 |     &s[start..start + 1]
  |        ^^^^^ not a value
```

rustc thinks maybe I mean `#[start]`. But that is silly.

And it was confusing to me as a user. I know there's an attribute `#[start]`, but presented like that without the `#[]` punctuation, I didn't recognize it, even though the message says exactly what it means!

`rustc --explain E0423` didn't help.

I think E0423 is confusing here, and rustc should fall back on E0425 ("cannot find the value `start` in scope").
Repository: TypeScript
Issue: Declaration includes incorrect 'any' types for inferred nested property members
Labels: Bug

**TypeScript Version:**  3.5.3

**Search Terms:** declaration any inferred type

**Code**

I'm using some helper functions to construct type guards where the type predicate is inferred:
```ts
const isObject = (value: unknown): value is { [key: string]: unknown } =>
    typeof value === 'object' && value !== null
  
const isObjectWith = <S>(
  predicates: {
    readonly [P in keyof Required<S>]: (value: unknown) => value is S[P]
  },
) => (value: unknown): value is S =>
    isObject(value) && entries(predicates).every(([k, p]) => p(value[k]))

const isNumber = (x: unknown): x is number => typeof x === 'number'

const entries = <V extends object>(object: V): ReadonlyArray<readonly [string & keyof V, V[string & keyof V]]> =>
  Object.entries(object) as Array<[string & keyof V, V[string & keyof V]]>

export const isFoo = isObjectWith({
  a: isNumber,
})

export const isBar = isObjectWith({
  b: isFoo,
})
```

**Expected behavior:**
The `.d.ts` file should contain all the inferred property types:
```
export declare const isFoo: (value: unknown) => value is {
    a: number;
};
export declare const isBar: (value: unknown) => value is {
    b: {
        a: number;
    };
};
//# sourceMappingURL=repro.d.ts.map
```

**Actual behavior:**

The `.d.ts` file contains `any` for the nested property type:
```
export declare const isFoo: (value: unknown) => value is {
    a: number;
};
export declare const isBar: (value: unknown) => value is {
    b: {
        a: any;
    };
};
//# sourceMappingURL=repro.d.ts.map
```

Interestingly, if I force TypeScript to "evaluate" the inferred type using a mapped type, I get the correct result:
```
const _isFoo = isObjectWith({
  a: isNumber,
})
type GuardedType<T> = T extends (value: any) =>
  value is infer S ? { [K in keyof S]: S[K] }
  : never
export const isFoo: (value: unknown) => value is GuardedType<typeof _isFoo> = _isFoo
```

**Related Issues:** https://github.com/microsoft/TypeScript/issues/19565
Repository: pytorch
Issue: Don't unnecesarily send cleanup dist autograd context RPCs to other nodes
Labels: module: bootcamp,triaged,better-engineering,module: rpc

## Enhancement: Don't unnecesarily send cleanup dist autograd context RPCs to other nodes
Currently if node A sends an RPC to B to clean up a given dist autograd context, B will propagate this information and send out its own messages too. It could be possible that B pointlessly sends out a message to A, creating an unneeded extra RPC. We can send over the workerId we're getting this message from to avoid this.

This will help us prevent the overhead of one additional RPC when there is such a request.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528 @jjlilley @osalpekar
Repository: TypeScript
Issue: JSDoc doesn't show param info for parameter properties using @param
Labels: Suggestion,Domain: Quick Info,Experience Enhancement

*TS Template added by @mjbvz*

**TypeScript Version**: 3.8.0-beta

**Search Terms**
- quickInfo
- jsdoc

---

<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.41.1 (Commit: 26076a4de974ead31f97692a0d32f90d735645c0)
- OS Version: MacOS Catalina 10.15 (19A602)

Steps to Reproduce:
1. Create a function with a single parameter
2. Add documentation to it with object parameter properties contained.

```javascript
/**
 * Shows a dialog to the user with the given title, content, and performs the onAcceptClick
 * on the accept button press
 *
 * @param {Object} payload - The dialog information to show the user
 * @param {string} payload.title - Title of dialog
 * @param {string} payload.content - Content of the dialog
 * @param {string} [payload.acceptText=null] - Text shown on the accept button
 * @param {Function} [payload.onAcceptClick=null] - Action performed when accept is clicked
 * @param {string} [payload.cancelText=null] - Text shown on the cancel button
 * @param {Function} [payload.onCancelClick=null] - Action performed when cancel is clicked
 */
export const showDialog = (payload) => ({
  type: constants.UPDATE_DIALOG,
  payload,
})
```

All the parameters show for the method signatures but none of the inner parameter descriptions show. e.g. payload.cancelText does not show the text "Text shown on the cancel button" in the hover event dialog.

![Sample](https://user-images.githubusercontent.com/9369196/72921291-04aaca80-3d19-11ea-9b2d-fa34fc932d34.png)

Note as well. Following the sytax defined [here](https://jsdoc.app/tags-param.html#optional-parameters-and-default-values) the default values do not show anywhere within the pop up. (I can make a separate issue if needed)
Repository: godot
Issue: Fail to capture microphone input on macOs - AudioUnitRender error -10863
Labels: bug,platform:macos,topic:audio

**Godot version:**
3.1.1.stable.custom_build

**OS/device including version:**
MacMini - macOS Catalina 10.15.2

**Issue description:**
When trying to record microphone input on macOs it throws an AudioUnitRender error -10863.
![](https://i.imgur.com/g3jVF58.png)

FYI, I already patched the microphone permission on #34338.

**Steps to reproduce:**
Download official demo project Mic Record Demo, plugin a microphone and run the scene.
If you disable Autoplay from AudioStreamRecord it doesn't throw this error.

**Minimal reproduction project:**
https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record
Repository: rust
Issue: Code generation quality for a recursive function
Labels: I-slow,C-enhancement,A-codegen,T-compiler,A-slice-patterns,WG-llvm,C-optimization

After reading [this blog post](https://thomashartmann.dev/blog/feature(slice_patterns)/) recently, I was very happily surprised with the quality of the code generation for the following function : 

```rust
fn middle(xs: &[u32]) -> Option<&u32> {
    match xs {
        [_, inner @ .., _] => middle(inner),
        [x] => Some(x),
        [] => None,
    }
}
```

```asm
example::middle:
        cmp     rsi, 2
        jb      .LBB0_2
        add     rsi, -2
        mov     rax, rsi
        and     rax, -2
        lea     rdi, [rdi + 2*rax]
        add     rdi, 4
        and     esi, 1
.LBB0_2:
        xor     eax, eax
        cmp     rsi, 1
        cmove   rax, rdi
        ret
```

It is amazing what the compiler is able to achieve !

But then, I tried this very slight variation : 

```rust
pub fn middle(xs: &[u32]) -> Option<u32> {
    match xs {
        [_, inner @ .., _] => middle(inner),
        [x] => Some(*x),
        [] => None,
    }
}
```

(the only difference is that we are returning an `u32` instead of an `&u32`)

And the generated code changes dramatically:

```asm
example::middle:
        push    rax
        cmp     rsi, 1
        jbe     .LBB0_1
        add     rdi, 4
        add     rsi, -2
        call    qword ptr [rip + example::middle@GOTPCREL]
        pop     rcx
        ret
.LBB0_1:
        cmp     rsi, 1
        jne     .LBB0_2
        mov     edx, dword ptr [rdi]
        mov     eax, 1
        pop     rcx
        ret
.LBB0_2:
        xor     eax, eax
        pop     rcx
        ret
``` 

Is there something making the optimization harder to apply in the second case, or is it a bug somewhere in the compiler ?
Repository: ant-design
Issue: Affix  is stakable
Labels: 💡 Feature Request,Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
If there are multiple Affix components on the page, they are stakable and will not be overlapped.

### What does the proposed API look like?
add a property: stakable={true | false}


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: LibTorch operates very slowly on data blobs from GPU
Labels: module: performance,module: cuda,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
If `dArray` is a pointer to GPU global memory, you can create a tensor using that poiner as follows:
```C++
1. const size_t N = 10000000;
2. cudaMalloc(&dArray, N * sizeof(float));
3. auto options = torch::TensorOptions().dtype(torch::kFloat32).device(torch::kCUDA);
4. auto torchTensor = torch::from_blob(dArray, torch::IntList(kNumElems), options);
5. torchTensor += 1;
```
Creating the tensor in line 4 takes 1808 us and increasing its value in line 5 takes **3168169** us. The latter value is very large. This probably indicates that there is a considerable overhead involved when we use `from_blob` in the aforementioned fashion. I downloaded binary version of LibTorch from the website and used that to make the C++/CUDA project. The relevant flags in my `CMakeLists.txt` are:

```cmake
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_STANDARD 14)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
set(DEFAULT_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
```


## Environment
```

 - LibTorch Version: 1.4.0 
 - OS (e.g., Linux): Ubuntu 18.04
 - How you installed PyTorch (`conda`, `pip`, source): Downloaded the binary from pytorch.org
 - Build command you used (if compiling from source): N/A
 - Python version: N/A - 3.7.4
 - CUDA/cuDNN version: CUDA: 10.0, cuDNN: 7.6.5
 - GPU models and configuration: TITAN V
 - Any other relevant information:

cc @ngimel @VitalyFedyunin @mruberry
Repository: pytorch
Issue: Tensor.random_ is not implemented for bool on CUDA(but implemented on CPU)
Labels: module: cuda,triaged,module: random

```
In [1]: import torch

In [2]: a = torch.empty((3, 3), dtype=torch.bool, device='cpu')

In [3]: a.random_()
Out[3]:
tensor([[False,  True, False],
        [False,  True,  True],
        [False,  True, False]])

In [4]: a = torch.empty((3, 3), dtype=torch.bool, device='cuda')

In [5]: a.random_()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-5-7b7864c4b98d> in <module>
----> 1 a.random_()

RuntimeError: "random_cuda_range_calc" not implemented for 'Bool'
```

cc @ngimel
Repository: pytorch
Issue: TorchScript C++ API Tracking Issue
Labels: oncall: jit,triaged

Things we need to clean up in the TorchScript C++ API

## 🚀 Feature
- [ ] torch::save and torch::load should work on both C++ serialized models and data created from torch.save/toch.load
- [ ] Simple constructors for Tuple, List, and Dict in the torch namespace `torch::Tuple(<vector of Ivalues>)`, `torch::List(std::vector<T>)`, etc. should work as expected
- [ ] Header file reorganization to make it clearer what is part of the public API (e.g. torch.h should contain declarations for things implemented in the torch:: namespace).

@suo @driazati 

cc @suo