sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Cupertino Mac OS Focus Highlight
Labels: framework,platform-mac,f: cupertino,a: desktop,P3,team-macos,triaged-macos

On Mac OS, when form fields/controls are focused, they also receive a visual highlight effect.  This looks like a light blue outline that animates in.  The animation starts larger than the widget and out of focus, and ends up sharp and just on the outside of the field.

We'll need to add this effect to our Cupertino widgets when running on the Mac OS platform.  Some design details that need to be thought out include:

  * How do we easily include this effect in all related Cupertino widgets without duplicating code? Can we just write a widget and use composition inside these widgets' build methods?
  * If this outline effect is drawn at the same level as the widget, it will be obscured by sibling widgets, since it is larger than the widget it is applied to.  Can we put it in the top level Overlay? Or, will that cause ugliness when the app bar is scrolled over the top of a focused widget?  We may need to add an intermediate Overlay that is below the CupertinoNavigationBar.
  * How will this code know the size **and shape** of the widget it is applied to?  For example, a slider thumb is not a perfect rectangle and the highlight must follow its specific shape, not just its bounding box.

CC  @gspencergoog
Repository: svelte
Issue: scrollX/Y for things other than window
Labels: feature request

Is there a reason why there's no `bind:scrollX` for dom nodes ? I see there are for window. I rolled my own solution, but it felt like it should be supported!
Repository: pytorch
Issue: Expose DifferentiableGraphBackward to python
Labels: oncall: jit,feature,module: autograd,triaged

## 🚀 Feature

Currently, there is no easy way of visualizing the graph generated by autodiff in jit. We want something that could do

```python
import torch

@torch.jit.script
def f(a):
    return (a + 100) * 5

a = torch.tensor(0., requires_grad=True)
result = f(a)

print(result.grad_fn.graph)
```

## Additional context

In autograd, the `Node` for `grad_fn` of a JIT graph is defined as

```
struct DifferentiableGraphBackward : public autograd::Node
``` 
in `torch/csrc/jit/graph_executor.cpp`

This class does not have python correspondence, therefore python only views it as a general `CppFunction`. We need to create a Python class for it so that we could access additional information.

**Please confirm if this feature sounds useful and if yes, assign me to this issue and I will work on it.**

cc @suo @ezyang @SsnL @albanD @zou3519 @gqchen
Repository: pytorch
Issue: Doing rendezvous twice can cause hangs
Labels: oncall: distributed,triaged

## 🐛 Bug

Rendezvous twice using the same file path, could cause version mismatch and hanging.

## To Reproduce

```
rendezvous_iterator = torch.distributed.rendezvous(init_method, self_rank, world_size)
store, self_rank, world_size = next(rendezvous_iterator)

# Might need to insert random delay.

rendezvous_iterator = torch.distributed.rendezvous(init_method, self_rank, world_size)
store, self_rank, world_size = next(rendezvous_iterator)
```

## Fix

Should put some special key in the store to mark the rendezvous has reached, and the same store path could be not used for rendezvous again.

Might need to use `PrefixStore` to supports versioning. Currently, `PrefixStore` is only used to create sub process group.


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528
Repository: pytorch
Issue: We should suggest using as_strided_ instead of set_
Labels: module: docs,triaged

## 📚 Documentation

Here in the description of resize:
`
This is a low-level method. The storage is reinterpreted as C-contiguous, ignoring the current strides (unless the target size equals the current size, in which case the tensor is left unchanged). For most purposes, you will instead want to use view(), which checks for contiguity, or reshape(), which copies data if needed. To change the size in-place with custom strides, see set_().
`

`as_strided_` has clearer semantics than `set_` (which can also change the storage, which isn't relevant for the situation in question.
Repository: rust
Issue: Feature gate for `dyn_compatible_for_dispatch` not suggested
Labels: T-compiler,C-bug,F-dyn_compatible_for_dispatch

Code:

```rust
struct S(Box<dyn Copy>);
```

errors with:

```rust
error[E0038]: the trait `std::marker::Copy` cannot be made into an object
 --> f.rs:1:10
  |
1 | struct S(Box<dyn Copy>);
  |          ^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
  |
  = note: the trait cannot require that `Self : Sized`
```

But it does not suggest adding the feature gate.
Repository: vscode
Issue: Enteraction appending text before the new line
Labels: feature-request,editor-commands

[EnterAction](https://code.visualstudio.com/api/references/vscode-api#EnterAction) Should allow appending text before the new line as well.

What I want to do is when a user press enter in the middle of a string to break it into two lines and concat the string with +

eg:

convert this,
```ballerina
string s = "Press enter here -> <- there"
```

to
```ballerina
string s = "Press enter here ->" 
    + " <- there"
```

But I can only append `+ "` to the string below. No way to add `"` to the string above :(
Repository: TypeScript
Issue: Enhance members of literal type like const array type (e.g. string literal types should have literal length property)
Labels: Suggestion,Awaiting More Feedback

The const array type, its principle members are also be the constant. When define a const array `[number, string, boolean]`, its `length` type be `3`. Also, when access to special index, the type also points the exact const type.

```typescript
function const_array(): void
{
    let elements: [number, string, false] = [3, "something", false];
    let length: 3 = elements.length;

    let first: number = elements[0];
    let second: string = elements[1];
    let third: false = elements[2];
}
```

However, the literal type is not like the const array. When define a literal type "something", its `length` be not `9` but `number`. Also, when access to a special index, the type is not a special literal type but a `string` type.

```typescript
function literal(): void
{
    let word: "something" = "something" as const;
    let length: number = something.length; // not 9 but number

    let first: string = word[0]; // not "s" but string
    let second: string = word[1]; // not "o" but string
    let third: string = word[2]; // not "m" but string
}
```

What about enhancing the literal type to be like the const array type?
Repository: create-react-app
Issue: react-scripts test does not fail when coverage threshold is not met
Labels: issue: bug


### Describe the bug

Utilizing create-react-app, when running tests,

### Did you try recovering your dependencies?

Yes.

### Which terms did you search for in User Guide?

Tests.  Coverage.

### Environment

```
  System:
    OS: macOS 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Binaries:
    Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
    Yarn: Not Found
    npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
  Browsers:
    Chrome: 77.0.3865.120
    Firefox: 69.0.2
    Safari: 13.0.2
  npmPackages:
    react: ^16.8.6 => 16.9.0 
    react-dom: ^16.8.6 => 16.9.0 
    react-scripts: 3.0.1 => 3.0.1 
  npmGlobalPackages:
    create-react-app: 3.0.1
```

### Steps to reproduce

**package.json**

```
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "test:coverage": "npm run test -- --coverage --watchAll=false",
  },
  "jest": {
    "collectCoverageFrom": [
      "src/components/**/*.js",
      "src/state/**/*.js",
      "src/templates/**/*.js",
      "src/routes/**/*.js"
    ],
    "coverageThreshold": {
      "global": {
        "branches": 80,
        "functions": 80,
        "lines": 80,
        "statements": 80
      }
    }
  }
```

Run `test:coverage`, the console shows a message that test coverage failed, but the test passes.


### Expected behavior

If the code coverage thresholds are not met, the console returns a non-zero response.

### Actual behavior

![Screen Shot 2019-10-23 at 10 31 06 PM](https://user-images.githubusercontent.com/45824943/67451027-d831c600-f5e4-11e9-958e-9e449222203b.png)
Repository: TypeScript
Issue: Source Map includes mapping for line ending characters
Labels: Bug

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  Version 3.8.0-dev.20191023

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

source map, source map new line

**Code**

```shell
tsc --inlineSourceMap test.ts
```

test.ts

```ts
console.log('hello');
console.log('world');
```

test.js

```
console.log('hello');
console.log('world');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNyQixPQUFPLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDIn0=
```

Source map breaks down into:

```
"console": test.ts:1:0
".": test.ts:1:7
"log": test.ts:1:8
"(": test.ts:1:11
"'hello'": test.ts:1:12
")": test.ts:1:19
";": test.ts:1:20
"\n": test.ts:1:21  <-- line end
"console": test.ts:2:0
".": test.ts:2:7
"log": test.ts:2:8
"(": test.ts:2:11
"'world'": test.ts:2:12
")": test.ts:2:19
";": test.ts:2:20
"": test.ts:2:21  <-- line end
```

**Expected behavior:**

Line end characters left unmapped.

**Actual behavior:**

Line end characters are included in the mapping, with the column number that equals to the length of the line -- which exceeds the boundary, given that column number is 0-based in a source map.

The [spec](https://sourcemaps.info/spec.html) doesn't cover if mappings for line ending characters should be included. But this behavior breaks some tools (eg. source-map-explorer) with strict boundary checks.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: go
Issue: x/crypto/ssh: newChannel leak after Reject()
Labels: NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.7 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Most likely.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ziyan/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ziyan/go"
GOPROXY=""
GORACE=""
GOROOT="/home/ziyan/software/go"
GOTMPDIR=""
GOTOOLDIR="/home/ziyan/software/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build414841088=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->

```go
conn, channels, requests, err := ssh.NewServerConn(...)
for channel := range channels {
	channel.Reject(ssh.ConnectionFailed, "rejecting channel")
}
```

Then keep trying to open new `direct-tcpip` channel on a SSH connection:

```
ssh -N gosshserver -L 9999:name:9999
telnet localhost 9999
telnet localhost 9999
telnet localhost 9999
```

### What did you expect to see?

No memory leak over time.

### What did you see instead?

Unconstrained memory leak.

```
  112.52MB 68.69% 68.69%   155.30MB 94.81%  golang.org/x/crypto/ssh.(*mux).newChannel
   23.50MB 14.35% 83.04%    23.50MB 14.35%  sync.NewCond
   15.50MB  9.46% 92.50%       36MB 21.98%  golang.org/x/crypto/ssh.newBuffer
       7MB  4.27% 96.77%        7MB  4.27%  golang.org/x/crypto/ssh.(*connectionState).readPacket
    2.50MB  1.53% 98.30%       26MB 15.87%  golang.org/x/crypto/ssh.newCond
    1.28MB  0.78% 99.08%     1.28MB  0.78%  golang.org/x/crypto/ssh.(*chanList).add
```
Repository: go
Issue: cmd/compile: minimally align variables in memory when -d=checkptr is used
Labels: help wanted,NeedsInvestigation,compiler/runtime

-d=checkptr should report a warning for:

    var x [4]byte
    p := (*uint32)(unsafe.Pointer(&x[0]))

In general, this is unsafe because `x` only requires 1-byte alignment, but `*uint32` requires 4-byte alignment.

Currently, this isn't reliably reported, because efficiently allocating variables often results in over alignment. But when -d=checkptr is in use, cmd/compile and the runtime could burn a few bytes of memory to intentionally *minimally* align things in the heap and on the stack (e.g., 1-byte-alignment variables always on an odd address).

Relatedly, when the runtime allocates a chunk of memory for a heap variable allocation, it could align the variable as close to the *end* of the allocation (rather than at the beginning), so that we can more easily detect pointer arithmetic overflows (at the expense of pointer arithmetic underflows, which seem less common).

These both would have helped catch issues that I've noticed in CLs to address errors reported by -d=checkptr.

(Prior art: I think OpenBSD's malloc used to prefer aligning allocations towards the end of an mmap'ed page so that buffer overflows were more likely to trigger a segmentation fault. Not sure if it still does that. I don't see it mentioned specifically in the man page.)
Repository: go
Issue: syscall: treat ENFILE as a temporary error, like EMFILE
Labels: help wanted,OS-Windows,NeedsFix

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

Linux

### What did you do?

One of our servers ran out of file handles (/proc/sys/fs/file-max). This led net.Listener.Accept() to return ENFILE (not EMFILE). Since ENFILE is not considered a temporary error, http.Server.Serve exited it's accept loop and returned ENFILE.

### What did you expect to see?

ENFILE should be treated as temporary if returned by accept (and possible others). http.Server should not abort its accept loop when encountering ENFILE.

### What did you see instead?

The application which received ENFILE logged the error, and continued running without a working listener / http server. If the application had followed the common `log.Fatalln(http.Serve(...))` it would have crashed.
Repository: opencv
Issue: Strange results of matchTemplate using TM_CCORR_NORMED with mask
Labels: category: imgproc

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

Please:

* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.


This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => 4.1.1 (opencv-python)
- Operating System / Platform => Windows 10 x64
- Compiler => Visual Studio 14 2015 Win64

##### Detailed description

<!-- your description -->
Results of `cv.matchTemplate(image, needle, cv.TM_CCORR_NORMED, mask=mask)`
sometimes contains many values larger than 1 at stange position.

It happens only for TM_CCORR_NORMED with mask.
Also, it seems if the `image` has odd width the problem will not be triggered.

##### Steps to reproduce

This only happens with some special shapes of `image`, it seems odd width never trigger the bug.

[opencvtest.zip](https://github.com/opencv/opencv/files/3766894/opencvtest.zip)

`out.txt` shows the result produced by `python cvtest.py` on my machine, including output of `cv.getBuildInformation()`.

I'm not sure what causes this problem.
Opencv 3.4.4 on windows and 3.1.0 on mac has the same problem, but the err_count varies.
Another build of 4.1.1 on linux doesn't has this problem.

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: pytorch
Issue: `Tensor.__reversed__` breaks protocol for reversible objects
Labels: module: internals,triaged,module: pybind

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
The `__reversed__` method of `Tensor` (https://github.com/pytorch/pytorch/blob/master/torch/tensor.py#L292) does not follow the protocol specified in https://docs.python.org/3/reference/datamodel.html#object.__reversed__. It should return an iterator that iterates in reverse, not a reversed `Tensor`.
## To Reproduce

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

## Additional context

<!-- Add any other context about the problem here. -->
Repository: rust
Issue: musl staticlib builds include all of the musl symbols
Labels: A-linkage,T-compiler,O-musl,C-bug

## Observed Behaviour

If I produce a simple `staticlib` crate for the `x86_64-unknown-linux-musl` target, I get a `.a` file that includes all the symbols from musl, including standard libc symbols like (for example) `readlink`.  This makes it impossible to link this library into a C program that links against libc itself (or another Rust staticlib) as the linker will fail with duplicate symbol errors.

## Reproduction

A test repository is at https://github.com/Twey/musl-staticlib-test, along with a Nix description of the relevant build environment for those so inclined.  You can execute `rustc -omusl-staticlib-test.a --target=x86_64-unknown-linux-musl --crate-type=staticlib lib.rs` to get a library, and use a tool such as `nm` to view the symbols in the resulting binary.  For example:

```
[twey@uruz:/tmp/musl-staticlib-test]$ nm musl_staticlib_test.a | grep readlink
                 U readlink
0000000000000000 T _ZN3std3sys4unix2fs8readlink17h4d68afd72996b214E
                 U readlink
readlink.lo:
0000000000000000 T readlink
readlinkat.lo:
0000000000000000 T readlinkat
                 U readlink
```

## Expected Behaviour

Normally, static libraries for consumption by C, like `rlib`s, contain only symbols from the project itself, not symbols from dependencies.  Certainly symbols from libc should never make it into the binary, as these will always conflict.

For example, here's `libev`, also built statically against musl:
```
[twey@uruz:/tmp/musl-staticlib-test]$ nm /nix/store/6r9z7a007vrla17paac35c968fmbzilq-libev-4.27-x86_64-unknown-linux-musl/lib/libev.a | grep readlink
[twey@uruz:/tmp/musl-staticlib-test]$
```
Repository: opencv
Issue: CMake Error on Termux, Android SDK: specify path to Android SDK via ANDROID_SDK_ROOT /   ANDROID_HOME / ANDROID_SDK variables
Labels: priority: low,category: build/install,platform: android

##### System information (version)

- OpenCV = 3.4.2
- Phone Brand = Mi Max 2
- Operating System / Platform = Termux aarch64 Android

##### Detailed description
as the official website say ,
[https://wiki.termux.com/wiki/Instructions_for_installing_python_packages#opencv](https://wiki.termux.com/wiki/Instructions_for_installing_python_packages#opencv),
step by step,
when configure the package part,

> LDFLAGS=" -llog -lpython3" cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=$PREFIX -DBUILD_opencv_python3=on -DBUILD_opencv_python2=off -DWITH_QT=OFF -DWITH_GTK=OFF ..

got the result,

> CMake Error at cmake/android/OpenCVDetectAndroidSDK.cmake:30 (message):
  Android SDK: specify path to Android SDK via ANDROID_SDK_ROOT /
  ANDROID_HOME / ANDROID_SDK variables
Call Stack (most recent call first):
  cmake/android/OpenCVDetectAndroidSDK.cmake:153 (ocv_detect_android_sdk)
  CMakeLists.txt:645 (include)
-- Configuring incomplete, errors occurred!

and i found the source code ,the path is 
>cmake/android/OpenCVDetectAndroidSDK.cmake

Are there any workarounds?
Thanks.
Repository: go
Issue: x/text: potential Ineffective Assignments in a few packages
Labels: help wanted,NeedsInvestigation

Background: I'm a Software Security consultant, but not a Go expert. Just learning Go.

### What version of Go are you using (`go version`)?

<pre>
$ go version
 go version go1.13.1 darwin/amd64 (i.e., MacOS)
</pre>

### Does this issue reproduce with the latest release?

I believe I'm using the latest version of Go.

### What did you do?

I ran a free Go tool called ineffassign (from: https://github.com/gordonklaus/ineffassign) and noticed it pointed out some issues in the go libraries themselves.  I asked Gordon Klaus to review them and his response was: "Some of those are harmless (if sloppy), but others look like they might be real bugs.  I think they're worth reporting at golang.org/issues."

### What did you expect to see?

No issues pointed out in Go libraries by this tool.

### What did you see instead?

I ran ineffassign on a Go app I'm doing a security review for and noticed these results as part of the output:

mpapp/vendor/golang.org/x/text/collate/build/colelem.go:205:5: ineffectual assignment to p
mpapp/vendor/golang.org/x/text/collate/maketables.go:449:4: ineffectual assignment to d
mpapp/vendor/golang.org/x/text/transform/transform.go:146:5: ineffectual assignment to err
mpapp/vendor/golang.org/x/text/unicode/bidi/core.go:489:5: ineffectual assignment to preceedingCharacterType
mpapp/vendor/golang.org/x/text/unicode/bidi/core.go:565:4: ineffectual assignment to i
mpapp/vendor/golang.org/x/text/unicode/bidi/core.go:644:4: ineffectual assignment to i
mpapp/vendor/golang.org/x/text/unicode/cldr/resolve.go:486:7: ineffectual assignment to err

These look like part of Go itself, so I find them interesting. Do you think these are real issues that need to be reported to the maintainers of Go? Or false positives?  (Gordon said report them, so here they are.)