sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: [Navigator/NavigationBar] One Stack per Navigation Item
Labels: framework,f: routes,c: proposal,P3,team-framework,triaged-framework

## Use case
I want to have a simple Navigation like the one used in Instagram. Meaning as a user I have a stack of Widgets for each Navigation Item. Lets say I have a Navigationbar with 3 items (A,B,C).
The following picture depicts the stacks on an arbitrary state:
![1](https://user-images.githubusercontent.com/15171332/113896552-5595ca00-97ca-11eb-9ce2-a0e9cab927eb.png)
Currently the B Item is selected in the Navbar. Therefore, the current visible Widget is xb3!
If I click the Navbar Item A now, the current Widget changes to x2a as shown in the following picture:
![2](https://user-images.githubusercontent.com/15171332/113896830-942b8480-97ca-11eb-8dbb-d15c5bd61a8c.png)
I can add another Widget on top of the current stack by a "simple push":
![3](https://user-images.githubusercontent.com/15171332/113896923-ad343580-97ca-11eb-805b-a04f679d5528.png)
As you can see, the visible widget is now xa3 and xa3 got pushed on the A stack.
If I am in the A stack and click the navbar item A again, then the current stack gets popped until A appears, leading to this configuration:
![4](https://user-images.githubusercontent.com/15171332/113897190-eff60d80-97ca-11eb-92d8-a1be46261593.png)
 

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal
I would like to have a simple way to archive the described behavior. 
Lets say I am in Widget x. This widget can be reached from any stack. So on pushing a widget to the Navroute the Navigator automatically handles which stack is currently active and passes this information to the widget x.
The widget x can then highlight the appropriate item in the Navbar.

P.S. If there is a way to archive this behavior please let me know.
Repository: excalidraw
Issue: Support updating offsets whenever excalidraw position is updated
Labels: package:excalidraw

This would be needed as there might be cases when there are multiple scroll containers or due to some element add/removal position gets updated in flex container for example. And it might be tricky for host to handle these scenarios specially when position updates due to some add / removal of item.

**Possible solution**
We can keep checking the offsets every x interval (or may be some better heuristic) and update only if offsets were updated. 
However not every app will need this so we can keep this behind a prop so it will be optional.
Repository: rust
Issue: rustdoc: Incorrect link to item when the item is reexported and inlined
Labels: T-rustdoc,E-hard,C-bug

Building the documentation of this code using `cargo doc` generates a link to the wrong page:

```rust
pub mod some {
    pub mod path {
        pub struct Foo;
    }

    #[doc(inline)]
    pub use path::Foo as Bar;
}

/// Link to [`Foo`](crate::some::path::Foo).
pub struct Test;
```

I expected a link to the `some/path/struct.Foo.html` page, but got a link to the `some/struct.Bar.html` page.

### Meta

The error happens in the stable `1.51.0` and nightly `2021-04-07` versions.
Repository: storybook
Issue: Canvas and Preview have conflicting `withSource` properties
Labels: bug,typescript,block: other

**Describe the bug**

`withSource` from `CanvasProps` from `@storybook/addon-docs` https://github.com/storybookjs/storybook/blob/c61b404a624d1b18027330906e7cf9000043379e/addons/docs/src/blocks/Canvas.tsx#L19

conflicts with

`withSource` from `PreviewProps` from `@storybook/components` https://github.com/storybookjs/storybook/blob/4747fea33f82eb488aa78b8bd3835e5b2e5dfa5d/lib/components/src/blocks/Source.tsx#L39

**Screenshots**
![image](https://user-images.githubusercontent.com/2684369/113911431-d20ab780-978e-11eb-9542-65c675903372.png)

![image](https://user-images.githubusercontent.com/2684369/113911373-c28b6e80-978e-11eb-9496-85f4b2509985.png)

**Example Code snippet**
If applicable, add code samples to help explain your problem.
```
export const getDocs: () => JSX.Element = () => {
  return (
    <>
      <Title>SendBox</Title>
      <Description of={SendBox} />
      <Heading>Example</Heading>
      <Canvas withSource={SourceState.NONE}>
        <div />
      </Canvas>
    </>
  );
};
```
**System**
Environment Info:

  System:
    OS: Windows 10 10.0.19042
    CPU: (12) x64 Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz
  Binaries:
    Node: 14.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 89.0.4389.114
    Edge: Spartan (44.19041.423.0), Chromium (89.0.774.68), ChromiumDev (91.0.838.3)
  npmPackages:
    @storybook/addon-actions: ^6.1.1 => 6.1.21
    @storybook/addon-docs: ^6.1.18 => 6.1.21
    @storybook/addon-essentials: ^6.1.1 => 6.1.21
    @storybook/addon-knobs: ^6.1.9 => 6.1.21
    @storybook/addon-links: ^6.1.1 => 6.1.21
    @storybook/addon-storyshots: ^6.1.6 => 6.1.21
    @storybook/node-logger: ^6.1.1 => 6.1.21
    @storybook/react: ^6.1.1 => 6.1.21
    @storybook/storybook-deployer: ^2.8.7 => 2.8.7
    @storybook/theming: ^6.1.10 => 6.1.21
Repository: terminal
Issue: Parse/understand weight suffixes in font names
Labels: Area-Rendering,Area-Settings,Product-Terminal,Issue-Task

From #9375
- C. In the future, we'll perhaps try to parse weight suffixes out of the specified font name and transform them into weight values or something more complicated. Backlog item.

_Originally posted by @miniksa in https://github.com/microsoft/terminal/issues/9375#issuecomment-811522579_

EDIT: See #10777 for some progress here that never ended up getting cleaned up and finished
Repository: PowerToys
Issue: Allow typing in the "Renamed" column when PowerRenaming
Labels: Idea-Enhancement,Product-PowerRename

I imagine when trying to mass rename files, you intend to have some sort of differentiating suffix as well, but you also don't want to use the "enumerate items" option because it doesn't look so great (and adds a random space between it and the title).

Instead what I've had to do is do a mass rename then manually rename the ending for each one, which takes away the whole point of this thing, and doing so leads to a whole sleuth of weird bugs and glitches that can ALSO be eliminated with my proposed feature.

**PROPOSED FEATURE**: After using the "Replace with" option, allow us further edit under the "Renamed" column to make this much more streamlined than it is now.

![image](https://user-images.githubusercontent.com/46249833/113919555-bc5ab980-97b1-11eb-93ef-b038e18ebd45.png)

In my scenario, I want to add quick custom suffixes to the end of a mixtures of a couple letters and numbers (see "Original" column)
Repository: pytorch
Issue: `torch.jit.interface` does not understand dunder methods (e.g. `__call__`)
Labels: oncall: jit

## 🐛 Bug

When defining an interface, `f(...)` does not map to `f.__call__(...)`. I also tested with `__add__`, though the repro is less clear because it falls back to `Tensor.__radd__` so it's less obvious what is going on.

## To Reproduce

```
import torch

@torch.jit.interface
class InterfaceModule(torch.nn.Module):
    def __call__(self, x: torch.Tensor) -> torch.Tensor:
        pass

def f(x: torch.Tensor, m: InterfaceModule) -> torch.Tensor:
    return m(x)

torch.jit.script(f)
```

```
RuntimeError:
cannot call a value of type '__torch__.InterfaceModule':
  File "test.py", line 9
def f(x: torch.Tensor, m: InterfaceModule) -> torch.Tensor:
    return m(x)
           ~ <--- HERE
```

## Expected behavior

`f` should script.

## Environment

 - PyTorch Version (e.g., 1.0): Nightly
 - OS (e.g., Linux): Linux
 - How you installed PyTorch (`conda`, `pip`, source): Built from source
 - Build command you used (if compiling from source): `python setup.py install`
 - Python version: 3.7
 - CUDA/cuDNN version: N/A
 - GPU models and configuration: N/A
 - Any other relevant information: N/A

CC @gmagogsfm 

cc @gmagogsfm
Repository: pytorch
Issue: [FX] See if we can type-annotate attribute accesses on proxy
Labels: triaged,module: fx

When we have a proxy, any attribute access is routed through the `Attribute` class:

https://github.com/pytorch/pytorch/blob/10abbb812a47bfabba4905b50dde02a511191522/torch/fx/proxy.py#L230

We should see if we can assign the correct type annotation in here for some known attribute values, e.g. `Tensor.size`. This may require knowing the type of the Proxy, however.

cc @ezyang @SherlockNoMad
Repository: rust
Issue: Float min/max/clamp follow IEEE754-2008 (and not IEEE754-2019) WRT negative zeros
Labels: C-bug,A-floating-point

In a [blog post](https://shift.click/codelet/codelet-saturate) (shameless plug) I wrote on clamping between 0.0 and 1.0, I noticed that we don't treat `-0.0` as less than `+0.0`. Instead, we return whichever is the first argument:

```
>> f32::min(0.0, -0.0)
0.0
>> f32::min(-0.0, 0.0)
-0.0
>> f32::max(0.0, -0.0)
0.0
>> f32::max(-0.0, 0.0)
-0.0
```

That behavior is kinda incoherent, probably unintentional, and seems highly unlikely that anybody is relying on it, so I suspect we're free to fix it.

While IEEE-754 defines two families of min/max functions (differing on NaN handling), all of them are required to treat `-0.0` as less than `+0.0`. We should fix our version to do this ¹.

This problem is present in `{float}::clamp` too, which ideally would produce +0.0 for `f32::clamp(-0.0, +0.0, _)`. (However, note that clamp uses a different² version of min/max than max/min, so fixing it here won't automatically fix it for clamp).

#### Excerpt from IEEE754 2019 section 9.6 "Minimum and maximum operations" (emphasis mine)

> - maximum(x, y) is x if x > y, y if y > x and a quiet NaN if either operand is a NaN, according to 6.2. **For this operation, +0 compares greater than −0.** ...
>
> - maximumNumber(x, y) is x if x > y, y if y > x, and the number if one operand is a number and the other is a NaN. **For this operation, +0 compares greater than −0.** ...
>
> - minimum(x, y) is x if x < y, y if y < x, and a quiet NaN if either operand is a NaN, according to 6.2. **For this operation, −0 compares less than +0.** ...
>
> - minimumNumber(x, y) is x if x < y, y if y < x, and the number if one operand is a number and the other is a NaN. **For this operation, −0 compares less than +0.** ...

CC @workingjubilee 

---

¹ Alternatively, since these functions only "should" be provided, we could say that we just don't provide equivalents to those functions and that ours are different functions. If we do this, we should have a very good reason IMO, and should document this as well.

² Note that for reasons³ our `{float}::clamp` functions are documented as propagating NaNs, but `{float}::{min, max}` are not. This means this does have to be fixed in multiple places, although, it's coherent under IEEE754 if we assume

- `{float}::{min, max}` use `minimumNumber` and `maximumNumber` respectively
- `{float}::clamp` uses `minimum` and `maximum`

³ <small>Nobody asked, but personally, I'd rather clamp be consistent with min/max, which for this has the benefit of guaranteeing that the result is always in the provided bound, which is quite desirable sometimes. I know it was probably deliberate, and I do get why, and know it can't be changed, but I'm still going to use this footnote-within-a-footnote on an obscure floating point bug report to gripe about it.
Repository: flutter
Issue: A way to distinguish TextEditingController event types.
Labels: a: text input,framework,f: material design,has reproducible steps,P2,found in release: 2.1,team-framework,triaged-framework

<!-- 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 out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

When using the `TextEditingController.addListener(myListener)` I get events from text changes but also from focus changes.
If I want to change my state, let's say showing an alert at some point when the user is typing, `myListener` is called 2 more times.
Meaning that I need to keep track of the previous text and check every time if the text did actually change or if it was just a focus event.
Same happens when the `TextField` get focused or unfocused. I get calls to `myListener`.

## Proposal

Having two listener types for `TextEditingController`. One for focus events and another one just for text changes.

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: transformers
Issue: denoising with sentence permutation, and language sampling
Labels: Feature request

# 🚀 Feature request

<!-- A clear and concise description of the feature proposal.
     Please provide a link to the paper and code in case they exist. -->

## Motivation

When training or fine tuning models, data collator provided in huggingface isn't enough.
For example, if we want to further pretrain `mBART` or `XLM-R`, where language sampling or sentence permutation are needed, which is hard to do with huggingface datasets API since it loads all language datasets at first.   


Thanks!
Repository: pytorch
Issue: Update TCPStore.wait() error message to be more friendly
Labels: oncall: distributed,triaged

```python
import torch.distributed as dist
store = dist.TCPStore("127.0.0.1", 1234, is_master=True, timeout=timedelta(seconds=5))
store.wait(["invalid_key"])
```

output
```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: Socket Timeout
```

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu
Repository: TypeScript
Issue: `unknown` isn’t narrowed by assignment
Labels: Suggestion,Awaiting More Feedback

# Bug Report

### 🔎 Search Terms

try block

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

<= 3.33.  Confirmed on Nightly as well

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about try-catch blocks

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.2.3#code/GYVwdgxgLglg9mABMAFAJwKYEcQYM5QBciA3gA4CGaFAtnsSQNqXU3EFoxgDmAuseADWYOAHcwAbgC+UgJSkAUImWIANhiiIAHogC8iTDnxQAdC1p4TWiUpVQ0AT0UqX2vYgBuFVTAAmFKAwULVkbFylECACIAAtEFAx5EilbZXsnElTXKApBfABley5uYNCsiKioWPjE0hSUhVBIWARPbz8AoK0BMGExMFl2Ip5SAw0QNCQAIimJRBSm6HgkHLy8Qs4eFHpEDmKkqSA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
function f(request: {params: {[param: string]: unknown;}}) {
    let x = request.params.x;
    try {
        x = validate(x);
    } catch (e) {}

    try {
        takesString(x);  // Fails to compile, x is of type unknown.
    } catch (e) {}
}

function validate(x: unknown): string { return ""; }
function takesString(s: string) {}
```

### 🙁 Actual behavior

In this example, the code fails to compile because `tsc` has deduced `x` in the second block to be of type `unknown`

### 🙂 Expected behavior

Since we have successfully exited the first try-catch block, `x`'s type should be narrowed to `string` in the second.
Repository: rust
Issue: Rustc should hint at accidental member access instead of associated function call on local variables
Labels: C-enhancement,A-diagnostics,A-resolve,T-compiler

<!--
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
struct Foo;

impl Foo {
    pub fn bar() {}
}

fn main() {
    let baz = Foo {};
    baz::bar();
}
```
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=69cea2de96d73a7c2c8f4ca0af0cf702

I expected to see this happen: 
```
error: use of undeclared crate or module `baz`

...

did you mean to call the function `bar` on `baz`?

baz.bar();
   ^
```

Instead, this happened:
```
error[E0433]: failed to resolve: use of undeclared crate or module `baz`
 --> src/main.rs:9:5
  |
9 |     baz::bar();
  |     ^^^ use of undeclared crate or module `baz`
```
No hint that maybe they meant to call bar as an associated function.

### 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`: Playground 1.51 stable, doesnt work on nightly 1.53 either
Repository: realworld
Issue: The Settings page requires the email and password fields regardless of whether their changed
Labels: Status: Approved,v2 changelog

Currently the "Email" and "New Password" fields are required by the API when they should not be. The user is unable to update say their username without also providing their email and password. This means users are essentially overwriting both their email and password every time they go to change any field on their profile.
Repository: pytorch
Issue: Source location range issue for dictionary 
Labels: oncall: jit,module: bootcamp,good first issue,OSS contribution wanted

## 🐛 Bug

During our hackathon today, I ran into this weird error highlighting. 
```
import torch
from typing import Dict

@torch.jit.script
def missing_index(x: Dict[str, int]) -> int:
    return x['dne']

missing_index({'item': 20, 'other_item': 120})
```

This code outputs:
```     
     9 
     10 
---> 11 missing_index({'item': 20, 'other_item': 120})

RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
  File "<ipython-input-6-f7e8ae85d5ad>", line 8, in missing_index
@torch.jit.script
def missing_index(x: Dict[str, int]) -> int:
    return x['dne']
           ~~~~ <--- HERE
RuntimeError: KeyError: dne
```
I feel like the highlighted range should be either shorter or long enough to highlight the entire statement. 



cc @gmagogsfm
Repository: node
Issue: Throw within queueMicrotask callbacks should not crash Node
Labels: confirmed-bug,repl,process

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**:v15.9.0
* **Platform**: macOS x86
* **Subsystem**: task_queues

### What steps will reproduce the bug?

```
λ node --trace-uncaught
Welcome to Node.js v15.9.0.
Type ".help" for more information.
> queueMicrotask(_ => { throw 1 });
undefined
>
node:internal/process/task_queues:94
    runMicrotasks();
    ^
1
Thrown at:
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
```

### How often does it reproduce? Is there a required condition?

Always.

### What is the expected behavior?

If I understood the [spec](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#microtask-queuing) correct:

> The queueMicrotask(callback) method must queue a microtask to invoke callback, and if callback throws an exception, report the exception.

It should behave similarly as Timer tasks.

```
> setTimeout(_ => {throw 1});
Timeout {
  ...
}
> Uncaught 1
```


### What do you see instead?

Node crashed

### Additional information

I did some preliminary triages that hopefully helps a bit:

- `task_queues.js` invoke `runMicrotask`
- which is a JS binding from `node_task_queue.cc` which invokes V8's `PerformCheckpoint` under the hood.
- V8's `PerformCheckpoint` invoked V8's `RunMicrotasks` to actually evaluate those JS callbacks.

But since V8's `PerformCheckpoint` returns `void`. I'm not sure how can Node be aware of any exceptions threw during the evaluation of those JS callbacks. Chromium seems to handle this fine but I haven't got time looking at its source.
Repository: pytorch
Issue: Improve test runtime of distributed tests.
Labels: oncall: distributed,module: tests,triaged,better-engineering

## Motivation

@malfet shared the image below outlining that about 1/5th of the test runtime belongs to distributed tests.

![Screen Shot 2021-04-07 at 7 47 47 PM](https://user-images.githubusercontent.com/9958665/113960963-29824500-97da-11eb-97a9-6cc2a8935d33.png)

## Pitch

Top 10 slowest tests can be found here: https://app.circleci.com/pipelines/github/pytorch/pytorch/297842/workflows/8de423f6-e83d-418d-8831-b87cccd172c6/jobs/12211109

I also compiled a list of all tests taking more than 10s: https://gist.github.com/pritamdamania87/97c5330deb1dc0c899de8f2ed5c9c948

These are good candidates to pick up to optimize runtime. As a first step we can ensure all tests run under 10s and then try to target to reduce the runtime even further.

An ideal state would be where most tests have a runtime of less than 1s and some exceptions take longer.

cc @mruberry @VitalyFedyunin @walterddr @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu