sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Submodules not rewritten during AST rewrite
Labels: triaged,module: fx

```python
import torch
from torch.fx import GraphModule
from torch.fx.experimental.rewriter import RewritingTracer

class B(torch.nn.Module):
    def __init__(self):
        super(B, self).__init__()
        self.linear = torch.nn.Linear(100, 200)

    def forward(self, x, y):
        assert y < 5
        return self.linear(x)

class A(torch.nn.Module):
    def __init__(self):
        super(A, self).__init__()
        self.net_b = B()

    def forward(self, x, y):
        assert y < 5
        return self.net_b(x, y)

ast_rewriter = RewritingTracer()
graph = ast_rewriter.trace(A())
```

```
Traceback (most recent call last):
  File "test/tinytest.py", line 36, in <module>
    graph = ast_rewriter.trace(A())
  File "/data/users/ansley/pytorch/torch/fx/experimental/rewriter.py", line 71, in trace
    return super().trace(root, concrete_args)
  File "/data/users/ansley/pytorch/torch/fx/symbolic_trace.py", line 355, in trace
    self.create_node('output', 'output', (self.create_arg(fn(*args)),), {},
  File "", line 3, in forward
  File "/data/users/ansley/pytorch/torch/fx/symbolic_trace.py", line 344, in module_call_wrapper
    return self.call_module(mod, forward, args, kwargs)
  File "/data/users/ansley/pytorch/torch/fx/symbolic_trace.py", line 223, in call_module
    return forward(*args, **kwargs)
  File "/data/users/ansley/pytorch/torch/fx/symbolic_trace.py", line 340, in forward
    return _orig_module_call(mod, *args, **kwargs)
  File "/data/users/ansley/pytorch/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "test/tinytest.py", line 23, in forward
    assert y < 5
  File "/data/users/ansley/pytorch/torch/fx/proxy.py", line 164, in __bool__
    return self.tracer.to_bool(self)
  File "/data/users/ansley/pytorch/torch/fx/proxy.py", line 94, in to_bool
    raise TraceError('symbolically traced variables cannot be used as inputs to control flow')
torch.fx.proxy.TraceError: symbolically traced variables cannot be used as inputs to control flow
```

cc @ezyang
Repository: go
Issue: proposal: cmd/go: support darcs vcs
Labels: Proposal,FeatureRequest,GoCommand

Copied from [Wikipedia](https://en.wikipedia.org/wiki/Darcs): Darcs is a distributed version control system created by David Roundy. Key features include the ability to choose which changes to accept from other repositories, interaction with either other local (on-disk) repositories or remote repositories via SSH, HTTP, or email, and an unusually interactive interface. The developers also emphasize the use of advanced software tools for verifying correctness: the expressive type system of the functional programming language Haskell enforces some properties, and randomized testing via QuickCheck verifies many others. The name is a recursive acronym for Darcs Advanced Revision Control System.
Repository: rust
Issue: Using a type alias for dyn Trait somehow imports the whole Trait, but also not really
Labels: A-resolve,A-trait-system,T-lang,C-bug,A-trait-objects

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
trait Foo {
    fn f(&self) {print!("2");}
}

impl<'a> dyn Foo + 'a {
    fn f(&self) {print!("1");}
}

impl Foo for bool {
}

type Bar = dyn Foo;

mod bar {
    pub fn bar() {
        crate::Bar::f(&true as &crate::Bar);
    }
}

fn main() {
    bar::bar();
}
```

I expected to see this happen: Should've printed 1, as the trait is not in scope, so the inherent impl on the type should be used instead of the trait impl. And yet the trait impl isn't used either.

Instead, this happened: The following error happens:

```
error[E0034]: multiple applicable items in scope
  --> src/main.rs:17:21
   |
17 |         crate::Bar::f(&true as &crate::Bar);
   |         ------------^
   |         |           |
   |         |           multiple `f` found
   |         help: disambiguate the associated function for candidate #2: `Foo::f`
   |
note: candidate #1 is defined in an impl for the type `(dyn Foo + 'a)`
  --> src/main.rs:6:5
   |
6  |     fn f(&self) {print!("1");}
   |     ^^^^^^^^^^^
note: candidate #2 is defined in the trait `Foo`
  --> src/main.rs:2:5
   |
2  |     fn f(&self) {print!("2");}
   |     ^^^^^^^^^^^
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
Uh how do you enable --version --verbose on the playground?
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
<backtrace>
```

</p>
</details>
Repository: rust
Issue: "Consider importing one of these" diagnostic should perhaps not suggest `use` statements from the parent module
Labels: C-enhancement,A-diagnostics,A-visibility,T-compiler,A-suggestion-diagnostics

```
use unicode_segmentation::UnicodeSegmentation; // 1.7.1;

mod foo {
    fn foo<T: UnicodeSegmentation>(){}
}
```

([playpen](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8c9a56f90c59b48525d7407f36153fac))

```
   Compiling playground v0.0.1 (/playground)
error[E0405]: cannot find trait `UnicodeSegmentation` in this scope
 --> src/lib.rs:4:15
  |
4 |     fn foo<T: UnicodeSegmentation>(){}
  |               ^^^^^^^^^^^^^^^^^^^ not found in this scope
  |
help: consider importing one of these items
  |
4 |     use crate::UnicodeSegmentation;
  |
4 |     use unicode_segmentation::UnicodeSegmentation;
  |
```

It's not really standard style to reuse _private_ `use` statements from other modules, at least not in my experience. Should the suggestion filter these out?


cc @estebank
Repository: pytorch
Issue: Omitting mutability annotations in op schemas can lead to subtle errors 
Labels: module: internals,triaged

## Problem

An op schema carries per-argument/per-return-value annotations to indicate mutability, e.g.

```
op_with_mutable_second_arg(Tensor first, Tensor(a!) second) -> Tensor(a!) 
```

Arguments without annotations are understood by the system to be immutable. 

When an schema has *no* arguments carrying mutability annotations, the system may treat the op as referentially transparent (making it memoizable) and effect-free (making a call to it superfluous if its output is provably unused).

```
functional_op(Tensor a, Tensor b) -> Tensor
```

The second condition is trivially true when the op returns nothing - from the POV of e.g. an optimization pass in the JIT, no call to such an op can produce meaningful results:

```
doomed_to_silence(Tensor a, Tensor b) -> ()
```

Unfortunately, if mutability annotations are omitted by mistake on an op that delivers its results entirely by mutating its arguments, the resulting schema might well have exactly this property. JIT optimizations can then remove calls to the op, resulting in hard-to-trace errors ([recent FB-internal example](https://fb.prod.workplace.com/groups/329222650990087/permalink/839925069919840/)).

## Solution (oartial)

Schema types/mutability annotations aren't tightly coupled enough to the C++ types of implementing kernels to permit erroring when, say, a const-Tensor-typed param in C++ receives the value of a mutability-annotated Tensor arg. 

But it shouldn't be too hard to at least add a registration-time check for the pathological case - an op with no mutable args *and* no return value - using the existing [compile-time schema parsing machinery](https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/core/op_registration/infer_schema.h). 

cc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh @ailzhang for reality check on practicality
Repository: flutter
Issue: [web]: No back/forward gesture support on iOS and MacOS browsers
Labels: c: new feature,framework,f: routes,f: gestures,platform-web,c: proposal,P3,team-web,triaged-web

I'm testing Navigator 2.0 functionality for a web apps, as described here: https://flutter.dev/docs/development/ui/navigation
The example I'm trying is the one described in the [blog post](https://medium.com/flutter/learning-flutters-new-navigation-and-routing-system-7c9068155ade). Here is [the code](https://gist.github.com/johnpryan/5ce79aee5b5f83cfababa97c9cf0a204). I also tried my own examples and other flutter-web demos on the web with the same result.
Also this official [Flutter Animation web demo](https://flutter.github.io/samples/web/animations/#/), has full PWA history support via back button, but back gesture does not work.

The problem: flutter web apps do not have support for back/forward gesture (swipe right/left from edge) that is normally available on all web pages in all MacOS and iOS browsers (Safari, Chrome, Firefox). History navigation works as intended if back/forward button is used, just the back/forward gesture does not work. It seems that the flutter web by default consumes all gesture events and does not propagate them to browser.

Platform: the problem occurs on all MacOS browsers: Safari, Chrome, Firefox. It also occurs on iOS (iPad) in Safari browser. 

How is it expected to work: flutter web apps run in MacOS & iOS browsers should have the default behavior as all other web pages or web apps do: have beck/forward gestures available and the app navigation (history API) should honor the back/forward gesture the same as it does with the back/forward buttons.
Repository: rust
Issue: Lifetime parameters in type aliases do not need to be used in the definition
Labels: A-lifetimes,T-compiler,C-bug

The following code compiles, even though it would emit an error about the lifetime being unused in any other context:
```Rust
type Huh<'a> = String;
```
Interestingly enough,
```Rust
type Huh<'a> = String;

struct MyStruct<'a> {
    foo: Huh<'a>,
}
```
fails to compile with
```
error[E0392]: parameter `'a` is never used
 --> src/lib.rs:3:17
  |
3 | struct MyStruct<'a> {
  |                 ^^ unused parameter
  |
  = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
```
I'm not sure what exactly is going on here, but if nothing else, this error message seems pretty confusing.

context: [link](https://www.reddit.com/r/rust/comments/logr07/crust_of_rust_subtyping_and_variance_video/go7u8c6/?utm_source=reddit&utm_medium=web2x&context=3)
Repository: three.js
Issue: pointsToStroke: Return a shape rather than a geometry
Labels: Enhancement

<!-- Ignoring this template may result in your feature request getting deleted -->

**Is your feature request related to a problem? Please describe.**

I'd like to create a map from an svg image. For this to work, I'd like to generate outlines for the map, and use the ExtrudeGeometry in order to create the walls.

**Describe the solution you'd like**

The `pointsToStroke` function seems to be what I'm looking for, however it's currently hardcoded to only return BufferGeometry. Given that the rest of the SVG loader works with shapes, I feel like it'd make sense API-wise that `pointsToStroke` would do so as well.

**Describe alternatives you've considered**

Tried a lot of alternatives to generate the outline, but the overhead w/ Three.js is significant. Since there are primitives supposed to do just that already, I'd prefer to only have to use them.
Repository: TypeScript
Issue: Broken emit when `Infinity` or `‑Infinity` ends up in a type position
Labels: Bug,Has Repro

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

- `Infinity`
- `NaN`
- numeric
- literal

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- Tested in: **TypeScript 4.1.5** and **TypeScript 4.3.0‑dev**
- I was unable to test this on prior versions because <https://github.com/microsoft/TypeScript/pull/9407> was implemented in **TypeScript 2.0**.

### 💻 Code

```ts repro
// @declaration
// @showEmit
// @showEmittedFile: index.d.ts

// @filename: index.ts
export const PositiveInfinity: 1e1_000_000 = 1/0 as any;
export const NegativeInfinity: -1e1_000_000 = -1/0 as any;
```

### ⏯ Playground Link

[Workbench Repro](https://www.typescriptlang.org/dev/bug-workbench/?target=2#code/PTAEAEBMFMGMBsCGAnRAXAlgewHYCgQIBnACywHcBRAWwzQLHFIprrWkgDEN5oAuUBhwwAHgDpIYtEQYQAZj2g5E1foOHRx0vJoAOWZGlCxcRIwAUsROhgBu0AJI4FOOgE8BARmieA+gAZAgMDQAF5QT2B-UEQiGJw3AG4dEX1DY1MjADloAHN0O0dnIXcBAFpvP0D-YOjwiqiYuMQE5KA)

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->
**TypeScript** emits `Infinity` and `‑Infinity` in a type position, which are intentionally invalid according to <https://github.com/microsoft/TypeScript/pull/9407#issuecomment-229721835>:
```ts
// index.d.ts
export const PositiveInfinity: Infinity;
export const NegativeInfinity: -Infinity;
```

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->
The `Infinity` and `‑Infinity` values are valid in a type position, so that the generated `.d.ts` file is valid.

---

Also, it’d be nice to support literal `NaN`s, which would allow for `Number.isNaN` to be typed as:
```ts
interface NumberConstructor {
	isNaN(number: unknown): number is NaN;
}
```

### Related issues
- https://github.com/microsoft/TypeScript/issues/28682
- https://github.com/microsoft/TypeScript/issues/31752
- https://github.com/microsoft/TypeScript/issues/32277
- https://github.com/microsoft/TypeScript/issues/56272
Repository: vscode
Issue: The initial position of the VSCode is shifted down when the native titlebar is on
Labels: bug,linux,good first issue,electron,titlebar,confirmed,upstream-issue-pending

<!-- ⚠️⚠️ 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. -->
- VS Code Version: 1.53.2
- OS Version: GNOME 3.38.4 X11 (Fedora 33)

The initial position of the VSCode is shifted down with every start of application when the native titlebar is on. Please, watch [this video](https://streamable.com/2tswdk).

Steps to Reproduce:

1. Launch VSCode and move its window to the required position
2. In the settings, select the native view for the window titlebar (Window > Title Bar Style > native)
2. Close VSCode
3.  Launch VSCode again

<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
<!-- 🪓 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 direct to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
Repository: pytorch
Issue: RTX 2080s performs better than RTX 3080 in Semantic Segmentation inference process(Libtorch,win10),why?
Labels: module: performance,module: cuda,triaged

## ❓ RTX2080s better than RTX3080?
### I used RTX2080s and RTX3080 to perform semantic segmentation inference operations in the same environment(see below,also same model & same data) separately.  The speed of using 3080 is _**>0.2s**_ per frame, while the speed of using 2080s is **_<0.01s_** per frame. Why is this?
This speed refers to the time of forward() function in libtorch...I measured it by using these codes:
```C++
clock_t forwardStart,forwardEnd;
  forwardStart = clock();
  output = module.forward(inputs).toTensor();
  forwardEnd = clock();
qDebug() << "Forward Time：" << double(forwardEnd - forwardStart) / CLOCKS_PER_SEC << "s" << endl;
``````
The pictures are loaded by opencv3.4.1's videocapture method and then pre-processed and trandformed into tensor.
```C++
    cap.read(img);//1920*1080
    pyrDown(img, img, Size(img.cols / 2, img.rows / 2));
    copyMakeBorder(img, img, 2, 2, 0, 0, BORDER_CONSTANT, value);
    cvtColor(img, img, CV_BGR2RGB);
    auto tensor_image = torch::from_blob(img.data, { 1, img.rows, img.cols, 3 }, torch::kByte); //opencv format H*W*C
    tensor_image = tensor_image.permute({ 0, 3, 1, 2 }); //pytorch format N*C*H*W
    tensor_image = tensor_image.toType(torch::kFloat);
    tensor_image = tensor_image.div(255.0);
    tensor_image[0][0] = tensor_image[0][0].sub_(0.5).div_(0.5);
    tensor_image[0][1] = tensor_image[0][1].sub_(0.5).div_(0.5);
    tensor_image[0][2] = tensor_image[0][2].sub_(0.5).div_(0.5);
    tensor_image = tensor_image.to(torch::kCUDA);
    std::vector<torch::jit::IValue> inputs;
    inputs.push_back(tensor_image);
    forwardStart = clock();
    output = module.forward(inputs).toTensor();
    forwardEnd = clock();
    qDebug() << "Forward Time：" << double(forwardEnd - forwardStart) / CLOCKS_PER_SEC << "s" << endl; 
``````

### Environment:
Win10 Libtorch-1.7.1
cuda11.0
Visual Studio 2019-release×64-Target platform:Win10-17763

- [Discussion Forum](https://discuss.pytorch.org/)


cc @ngimel @VitalyFedyunin
Repository: three.js
Issue: SVG Loader: incorrect rendering in complex SVGs
Labels: Enhancement,Loaders

**Describe the bug**

I'm trying to use SVGLoader to load a more complex SVG generated from Illustrator

I get hundreds of warnings:
 - THREE.Color: Unknown color url(#linear-gradient-26)
 - SVGLoader: url access in attributes is not implemented.
 - SVGLoader: Elliptic arc or ellipse rotation or skewing is not implemented.

And a few errors:
 - THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values. 

**To Reproduce**

It occurs when I'm trying to load a complex svg, the code is the same. Unfortunately, I cannot share this SVG. I'll just upload parts of it, I suppose.

This is how the browser renders it:
![image](https://user-images.githubusercontent.com/6199480/108632588-76070080-7478-11eb-90e7-6c123a49c056.png)

This is how Three.js renders it:
![image](https://user-images.githubusercontent.com/6199480/108632633-9f279100-7478-11eb-8847-4aebca3e0327.png)

**Expected behavior**

It should look exactly the same as the browser would render it natively, but the colors are undefined and the z-order of the elements seems wrong. The wireframe visualization is correct, though.
The SVG also contains subtle elements with small opacity values. SVGLoader seems to ignore the shapes that are supposed to be visible through the transparent layers.

**Platform:**

 - Device: Desktop
 - OS: Windows
 - Browser: Chrome, Firefox, Edge
 - Three.js version: main branch
Repository: flutter
Issue: GlowingOverscrollIndicator dartpad samples are confusing
Labels: framework,f: scrolling,d: api docs,d: examples,P2,team-framework,triaged-framework

GlowingOverscrollIndicator code samples may be confusing when ran in web, because glow is not drawn

https://api.flutter.dev/flutter/widgets/GlowingOverscrollIndicator-class.html

TargetPlatform should be used in these samples
Repository: puppeteer
Issue: puppeteer provides no way to retrieve all cookies
Labels: feature,confirmed

There is no way to retrieve all the browser's cookies (i.e. to call `Network.getAllCookies`). If I provided a patch to do this, would you pull it? Should the API be a new call such as `page.allCookies()` or `context.cookies()`, or a parameter to `page.cookies()` such as `"*"` or `"all"` or `undefined`? (It's not obvious why the current call `page.cookies()` is on the `page` object anyway - it is a function of the browser context, not the page.)
Repository: tauri
Issue: Use with OTP/Elixir, and specifically Phoenix LiveView
Labels: type: feature request

**Is your feature request related to a problem? Please describe.**

Glad to see a solid alternative to Electron! While Rust is a great choice (though I am currently building apps in Elixir) I much prefer not using JS-heavy frameworks like React and instead use [Phoenix's LiveView](https://www.phoenixframework.org/) to build SPA apps driven by the backend.

**Describe the solution you'd like**

I'd love see what it would take to bundle OTP and an Elixir and LiveView-based app using Tauri. 

**Describe alternatives you've considered**

[Bakeware](https://github.com/spawnfest/bakeware) is a step in the right direction, and could maybe be combined with Tauri for these purposes.
Repository: flutter
Issue: Support Full Keyboard Access on iOS for keyboard navigation events
Labels: platform-ios,framework,a: accessibility,f: focus,has reproducible steps,P1,customer: chalk (g3),customer: castaway,found in release: 3.19,found in release: 3.22,team-accessibility,triaged-accessibility

Internal: b/368112319

Internal: b/374883991

## Steps to Reproduce

1. Connect iPhone to an external keyboard via bluetooth 
2. Run/open an iOS flutter app (on a physical device)
3. Try to navigate the app using only an external keyboard

**Expected results:**
- Able to access & interact with all input elements (text fields, buttons, checkboxes, etc.) by making use of keys such as tab, up, down, space, enter, etc.

**Actual results:**
- Not able to access any input fields or interact with the app in any way

**Details**
- I tried using the 1Keyboard app to use my Mac keyboard through bluetooth, and I also bought a bluetooth keyboard to try. Both yielded same result.
- There is one workaround I have found but it only applies to text fields. That is to set autofocus to true and then adding this code to the text field: <code> textInputAction: TextInputAction.next, onEditingComplete: () => FocusScope.of(context).nextFocus(), </code> But, I would expect it to work out of the box and for any type of input element. Also this requires autofocus to be set to true which is not ideal in many cases. 
- I have tried using a small sample app I've built, as well as the Flutter Catalog app which I read should have this support.

**Flutter Doctor Results**
<img width="607" alt="Screen Shot 2021-02-21 at 2 25 38 PM" src="https://user-images.githubusercontent.com/70536174/108637542-c1a5b400-7450-11eb-96b2-10eacf06ae57.png">

@gspencergoog Hixie said you have done work on keyboard for mobile. Any ideas? Thanks for looking at this!
Repository: go
Issue: syscall/js: Add new convenient functions
Labels: NeedsDecision,FeatureRequest

Add 3 new JS functions that are common and make them **idiomatic Go** in usage:
- New2
- Invoke2
- Call2