sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/tools/gopls: normalize feature sets of unimported completions and organize imports
Labels: gopls,Tools,gopls/imports

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
go version go1.13.4 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

Can't test on latest release, will update when brew makes go1.13.5 available

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/steelphase/Library/Caches/go-build"
GOENV="/Users/steelphase/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY="go.company.org"
GONOSUMDB="go.company.org"
GOOS="darwin"
GOPATH="/Users/steelphase/Code/Go"
GOPRIVATE="go.company.org"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0b/zk7t542s1sj_31mwpwyk3cy81gy8z8/T/go-build062639987=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

Pasted in some code that referenced a dependency that needed to be imported.

### What did you expect to see?

import to be autocompleted for direct dependency `go.company.org/org/lib/v4/errors`

### What did you see instead?

import autocompleted to transitive dependency `github.com/pkg/errors`

### Additional Details

This is the `go.mod` of the module I'm working in

```mod
module go.company.org/org/thing

go 1.13

require (
	go.uber.org/zap v1.13.0
	go.company.org/org/lib/v4 v4.1.0
)
```

output of `go mod why`

```bash
steelphase@macbook:lib$go mod why github.com/pkg/errors
# github.com/pkg/errors
go.company.org/org/thing/cmd/thing
go.uber.org/zap
go.uber.org/zap.test
github.com/pkg/errors
```
Repository: flutter
Issue: TextField should have a selectAllOnFocus
Labels: a: text input,c: new feature,framework,f: material design,c: proposal,P3,workaround available,team-text-input,triaged-text-input

`TextField` or `TextEditingController` should have a `selectAllOnFocus` property, just like Android has, to easily make the whole text selected once the `TextField` gets in focus.
Repository: flutter
Issue: Expose a way to see which font engine ended up loading
Labels: engine,a: typography,customer: dream (g3),P2,team-engine,triaged-engine

Internal: b/292548466

customer: dream requested to be able to know what font family is being loaded by the engine.

They are unable to bundle all the fonts they intend to use with their app. They want to rely on system fonts. However, while doing development, they sometimes see odd behavior and want to know whether it is due to a missing font. AFAIK, there's no way of knowing this unless you instrument the engine and print the chosen font family (not an option internally if you are using prebuilts).

Could tracing be added to font loader so that the loaded fonts are printed? Would it be possible to go further and see which font famil(ies) were chosen given a single Text widget?
Repository: vscode
Issue: Disambiguate quickSuggestion from editor.action.triggerSuggest
Labels: suggest,under-discussion

From a CompletionItemProvider it would be useful to be able to disambiguate completions triggered by quickSuggest and manual invocation of the command (via ctrl-shift). This could be used if specific completions are expensive or particularly low confidence.

Currently quickSuggest suggestions and ctrl-space suggestions both come through with CompletionContext.triggerKind = 0 and triggerCharacter = undefined.
Repository: ant-design
Issue: Select (type: multi/tags) change event cannot be prevented by onInputKeyDown
Labels: Inactive,improvement

- [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.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/dawn-silence-s2hkq)

### Steps to reproduce
1. Open codesandbox link (https://codesandbox.io/s/dawn-silence-s2hkq)
2. Select some items in the select component
3. Press the ENTER key

You notice now that the selection changed because the standard onChange event of the select component still triggered although it should have not.

### What is expected?
It is expected that the last selection before having pressed the ENTER key remains.

### What is actually happening?
The last item selected (or unselected) is reversed by the ENTER press because the standard behaviour of the ENTER key is to select/unselect items.

| Environment | Info |
|---|---|
| antd | 3.26.2 |
| React | 16.12 |
| System | Linux |
| Browser | All |

---
What I try to do is to save the current selections by the ENTER key because that was the most natural behaviour expected by the users of my test group. Therefore I used the onInputKeyDown event to call the blur event. However, the side effect is that the default behaviour of selecting an item cannot be prevented.

Please have a look at the sandbox.


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: Add torch.version.nccl
Labels: oncall: distributed,module: bootcamp,triaged,enhancement,module: nccl

## 🚀 Feature

Make NCCL version available at `torch.version.nccl`.

## Motivation

We have `torch.version.cuda` and should have a similar field for the NCCL version.

## Pitch

We should add it. The version is available as a compile time constant by looking at the header. Alternatively, we can pull the version dynamically through [`ncclGetVersion`](https://docs.nvidia.com/deeplearning/sdk/nccl-developer-guide/docs/api/comms.html#ncclgetversion). The latter has my preference, because it will always be correct, whereas the header approach leaves some ambiguity (e.g. you can use header of version X but load version Y).

## Additional context

Once added, this should be added to the version information scraper script as well.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528
Repository: pytorch
Issue: torch.nn.Softplus threshold argument bug?
Labels: module: nn,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

I noticed a potential bug in the torch.nn.Softplus function:

when plotting `torch.nn.Softplus(beta=10, threshold=0.4)` it appears that the linear threshold starts around 0.05 instead of 0.4 as specified, leading to a discontinuity in the function.

## To Reproduce

Steps to reproduce the behavior:

```
import torch
import matplotlib.pyplot as plt

print(torch.version.__version__)

beta = 10
threshold = 0.4
softplus = torch.nn.Softplus(beta=beta, threshold=threshold)
x = torch.arange(-1, 1, 0.01, dtype=torch.float32)
y = softplus(x)
plt.plot(x,y, label="torch.nn.Softplus")
plt.scatter(threshold, softplus(torch.tensor(threshold)), label="threshold value")
plt.legend()
plt.title("torch.nn.Softplus(beta=%s, threshold=%s)"%(beta, threshold))
```

Output:

`>>> 1.2.0`
![image](https://user-images.githubusercontent.com/33726845/70623822-d19ff200-1c16-11ea-8ab1-832a0683e047.png)



## Expected behavior

```
def expected_softplus(x, beta=1, threshold=20):
    "Expected softplus function"
    
    y=torch.zeros_like(x)
    y[x<=threshold] = (1/beta)*torch.log(1+torch.exp(beta*x[x<=threshold]))
    y[x>threshold]  = x[x>threshold]# revert to linear outside of threshold
    
    return y

beta = 10
threshold = 0.4
softplus = torch.nn.Softplus(beta=beta, threshold=threshold)
x = torch.arange(-1, 1, 0.01, dtype=torch.float32)
y = softplus(x)
plt.plot(x,y, label="torch.nn.Softplus")
plt.plot(x,expected_softplus(x, beta=beta, threshold=threshold), label="expected softplus function")
plt.scatter(threshold, softplus(torch.tensor(threshold)), label="threshold value")
plt.legend()
plt.title("torch.nn.Softplus(beta=%s, threshold=%s)"%(beta, threshold))
```

Output:

![image](https://user-images.githubusercontent.com/33726845/70624121-83d7b980-1c17-11ea-830a-b720f0e4065f.png)


## Environment

Collecting environment information...
PyTorch version: 1.2.0
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 10.14.6
GCC version: Could not collect
CMake version: Could not collect

Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] numpy==1.16.4
[pip] numpydoc==0.9.1
[pip] torch==1.2.0
[pip] torchvision==0.4.0a0+6b959ee
[conda] blas                      1.0                         mkl  
[conda] mkl                       2019.4                      233  
[conda] mkl-service               2.3.0            py37hfbe908c_0  
[conda] mkl_fft                   1.0.14           py37h5e564d8_0  
[conda] mkl_random                1.0.2            py37h27c97d8_0  
[conda] pytorch                   1.2.0                   py3.7_0    pytorch
[conda] torchvision               0.4.0                  py37_cpu    pytorch
Repository: create-react-app
Issue: Add documentation for using create-react-app with yarn pnp
Labels: issue: proposal

### Is your proposal related to a problem?

Documentation request for uding create-react-app with yarn 2 pnp.

### Describe the solution you'd like

To use create-react-app with yarn 2 pnp.

(Describe your proposed solution here.)

Document solution for using create-react-app with yarn 2 pnp


thanks
Repository: rust
Issue: Passing -Z embed-bitcode doesn't embed bitcode for debug builds of external dependencies
Labels: O-ios,T-compiler,C-bug

I'm not 100% sure if this is a cargo bug or a rustc bug, but it looks like a rustc bug.

I tested using `rustc 1.41.0-nightly (412f43ac5 2019-11-24)` running on MacOSX Catalina.

I put my files in a small repository, which you can find here: https://github.com/davehylands/simple-lib

What I noticed is that if I build using cargo normally (i.e. without using --release) then the object files for external crates do not get bitcode embedded. If I build using cargo with --release when the object files for external creates do get bitcode embedded. In either case, cargo is being run by using `RUSTFLAGS="-Z embed-bitcode"`

You can pass `--release` to the build.sh script to get the --release behaviour, and pass no flags to get the debug behaviour. The build.sh script runs otool over the objects included in libsimple_lib.a to show whether bitcode is included or not.

If you modify the for loop to use 
```bash
for obj in rand_core*.o; do
```
rather than:
```bash
for obj in *.o; do
```
then you'll get simpler output.

Normally, I use a rust toolchain that has the rust standard libraries built with bitcode, so I realize that these objects won't have bitcode using the nightly compiler.

Cargo.toml
```
[package]
name = "simple_lib"
version = "0.1.0"
authors = ["Dave Hylands <davehylands@fullstory.com>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rand = "0.7"

[lib]
name = "simple_lib"
# rustc cannont create dylibs for iOS.
# https://github.com/rust-lang/rust/issues/21727#issuecomment-424026535
crate-type = ["staticlib"]
```
src/lib.rs
```
use rand;

pub fn test_func2() -> String {
    let x = rand::random::<u16>();
    format!("Your number is {}", x)
}
```
build.sh
```
#!/bin/sh
set -e
if [ "$1" == "--release" ]; then
  BUILD_TYPE="release"
  CARGO_ARGS="--release"
else
  BUILD_TYPE="debug"
fi
TARGET_DIR=target
rm -rf ${TARGET_DIR}
RUSTFLAGS="-Z embed-bitcode" cargo build -v ${CARGO_ARGS}

cd ${TARGET_DIR}/${BUILD_TYPE}
ar x libsimple_lib.a

for obj in *.o; do
  if otool -l ${obj} | grep bitcode > /dev/null ; then
    echo "${obj} has bitcode"
  else
    echo "${obj} DOES NOT have bitcode"
  fi
done
```
Repository: create-react-app
Issue: Move react-scripts/config/jest into react-dev-utils
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

All the files in the folder `react-scripts/config/jest` are util transforms used in a `jest.config.js`. 
They're really useful and very common, so that they're described also in the [official guide of jest](https://jestjs.io/docs/en/webpack.html).

I am building a custom jest config, and would rather use those files than write my own, so I added `react-script` as a dependency and am importing those files from there. However I would prefer if they'd be in `react-dev-utils` instead, because that's more semantically correct and I don't want to install another dependency with a lot of other dependencies I don't need inside, just for a couple of functions.

### Describe the solution you'd like

Move `react-scripts/config/jest` into `react-dev-utils`.
Repository: rust
Issue: Casting or adding type ascription to panic!() triggers unreachable_code
Labels: C-enhancement,A-lints,P-medium,T-compiler,F-never_type,requires-nightly

```rust
fn test() -> impl Iterator<Item = i32> {
    panic!()
}
```
doesn't compile, as `()` (nor `!`) implement `Iterator<Item = i32>`.
```rust
#![feature(never_type_fallback)] // required for `panic!() as _`
fn test() -> impl Iterator<Item = i32> {
    panic!() as std::iter::Empty<_>
}
```
compiles, but gives this warning:
```
warning: unreachable expression
 --> src/lib.rs:3:5
  |
3 |     panic!() as std::iter::Empty<_>
  |     --------^^^^^^^^^^^^^^^^^^^^^^^
  |     |
  |     unreachable expression
  |     any code following this expression is unreachable
  |
  = note: `#[warn(unreachable_code)]` on by default
  = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
```
```rust
#![feature(type_ascription)]
fn test() -> impl Iterator<Item = i32> {
    panic!(): std::iter::Empty<_>
}
```
also compiles, but gives the same warning.
Repository: TypeScript
Issue: Add a Merge utility type
Labels: Suggestion,Awaiting More Feedback

## Search Terms

merge types

## Suggestion

It would be great if you could merge two types. The closest I can get right now is a union:

```typescript
type Test1 = { id: number, code: string }
type Test2 = { id: string, code: number }
type Test3 = Test1 | Test2

// This is not allowed, because x doesn't match Test1 OR Test2
export const x: Test3 = {
  id: "bob",
  code: "bob"
}
```

Basically I want to be able to create the following type by merging Test1 and Test2:

```typescript
type Test3 = { id: number | string, code: number | string }
```

Perhaps there could be a utility to merge the types:

```typescript
type Test3 = Merge<Test1, Test2>
```

## Use Cases

React-Native has a few style types (TextStyle, ImageStyle, ViewStyle) and they are very useful for autocomplete and type checking in my code. The TextStyle has a property `fontSize: number`. I want to be able to redefine the TextStyle type to allow a string value for all of the properties (so that I can use my own variable system). Something like `fontSize: "$fontSizeMD"`

## Examples

```typescript
type EImageStyle = ImageStyle | Partial<Record<keyof ImageStyle, string>>
type ETextStyle = TextStyle | Partial<Record<keyof TextStyle, string>>
type EViewStyle = ViewStyle | Partial<Record<keyof ViewStyle, string>>

type EComponentStyle = EImageStyle | ETextStyle | EViewStyle
type EComponentStyles = { [P in keyof any]: EComponentStyle }
```

With the merge it would look like:

```typescript
type EImageStyle = Merge<ImageStyle, Partial<Record<keyof ImageStyle, string>>>
type ETextStyle = Merge<TextStyle, Partial<Record<keyof TextStyle, string>>>
type EViewStyle = Merge<ViewStyle, Partial<Record<keyof ViewStyle, string>>>

type EComponentStyle = EImageStyle | ETextStyle | EViewStyle
type EComponentStyles = { [P in keyof any]: EComponentStyle }
```

## Checklist

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, etc.)
* [X] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: flutter
Issue: Improve the indexability (SEO) of Flutter apps on the web 
Labels: c: new feature,framework,customer: crowd,platform-web,c: proposal,P2,team-web,triaged-web

Latest status: https://github.com/flutter/flutter/issues/46789#issuecomment-1007835929

----

I Just wanted to know whether its SEO Friendly or not and about the status of Initial paintful load.
Repository: vscode
Issue: Allow to configure symbol visibility in pickers that may show symbols
Labels: feature-request,editor-symbols,quick-open

It's sometimes difficult to use "Go To Symbol" to go to a specific method of a class because the namespace of the palette is polluted with variable names. Personally, I have no need to use "Go To Symbol" to navigate to variables, so just like I can hide them in the outline, I'd like to be able to hide them from the palette.
Repository: vscode
Issue: [scss] add parameter hints
Labels: feature-request,css-less-scss

Currently when we complete a function in SCSS, it completes all parameters:

![image](https://user-images.githubusercontent.com/4033249/70644906-c342dd80-1bf8-11ea-9933-2be6dfb77bd7.png)

I think a better experience would be to use parameter hints and do not show the parameter names.
Repository: vscode
Issue: [css] hover for property values
Labels: feature-request,css-less-scss

There's completion details for property values:

![image](https://user-images.githubusercontent.com/4033249/70645046-0a30d300-1bf9-11ea-8e2b-5b54c92356ef.png)

But no hover for them.
Repository: vscode
Issue: [scss] provide hover for scss functions
Labels: feature-request,css-less-scss

In SCSS, when hovering over a function, we should show its documentation. Currently it only shows the property name's documentation:

![image](https://user-images.githubusercontent.com/4033249/70645122-351b2700-1bf9-11ea-98e5-f55ac1a813cd.png)

Depends on #86764.
Repository: node
Issue: Debugger doesn't pause again after stepping through blackboxed function
Labels: inspector

<!--
Thank you for reporting a possible bug in Node.js.

Please fill in as much of the template below as you can.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify the affected core module name

If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you can.
-->

* **Version**: v13.3.0 (and older versions. Works in 8.x)
* **Platform**: macOS

<!-- Please provide more details below this comment. -->

Have a script like 

```js
// test.js
debugger;
console.log('hello there');
for (var i = 0; i < 100; i++) {
    console.log('helllo there')
}
```

- Run `node --inspect-brk test.js`
- Open the developer tools against that process
- Set the following blackbox pattern: `^(?!file:\/\/\/).*`. This should blackbox any script that does not start with `file:///`, and should blackbox all internal node scripts while allowing user scripts to be debugged
- "step in" into the `console.log` statement
- All scripts called by `console.log` should be blackboxed and execution should continue to the next line
- Instead, the script runs to completion

I am not sure whether this is node-specific but I wasn't able to come up with a repro in Chrome. It worked at least in Node 8.

If I set up other scenarios of stepping into node code with this blackbox pattern set, sometimes it works and sometimes I see other wrong behavior - it pauses in `internal/per_context/primordials.js` even though that script is marked as "This script is blackboxewd in debugger"
Repository: rust
Issue: Clarify pitfalls of references and NonNull in FFI
Labels: C-enhancement,A-FFI,T-lang,A-docs

Add a note like the one in this commit to the documentation of references and nonnull: https://github.com/rust-lang/rust/pull/62514/commits/fafa4897985f932490960e90ddd2ff39134e967e 

Something like what that commit does for `Box<T>`:

```rust
//!  **Important.** At least at present, you should avoid using
//! `Box<T>` types for functions that are defined in C but invoked
//! from Rust. In those cases, you should directly mirror the C types
//! as closely as possible. Using types like `Box<T>` where the C
//! definition is just using `T*` can lead to undefined behavior, as
//! described in [rust-lang/unsafe-code-guidelines#198][ucg#198].
```

but replacing `Box<T>` with the reference types and `NonNull<T>`.
Repository: vscode
Issue: Make css auto completion items overtype on semicolon
Labels: feature-request,suggest,editor-autoclosing

![gif](https://user-images.githubusercontent.com/35271042/70650616-49b0ec80-1c04-11ea-8e7f-e45a0c33244a.gif)

Now that auto complete adds a `;` when selecting properties, it would be great if typing a `;` next to a semicolon would overtype so that I can quickly get to the end of the line and keep typing. I know that you can type `cmd/ctrl+enter` to start a new line, but typing a semicolon is a bit faster.
Repository: pytorch
Issue: [jit] Python objects as arguments are not mutated
Labels: oncall: jit,low priority,triaged

In Python the original object passed in is not modified by running the script function, but in C++ it is (which is the correct behavior).

```python
from typing import Dict
import torch

class XYZ(torch.nn.Module):
    def __init__(self):
        super().__init__()
        
    @torch.jit.export
    def f(self, x: int, d: Dict[int, int]) -> Dict[int, int]:
        d[x] = x + 2
        return d

jit = torch.jit.script(XYZ())

d0 = {11: 11}
d1 = jit.f(23, d0)

# this assertion passes
assert 23 not in d0 and d1[23] == 25

jit.save("saved.pt")
```

```cpp
#include <torch/script.h>
#include <iostream>

int main() {
  torch::jit::script::Module module =
      torch::jit::load("saved.pt");

  c10::Dict<int64_t, int64_t> d0;
  d0.insert(11, 11);
  auto d1 = module ({23, d0}).toGenericDict();
  std::cout << d0.at(23) << " " << d0.at(11)<<std::endl;
  std::cout << d1.at(23) << " " << d1.at(11)<<std::endl;
}

/*
The above code prints:
25 11
25 11
*/
```

cc @suo
Repository: go
Issue: x/net/http2: test timeouts on js-wasm builder
Labels: help wanted,NeedsInvestigation,arch-wasm

[2019-12-09T16:08:50-c0dbc17/js-wasm](https://build.golang.org/log/16b8f0dc90c74888bb31f97b8741461cbfb016de) has an interesting timeout failure.

It's not obvious to me whether it is due to a bug in the test, a bug in the `js/wasm` standard library, or a bug in `x/net/http2` or one of its dependencies that happens to be exposed by the different goroutine scheduling on `js/wasm`.

The presence of a goroutine blocked in `net.(*bufferedPipe).Read` via `crypto/tls` makes me suspect a concurrency bug in either `golang.org/x/net/http2` or `crypto/tls`, but admittedly that evidence is not compelling.

I also can't reliably determine how often this occurs or on what platforms because I can't fetch most of the `x/net` logs (#35515).

CC @bradfitz @FiloSottile @tombergan