sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Flutter should exit more gracefully when network is unavailable
Labels: tool,a: quality,has reproducible steps,P2,found in release: 2.8,found in release: 2.9,team-tool,triaged-tool

## Steps to Reproduce

Run `flutter upgrade` from a disconnected machine:

```
[C:\Program Files\Microsoft Visual Studio\2022\Community] flutter upgrade
ProcessException: Process exited abnormally:
ssh: Could not resolve hostname github.com: No such host is known.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
  Command: git fetch --tags
```

It would be preferable if Flutter interpreted the exit error code and displayed a message that had fewer distractions (e.g. questioning access rights, referring to github (some users may not even understand why github is involved in an upgrade), running `git fetch --tags`).
Repository: material-ui
Issue: [styled-engine-sc] MUI + styled-components + Next.js CSS rules ordering issue
Labels: bug 🐛,external dependency,priority: important,package: styled-engine-sc,nextjs

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Next.js projects using MUI + styled-components based on the example configuration from:\\ have incorrect MUI components styling on production. The order of the CSS rules is different from SSR and after hydration.

### Expected behavior 🤔

UI elements looks always same (on dev run and on production). CSS rules are applied always in the same order.

### Steps to reproduce 🕹

Steps:

1. visit https://codesandbox.io/s/heuristic-framework-2leki?file=/pages/about.tsx
2. refresh preview after server build and run the prod bundle
6. navigate between pages + play with refreshing pages (to load SSR styles)

Video preview:
https://www.youtube.com/watch?v=A0dqNA8IO4Q

### Context 🔦

When I was testing it locally it happened only on production builds, but in code sandbox it happens also on development mode. Just css class order is different between dev and prod. 

Privided code sanbox is a fork for from official example from: https://github.com/mui-org/material-ui/tree/master/examples/nextjs-with-styled-components-typescript

I've just added 2 more buttons.

There are different states for the buttons depending on the scenario:
Correct styling:
<img width="534" alt="obraz" src="https://user-images.githubusercontent.com/4493100/142282784-41c99404-9e29-45ce-b13e-94175c5b3e44.png">

Incorrect styling:
<img width="523" alt="obraz" src="https://user-images.githubusercontent.com/4493100/142282838-1634e2c9-f63a-46cc-9926-ce36d5d79314.png">

CSS rules order comparison:
<img width="1365" alt="obraz" src="https://user-images.githubusercontent.com/4493100/142283313-da707a86-5d69-4dee-b9b9-376429525b09.png">


### Your environment 🌎

I've tested this issue on Windows 10, Mac OS, AWS Amplify and at the end I've found that it also happens on CodeSandbox example. Always with latest versions with MUI, Next, node and styled-components
Repository: godot
Issue: Playing an animation another time in AnimatedSprite doesn't work
Labels: discussion,documentation,topic:animation

### Godot version

3.3.4

### System information

macOS, Windows

### Issue description

When you have an AnimatedSprite and use GDScript to play an animation, wait for it to complete and then play the same animation again, it doesn't play it.

### Steps to reproduce

* Add an AnimatedSprite node with frames and an non-looped animation
* Use GDScript to run $AnimatedSprite.play(animation)
* Yield for "animation_finished"
* Use GDScript to run $AnimatedSprite.play(animation) again


### Minimal reproduction project

[testdoubleanim.zip](https://github.com/godotengine/godot/files/7558132/testdoubleanim.zip)
Repository: node
Issue: implement URLPattern
Labels: discuss,feature request,whatwg-url

Don't know if you have heard of this new [URLPattern](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern)
Deno shipped it, and browser supports it, would be a cool util to have globally avalible to pear up with web standards and for usage in express routing for instance
Repository: godot
Issue: 3D geometry cull failure and light flickering at particular camera far / near values
Labels: bug,topic:rendering,topic:3d

### Godot version

3.4 stable

### System information

Xubuntu 20.10 AMD 3020e, Vega3, GLES3

### Issue description

In 3D at extremely low camera near and extremely high camera far values, geometry fails to be culled partially or completely when moving beyond camera far distance from the object. It also makes lights misbehave and flicker depending on the view angle.

Not critical but may be worth squashing. Can be avoided by using reasonable camera clipping planes distances.

[Video demonstration of both effects](https://cdn.discordapp.com/attachments/212250894228652034/909460086093664256/simplescreenrecorder-2021-11-14_17.04.18.mp4)

### Steps to reproduce

Set `camera_near` >0.05, set `camera_far` 1000000 (maximum).
Place large visible object at `camera_far` distance from camera, move camera away. If bug reproduces - the object won't disappear or will flicker.

Place point light source at object location, make light distance >= `camera_far`, move camera away, while also looking at the source or away from it, observe the flickering.

### Minimal reproduction project

[My project release version that illustrates the bug](https://github.com/roalyr/GDTLancer/releases/tag/v0.3-pre-alpha-bug-test)

Suspected culprit for this bug may be a condition check at which fragments should be discarded (shader) or a piece of code the governs camera culling. Also it may be an issue related to floating point precision, or the code check that doesn't take into account `camera_near` that small.


### **The workaround for light-related part of the issue seems to be in using larger light source range range and/or size with steeper curves on small lights.**
Repository: flutter
Issue: Implement method specific task queues for MethodChannels
Labels: c: new feature,engine,P3,team-engine,triaged-engine

## Description

If you have a project that is using MethodChannels and want to migrate some of the methods to execute on a background thread, not the platform thread, you have to split your usage between 2 different channels, one that handles on the platform thread and one on the background thread.  When developing federated plugins it isn't possible to change the channel communication scheme though without creating a breaking change to the platform_interface.

We have talked about removing channels from the platform_interface.  If we do that, this isn't a problem.  cc @stuartmorgan 

## Proposed Api

```java
channel = new MethodChannel("com.example.foo", binaryMessenger);
taskQueue = binaryMessenger.makeBackgroundTaskQueue();
channel.setMethodTaskQueue("foo", taskQueue);
```

## Implementation Details

If MethodChannel supplied its own TaskQueue to the BinaryMessenger, it would have the ability to dispatch to TaskQueues that it has stored locally to be associated with specific methods.  This only works though if the dispatch method is available to MethodChannel, currently it is private to the BinaryMessenger.
Repository: pytorch
Issue: [distributed] elastic/agent/server/api.py could react faster on exit / Ctrl+D / Ctrl+C
Labels: triaged,oncall: r2p

I'm having a model run with torch.distributed.launch with only 1 rank for interactive debugging. I'm exiting pdb with Ctrl+D (graceful exit), but torchelastic is slow to detect an exit is requested and interpreter hangs for some seconds - not too much, but still (which is not good because it's not clear to the user why it's hanging). Then I hit Ctrl+C and I get the following stack trace.

I wonder if that server/api.py could also detect that exit is requested with Ctrl+D. Maybe it's some Linux signal that's not currently handled?

```
  File "/home/vadim/prefix/miniconda/lib/python3.9/bdb.py", line 94, in trace_dispatch
    return self.dispatch_exception(frame, arg)
  File "/home/vadim/prefix/miniconda/lib/python3.9/bdb.py", line 174, in dispatch_exception
    if self.quitting: raise BdbQuit
bdb.BdbQuit

^CTraceback (most recent call last):
  File "/home/vadim/prefix/miniconda/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/vadim/prefix/miniconda/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/vadim/prefix/miniconda/lib/python3.9/site-packages/torch/distributed/launch.py", line 193, in <module>
    main()
  File "/home/vadim/prefix/miniconda/lib/python3.9/site-packages/torch/distributed/launch.py", line 189, in main
    launch(args)
  File "/home/vadim/prefix/miniconda/lib/python3.9/site-packages/torch/distributed/launch.py", line 174, in launch
    run(args)
  File "/home/vadim/prefix/miniconda/lib/python3.9/site-packages/torch/distributed/run.py", line 689, in run
    elastic_launch(
  File "/home/vadim/prefix/miniconda/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 116, in __call__
    return launch_agent(self._config, self._entrypoint, list(args))
  File "/home/vadim/prefix/miniconda/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 237, in launch_agent
    result = agent.run()
  File "/home/vadim/prefix/miniconda/lib/python3.9/site-packages/torch/distributed/elastic/metrics/api.py", line 125, in wrapper
    result = f(*args, **kwargs)
  File "/home/vadim/prefix/miniconda/lib/python3.9/site-packages/torch/distributed/elastic/agent/server/api.py", line 700, in run
    result = self._invoke_run(role)
  File "/home/vadim/prefix/miniconda/lib/python3.9/site-packages/torch/distributed/elastic/agent/server/api.py", line 828, in _invoke_run
    time.sleep(monitor_interval)
```

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: godot
Issue: GraphEdit selection doesn't respect start position when scrolling
Labels: bug,topic:gui

### Godot version

3.4

### System information

Windows

### Issue description

I can't select GraphEdit nodes far from each other using standard selection tool (selection rectangle). When I scroll with the mousewheel, selection rectangle start position changes.

### Steps to reproduce




https://user-images.githubusercontent.com/16458555/142309366-4af48706-bfe8-47b4-b478-bd15a7dead37.mp4




### Minimal reproduction project

_No response_
Repository: go
Issue: cmd/compile: defer wrapper has more instructions than hand-written wrapper
Labels: NeedsDecision,compiler/runtime

`defer src.Close()` results in surprisingly more assembly than `defer func() { _ = src.Close()}()`. Is this a bug or am I missing something?

https://godbolt.org/z/KP4q1WTah

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.17.2 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=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/adrian/Library/Caches/go-build"
GOENV="/Users/adrian/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/adrian/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/adrian/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.17.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.17.2/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/adrian/tetratelabs/func-e/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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/vd/1cf8zdb1721f4z5rjggy8bp40000gn/T/go-build3091093826=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

Inspect the assembly generated from an implicitly swallowed error
```go
func Close(src io.Closer) error {
    defer src.Close()
    return nil
}
```

vs doing it explicitly like this:
```go
func Close(src io.Closer) error {
    defer func() { _ = src.Close()}()
    return nil
}

### What did you expect to see?

I expected to see similar size of assembly.

### What did you see instead?

The assembly of the first first was significantly larger https://godbolt.org/z/KP4q1WTah
Repository: pytorch
Issue: LibTorch -> TorchScript -> PyTorch (Python) fails with `AttributeError: 'RecursiveScriptModule' object has no attribute 'forward'`
Labels: oncall: jit

LibTorch -> TorchScript -> PyTorch (Python) fails when calling loaded module.

## To Reproduce

1. In C++, save to TorchScript with `torch::save(model, "model.pt")`.

2. Load and call the model in Python.

The repro case here was provided by @swilson314 [here](https://github.com/pytorch/pytorch/issues/17869#issuecomment-928238122).

```python
import os
import urllib.request
import zipfile
import torch

zip_path = "Model.zip"

urllib.request.urlretrieve(
    "https://github.com/pytorch/pytorch/files/7239083/Model.zip",
    zip_path)

unzipped_dir = "unzipped"
with zipfile.ZipFile(zip_path, "r") as zip_ref:
  zip_ref.extractall(unzipped_dir)

torch_script_path = os.path.join(unzipped_dir, os.listdir(unzipped_dir)[0])
loaded = torch.jit.load(torch_script_path)
loaded(torch.rand((1, 25, 200)))
```

Fails with:

`AttributeError: 'RecursiveScriptModule' object has no attribute 'forward'`

## Expected behavior

Model can be used for inference in Python PyTorch.

## Environment

PyTorch version 1.10.0+cu111

## Additional context

Potentially related issues:
* #17869 (pretty sure this blocks that)
* #32976 (not entirely sure it's related, but similar error)
* #61464
Repository: flutter
Issue: Support for Custom Embedders with Non-standard File I/O
Labels: c: new feature,engine,e: embedder,P3,team-engine,triaged-engine

## Use case

Many platforms, Android included, may store or manage files using non-standard File APIs. In some cases these may map nicely to existing APIs (for ex Win32), but in some cases these may not fit as well (for ex Android NDK AAsset, HTTPS, FTP, etc).

## Proposal

To allow Flutter to become more portable for custom embedders without a standard filesystem, I propose the following changes:

- [ ] Expose AssetResolver through Embedder API (flutter/engine#29802)
- [ ] Allow PersistentCache to be overridden/provided by the Embedder
- [ ] Add GN configuration options for linking with Dart without `dart:io`
- [ ] Add C define (tentatively `FLUTTER_NO_IO`) to ifdef out I/O dependent parts of Engine and FML

This should allow builds of Flutter with embedder-provided I/O. Of course, deeper changes are needed in dependencies like Dart when the target platform is "barely POSIX" but this is out of scope for this issue.
Repository: electron
Issue: [Feature Request]: can i open the extension popup page and background page in electron
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

![image](https://user-images.githubusercontent.com/26026184/142349341-93976d83-0ba5-417a-8700-c1b881ef4957.png)
i can open the chrome's extension  popup page and background page easily in chrome. Can i open the popup page and background page in electron. Or I can;t open these page in electron?

### Proposed Solution

I want to konw the certain answer

### Alternatives Considered

Should I make the popup by myself?

### Additional Information

_No response_
Repository: TypeScript
Issue: Optional discriminated union's callback parameter type is not inferred
Labels: Bug

# Bug Report

Optional discriminated union's callback parameter type is not inferred

### 🔎 Search Terms

#35769 

### 🕗 Version & Regression Information

typescript@4.4.4

### ⏯ Playground Link

https://www.typescriptlang.org/play?ts=4.5.0-beta#code/C4TwDgpgBAglC8UDeAoK6qkgfgFxQHIYCAaNDAQ3wAoBjfJKAE3wDsBXAWwCMIAnKAF8AlAgB8UAG4B7AJZMA3CkEoUWaACEEycunX4CG0rqhUodBszZdefElHpQAzsD6zWAcyGj4EmfKUVVXVYDQBhbTgAHygtJRRJCgEzGHCAbQBdKBiAJQhaaT4mAB4XN097VLDMiUQ0k1QMJtMaMCSKTicfCUbmvpMmlUGUDKA

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
type A = {
    type?: 'A',
    a: (c: { d: number }) => void;
}

type B = {
    type: 'B',
    a: (c: { d: number, c: string }) => void;
}


type ABC = A | B ;

var a: ABC[] | Record<string, ABC[]> = [
    {
        a: (params) => {
            
        }
    }
]
```

### 🙁 Actual behavior

Parameters of method 'a' can not be inferred correctly.

### 🙂 Expected behavior

Parameters of method 'a 'can be inferred correctly: `{d: number}`
Repository: node
Issue: writable.end(cb), the cb is never called
Labels: stream

### Version

16.12.0

### Platform

Linux alex-p330 5.13.0-19-generic #19-Ubuntu SMP Thu Oct 7 21:58:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

### Subsystem

stream

### What steps will reproduce the bug?

1. 
```
touch testfile
chmod 400 testfile
```

2. create test.js with the following content

```
const stream = require("stream");
const fs = require("fs");

const w = fs.createWriteStream("testfile");
w.write("test")
stream.finished(w, (e) => {
  console.log('finished(): ' + e)
  w.end(() => {
    console.log('end()')
  })
})

setTimeout(() => { console.log("timeout"); }, 10 * 1000)
```
3. node test.js and wait 10 seconds


### How often does it reproduce? Is there a required condition?

always

### What is the expected behavior?

```
finished(): Error: EACCES: permission denied, open 'testfile'
end()
timeout
```

### What do you see instead?

```
finished(): Error: EACCES: permission denied, open 'testfile'
timeout
```

### Additional information

_No response_
Repository: vscode
Issue: Process explorer: update name for service worker process
Labels: bug,help wanted,upstream,electron,workbench-diagnostics

Steps to Reproduce:

1) Open any webview, ex: open an extension page
2) Open process explorer
3) There will now be a `window` process with no associated title, it can be mistaken for workbench

Inspecting the window via remote debugging, the following are the location information

```
"vscode-webview://extensioneditor/service-worker.js?id=bd03d4e0-fea8-4a03-8b…de-resource.vscode-webview.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app"
```

Service workers are also spawned as renderer processes so it would be good to differentiate them in the explorer.

<img width="802" alt="Screen Shot 2021-11-18 at 18 13 38" src="https://user-images.githubusercontent.com/964386/142386079-e72eae24-a73a-4824-8610-e20213f499c3.png">
Repository: vscode
Issue: Git - git.autoRepositoryDetection does not honour git.ignoredRepositories nor files.exclude
Labels: bug,git

<!-- ⚠️⚠️ 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?: Yes/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.2
- OS Version: Mac OS 11.6

Steps to Reproduce:

1. Open workspace.
2. Create/clone a repository.
2. Add repository path to git.ignoredRepositories and files.exclude.
![image](https://user-images.githubusercontent.com/3456652/142392088-b9aa101e-4da1-4c7d-af63-0d71b8f613b6.png)
3. Set git.autoRepositoryDetection to true.
![image](https://user-images.githubusercontent.com/3456652/142392207-205c1d71-ce84-4f7d-ad15-c10e4c8a4904.png)
4. Reload/restart workspace.
5. Open a file in the repository.
6. Check git output, git would have scanned the repository and added to Source control.
![image](https://user-images.githubusercontent.com/3456652/142392694-59787746-9ee9-4bf5-ae4d-448b58c46dee.png)
![image](https://user-images.githubusercontent.com/3456652/142394153-8028c1c6-6ce1-4a12-8c4d-95d521b7ee77.png)

I don't think git.autoRepositoryDetection honours git.ignoredRepositories, files.exclude. If this is not a bug, I will raise a feature request for the same.

This is a directory mounted with sshfs. Git scans in this directory take a lot of time (>5 hours). I have the same repo cloned locally. I use this folder for monitoring a remote system and do not need git scans to occur here. Its not a problem if it occurs, but as its an sshfs volume, it takes ages and gets stuck. I cannot unmount the volume while the scan is taking place unless I close vscode. Sometimes the entire system hangs as it tries to scan a disconnected volume.

I use repository detection for other folders in my system, and hope that it allows for exclusions.
Repository: pytorch
Issue: [ux] Print tensor's dtype by default
Labels: triaged,enhancement,module: ux

In addition to already printed device field. This will save some very frequent keystrokes / commands with interactive pdb-based debugging + will also help explorability for new users. E.g. currently:
```
(Pdb) self.gt_classes_img
[tensor([5], device='cuda:0')]
``` 
Question pops up: is it int64? Or is it somehow float, but exactly representing an integer?