sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Scroll position not saved when using back button to go to page using getServerSideProps.
Labels: bug

### What version of Next.js are you using?

10.2.3

### What version of Node.js are you using?

12.6.3

### What browser are you using?

Chrome, Firefox

### What operating system are you using?

Ubuntu 18.04

### How are you deploying your application?

next start, next dev

### Describe the Bug

> This bug was addressed for previous versions of Next prior to version 10. A few of them are as follows #9989 ,#12530. This issue seems to have come back.

- Assume there are 99 posts
- Scroll down to the 50th post and click on it.
- 50th post opens up
- Press the back button
- Expectation is to return to the previous position (50th post)
- However due to the bug the scroll position returns to the top, sometimes it goes to weird locations between the 1st and the 50th post.

This issue occurs when we return to a page which uses `getServerSideProps` with the back button. I tried it with `getInitialProps` and it works fine. 

### Expected Behavior

The expected behavior is to go back to the previous scroll position after clicking the back button. This does not happen.

### To Reproduce

### index.js in the pages folder

```

import React from 'react'
import Link from 'next/link';

const Home = ({ posts }) => {

  const projectList = posts.map((postId) => (
    <li key={postId}>
      <Link href={`/posts/${postId}`}>
        <a className="hover:bg-light-blue-500 hover:border-transparent hover:shadow-lg group block rounded-lg p-4 border border-gray-200">
          <img src="https://via.placeholder.com/600x400.png" alt="" />
          <div className="leading-6 font-medium text-black">
            Project ID : {postId}
          </div>
        </a>
      </Link>
    </li>
  ))

  return (
    <section className="px-4 sm:px-6 lg:px-4 xl:px-6 pt-4 pb-4 sm:pb-6 lg:pb-4 xl:pb-6 space-y-4">
      <ul className="grid grid-cols-1 gap-4">
        {projectList}
      </ul>
    </section>
  )
}

export const getServerSideProps = async () => {
  const posts = [];
  for (let index = 0; index < 1000; index++) {
    posts.push(index);
  }
  setTimeout(() => {
  }, 10000);
  return {
    props: {
      posts
    }
  };
};

// Using this instead of getServerSideProps works as intended
// Home.getInitialProps = async (ctx) => {
//   const posts = [];
//   for (let index = 0; index < 1000; index++) {
//     posts.push(index);
//   }
//   setTimeout(() => {
//   }, 10000);
//   return { posts };
// }

export default Home


```

### [id.js] file in the pages/posts folder
```

export const getServerSideProps = async (context) => {
  const { query } = context;
  const id = query.id;
  return {
    props: {
      id,
    },
  };
};

const Posts = ({id}) => {
  return (
    <h1>
      {id}
    </h1>
  )
}

export default Posts

```
Repository: godot
Issue: Warn you before binding a new shortcut if another shortcut is bound to that key
Labels: discussion,topic:editor,usability,topic:input

### Godot version

3.3.2.stable

### System information

Linux Mint 19.3 Tricia x86_64

### Issue description

If you assign a key bind in shortcuts that is already bound this is allowed.
There should be a popup telling you that key is already bound and offer you the option to unbind it or cancel.

### Steps to reproduce

Editor : Settings : Shortcuts
Bind a key combination that is already bound.

### Minimal reproduction project

_No response_
Repository: TypeScript
Issue: Support go-to-definition on tsconfig mapped paths for non-source files
Labels: Suggestion,Experience Enhancement

# Suggestion

The [recent change](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/#go-to-def-non-js) in TypeScript 4.3 to bring go-to-definition support on non-JavaScript file paths is fantastic! I’d love to see this functionality extended to mapped paths defined in `tsconfig.json`.

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

* go-to-definition (and “go to definition”)
* paths
* tsconfig

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->

## 📃 Motivating Example

As of TypeScript 4.3,
```ts
import foo from "../styles/foo.css";
```
works well when using go-to-definition. This suggestion would make
```ts
import bar from "+styles/foo.css";
```
work just as well, opening up the underlying mapped file.

## 💻 Use Cases

This would be useful anywhere someone is using mapped paths in their `tsconfig.json` to shorten relative imports to commonly used directories (like a “styles” directory).

—

Here’s an example of how I imagine this working:

```
ts-gotodefs-example
├── package.json
├── src
│   ├── css.d.ts
│   └── index.ts
├── styles
│   └── foo.css
├── tsconfig.json
```

`src/index.ts`
```ts
// go-to-definition works, foo.css opens as of TS 4.3
import foo from "../styles/foo.css";
// this should also open foo.css but as of TS 4.3 it does not
import bar from "+styles/foo.css";
```

`src/css.d.ts`
```ts
declare module "*.css" {
    const classes: { [key: string]: string };
    export default classes;
}
```

`tsconfig.json`
```json
{
    "compilerOptions": {
        "rootDir": "src",
        "outDir": "lib",
        "paths": {
            "+styles/*": ["./styles/*"]
        }
    }
}
```
Repository: react
Issue: Question: Transition starvation in React 18?
Labels: Resolution: Needs More Information,Type: Discussion,React 18

Main question:

> What happens if a transition gets constantly interrupted before it has time to finish, and are there any cases where we need to worry about this in userland?

Subquestion:

> What exactly interrupts a transition? Is it only user events, or also for example when a new transition happens and if so, is it only if a new transition happens in the same component or an ancestor, or is it app-wide?

I've seen discussions around the starvation problem now and then (can't remember where) so I'm curious about if you have ended up with a specific approach in React 18 or if this is yet undecided? It struck me that since interrupted work is no longer reused, maybe this has the potential for happening more often now?

The heuristics is an internal detail that can be tweaked of course, so I'm mostly interested if this is something I'll need to ever care about as a developer?

Perhaps more concretely:

> What happens if I call `startTransition` in a `requestAnimationFrame` and it never has time to finish?
Repository: rust
Issue: Large memory usage and long time on compiling large number of println
Labels: I-compiletime,A-borrow-checker,T-compiler,I-compilemem,C-bug

<!--
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.
-->

Not sure whether it's a known bug.

I tried this code:

```rust
fn main() {
    println!("hello world!"); // repeat 16384 times
}
```

(To save you some time, you can download the file [here](https://gist.github.com/upsuper/6518ca5af9d7fce14ca4c7b9b6ed5e28/raw/8c5738af6347f2dabda9559b41791801e9f48d12/test.rs) directly rather than generating it yourself.)

I expected to see this happen: it should take reasonable amount of memory and reasonable time to compile.

Instead, this happened: on my machine, I saw it took up to 34GB memory and 2.5min of time just to compile this.

### 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`:
```
rustc 1.52.1 (9bc8c42bb 2021-05-09)
binary: rustc
commit-hash: 9bc8c42bb2f19e745a63f3445f1ac248fb015e53
commit-date: 2021-05-09
host: x86_64-unknown-linux-gnu
release: 1.52.1
LLVM version: 12.0.0
```
Repository: go
Issue: cmd/go, misc/cgo: clang does not generate .edata sections
Labels: OS-Windows,NeedsInvestigation

We're currently using the .edata section to check whether cgo generated a PE binary with the expected symbols. While binutils generates this section, clang's LLD does not. It still exports the symbols, but just doesn't have the .edata section. This issue is to track the (eventual) refactoring of those tests.
Repository: realworld
Issue: On Update User Endpoint, 'NULL' for the password field in the request body is being accepted which should not happen
Labels: Status: Approved,v2 changelog

# 🐞 bug report

### Relevant scope
Backend Scope

### Description

I was testing the endpoints on Postman and in the Update User POST request, in the Request Body, it sees like I can pass NULL for password which I think should not ideally happen. It essentially makes the user's password null and hence we can't change it thereafter because later the user can't login. 
 For the username parameter in the request body there is a check that says it cant be null and must be minimum 1 character and maximum 20 characters, similarly it should happen for password field as well.

### Error
This should not happen and should sent an error response like the below
![image](https://user-images.githubusercontent.com/64930624/121774251-2d965e80-cb9f-11eb-8d41-2b96bf126f4e.png)


### Correct
![image](https://user-images.githubusercontent.com/64930624/121774229-0d669f80-cb9f-11eb-8f1a-b85536129a3e.png)
Repository: godot
Issue: C# EditorPlugin relative paths
Labels: bug,topic:editor,topic:dotnet

### Godot version

3.3.2.stable.mono.official

### System information

Windows 10, GLES 3

### Issue description

```c#
        var script = GD.Load<Script>("MyButton.cs");
        var texture = GD.Load<Texture>("bubble.png");
        AddCustomType("MyButton", "Button", script, texture);

```
searches from Project root not from addons/<project>/....

It is not possible to work that way and create a plugin.

You also can't enable the EditorPlugin before you have saved and then build the whole project.



### Steps to reproduce

Follow [https://docs.godotengine.org/en/stable/tutorials/plugins/editor/making_plugins.html](https://docs.godotengine.org/en/stable/tutorials/plugins/editor/making_plugins.html) for c# editor plugin.

It won't work until you didn't build the project first time.

Second, this issue, relative paths to MyButton can't be accessed in this addon folder because ```var script = GD.Load<Script>("MyButton.cs");``` searches from project root.

You also need to rebuild the project and disable-enable the plugin all over again to fetch the latest changes

### Minimal reproduction project

_No response_
Repository: flutter
Issue: Default button for forms (Standard in windows)
Labels: c: new feature,framework,f: material design,platform-windows,platform-web,c: proposal,a: desktop,P3,team-design,triaged-design

Hello,

In desktop and web there is the "default button", that is, in a form, having the focus any of the edit fields of the form, pressing the ENTER key on the keyboard executes the default button of the form.
In windows, for example, buttons have a "default" property that indicates which is the default button.
This functionality is required in Flutter. 
Thanks.
Regards,
jose
Repository: godot
Issue: Windows launched by Godot start with `WM_SIZE_HINTS` set too small unless disabling `Resizable` (i3-gaps)
Labels: bug,platform:linuxbsd,topic:porting

### Godot version

master 6d98f84abb5ce8b395c37457c2e8b56e38272215

### System information

Linux x1e2 5.12.8-artix1-1 x86_64 GNU/Linux  using i3-gaps

### Issue description

Similar to #49206 but different: running a scene with F5 or F6 opens the game window with hints that specify its window size to be `0 by 0`. Using `xprop` on a game window opened by 3.x and comparing to the `xprop` output for the game window opened on `master` shows the following additional hints are set on the window launched by `master`:
```
+WM_NORMAL_HINTS(WM_SIZE_HINTS):
+               program specified location: 0, 0
+               program specified size: 0 by 0
```
causing the window to open at the bare minimum size imposed by my window manager.  I have to resize the window manually to get a reasonable window.  This happens regardless of any dimensions given under Display > Window as long as Resizable is checked.  When `Resizable` is *unchecked*, the `WM_NORMAL_HINTS(WM_SIZE_HINTS)` are set to the specified size, and it also adds minimums. e.g.:
```
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified location: 448, 240
                program specified size: 1024 by 600
                program specified minimum size: 1024 by 600
                program specified maximum size: 1024 by 600
```

In case it's at all relevant, these are the only `i3-config` rules I have set for anything pertaining to Godot:
```
for_window [instance="Godot_(?:Editor|ProjectList)"] floating enable
for_window [instance="Godot_Engine" class="^(?!Godot).*"] floating enable, border normal
for_window [instance="Godot_Editor" class="^Godot$"] resize set width 1920 px height 1060px, move position center
```

**edit**: Actually, I notice that the editor itself also opens as a tiny window at first, and then expands to my i3-config's specified size.  Upon erasing the bottom line to resize the editor to `1920 x 1060`, the editor itself opens up smol.  The project manager window is fine.
**edit 2:** `xprop` on the editor shows that it starts with `WM_SIZE_HINTS` set with `program specified size: 75 by 50`

### Steps to reproduce

 - Use `master` on i3-gaps
 - Leave `Resizable` checked
 - Run a scene from the editor, observe smol window

### Minimal reproduction project

Any project, 2D or 3D
Repository: youtube-dl
Issue: Site Support Request: cgcookie.com
Labels: site-support-request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.06.06. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://cgcookie.com/lesson/modeling-the-primary-structures
- Playlist: https://cgcookie.com/course/create-realistic-industrial-environments-with-blender-and-eevee

Youtube Host
introvid: https://cgcookie.com/course/creating-clouds-with-blender-2-8-and-eevee

## Description

<!--
Video corresponnding to "single video"
can be found from developer console and downloaded with youtube-dl
![image](https://user-images.githubusercontent.com/85811535/121793257-8e7f6000-cbba-11eb-9a3b-efca005c816d.png)

Provide any additional information.
Account is optional for paid courses
account can be made at https://cgcookie.com/pricing
-->

doesnt work with single video url or playlist url
Video corresponnding to "single video"
can be found from developer console and downloaded with youtube-dl
![image](https://user-images.githubusercontent.com/85811535/121793257-8e7f6000-cbba-11eb-9a3b-efca005c816d.png)
Account is optional for paid courses
account can be made at https://cgcookie.com/pricing
some videos are served through youtube some through wistia
Repository: go
Issue: x/build: gccgo builder for testing $GOROOT/test directory
Labels: Builders,NeedsInvestigation,FeatureRequest

The $GOROOT/test directory contains test files that are also tested by gccgo, but that we don't regularly test against gccgo. That means:

1. @ianlancetaylor has to periodically spend a bunch of time updating tests for gccgo. E.g., these CLs span about 3 weeks from late Nov 2020 to mid Dec 2020: b94346e69bb01e1cd522ddfa9d09f41d9d4d3e98, d6abf298cf1ef56dc8cbec2ee9a18c071bb6eb3c, a45e12fd4bd2cc4d5970f374499b603bfb793891, 848dff6dda4d38d3d2e9ab128954f50d085d9313, 73e796cb007989449da95fb4adf936ee76b766ca, 58768ae15b3f892b9b1902220ba3564375e5c6de,  bacb307b80747deaf6a017f5b3cee4e3cb115f61, 6d2b3351f6312ebc924d0014013088c69b9c1bc2, ce61ccca8f9e101b13b61907024ee48afadca403, be10af7c4e818566f0b19fb9ffefce2853722842, 5a25a3fd1d8248c039e34f5ae02cc9c8198fc6d6, 685a322fe404d725e6bfb2766388c4b95ed84603, 731bb540381e1b79c85b0bdcb95af90f6bde7b89, 

2. When updating existing tests, folks are scared to ever remove pattern alternatives from existing regexps for fear of breaking gccgo. For example, test/fixedbugs/issue11326.go has tests with *5* alternatives, even though we've only ever supported 3 type checkers (gc, gccgo, and go/types):

   https://github.com/golang/go/blob/1ed0d129e9ba9b55e9ae36ac1d7f2766ba16b373/test/fixedbugs/issue11326.go#L21-L25

   Additionally, the 5th alternative "overflows" is a substring of alternatives 1 and 4, so they needn't be included anymore.

I think both of these issues would be helped if we had a builder (and slowbot) that ran the $GOROOT/test tests in gccgo mode.

/cc @ianlancetaylor @golang/release
Repository: rust
Issue: type aliases dont propagate implied `ConstEvaluatable` bounds of rhs
Labels: C-bug,A-const-generics,F-generic_const_exprs

In an attempt to implement array default with const generics, I tried this code:

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=700737e7598eca3dc58921f4530627f5

The code seems overall ok, but the compilation failed. After some try, it seems i can workaround this by add another usage of the "complex expression", and this second code snippet compiles:

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d3b02c12306c7e0754020951c84f0cbe

However when the usage code is generic, it still doesn't work:

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d3b02c12306c7e0754020951c84f0cbe

With this third piece of code, I did some debugging, and it seems in the `is_const_evaluatable<'cx, 'tcx>` function, there's a call like this:
````text
[compiler\rustc_trait_selection\src\traits\const_evaluatable.rs:44] &def = WithOptConstParam {
    did: DefId(0:46 ~ array_default_extern_generic_doesnt_work[317d]::{impl#0}::{constant#0}),
    const_param_did: None,
}
[compiler\rustc_trait_selection\src\traits\const_evaluatable.rs:45] &substs = [
    R,
    Const {
        ty: usize,
        val: Unevaluated(
            Unevaluated {
                def: WithOptConstParam {
                    did: DefId(0:79 ~ array_default_extern_generic_doesnt_work[317d]::impl_test::UnwindContext::stack_storage::{constant#0}),
                    const_param_did: None,
                },
                substs: [
                    R,
                ],
                promoted: None,
            },
        ),
    },
]
[compiler\rustc_trait_selection\src\traits\const_evaluatable.rs:46] param_env.caller_bounds() = [
    Binder(TraitPredicate(<R as std::default::Default>), []),
    Binder(TraitPredicate(<R as std::marker::Sized>), []),
]
````
And there's no corresponding `ConstEvaluatable` bound in it. So it seems the evaluatable analysis is using a wrong or unpopulated "environment bounds"?

This and the `const_evaluatable_checked` feature itself is the single blocker for array defaults implementation using const generics. So it would be nice if this can get fixed.

cc @rust-lang/wg-const-eval
Repository: godot
Issue: Properties doesn't show up when export in script derived from EditorPlugin
Labels: discussion,topic:editor,topic:plugin

### Godot version

Godot Engine v3.3.2.stable.official

### System information

Windows 10

### Issue description

When writing an editor plugin, I tried to export a variable, but it doesn't show up in the engine.

### Steps to reproduce

Write an editor with  export variable, look something like this.

`export(PackedScene) var CannotExportVariable`

And in the editor dock of the plugin doesn't show up exported property.

![Screenshot (45)](https://user-images.githubusercontent.com/53887662/121797085-31ca8680-cc48-11eb-9191-6e0c7dc576bd.png)

![Screenshot (44)](https://user-images.githubusercontent.com/53887662/121797088-35f6a400-cc48-11eb-915e-5206280604ce.png)



### Minimal reproduction project

[ExportPropertiesInEditorPlugin.zip](https://github.com/godotengine/godot/files/6643353/ExportPropertiesInEditorPlugin.zip)
Repository: create-react-app
Issue: create-react-app error handling in development environment
Labels: needs triage

I've been developing a JS project that from a while ago the React was added to that. I want to use error handling in the development environment the same as the thing that exists when a project creates a `npx create-react-app` command.

I have installed react-scripts and its dependencies but I couldn't fix my issue.

How can I configure my project to reaches error handling in a project that creates via the `npx create-react-app` command?