sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/crypto/ssh: ssh client hangs on waitting for the openConfirm message.
Labels: NeedsInvestigation

- **overview** 

The hang problem arises when using the library, the **ssh client** key code in file ssh/mux.go:

	open := channelOpenMsg{
		ChanType:         chanType,
		PeersWindow:      ch.myWindow,
		MaxPacketSize:    ch.maxIncomingPayload,
		TypeSpecificData: extra,
		PeersID:          ch.localId,
	}
	if err := m.sendMessage(open); err != nil {
		return nil, err
	}

	switch msg := (<-ch.msg).(type) {
	case *channelOpenConfirmMsg:
		return ch, nil
	case *channelOpenFailureMsg:
		return nil, &OpenChannelError{msg.Reason, msg.Message}
	default:
		return nil, fmt.Errorf("ssh: unexpected packet in response to channel open: %T", msg)
	}

The process hangs on the line of "switch msg := (<-ch.msg).(type) "，it may loss the OpenConfirm msg because of the sshd server or the net status. 
Maybe we should add the timeout when waitting for the confirm msg.

	select {
	case data := <-ch.msg:
		switch msg := data.(type) {
		case *channelOpenConfirmMsg:
			return ch, nil
		case *channelOpenFailureMsg:
			return nil, &OpenChannelError{msg.Reason, msg.Message}
		default:
			return nil, fmt.Errorf("ssh: unexpected packet in response to channel open: %T", msg)
		}
	case <-time.After(aliveTime):
		return nil, fmt.Errorf("ssh: the confirm message maybe lost")
	}
Repository: TypeScript
Issue: Propagate contextual inference candidates backwards through `this`-returning method calls
Labels: Suggestion,Awaiting More Feedback

# Bug Report
Hey Team, I've posted this question on [StackOverflow](https://stackoverflow.com/questions/70709311/typescript-generics-priority) and nobody was able to find a good solution, it seems to be a bug / limitation of TypeScript. It makes sense that TypeScript does not try 'everything' to figure out an implicit type backwards, but the `this` should be skipped when evaluating the generic.

### 🔎 Search Terms
Implicit Generic Type

### 🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about 4.5.4

### ⏯ Playground Link
[Playground Link](https://www.typescriptlang.org/play?#code/MYGwhgzhAEAqYCMQFMA8sB80DeAoaB0wA9gHYQAuATgK7AXFUAUVyJVAJhAFxwDaAXQA0RYiBoBbcrwDCYyaXQZBAShwBfXJtyhIMOeKlKc+AiXLU6DZqTATkvSlQCWpAOYjqYcgDNG9ql4mZwpkCV5YNQBeLCdXNzVsTUIwDg5YYjEKZwAHJi9ff2RA6GDQ8Lho2Op4lV4KAAtnGGxoVgoaKlJoRuaAbmhNbV0oaAAhGmcQDniTQnMnK0ZSnJokZ2BoW3tHGvdEodwdMkpoBEnp+Jgo6D5TLeQAd3GLmfcmACJQyg+VIXvSE8XlM3m5PpQwNkyL9cAI+kcAPQI6CPRgAawgxwsPUQKAAjNAboDnvAkMgmOcQVcRHdCA9ngYFJ8AHJ2ZAfESUy7uQlYLmggB022QKlhKnhuCR0A4xGQMFIxAoKPRWNOFFxyAATIT6XANagJlT3BgKa9qbd7rrGVIWWyOWczTyYg6jW4hWy-pbidBraRbfZ7fzZs6g+53fYVALUulMiBsnklc6KOGRWKJVLUVQMaqleqyQBmHXe0koU2uiA0r1A33+9mcx1uXku7lu4Weune30Ghsmj6sgP111N0Otj1RtIZLK5fJN5NttOI5EyuVbRXKrM5nFkgAsRaBJfJI4rFo71fkNr7dsHLeHDZT7cInfPfsvA+boNvrvv45jU4Ts-vNMgA)

### 💻 Code
I currently have the following code:

```
class Table<T,> {
   constructor(records: T[], columns: Column<T>[]) { ... }
}

class Column<T> {
   constructor(name: string, transformer: (item: T) => string) { ... }
   addTooltip(transformer: (item: T) => string): this { ... }
}

class Building {
   constructor (public name: string) {}
}

const buildings = [
   new Building("test"),
   new Building("station")
];
```

I want to create a table, without having to specify that `T` is of type `Building`.

This works so far, because typescript can infer the type from the buildings array and it works. Even in the `transformer` of the Column, I still get type suggestions.
```
const table = new Table(buildings, [
    new Column("Name", building => building.name)
]);
```

But when I use `addTooltip`, typescript can't figure out what `T` is and completely freaks out, because the `Column` assumes that `T` is `unknown`.
```
const table = new Table(buildings, [
    new Column("Name", building => building.name),
    new Column("Name", building => building.name).addTooltip(t => t.name)
]);
```

Is there a way to tell TypeScript to use the type of its `records` constructor parameter as a source for T, ignoring what the columns think `T` is - without using `new Table<Building>(...)`? I know that we could use `columns: Column<any>[]`, but then the type checking in the Columns would not work. 

### 🙁 Actual behavior
TypeScript can't figure out what type `T` in `Column` is.

### 🙂 Expected behavior
TypeScript would know that because `.addTooltip` returns `this`, the type could be passed up.
Repository: node
Issue: Add a utility to convert file URL or path to one of them?
Labels: url,feature request

### What is the problem this feature will solve?

It's a nice way to accept both `URL` and path string in API, but we need covert it to either string or URL, it would be nice to have a built-in method to do this.

### What is the feature you are proposing to solve the problem?

For converting to string:

Maybe add `path.from(URL | string)`? @sindresorhus proposed [here](https://github.com/sindresorhus/globby/pull/201#issuecomment-1012249320).

For converting to URL:


`url.from(URL | string)`

I'm not sure, since `URL` is a standard, I guess adding method `URL` object won't be acceptable, maybe to `node:url` module?


### What alternatives have you considered?

_No response_
Repository: angular
Issue: docs: clarify bundle budgets
Labels: help wanted,P4,area: docs

### Which @angular/* package(s) are relevant/releated to the feature request?

compiler-cli

### Description

#### [Configuring size budgets](https://angular.io/guide/build#configuring-size-budgets)

1. "_initial - The size of JavaScript needed for bootstrapping the application. Defaults to warning @ 500kb and erroring at 1mb_" 
this is not very clear what it means ... is it exactly the value shown in the table of the cli ng build output "Initial Total" ?  if so, **can we mention that in the doc**
2. "_baseline_" 
  im not setting this in my budgets ... does that mean it defaults to 0 ?
  the effect of baseline is unclear, **can we add a sample snippet** to doc that has a "baseline" value ?
3. "_anyScript_"
not sure how useful it is, because ex. i have many lazy-loaded chunks i wish to keep small, but my vendor.\*.js and main.\*.js will always be comparatively large ... request: **can we add "anyLazyLoadedScript"** property ?
4. similarly, "_bundle_","_name_" ... how useful is it if have "outputHashing" : "all" ? **can the name be regex or wildcard** ? ex: "main.\*.js", "vendor.\*,js"
5. request **property "assets"** ... so can budget the size of the assets folder ... ex. fonts here can be very big    

### Proposed solution

see Description ...

for example:
<pre>
             "budgets": [
                {
                  "type": "initial",
                  "maximumError": "3.25mb"
                },
                {
                  "type": "bundle",
                  "name": "main.*.js",
                  "maximumError": "1.5mb"
                },
                {
                  "type": "bundle",
                  "name": "vendor.*.js",
                  "maximumError": "2mb"
                },
               {
                  "type": "anyLazyLoadedScript",
                  "maximumError": "1mb"
                },
                 {
                  "type": "anyComponentStyle",
                  "maximumError": "10kb"
                },
                {
                  "type": "assets",
                  "maximumError": "2.5mb"
                },
                {
                  "type": "all",
                  "maximumError": "3.75mb"
                }
              ]
</pre>
 

### Alternatives considered

i could not achieve the result i wanted given the currently available properties
Repository: kubernetes
Issue: Add more details related to scheduler's decisions to logging and event messages
Labels: sig/scheduling,kind/feature,help wanted,needs-triage

### What would you like to be added?

For scheduled pods, add additional details on how the selected node was scored

For unscheduled pods, add details on which filters were actually executed on the pod.

The former should be easy to do now, the latter needs improvements to the framework: e.g. a new "Success" status that says "NotRelevant"/"Skipped", which Filters (perhaps using PreFilter extension) return when they didn't do anything meaningful on the pod (e.g. nodeAffinity returns NotRelevant if the pod doesn't specify any node selector or affinity)

### Why is this needed?

Helps operators reason better about scheduler decisions.

/sig scheduling
/help
Repository: vscode
Issue: C symbol names are not displayed in the Disassembly view
Labels: feature-request,debug,debug-disassembly

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.62.3
- OS Version: RHEL7

This issue is observed with a proprietary extension for C/C++ programs debugging, implementing the DAP disassembleRequest() method. The obtained Disassembly view looks quite fine, but the symbol names are never displayed, although the method returns DisassembledInstruction objects with the 'symbol' field correctly initialized.

In the following screenshot, we see that the C code lines are correctly displayed interleaved with the instructions, but the 'main' symbol name is missing:
![disassembly_vscode](https://user-images.githubusercontent.com/16207586/149550767-e6e2bc54-37d2-47ad-ba8f-3a8264edbcc5.PNG)

I would except to have the symbol names also displayed in view, such as it is done by Eclipse:
![disassembly_eclipse](https://user-images.githubusercontent.com/16207586/149550975-1ad101c7-71ca-4576-963a-93fcfdb3f28c.PNG)


Steps to Reproduce:
1. Install an extension implementing the DAP Disassemble Request for C/C++
2. Launch debug of a C program, compiled with -g option
3. Open the Disassembly view, and observe that the symbol names are not displayed
Repository: ant-design
Issue: Popover - TopRight/BottomRight placement causes css calculation loop under certain conditions
Labels: 🐛 Bug,Inactive

- [ ] 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/placement-antd-4-18-3-forked-g27ds?file=/index.js)

### Steps to reproduce
I forked one of the examples from the Popover component docs. Click either the TR or BR buttons and you should see the issue.
The popover loops through calculated css values.

### What is expected?
The Popover renders and remains static, as with each other placement value.

### What is actually happening?
The component's css continually recalculates.

| Environment | Info |
|---|---|
| antd | 4.18.3 |
| React | 16.14.0 |
| System | Windows |
| Browser | Chrome |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: go
Issue: x/mobile: reverse binding not working anymore?
Labels: NeedsInvestigation,mobile

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.17.6 linux/amd64

$ gomobile version
golang.org/x/mobile/cmd/gomobile@latest
</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
 go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/root/sdk/go1.17.6"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/root/sdk/go1.17.6/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17.6"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/build2/go.mod"
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-build2412464046=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
Create a file in a module that uses reverse binding:
```go
package gomobiletest


import (
        "log"
        "Java/android/content"
)

func Test(androidctx content.Context)  {
        apkPath := androidctx.GetPackageResourcePath()
        log.Println(appPath)
}
```

and run 

`gomobile bind`

### What did you expect to see?

A successful compile 

### What did you see instead?

A successful compile with the method ignored.
Repository: storybook
Issue: Configuration API documentation
Labels: documentation

**Is your feature request related to a problem? Please describe**
 I want to know the shape of the data of "parameters" in preview.js and it does not seem to be clearly defined in the documentation. The "API" section of the docs  does not provide a comprehensive list of all parameters.

**Describe the solution you'd like**
Provide comprehensive documentation for all configuration interfaces. 

**Describe alternatives you've considered**
Use tools to auto-document Typescript interfaces/types

**Are you able to assist to bring the feature to reality?**
no

**Additional context**
Add any other context or screenshots about the feature request here.
Repository: create-react-app
Issue: yarn build failed with a fresh created react ts app
Labels: needs triage,issue: bug report

### Describe the bug

After creating a fresh new app using `yarn create react-app my-app --template typescript` the build process failed with an error from `my_project/node_modules/react-scripts/config/webpack.config.js:664`

Based on last releases of all componants inside node 16.13.0

Error is:

```
yarn build
yarn run v1.22.17
$ react-scripts build
/workspace/my_app/node_modules/react-scripts/config/webpack.config.js:664
        new MiniCssExtractPlugin({
        ^

TypeError: MiniCssExtractPlugin is not a constructor
    at module.exports (/workspace/my_app//node_modules/react-scripts/config/webpack.config.js:664:9)
    at Object.<anonymous> (/workspace/my_app/node_modules/react-scripts/scripts/build.js:58:16)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

### Did you try recovering your dependencies?

Yes, getting de fresh project from git or from scratch, see "Steps to reproduce"

### Environment

- Gitpod
- Node 16.13.0

### Steps to reproduce

Easy to reproduce craete a fresh new project like this :

```
yarn create react-app my-app --template typescript
cd my-app
yarn install
yarn build
```

Using yarn start, the dev mode is working fine.


### Expected behavior

A built app.

### Actual behavior

Build failed and the app is not ready for production.
Repository: pytorch
Issue: [torch.deploy] Using zipped torch modules in torch.deploy interpreter 
Labels: triaged,days,oncall: package/deploy,imported

### 🐛 Describe the bug

In fbcode, we recently changed a way to deliver torch modules into deploy interpreter. Previously we shipped a python bytecode, but now we ship a zip file containing torch modules. Due to  different cpython version in OSS, we weren't able to enable this change in OSS. Ideally, the OSS and fbcode should have same behavior. Therefore, this issue will be used to track this process. 

PR that changes fbcode behavior: https://github.com/pytorch/pytorch/pull/71072

cc: @shunting314 @suo 

### Versions

master
Repository: go
Issue: bytes,strings: tests appear to take ~100x as long on riscv
Labels: NeedsInvestigation,arch-riscv

I was poking at https://build.golang.org/, and I wondered why the builds for the riscv machines were lagging behind. I understand they may be slower machines, but still, they shouldn't be *that* slow.

I took a peek at some of the recent logs, such as:

https://build.golang.org/log/c0751a2f215266bf2e29d8987f7a274a4774894d
https://build.golang.org/log/f7b5e9a48eba8ab84a1ac5f77e87dec51f28ef3b
https://build.golang.org/log/ba7516c48279b409253d9742a2efb1fa2e2fa59d

What jumped out to me is how the `bytes` and `strings` packages take 100-300s to test, which sounds like something is very wrong. Perhaps they are running huge inputs through unoptimized functions like `IndexByte`? On most other builders, these packages take 1-2s.

For the rest of the packages, testing on riscv is somewhere in between about as fast and 10x slower. For example, cmd/go includes lots of process execution, filesystem I/O, and Go builds, and it goes from ~30s to ~300s, which is still reasonable. I haven't found a single other package that gets close to being 100x as slow.

Also, at an intuitive level, it does not make any sense that testing `cmd/go` takes about as long as testing `bytes`; the former has significantly more tests, even in short mode, and they tend to be integration tests too.

It's unclear to me if we can truly blame the two packages, or if this problem is only occurring on riscv; I haven't done further research.

cc @4a6f656c @rhysh
Repository: pytorch
Issue: Allow users to pass use_reentrant=False to checkpoint_sequential
Labels: module: checkpoint,triaged

### 🚀 The feature, motivation and pitch

The `use_reentrant` flag was introduced for the `torch.utils.checkpoint.checkpoint` function in #69508.
Can we have the same flag as a possible kwarg of `torch.utils.checkpoint.checkpoint_sequential`?

### Alternatives

_No response_

### Additional context

_No response_
Repository: go
Issue: database/sql: goroutine leak detection made difficult with sql.DB.Close()
Labels: NeedsInvestigation

We start a goroutine for connectionOpener like this:
https://github.com/golang/go/blob/4f0c32de078b57958fa9c37c05bae4ee1f8193e5/src/database/sql/sql.go#L794



And then it terminates when the context is cancelled: https://github.com/golang/go/blob/4f0c32de078b57958fa9c37c05bae4ee1f8193e5/src/database/sql/sql.go#L1224-L1233

Which happens here: https://github.com/golang/go/blob/4f0c32de078b57958fa9c37c05bae4ee1f8193e5/src/database/sql/sql.go#L910

The Close() method then returns after some additional cleanup. Since we don't wait for the actual goroutine to close, after Close() happens, there could still be a goroutine running. 

I think we should add something like this to the `OpenDB` method:

```
go func() {
  defer db.openerRoutine.Done()
  db.connectionOpener(ctx)
}
```

and then add this to the `Close()` method:

```
db.stop()
db.openerRoutine.Wait()
```

This would make it easier to use things like goleak with this library. Currently, I have to workaround it somehow, e.g. with a sleep or an ignore.
Repository: flutter
Issue: [camera] Proposal to take a picture while VideoRecording is in Progress
Labels: c: new feature,p: camera,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

I need to take pictures while recording videos. Images could be preview frames.

In the current version, calling the takePicture function during a recording does not return an image.
Repository: pytorch
Issue: [RFC] Implement array methods (extend, insert, pop, etc) for container classes
Labels: feature,module: nn,triaged

### 🚀 The feature, motivation and pitch

This thread is a revisiting of https://github.com/pytorch/pytorch/issues/20117, where the possibility of adding various array operations to `nn.Sequential` were discussed. 

The rationale behind opening a new issue is as follows:
* The PyTorch API has been updated significantly since May 2019.
* Previous discussions were limited to `nn.Sequential`, but perhaps `nn.ModuleList` also deserved attention.

Shown below is a table summarizing the current state of the containers API. A cross does not suggest that we _should_ implement a given method; it merely indicates an absence of implementation.

|            | `Sequential`                                         | `ModuleList` |
|------------|------------------------------------------------------|--------------|
| `append`   | ✅ | ✅            |
| `insert`   | ✅                                                    | ✅            |
| `extend`   | ✅                                                    | ✅            |
| `add`      | ❌                                                    | ✅            |
| `__add__`  | ❌                                                    | ✅            |
| `__iadd__` | ❌                                                    | ✅            |
| `pop`      | ✅                                                    | ✅            |
| `repeat`   | ❌                                                    | ❌            |
| `flatten`  | ❌                                                    | ❌            |

As referenced in "Additional Contexts," some methods such as `repeat` were taken from [Chainer](https://docs.chainer.org/en/latest/reference/generated/chainer.Sequential.html#chainer.Sequential).

Some things to consider:
* Which methods would be useful additions?
* Which methods, if any, should be implemented in one, but not the other?
* What should be the expected input and output of the methods?
* Should we also consider additional methods for `ModuleDict` (e.g.  `__or__` for merging dictionaries, [PEP](https://www.python.org/dev/peps/pep-0584/#reference-implementation))?
* Should we also consider `ParameterList`?

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are

### Additional context

Implementing array operations was previously attempted in https://github.com/pytorch/pytorch/pull/20274, which was a follow up to https://github.com/pytorch/pytorch/issues/20117. As brought up in the original RFC, [Chainer's `Sequential` API](https://docs.chainer.org/en/latest/reference/generated/chainer.Sequential.html#chainer.Sequential) is also potentially worth looking at.

**Note** Updated 1/22/2023 to reflect recent merges by @khushi-411.