sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: use staticuint64s
Labels: Suggested,Performance,help wanted,NeedsFix,compiler/runtime

CL 216401 introduced a new static array of uint64s running from 0 to 255.

Two follow-ups here:

* We should use it in the compiler instead of staticbytes for byte-sized values (see https://go-review.googlesource.com/c/go/+/216401/2/src/runtime/iface.go#531).

* We should use it in the compiler for larger-sized ints whose value is a constant between 0 and 255.
Repository: TypeScript
Issue: Go to definition shouldn't go to the import/require/aliased statement
Labels: Bug

*TS Template added by @mjbvz*

**TypeScript Version**: 3.8.3

**Search Terms**
- go to definition
- require
- node / nodejs

---

```js
const { c } = require('./a');

c();
```
When I `CTRL + CLICK` `c`, I want to go to the definition of `c` inside `a.js`, not to the require statement.

Currently
- `go to type definition` gives this behavior, but I can't rebind mouse commands
- if I allow `peek`, the second option is the one that I want
Repository: flutter
Issue: Semantic buttons in TextSpan with gesture recognizer weren't read consecutively.
Labels: platform-android,framework,a: accessibility,customer: dream (g3),has reproducible steps,customer: peppermint,P2,found in release: 3.7,found in release: 3.10,team-android,triaged-android

Internal bug: b/150621008

The client is building a `TextSpan` via:

```dart
child: RichText(
  text: TextSpan(
    text: '',
    children: [...]
```

Inside TextSpan there's a bunch of children that may or may not be "links". The links like this:

```dart
TextSpan(
    text: someLoremIpsumText,
    style: someLinkStyle,
    recognizer: TapGestureRecognizer()..onTap = someGestureHandler,
    semanticsLabel: someText,
);
```

**The problem is that when the text reader announces these, it stops at each link.** It requires user action (like a "next gesture" or a tap) to continue. The expected behavior is that the reader should just keep going.

The semantic tree looks like this (with a link in the middle):

```
                                        |─SemanticsNode#48
I/flutter ( 4942):            │ │   Rect.fromLTRB(68.0, -4.0, 192.0, 24.0)
I/flutter ( 4942):            │ │   actions: tap
I/flutter ( 4942):            │ │   flags: isLink
I/flutter ( 4942):            │ │   label: "lorem ipsum"
I/flutter ( 4942):            │ │   textDirection: ltr
I/flutter ( 4942):            │ │   sortKey: OrdinalSortKey#cac8c(order: 1.0)
I/flutter ( 4942):            │ │
I/flutter ( 4942):            │ ├─SemanticsNode#49
I/flutter ( 4942):            │ │   Rect.fromLTRB(-4.0, -4.0, 521.0, 44.0)
I/flutter ( 4942):            │ │   label:
I/flutter ( 4942):            │ │     " lorem ipsum lorem ipsum "
I/flutter ( 4942):            │ │   textDirection: ltr
I/flutter ( 4942):            │ │   sortKey: OrdinalSortKey#d570b(order: 2.0)
I/flutter ( 4942):            │ │
I/flutter ( 4942):            │ ├─SemanticsNode#50
I/flutter ( 4942):            │ │   Rect.fromLTRB(41.0, 16.0, 282.0, 44.0)
I/flutter ( 4942):            │ │   actions: tap
I/flutter ( 4942):            │ │   flags: isLink
I/flutter ( 4942):            │ │   label: " lorem link ipsum "
I/flutter ( 4942):            │ │   textDirection: ltr
I/flutter ( 4942):            │ │   sortKey: OrdinalSortKey#a369f(order: 3.0)
I/flutter ( 4942):            │ │
I/flutter ( 4942):            │ ├─SemanticsNode#51
I/flutter ( 4942):            │ │   Rect.fromLTRB(-4.0, 16.0, 630.0, 84.0)
I/flutter ( 4942):            │ │   label:
I/flutter ( 4942):            │ │     " lorem ipsum"
I/flutter ( 4942):            │ │   textDirection: ltr
I/flutter ( 4942):            │ │   sortKey: OrdinalSortKey#73755(order: 4.0)
```
Repository: godot
Issue: 3.2 Stable Mono - Exported standalone custom resource has default/null field values, arrays of custom resources work as expected 
Labels: topic:dotnet

**Godot version:**
3.2 Stable Mono

**OS/device including version:**
Windows 10

**Issue description:**
Custom resources exported by themselves are not initialized properly. Ex:

```cs
public class MyCustomResource : Resource {
  [Export]
  public string Id { get; private set; } = "my resource id"
}
```

```cs
// SomeNode.cs
[Export]
private MyCustomResource _resource; // assume I have assigned my custom resource via the editor

public override void _Ready() {
  GD.Print(_resource?.Id ?? "no id"); // prints "no id" on run
}
```

However, when I structure the export as a `Godot.Collections.Array` I see the following:

```cs
[Export]
private Godot.Collections.Array<MyCustomResource> _resource; // assume I have assigned a single resource via the editor

public override void _Ready() {
  GD.Print(_resource[0].Id); // prints "my resource id" on run
}
```

Potentially related, I also noticed that attempting to duplicate custom resources at run time also clears out all of the properties and fields of the resource. Let me know if I should file a separate bug for that.

**Steps to reproduce:**
See above

**Minimal reproduction project:**
N/A
Repository: nvm
Issue: Support Node Aliases
Labels: feature requests

Hey, I was wondering what it would take to get nvm to support these aliases?

https://github.com/nodejs/package-maintenance/issues/236

Is this something you are interested in?
Repository: rust
Issue:  Consider integrating with OSS-Fuzz?
Labels: C-enhancement,T-compiler

(Similar to my issue for regex: https://github.com/rust-lang/regex/issues/650)

[OSS-Fuzz](https://google.github.io/oss-fuzz/) is a Google-provided service that can automatically and continuously fuzz OSS code and report bugs for discovered issues.

[The requirement for being accepted](https://google.github.io/oss-fuzz/getting-started/accepting-new-projects/) in OSS-Fuzz is "project must have a significant user base and/or be critical to the global IT infrastructure" which I _personally_ believe includes the rustc since it's at the core of so much stuff. Also, OSS-Fuzz supports fuzzing Rust libraries, so IMO that signals the project views Rust as important enough. [List of projects that are currently in OSS-Fuzz.](https://github.com/google/oss-fuzz/tree/master/projects) Note that LLVM and Go are on the list, so compilers have been accepted before.

Can't hurt to file a form and ask.

OSS-Fuzz offers [monetary rewards for integration](https://opensource.googleblog.com/2017/05/oss-fuzz-five-months-later-and.html), up to $20k. It can be donated to a charity and Google will double the reward. (Has the much-talked-about Rust Foundation been created? If so, it would be a great fit.)

$40k to a charity for a few days of work doesn't sound like a bad deal...

(Disclaimer: I work for Google, but not on anything fuzzing or security-related. I do not speak for my employer. This suggestion comes from "personal Val", not "business Val". :smiley:)

cc @Shnatsel @rust-fuzz
Repository: rust
Issue: Very hard to read error when returning `?` from closure not returning Result or Option
Labels: C-enhancement,A-diagnostics,T-compiler,A-suggestion-diagnostics,D-papercut

The original code:
```rust
    // '[' expr ']' | '(' argument* ')' | '.' ID | '->' ID | '++' | '--'
    fn match_postfix_op(&mut self) -> SyntaxResult<Option<Locatable<impl Fn(Expr) -> ExprType>>> {
        let needs_id = |this: &mut Self, constructor: fn(Box<Expr>, InternedStr) -> ExprType| {
            let start = this.next_token().unwrap().location;
            let Locatable { data: id, location } = this.expect_id()?;
            let location = start.merge(&location);
            (move |expr| constructor(expr, id), location)
        };
        // prefix operator
        let (func, location) = match self.peek_token() {
            Some(Token::Dot) => needs_id(self, ExprType::Member)?,
            _ => return Ok(None),
        };
        Ok(Some(Locatable {
            data: move |e| func(Box::new(e)),
            location,
        }))
    }
```

```
error[E0277]: the `?` operator can only be used in a closure that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
   --> src/expr.rs:237:52
    |
235 |           let needs_id = |this: &mut Self, constructor: fn(Box<Expr>, InternedStr) -> ExprType| {
    |  ________________________-
236 | |             let start = this.next_token().unwrap().location;
237 | |             let Locatable { data: id, location } = this.expect_id()?;
    | |                                                    ^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a closure that returns `([closure@src/expr.rs:239:14: 239:47 constructor:_, id:_], data::lex::DefaultLocation)`
238 | |             let location = start.merge(&location);
239 | |             (move |expr| constructor(expr, id), location)
240 | |         };
    | |_________- this function should return `Result` or `Option` to accept `?`
    |
    = help: the trait `std::ops::Try` is not implemented for `([closure@src/expr.rs:239:14: 239:47 constructor:_, id:_], data::lex::DefaultLocation)`
    = note: required by `std::ops::Try::from_error`

error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
   --> src/expr.rs:243:33
    |
243 |             Some(Token::Dot) => needs_id(self, ExprType::Member)?,
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `([closure@src/expr.rs:239:14: 239:47 constructor:_, id:_], data::lex::DefaultLocation)`
    |
    = help: the trait `std::ops::Try` is not implemented for `([closure@src/expr.rs:239:14: 239:47 constructor:_, id:_], data::lex::DefaultLocation)`
    = note: required by `std::ops::Try::into_result`

error: aborting due to 2 previous errors
```

The fix was to return `Ok()` at the end of the closure: `            Ok((move |expr| constructor(expr, id), location))`. It would be much more helpful if the error message suggested returning `Ok()` at the end instead of spouting a wall of text at me.
Repository: rust
Issue: Improve diagnostics when a type does not impl a trait despite #[derive]'ing it
Labels: C-enhancement,A-diagnostics,T-compiler


_Originally posted by @simonbuchan in https://github.com/rust-lang/rust/issues/26925#issuecomment-593708712_

I think I would be a lot happier with the current situation with "just" adding more information to the compiler diagnostic.

At the moment, you get something like:
```
error[E0599]: no method named `clone` found for type `Ptr<Foo>` in the current scope
 --> src/main.rs:9:15
  |
2 | struct Ptr<T>(*mut T);
  | ---------------------- method `clone` not found for this
...
9 |     let b = a.clone();
  |               ^^^^^ method not found in `Ptr<Foo>`
  |
  = note: the method `clone` exists but the following trait bounds were not satisfied:
          `Ptr<Foo> : std::clone::Clone`
  = help: items from traits can only be used if the trait is implemented and in scope
  = note: the following trait defines an item `clone`, perhaps you need to implement it:
          candidate #1: `std::clone::Clone`
```

or

```
error[E0382]: use of moved value: `a`
  --> src/main.rs:10:15
   |
8  |     let a = Ptr(&mut foo);
   |         - move occurs because `a` has type `Ptr<Foo>`, which does not implement the `Copy` trait
9  |     let b = a;
   |             - value moved here
10 |     let ptr = a.0;
   |               ^^^ value used here after move
```

Neither of these tell you that the *reason* `Ptr` doesn't implement `Copy` or `Clone`, despite `#[derive(Copy, Clone)]` being right there. I think some logic to add another sentence for this would get rid of the case where `derive` doesn't implement when it should, which I think newer users (like me!) would be more likely to hit.
Repository: pytorch
Issue: autograd with TorchScript does not match finite differences
Labels: high priority,triage review,oncall: jit

## 🐛 Bug

Some code does not match finite differences (`torch.autograd.gradcheck`) if scripted. Below is a minimum reproducible example:

## To Reproduce

```python
import torch
torch.set_default_dtype(torch.float64)

def func(arg: torch.Tensor) -> torch.Tensor:
    a = (arg * 1.001)[None]
    b, = torch.unbind(a, dim=0)
    #b = a[0] # Uncommenting this line works
    
    return arg * 1.001 + b

torch.autograd.gradcheck(func, (torch.tensor(1., requires_grad=True))) # This passes
torch.autograd.gradcheck(torch.jit.script(func), (torch.tensor(1., requires_grad=True))) # This fails
```
Output:
```
RuntimeError                              Traceback (most recent call last)
<ipython-input-30-771c6d9493c6> in <module>
     10 
     11 torch.autograd.gradcheck(func, (torch.tensor(1., requires_grad=True))) # This passes
---> 12 torch.autograd.gradcheck(torch.jit.script(func), (torch.tensor(1., requires_grad=True))) # This fails

~/.local/lib/python3.6/site-packages/torch/autograd/gradcheck.py in gradcheck(func, inputs, eps, atol, rtol, raise_exception, check_sparse_nnz, nondet_tol)
    287                 if not torch.allclose(a, n, rtol, atol):
    288                     return fail_test('Jacobian mismatch for output %d with respect to input %d,\n'
--> 289                                      'numerical:%s\nanalytical:%s\n' % (i, j, n, a))
    290 
    291         if not reentrant:

~/.local/lib/python3.6/site-packages/torch/autograd/gradcheck.py in fail_test(msg)
    225     def fail_test(msg):
    226         if raise_exception:
--> 227             raise RuntimeError(msg)
    228         return False
    229 

RuntimeError: Jacobian mismatch for output 0 with respect to input 0,
numerical:tensor([[2.0020]])
analytical:tensor([[1.0010]])
```

I experimented with a few other cases. The scalar multipliers (here `1.001`) must be the same, and cannot be `0.` or `1.`. Replacing `unbind` with indexing (as commented in the example) also solves the issue.

## Expected behavior

The gradient of PyTorch and TorchScript functions should agree with each other, and with finite differences.

## Environment

PyTorch version: 1.4.0 (installed through pip)
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Ubuntu 18.04.4 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
CMake version: version 3.10.2

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce GTX 1080 Ti
Nvidia driver version: 440.59
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5

Versions of relevant libraries:
[pip3] numpy==1.18.1
[pip3] pytorch3d==0.1
[pip3] torch==1.4.0
[pip3] torch-cg==1.0.1
[pip3] torchtext==0.4.0
[pip3] torchvision==0.5.0
[conda] Could not collect

cc @ezyang @gchanan @zou3519 @bdhirsh @heitorschueroff @gmagogsfm @suo
Repository: rust
Issue: Tracking issue for more precise coroutine captures
Labels: A-type-system,E-hard,C-enhancement,T-compiler,A-coroutines,A-async-await,AsyncAwait-Triaged,T-types

Today, valid programs using coroutines (and async/await) are rejected by the compiler because it thinks certain values may be held across yields when they are not.

Examples / to do: (please add more as they come up)

- [x] https://github.com/rust-lang/rust/issues/57017
- [x] https://github.com/rust-lang/rust/issues/57478
- [x] https://github.com/rust-lang/rust/issues/72956
- [x] #72651
- [ ] https://github.com/rust-lang/rust/issues/63768
- [x] #87309
- [x] #104883

### Unresolved Questions

How should we implement this?

Are there any programs which _could_ be accepted, but shouldn't be because they would depend too heavily on implementation details of the compiler?

### Implementation notes

There's some discussion here: https://github.com/rust-lang/rust/issues/57017#issuecomment-540023781

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->
This issue has been assigned to @eholk via [this comment](https://github.com/rust-lang/rust/issues/69663#issuecomment-881594396).
<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"eholk"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: storybook
Issue: MDX Props table doesn't display props of external library component
Labels: feature request,addon: docs,block: props

I have a use-case where I want to document in my storybook a material-ui component and get all of it's props to be displayed in the table.

As a naive approach, here was my mdx doc file:
```mdx
import { Meta, Story, Preview, Props } from "@storybook/addon-docs/blocks";
import { Button } from "@material-ui/core";

<Meta title="Button" component={Button} />

### Basic

<Preview>
  <Story name="Basic">
    <Button>
        Storybook
    </Button>
  </Story>
</Preview>

### Props

<Props of={Button} />
```

Unfortunately, I couldn't see any props in the table.

I'm consuming the compiled version material-ui component which includes a separated `d.ts` types file with all the relevant props and descriptions but I can't seem to load them properly.
Repository: rust
Issue: Tracking Issue for the `avr-interrupt`/`avr-non-blocking-interrupt` calling convention/ABI
Labels: T-lang,B-unstable,C-tracking-issue,WG-embedded,O-AVR,S-tracking-needs-summary,A-hardware-interrupts

<!--
Thank you for creating a tracking issue! 📜 Tracking issues are for tracking a
feature from implementation to stabilisation. Make sure to include the relevant
RFC for the feature if it has one. Otherwise provide a short summary of the
feature and link any relevant PRs or issues, and remove any sections that are
not relevant to the feature.

Remember to add team labels to the tracking issue.
For a language team feature, this would e.g., be `T-lang`.
Such a feature should also be labeled with e.g., `F-my_feature`.
This label is used to associate issues (e.g., bugs and design questions) to the feature.
-->

This is a tracking issue for the RFC "XXX" (rust-lang/rfcs#NNN).
The feature gate for the issue is `#![feature(FFF)]`.

### Steps

- [x] Implement the RFC
- [ ] Adjust documentation ([see instructions on rustc-guide][doc-guide])
- [ ] Stabilization PR ([see instructions on rustc-guide][stabilization-guide])

[stabilization-guide]: https://rust-lang.github.io/rustc-guide/stabilization_guide.html#stabilization-pr
[doc-guide]: https://rust-lang.github.io/rustc-guide/stabilization_guide.html#documentation-prs

### Unresolved Questions

None yet.

### Implementation history

* #69478 introduces AVR as a tier-3 target upstream
Repository: scrcpy
Issue: Lock video rotation to landscape but display in portrait 
Labels: rotation

Hello, please let me know if this is the right place  to ask.

I'm having problem with screen rotation of the device, basically the screen orientation (portrait, 1080x1920) & input capture (click) are correct, but the video stream of the screen are not (c.f. screenshot 1 & output 1)

```
❯ ninja -Cx && ./run x --lock-video-orientation 0                                                                                                                                           scrcpy/git/dev 
ninja: Entering directory `x'
[0/1] Generating scrcpy-server with a custom command.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 739ms
26 actionable tasks: 1 executed, 25 up-to-date
2020-03-03 09:57:38.751 scrcpy[72447:1637298] INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
x/server/scrcpy-server: 1 file pushed. 1.8 MB/s (26886 bytes in 0.014s)
2020-03-03 09:57:39.175 scrcpy[72447:1637298] INFO: Initial texture: 1080x1920
```
When I try to lock screen to rotate 90 degree, it works perfectly, but then everything is rotated (c.f. screenshot2 and output 2)

```
❯ ninja -Cx && ./run x --lock-video-orientation 1                                                                                                                                           scrcpy/git/dev 
ninja: Entering directory `x'
[0/1] Generating scrcpy-server with a custom command.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 758ms
26 actionable tasks: 1 executed, 25 up-to-date
2020-03-03 10:03:17.570 scrcpy[72684:1643900] INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
x/server/scrcpy-server: 1 file pushed. 1.8 MB/s (26886 bytes in 0.015s)
2020-03-03 10:03:17.999 scrcpy[72684:1643900] INFO: Initial texture: 1080x1920
2020-03-03 10:03:18.126 scrcpy[72684:1643900] INFO: New texture: 1920x1080
```
My question is "is there a way to rotate the stream again 90 degree so I can work with the app normally without having my neck rotated." I don't mind to hard code a walkaround for this specific case, but still don't know where I can modify the code, client or server etc.

Regards,

Screenshots
https://imgur.com/a/VC2kvEg
Repository: flutter
Issue: [in_app_purchase] autoConsume should be false by default
Labels: p: in_app_purchase,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

By what it looks like, in_app_purchases autoCompletes transactions by default:
```
Future<bool> buyConsumable({@required PurchaseParam purchaseParam, bool autoConsume = true});
```

I presume those auto-consumed purchases are not verified against app licence and therefore might be spoofed. By setting `autoConsume` to be `true` by default it creates a potential threat to users who do not even think about verifying purchases as the library completes the purchase for them.
Repository: flutter
Issue: Provide system font info in initial configuration on Linux
Labels: framework,engine,platform-linux,c: proposal,a: desktop,P3,team-linux,triaged-linux

Material should be using the system font; on most platforms we have a specific font (Roboto, San Francisco, etc.) but on Linux we should be getting that information from the system. E.g., on Ubuntu it should be Ubuntu, but that wouldn't be right for Debian.

The current thinking is that we should query the system for that an pass it in the initial configuration system channel (which isn't currently being sent at all on Linux IIRC, but we can certainly add it).

/cc @gspencergoog