sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: spec: don't say that 0123i == 123i is for backward-compatibility
Labels: NeedsDecision

The Go Language Specification in https://golang.org/ref/spec#Imaginary_literals has the example

```
0123i         // == 123i for backward-compatibility
```

With the new number literal proposal implemented in `Go 1.13`, I think the comment should be changed, since now it is `0123 == 0o123` that should be considered to be for backward-compatibility.

Probably the examples in https://golang.org/ref/spec#Integer_literals

```
0600
0_600
```

should have a comment `// == 0o600 for backward-compatibility`.
Repository: react
Issue: SuspenseList tail property not working on re-renders
Labels: Type: Discussion,Component: Suspense,Component: Concurrent Features

<!--
  Note: if the issue is about documentation or the website, please file it at:
  https://github.com/reactjs/reactjs.org/issues/new
-->

**Do you want to request a *feature* or report a *bug*?**

I am reporting a possible bug or otherwise requesting clarification.

**What is the current behavior?**

When a component with a SuspenseList re-renders (such as when it is is passed a new resource), the SuspenseList component still  respects the revealOrder="forwards" or revealOrder="backwards" prop but does not respect the tail="collapsed" or tail="hidden" prop.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**

https://codesandbox.io/s/exciting-cherry-g9uc9

In order to see bug: 
1) Refresh the Code Sandbox browser and see that "Loading profile..." displays and "Loading posts..." does not due to the tail being collapsed.  This is the expected behavior.
2) Press the "Next" button.  Both "Loading Profile..." and "Loading posts..." display.  The tail is no longer collapsed.

**What is the expected behavior?**

The expected behavior would be for the tail to be collapsed when pressing the "Next" button. "Loading profile..." should be displayed, but not "Loading posts..."

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

This affects only the experimental Concurrent Mode build of React.
Repository: TypeScript
Issue: this type in conditional type false clause is incorrectly typed
Labels: Bug

**TypeScript Version:**  3.7.3

**Search Terms:**
generic type this widening incorrect

**Code**

```ts
type Option1 = { run(this: { b: 1 }): void }

function f1(options: Option1) { return options }

// `this` is correctly typed as `{ b: 1 }`
f1({ run() { this.b } })

type Option2<Config> = Config extends Record<string, any> ? {
  config: Config,
  run(this: Config): void
} : {
  run(arg: { b: 1 }): void
}

function f2<Config>(options: Option2<Config>) { return options }

// `this` is correctly typed as `{ a: number }`
f2({ config: { a: 1 }, run() { this.a } })
// `arg` is correctly typed as `{ b: 1 }`
f2({ run(arg) { arg.b } })

type Option3<Config> = Config extends Record<string, any> ? {
  config: Config,
  run(this: Config): void
} : {
  run(this: { b: 1 }): void
}

function f3<Config>(options: Option3<Config>) { return options }

// `this` is correctly typed as `{ a: number }`
f3({ config: { a: 1 }, run() { this.a } })
// `this` is widen to what `Config` extends to. In this case `Record<string, any>`
f3({ run() { this.b } })
```

**Expected behavior:**
`this` in `f3({ run() { this.b } })` should be typed as in `this` in `f1()` and `arg` in `f2()`

**Actual behavior:**
`this` in `f3({ run() { this.b } })` is typed as the base type of `Config` (`Record<string,any>` in the example above)

**Playground Link:**
[Playground Link](https://www.typescriptlang.org/play/?ssl=1&ssc=1&pln=37&pc=1#code/C4TwDgpgBA8mwEsD2A7AjFAvFA3lATgK4oAUwAFggM4BcuUARnRgL4CUdAbkggCZQsAsACgRAM2IBjRKihi0JJPGQpasZajRt6+CMEL4UUJTNUCRIgPSWoAAwrVbUalElJ8u6QBsQUUJH4AQyo7PCYoVltxBTwiUm08ByoAOgYBATYLYX9oOFMAJgAeAGFUMQQAcwA+LChSlHKKqAgAD2AIFF4QgCUIN3xeQqpgfAQUCoAaKECUEBqAflwRKFcyyrp6xonlgmIySjVNyo4obj4RFig6HB24kkD8CuvGZgyuHl4LrIkUaRU5IpHaqKDSqOh5FSAtbVBIEPQGIwmFQhISiYTWOxJJwufqeYA+PzgCBBEK2PCBOgoQgAWwYEHwAiiwjE+RIeDcDXW9ApEQEUzusKSyUC6XYWQxtgeFWxIRyJNCL15LCZLLZu1IUthUtSosyaJy6lMAGYStCatggc02h0ulBev1BsNRuMpjM5lBFjdhCsOY0NtDtt71ftqP7ORUTmdPsJLtdbnsks9wqxIx8vmifn9ZGITUCqiDTGoIahc2bYbp9IZjKCUeKbPYDjLVh4+vjfHLpqTyZSaXSGcrxEa1b6ud2lfy9oKDsLdXXMY3nCEAO58Dp+JBQJfkQLAOxApytdqdWVIZJQACSRiSrmC0Fs9vcjpGY0m01mVRVQ9ik-oQrSlzFYQgA)


**Related Issues:**
Some maybe related issues:
https://github.com/microsoft/TypeScript/issues/32990
https://github.com/microsoft/TypeScript/issues/30152
https://github.com/microsoft/TypeScript/issues/13995

I also recall there were some discussion about `type` and `Record<>`, but that is in the gitter channel and I can't find relevant issue or doc about it.

I think this is different than the related issues above because this does not involve union type.

This is about the `false` condition of the conditional type `Config extends Record<string, any> ? ... : ...` do not use the generic type `Config` and should not be affected by it.
Repository: flutter
Issue: ThemeData.from ignore colorPrimary when brightness is dark
Labels: framework,f: material design,a: quality,has reproducible steps,found in release: 3.3,found in release: 3.7,team-design,triaged-design

## Steps to Reproduce

1. create a colorscheme:
```dart
const ColorScheme.dark(
      primary: Color(0xFFf8fa93),
      primaryVariant: Color(0xFFc4c763),
      onPrimary: Color(0x8C000000),
      secondary: Color(0xFF9593fa),
      secondaryVariant: Color(0xFF6265c6),
      onSecondary: Color(0xA8000000),
    );
```
2. create a theme data using the ThemeData.from:
```dart
ThemeData.from(
      colorScheme: defaultDarkColorScheme,
      textTheme: Typography.englishLike2018,
    );
```
3. override the primary text theme with text color matching eligible [text color](https://material.io/resources/color/#!/?view.left=1&view.right=1&primary.color=F8FA93&secondary.color=9593fa):
```dart
defaultDarkTheme.copyWith(
      primaryTextTheme: defaultDarkTheme.primaryTextTheme.apply(
        displayColor: Color(0x6B000000),
        bodyColor: Color(0x8C000000),
      ),
      accentTextTheme: defaultDarkTheme.accentTextTheme.apply(
        displayColor: Color(0x7D000000),
        bodyColor: Color(0xA8000000),
      ),
    );
```
4. pass the theme to the material app theme or dark theme property.

Result:
the app bar color does not match the primary color so then the text appbar is not visible.

Here's a dart pad example showing the issue https://dartpad.dev/b6409e10de32b280b8938aa75364fa7b

**Target Platform:**
Any
**Target OS version/browser:**
Any
**Devices:**
Any
Repository: pytorch
Issue: Negative indices in chunk could cause Out of Range access on loss.backward in JIT
Labels: oncall: jit,triaged

## 🐛 Bug

This's the error message:

```
  File "~/exp/foo/train.py", line 114, in train
    loss_.backward()
  File "~/.local/lib/python3.6/site-packages/torch/tensor.py", line 166, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "~/.local/lib/python3.6/site-packages/torch/autograd/__init__.py", line 99, in backward
    allow_unreachable=True)  # allow_unreachable flag
RuntimeError: vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 2)
The above operation failed in interpreter, with the following stack trace:
```

It doesn't happen given `env PYTORCH_JIT=0`.

It doesn't mention anything about where the error could actually be... So I went hunting in recent commits and:

## To Reproduce

I'm still trying to write a minimal example, but haven't been able to yet.

It's a custom RNN. The _only_ difference between the code that works with the JIT and that which doesn't is one place with the following change:

```py
out = self.input_kernel(xto).chunk(4, 1)
# had been changed into:
out = self.input_kernel(xto).chunk(4, -1)
```

`xto` is _always_ a 2D tensor where dim1 is divisible by 4. The error also mentions it's of `this->size() == 2`. Unless I'm misunderstanding that.

Factoring out that expression into a method and decorating it `jit.ignore` solves the issue. Meaning the model runs and trains. But there's this break in the JIT chain.

## Expected behavior

Negative indices work as expected.

## Environment

```
PyTorch version: 1.3.1
Is debug build: No
CUDA used to build PyTorch: 10.1.243

Python version: 3.6
Is CUDA available: Yes

Versions of relevant libraries:
[pip3] numpy==1.18.0
[pip3] pytorch-transformers==1.1.0
[pip3] torch==1.3.1
[pip3] torchfile==0.1.0
[pip3] torchnet==0.0.4
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.4.0
[pip3] torchviz==0.0.1
```

## Additional context

None.


cc @suo
Repository: pytorch
Issue: The model training time is increasing between runs if the same DataLoader reused to train multiple models.
Labels: module: dataloader,triaged

[torch-dataloader-issues.ipynb.zip](https://github.com/pytorch/pytorch/files/4022924/torch-dataloader-issues.ipynb.zip)

## 🐛 Bug

The model training time is increasing between runs if the same `DataLoader` reused to train multiple models. This problem was initially observed when we benchmarked fast.ai model, so we tried plain torch and it seems the problem persists.

The problem is not as severe if `num_workers=0` used. And it seems the source is somewhere in this call

Training time for 500 runs with the same DataLoader:
![image](https://user-images.githubusercontent.com/10080307/71775719-78d42880-2f3a-11ea-9236-f37d50e6b920.png)


**Before**

```
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      151    0.009    0.000    0.261    0.002 /home/user/anaconda3/envs/py36mkl/lib/python3.6/site-packages/torch/utils/data/dataloader.py:344(__next__)
```

**After**
```
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      151    0.010    0.000    0.277    0.002 /home/user/anaconda3/envs/py36mkl/lib/python3.6/site-packages/torch/utils/data/dataloader.py:344(__next__)
```
## To Reproduce

See attached jupyter notebook in zip.

## Expected behavior

No training time growth if the same data loader reused to train same model.

## Environment
```

Collecting environment information...
PyTorch version: 1.3.1
Is debug build: No
CUDA used to build PyTorch: 10.1.243

OS: Ubuntu 18.04.3 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: TITAN RTX
Nvidia driver version: 440.33.01
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5

Versions of relevant libraries:
[pip] numpy==1.17.4
[pip] torch==1.3.1
[pip] torchvision==0.4.2
[conda] mkl                       2019.5                intel_281    intel
[conda] mkl-service               2.3.0                    py36_0    intel
[conda] mkl_fft                   1.0.14           py36ha68da19_1    intel
[conda] mkl_random                1.0.4            py36ha68da19_2    intel
[conda] mxnet-mkl                 1.5.1.post0              pypi_0    pypi
[conda] pytorch                   1.3.1           py3.6_cuda10.1.243_cudnn7.6.3_0    pytorch
[conda] torch                     1.2.0                    pypi_0    pypi
[conda] torchvision               0.4.2                    pypi_0    pypi
```

## Additional context
See attached jupyter notebook for more details.

cc @SsnL
Repository: rust
Issue: Compile code is very slow in debug mode
Labels: I-compiletime,T-compiler,A-incr-comp

Compile code is very slow in My hardware configuration.
```
CPU : Core i7 8700 3.2GHz(6 core)
MEM: 16GB
Samsung SSD 500GB solid state drive
```
Compilation is very slow.
every time  Compilation  use more than 10 second

Can the new version speed up compilation?  Because the compilation is slow and the coding efficiency is also slow。
Repository: flutter
Issue: Add screen shot capabilities to webview
Labels: c: new feature,p: webview,package,team-ecosystem,P3,triaged-ecosystem

<!-- 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 our 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 alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

<!--
     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.
-->
Could you please add a function in webview plugin which can take a shortcut in webview? Thanks so much
Repository: storybook
Issue: Create an official template for CRA
Labels: feature request,cli,cra

**Is your feature request related to a problem? Please describe.**
Since CRA now supports [custom template](https://create-react-app.dev/docs/custom-templates), I think it makes sense for us to create official template for CRA. It would make new comers easier to get started with storybook and CRA.

**Describe the solution you'd like**
We can create a new package `cra-template-storybook` and maintain it in this mono. We just have to follow the guide [here](https://create-react-app.dev/docs/custom-templates#building-a-template), and the official template in [`cra-template`](https://github.com/facebook/create-react-app/tree/master/packages/cra-template) and [`cra-template-typescript`](https://github.com/facebook/create-react-app/tree/master/packages/cra-template-typescript).

**Describe alternatives you've considered**
`npx -p @storybook/cli sb init` works just fine, and we can continue support that for existing projects and for non-CRA projects. For new projects though, we can recommend users to just use `cra-template-storybook` to get started.

**Are you able to assist bring the feature to reality?**
Absolutely! I think it's fairly straight-forward. There are only some minor issues, like where should we put this project? A new directory `templates`? Inside `examples` (but it's not an example)? Or maybe just in `lib`?

Also since we can control the template now, we could create example component directly inside the template rather than using `@storybook/react/demo`. Would love to hear some ideas about this 🙂.

**Additional context**
In short for what it would look like when landed. Users can simply run this command and get an CRA with storybook.

```sh
npx create-react-app --template storybook
```
Repository: ant-design
Issue: Timeline组件能否支持水平（horizontal）和竖直（vertical）两种方向
Labels: Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
很多数据可视化需要一种水平显示，比如一种重复的周期性的日期

### What does the proposed API look like?
就像Steps组件一样 提供direction参数就行


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: rust
Issue: Type inference can't resolve through Result::map_err
Labels: C-enhancement,T-lang,T-compiler,A-inference

I would expect all 4 of these functions to compile, but the second one apparently doesn't have enough type information, despite it looking logically equivalent to the first (to me anyways).

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1d3fa8810715f720dd3f6c09e8db534f
Repository: flutter
Issue: Support named routes redirects
Labels: c: new feature,framework,f: routes,platform-web,c: proposal,P3,team-web,triaged-web

## Use case

For Flutter web, the page URL shown on the browser's address bar corresponds to the named routes. However, there is very little control as to what URL to show to the user. And there is no way to define a route redirect in the `routes` (which takes a `WidgetBuilder`). 

For example, we can do the following to map multiple named routes to the same widget, but on the web version the page URL will show up differently.

```dart
routes: <String, WidgetBuilder>{
  '/first': (context) => FirstScreen(),
  '/firstAlias': (context) => FirstScreen(),
  '/second': (context) => SecondScreen(),
)
```

If we don't want the page URL to show up as `'/firstAlias'` and we want to simply redirect the route to  `'/first'`, this currently is very hard to implement because `NavigatorState` doesn't expose an API for getting the path of the current route, and `Route` doesn't expose an API for determining a route's path either. So there is no simple way to determine in `FirstScreen`'s `initState` which route it is and thus cannot easily push routes to redirect accordingly.

The use case, is for web apps, for example, it is common to have the same content with multiple URLs, while having a unique canonical URL for them all. And we want to redirect all other URLs to its canonical URL that is exposed to the user on the browser's address bar.

## Proposal

I'd like to propose a `RouteRedirect` widget that could handle the route redirects:

```dart
routes: <String, WidgetBuilder>{
  '/first': (context) => FirstScreen(),
  '/firstAlias': (context) => RouteRedirect.to('/first'),
  '/second': (context) => SecondScreen(),
)
```

The difference here in using `RouteRedirect.to(String routeName)` is that it will redirect the named route, so it can expose the desired on the URL on the browser's address bar. In this case, the URL will show up as `'/first'` even when `'/firstAlias'` is pushed, or if the user attempts to visit `'/firstAlias'` through the address bar.

### Things that Route Redirects might affect

- How `NavigatorObserver` should behave with route redirects
The `NavigatorObserver.didPush` should be triggered twice -- once for the route redirect (`'/firstAlias'`) and another for the target route (`'/firstAlias'` -> `'/first'`) 

- How cross-route animations (e.g. `Hero` animations`) should behave with route redirects
Any cross-route animations should not be affected by route redirects.
Repository: TypeScript
Issue: Include new features in handbook instead of referencing "What's new".
Labels: Docs

While reading through the handbook I find something like this:

"From TypeScript 3.7 and onwards, you can use optional chaining to simplify working with nullable types." Where "optional chaining" links to the "What's new" page for version 3.7.

Why not include this in the handbook but put references - in the handbook - to other pages explaining "What's new"?

Please include all features of the language in the handbook. Actually I'd suggest to always update the handbook and only put references in the "What's new" page with a link to the relevant pages in the handbook.
Repository: create-react-app
Issue: Allow independent versioning for custom react-scripts forks
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

Yes.

I'm currently working on a custom version of react-scripts for my company to use so that we can build new react-apps with our own webpack configs & pre-installed dependencies. However, the problem is that in `createReactApp.js` line 436, `const templatesVersionMinimum = '3.3.0';` it makes it so that in order for CRA to actually build the src files properly I have to specify a minimum package version of `3.3.0` I get the motivation for that code. However, if I'm working on a new customized version of a package, I don't really want to start at version 3.3.0, I want to start at 0.0.1 or at least 1.0.0. 

### Describe the solution you'd like

I think the `templatesVersionMinimum` constant being set to `3.3.0` should really only be applied if you intend to use the default package of react-scripts that CRA uses. Otherwise it really shouldn't have that limit in place, because other people might not want to begin their package versioning at 3.3.0. Of course, people using custom-react scripts intending to use templates would need to be sure their customizations don't break the template support introduced in 3.3.0 so I guess the scope expands a bit further than simply setting a conditional wherein that `templatesVersionMinimum` isn't set at all when a non-default react-scripts is specified.

### Describe alternatives you've considered

1. Setting my package version to `3.3.0`
--This works, but I mean it's pretty gross.

2. Leaving modern society and living in a cave eating berries
--This doesn't _fix_ the problem per se. But it does remove it from a being a problem I need to deal with. Not an ideal solution either.
Repository: scrcpy
Issue: Long press action for BACK, HOME, APP_SWITCH
Labels: feature request

Android (9 Pie) allow you to define "long press" and "double tap" actions for BACK, HOME, APP_SWITCH (in Settings/Buttons/Buttons).

"Long press" is not working. 

For example "long press Middle-Click" is NOT working like "long press HOME" on device. And "long press Right-Click" is NOT working like "long press BACK" on device. 
(It is the same about long press Ctrl+B, Ctrl+H, Ctrl+S).

Thanks!
Repository: godot
Issue: Inspector unresponsive when expanding array with a dictionary value while game running
Labels: bug,topic:editor

**Godot version:**
v3.2.beta5

**OS/device including version:**
Windows 10

**Issue description:**
If you place dictionaries into an array, then it can be unresponsive to open and close the dictionary in the inspector while the game is running.
https://gyazo.com/939fb3800e04dafccdfbea764dfc31cc

**Steps to reproduce:**
Create an array with a dictionary in it
Run game
Select Remote scene tree
Navigate to array in inspector
Click to expand the dictionary value

**Minimal reproduction project:**
[dict-array-bug.zip](https://github.com/godotengine/godot/files/4023792/dict-array-bug.zip)