sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: crypto/tls: expose TLS alert type for more precise error checks
Labels: Proposal,NeedsInvestigation,FeatureRequest,Proposal-Crypto

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.3 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/me/Library/Caches/go-build"
GOENV="/Users/me/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/me/Code/Golang"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/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/16/7jt3pcs15570rmz95wf9vlrc0000gn/T/go-build533656385=/tmp/go-build -gno-record-gcc-switches -fno-common"
</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.
-->

I've hooked `http.Server.ConnState` using a function that checks for handshake errors on the `http.StateClosed` state, and logs these. For example:

```go
func ConnStateHook(c net.Conn, cstate http.ConnState) {
	if cstate == http.StateClosed {
		if cc, ok := c.(*tls.Conn); ok {
			tlsState := cc.ConnectionState()
			if err := cc.Handshake(); err != nil {

				if strings.Contains(err.Error(), "remote error: tls: unknown certificate authority") || strings.Contains(err.Error(), "remote error: tls: unknown certificate") {
					// Do something
				}
			}
		}
	}
}
```


### What did you expect to see?

This works, but I really don't like using string comparison on error messages. What would be helpful to ensure accurate comparison (especially if these strings change in the future) is to be able to compare the error with the `tls.alert` types. The error above (`err`) is actually a `tls.alert` wrapped in a `*net.OpError` type, but because the `tls.alert` type is not exported, I only get to see the public `Error()` method that outputs a string.

The result of this would be similar to the `http` status codes found in `net/http/status.go`.
Repository: storybook
Issue: [addon-docs] Link to another story
Labels: feature request,has workaround,addon: docs

**Is your feature request related to a problem? Please describe.**
Well of course. I need to link to another story to sort of build a "See also" or "For more information, see..." section.

**Describe the solution you'd like**
I would like to be able to just link to another story by writing a MD link, something like:
```
See [this cool component](Components|General/CoolComponent) for more information
```
Storybook would recognize that this is not a regular url, but a link to a story, and transform the link in such a way that it will navigate to that story, instead of trying to open the url as-is.

**Describe alternatives you've considered**
The best workaround at the moment would be to go to that story using the existing navigation, recording what the url is, and pasting that into the MD link. It doesn't feel like that's the most stable way to go, because I don't think those url's a completely chained to the components that are on them.

**Are you able to assist bring the feature to reality?**
Not sure I can, sorry.

**Additional context**
It might be worth noting that the documentation of MDX stories is a bit "all over the place". I feel there isn't a single source of truth when it comes to MDX. All I can find is a couple of use-cases (although very common ones) and their solutions, but not an exhaustive reference. Perhaps working on that may reveal that the feature being requested here, is already possible in some other way, that I have no way of being aware of.
Repository: ant-design
Issue: Set Global Tooltip mouseEnterDelay/Other Properties
Labels: 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?
Currently tooltips show up after 0.1 seconds by default. We can customise this delay using the "mouseEnterDelay" API. For our use case, we use a lot of tooltips in our application in various locations. With all these tooltips, we want a quick and easy way to standardise our implementation without having to add "mouseEnterDelay={1.5}" and other similar properties to every instance of tooltip in our codebase. This will help keep the design and user experience consistent in larger code base. It will also help streamline refactors should we decided to change our design. 

### What does the proposed API look like?
A parent component that you can edit with certain properties. 

```jsx
<ConfigProvider
  tooltipMouseEnterDelay={1.5}
  tooltipMouseLeaveDelay={0.5}
>
  <App />
</ConfigProvider>
```

These properties could then be overriden on a case by case basis like so:
```jsx
<ConfigProvider
  tooltipMouseEnterDelay={1.5} 
  tooltipMouseLeaveDelay={0.5}
>
  <App>
    <Tooltip />                           // 1.5 second delay
    <Tooltip mouseEnterDelay={1.0} />     // 1.0 second delay
  </App>
</ConfigProvider>
```


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: create-react-app
Issue: provide option to use pnpm for installation to avoid file replication across apps.
Labels: issue: proposal

### Is your proposal related to a problem?

using create-react-app uses for installation leads to lots of repeated node_module folders

angular cli provides option to use npm or pnpm for installation.

### Describe the solution you'd like

give an option during create-react-app process to use pnpm if installed to avoid duplication of node_module files.

### Describe alternatives you've considered

pnpm install on a github clone (havent tried it yet).


### Additional context

none considered.
Repository: TypeScript
Issue: Type reference to Image resolves to static side
Labels: Bug,Domain: JavaScript

```js
/**
 * @param {Image} i
 * @param {Element} l
 */
function f(i, l) {
    l.appendChild(i);
    i.style.display = 'none';
}
```

Expected: `i` should (1) have type `Image` (2) be assignable to Node and (3) should have the property `style`.

Actual: `i: new (width?: number, height?: number) => HTMLImageElement`, which is not assignable to Node and doesn't have the property `style`.
Repository: kubernetes
Issue: Admission chain for underlying resource is not called for requests to /scale subresource
Labels: kind/bug,priority/backlog,sig/api-machinery,lifecycle/frozen,wg/api-expression

**What happened**:
When a user makes a modifying request to an object through the /scale subresource, the /scale admission chain is called, but mutating and validating admission for the underlying resource are not. This introduces some unexpected behavior and also makes certain valid use cases impossible to enforce consistently.

For example, if a user wants to register a webhook on Deployments which prevents the total resource limits of the deployment from exceeding a certain amount, by validating that the product of replicas*memory is below a certain amount, this is not possible. Because a user could always increase the replicas through /deployments/scale, and bypass the validating webhooks registered for /deployments.

**What you expected to happen**:
The mutating and validating admission for the underlying resource would be called when making a request to the /scale subresource

**How to reproduce it (as minimally and precisely as possible)**:
Register a webhook for /deployments which prevents changing replicas
Make a request to /deployments/scale

/cc @apelisse
Repository: godot
Issue: Spatial Shader with render_mode world_vertex_coords prevents skinning
Labels: bug,topic:rendering,confirmed,topic:3d

Characters with a Skeleton stop skinning altogether when their Material uses a Shader that sets **render_mode** to **world_vertex_coords**

I'm not sure if this is expected behavior, but I couldn't find any mention of it in the documentation.

Simplest shader to reproduce the issue:
`shader_type spatial;
render_mode world_vertex_coords;`

Tested Version: Godot 3.2.alpha3.official
OS: Ubuntu 19.10
Repository: flutter
Issue: [flutter_plugin_android_lifecycle] Add a getter for a service lifecycle
Labels: platform-android,e: embedder,package,P3,p: flutter_plugin_android_lifecycle,team-android,triaged-android

Currently the plugin only exposes a getter for the activity lifecycle, a getter for the lifecycle available through ServicePluginBinding should be added as well.

The code should be just:
```java
  @Nullable
  public static Lifecycle getServiceLifecycle(@NonNull ServicePluginBinding servicePluginBinding) {
    try {
      Method getLifecycle = ServicePluginBinding.class.getMethod("getLifecycle");
      Object hiddenLifecycle = getLifecycle.invoke(activityPluginBinding);
      return getHiddenLifecycle(hiddenLifecycle);
    } catch (ClassNotFoundException
            | NoSuchMethodException
            | IllegalAccessException
            | InvocationTargetException e) {
      Log.w(
              TAG,
              "You are attempting to use Flutter plugins that are newer than your"
                      + " version of Flutter. Plugins may not work as expected.");
    }
    return null;
  }
```

The part that requires some more work is getting the integration test to launch a service and exercise this code path.

I'm starting with landing just an activity lifecycle getter to fix red CI.
Repository: go
Issue: x/crypto/ssh: add example for KeyboardInteractive
Labels: Documentation,help wanted,NeedsInvestigation

I'm having trouble figuring out how to use this method to prompt a user for input and get a password back out. I tried searching on Github but most of the top results are vendored copies of the ssh package.

Alternatively, it would be nice to have a default implementation.
Repository: node
Issue: Handle windows-style bare specifiers in exports
Labels: module

There's currently a loophole in CJS exports:

```js
require('x\\y.js');
```

The above will load `y.js` at least on Windows even if `x` uses `exports` and didn't whitelist the path. This happens because the specifier isn't recognized as an `exports` specifier.

There's three possible ways out:

1. We detect this case and iff `x` uses `exports` treat it as "not mapped", no matter what the subpath is.
2. We accept this as a loophole.
3. We normalize the specifier, turning backslashes into slashes.

There are other potential loopholes like the following:

* `@scope/../any/file.js`: Doesn't match the RegExp, allows access to `any/file.js`.
* TBD

It's not quite clear if we *can* plug all holes in CJS but there's likely some way of doing it.
Repository: pytorch
Issue: Remove bce_with_logits in derivatives.yaml
Labels: triaged,enhancement,better-engineering

Its backward is done through autograd, we don't need explicitly set it at all.
Repository: flutter
Issue: flutter  can't be installed as a shared program
Labels: tool,platform-linux,c: proposal,P3,team-tool,triaged-tool

While trying to install flutter 1.9.1+hotfix.6  using Ansible on several Linux servers, I noticed that I can't run flutter if the user is not the one that has been used for the installation (this is a standard use case for any Linux/Unix system)
For example, flutter executable tries to create/modify  a lock file under bin/cache. It tries apparently to alter  a file named version under the installation directory.

Lock files should be created under /var/lock (or /run/lock) or under the user home directory and no file under the installation directory should be "touched"
Repository: TypeScript
Issue: Uncalled Function Checks don't check negative condition
Labels: Suggestion,Awaiting More Feedback

```ts
function foo() {
}

if (!foo) {
    let x = 10
}
else {
}
```

**Expected**: Error on `!foo` that the condition is always true because `foo` is defined.
**Actual**: No error.

Also, any work on this should include the following test:

```ts
function foo() {

}

if (!foo) {
}
else {
    foo()
}
```
Repository: flutter
Issue: The FlutterPointerEvent coordinate space is not documented.
Labels: engine,d: api docs,e: embedder,P2,team-engine,triaged-engine

[This](https://github.com/flutter/engine/blob/e5692949023766c6a42b554a0ded365f1e8a33b3/shell/platform/embedder/embedder.h#L409) has caused some confusion to custom embedder authors. The GLFW example embedder does seem to [handle this correctly](https://github.com/flutter/engine/blob/e5692949023766c6a42b554a0ded365f1e8a33b3/examples/glfw/FlutterEmbedderGLFW.cc#L26).
Repository: vue
Issue: Add non-passive event modifier
Labels: feature request

### What problem does this feature solve?
An event modifier to support `passive` events was added in #5132.

In the last couple of years, browsers have adopted the `passive` behavior by default for `touchstart` and `touchmove` events ([reference](https://www.fxsitecompat.dev/en-CA/docs/2018/touch-event-listeners-are-now-passive-by-default-making-scrolling-faster-on-mobile/)). Thus, to be able to cancel one of these events by calling `e.preventDefault()`, you need to explicitly pass `{ passive: false }` when adding the event listener.

With the current API this is impossible to achieve in a Vue template (as far as I can tell). You must manually add and remove the event listener in a component hook like so:

```js
this.$refs.someElement.addEventListener('touchstart', this.start, { passive: false });
this.$refs.someElement.addEventListener('touchmove', this.move, { passive: false });

// later
this.$refs.someElement.removeEventListener('touchstart', this.start);
this.$refs.someElement.removeEventListener('touchmove', this.move);
```

### What does the proposed API look like?
An event modifier that does the opposite of the `passive` event modifier, specifying the option as `false` instead of `true`.

Unsure of the naming - perhaps `nonPassive`, `active`, `assertive`, `intentional`.

```html
<div
  @touchstart.active="start"
  @touchmove.active="move"
></div>
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: pytorch
Issue: Command for downloading torch 1.12.0 CUDA 10 linked to cu92 version
Labels: module: binaries,triaged

I want to install pytorch 1.12 CUDA 10 in Ubuntu following this step https://pytorch.org/get-started/previous-versions/ . 

Every time I input this command `pip install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html` I always get the `cu92` version instead of CUDA 10 version.

```
pip3 install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.2.0
  Downloading https://download.pytorch.org/whl/cu92/torch-1.2.0%2Bcu92-cp36-cp36m-manylinux1_x86_64.whl (663.1MB)
    16% |█████▏                          | 106.4MB 116.9MB/s eta 0:00:05^C
```

After the package has been installed, I checked using python and it prints the cu92 version
```
import torch
>>> torch.__version__
'1.2.0+cu92'
```

How do I get the torch 1.12 CUDA 10 version?

cc @ezyang
Repository: flutter
Issue: [webview_flutter]About handle long press gestures
Labels: c: new feature,customer: crowd,p: webview,package,team-ecosystem,P3,triaged-ecosystem

```dart
/// Which gestures should be consumed by the web view.
  ///
  /// It is possible for other gesture recognizers to be competing with the web view on pointer
  /// events, e.g if the web view is inside a [ListView] the [ListView] will want to handle
  /// vertical drags. The web view will claim gestures that are recognized by any of the
  /// recognizers on this list.
  ///
  /// When this set is empty or null, the web view will only handle pointer events for gestures that
  /// were not claimed by any other gesture recognizer.
  final Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers;
```
I don't want to handle any gestures, what should I do?
Repository: flutter
Issue: Remove delegate setter on FlutterActivity and FlutterFragment
Labels: a: tests,team,platform-android,engine,c: proposal,P2,team-android,triaged-android

Remove delegate setter on FlutterActivity and FlutterFragment.

A more complete and current infrastructure for writing Android tests within the engine should allow a better approach.
Repository: material-ui
Issue: [Snackbar] Add imperative methods to display them directly
Labels: new feature,component: snackbar,priority: important

## Summary 💡

Support imperative calls for the sake of simplicity.

## Examples 🌈

```jsx
import { useSnackbar } from '@material-ui/core';

function MyComponent() {
  const snackbar = useSnackbar();

  return (
    <Button
      onClick={() => {
        snackbar({
          message: "My primary message for the user.",
          duration: 3000,
          variant: 'success',
        });
      }}
    >
      Trigger
    </Button>
  );
}
```

```jsx
import { ConfigProvider } from '@material-ui/core';

<ConfigProvider snackbar={{ maxItems: 3 }} />
```

## Motivation 🔦

Without such support, a developer has to set up a global event emitter system. It's cumbersome and tedious.

## Benchmark

- https://react-hot-toast.com/
- https://dev.to/dmtrkovalenko/the-neatest-way-to-handle-alert-dialogs-in-react-1aoe
- https://blueprintjs.com/docs/#core/components/toast
- https://seek-oss.github.io/braid-design-system/components/useToast
- https://github.com/fkhadra/react-toastify
- https://chakra-ui.com/toast
- https://ant.design/components/message/
- https://github.com/iamhosseindhv/notistack/
- https://sancho-ui.com/components/toast/
- https://evergreen.segment.com/components/toaster
- https://twitter.com/railto/status/1232997843020996610
- https://baseweb.design/components/toast/
- https://toasted-notes.netlify.com/
- https://github.com/kylecesmat/react-cheers
- https://jossmac.github.io/react-toast-notifications/
- https://github.com/mui-org/material-ui/issues/21053#issuecomment-630119128
- https://twitter.com/listenMrUtkarsh/status/1283480376904568833
- https://trello.com/c/tMdlZIb6/1989-snackbar-more-features
Repository: go
Issue: x/sys/windows: go test ./... failed on windows
Labels: OS-Windows,NeedsInvestigation,compiler/runtime

<!-- 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 windows/amd64
</pre>

### Does this issue reproduce with the latest release?



### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\xx\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\xx\go
set GOPROXY=https://goproxy.io
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map==C:\Users\ xx\AppData\Local\Temp\go-build199807830=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?

file.go
<pre>
import "golang.org/x/sys/windows"

func Foo(v ...interface{}) (err error) {
	var info windows.ConsoleScreenBufferInfo
	return windows.GetConsoleScreenBufferInfo(windows.Stdout, &info)
}
</pre>

file_test.go
<pre>
import "testing"

func TestFoo(t *testing.T) {
	if err := Foo("test"); err != nil {
		t.Error(err)
	}
}
</pre>

`go test`:
<pre>
PASS
ok      github.com/issue9/term  0.386s
</pre>

`go test ./...` or `go test .`:
<pre>
--- FAIL: TestFoo (0.00s)
    file_test.go:11: The handle is invalid.
FAIL
FAIL    github.com/issue9/term  0.380s
</pre>

### What did you expect to see?


### What did you see instead?
Repository: flutter
Issue: [iOS] Light/Dark mode on iOS should change in the background
Labels: platform-ios,framework,f: material design,a: fidelity,f: cupertino,customer: crowd,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->
Native apps change the theme colors as soon as you change the settings, while Flutter apps changes them when you go back to the app.

## Steps to Reproduce
<img src="https://user-images.githubusercontent.com/19904063/67843413-35a1a780-fafc-11e9-8497-9fecf0631aa7.gif" height="300">



<!--
     Please tell us exactly how to reproduce the problem you are running into.

     Please attach a small application (ideally just one main.dart file) that
     reproduces the problem. You could use https://gist.github.com/ for this.

     If the problem is with your application's rendering, then please attach
     a screenshot and explain what the problem is.
-->

| Safari  | Flutter App |
| ------------- | ------------- |
| <img src="https://user-images.githubusercontent.com/19904063/67844918-ddb87000-fafe-11e9-8a07-3f1e9d02f4e8.gif" height="300">  | <img src="https://user-images.githubusercontent.com/19904063/67844921-df823380-fafe-11e9-98a8-3e804c74a9bc.gif" height="300">  | 
| Changes instantly | Changes when back to the app  | 

[✓] Flutter (Channel master, v1.10.15-pre.205, on Mac OS X 10.15 19A602, locale es-ES)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] Connected device (4 available)