sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Top-level await is broken server-side if awaited promise result is not assigned
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.16.0
      npm: 9.5.1
      Yarn: 1.22.19
      pnpm: 8.2.0
    Relevant packages:
      next: 13.3.1-canary.10
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

_No response_

### Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/stupefied-edison-wod7ed?file=%2Fpages%2Findex.tsx

### To Reproduce

Start server and open index page:

```
npm start dev
open http://localhost:3000
```

### Describe the Bug

When top-level await support is enabled by setting compilation target in `tsconfig.json` to `es2017` or higher and enabling the webpack experiment `topLevelAwait`, a syntax error is thrown server-side when parsing top-level await without assigning its result to a variable.

If the awaited promise result is captured, no syntax error is thrown. This error is only thrown by the server, while the same syntax runs fine in client code.

The following error is printed to the console:

```
Error:
  x top level await requires target to es2017 or higher and topLevelAwait:true for ecmascript
   ,-[/.../top-level-await-repro/pages/index.tsx:2:1]
 2 |   "Top-level await with assignment works fine"
 3 | );
 4 |
 5 | await Promise.resolve(
   : ^^^^^
 6 |   "Top-level await without assignment causes Syntax Error in server (works on client)"
 7 | );
   `----

Caused by:
    Syntax Error
```

### Expected Behavior

Standalone statements using top-level await without assignment should work for server-side code.

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: flutter
Issue: [packages] Enforce snippets for more languages
Labels: team,p: tooling,package,team-ecosystem,P3,triaged-ecosystem

Currently we only require that ` ```dart ` blocks use code snippets in the flutter/packages repo tooling. Ideally we should expand that to cover as many languages as we reasonably can, so that we're ensuring that other code (e.g., Pigeon examples, or native configuration code for some plugins) is also correct.
Repository: PowerToys
Issue: Fancy zones space around zone edit in canvas
Labels: FancyZones-Layouts,Product-FancyZones,Needs-Triage,Needs-Team-Response

### Description of the new feature / enhancement

I want to edit the space around the fancy zones as you can in grid mode. I use fancy zones, as shown below, which allow for the most productivity, and I have recently moved to Canvas to allow for a main window when needed. Without the ability to edit the space around, it leaves gaps where I can see my moving wallpaper, which can be very distracting. 

I have tried it without an animated background also, and this still comes threw. It presents itself as flickering all around the edge and in between the zones in the middle.


![Screenshot_2](https://user-images.githubusercontent.com/127796906/232593639-e95e8d4f-9a5d-4e13-a409-c491c7169b24.png)

![Screenshot_1](https://user-images.githubusercontent.com/127796906/232594386-2db92b44-6504-4170-b81c-b67bc92bb402.png)


### Scenario when this would be used?

It would be used daily as once you get into the layered fancy zones, it is a lot more productive and allows for greater freedom. 

### Supporting information

_No response_
Repository: vscode
Issue: [linked editing] Linked editing stops syncing on quick edits
Labels: bug,editor-synced-region


Type: <b>Bug</b>

1. `"editor.linkedEditing": true`
1. In an html file, start linked editing on some tags
1. Rapidly type a few characters

**Bug**
Sometimes linked editing stops working

VS Code version: Code - OSS Dev 1.78.0 (Commit unknown, Date unknown)
OS version: Darwin x64 22.4.0
Modes:
Sandboxed: Yes

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|3, 4, 3|
|Memory (System)|32.00GB (0.01GB free)|
|Process Argv|.|
|Screen Reader|no|
|VM|0%|
</details>
<!-- generated by issue reporter -->
Repository: flutter
Issue: As long as the payment isn't confirmed the purchase shouldn't be part of the result of restorePurchases
Labels: p: in_app_purchase,package,team-ecosystem,P2,triaged-ecosystem

_The following was reported to our security alias. It does not seem to me to be a security vulnerability so I am filing it as a normal issue. -@Hixie_

----

## Steps to Reproduce

I use in_app_purchase: 3.1.5 and test on an emulator inside Android Studio.

1. Buy a product with a slow test card. E.g.: "Slow test card, declines after a few minutes"
2. Call InAppPurchase.instance.restorePurchases() within the next minute

**Expected results:**
As long as the payment isn't confirmed the purchase shouldn't be part of the result of restorePurchases. Or at least should have the state: PurchaseStatus.pending

**Actual results:**
Purchase is returned when calling restorePurchases and [state] is PurchaseStatus.restored, [pendingCompletePurchase] is true

With these values I'm not able to say if the payment is confirmed or not. Giving access to a product can therefore be exploided by using a delayed, declining credit card and call restorePurchases.

(Stopping the delivery of the product when PurchaseStatus.restored && pendingCompletePurchase == true
isn't an option, because I want to be able to restore a purchase when the user behaves like this: Purchases a product and immediately closes the app)

It is possible to set the correct `PurchaseStatus` by hand. I call the following function inside `InAppPurchase.instance.purchaseStream.listen` for each `PurchaseDetails`:

```dart
static void _bugfixSetPending(PurchaseDetails purchaseDetails) {
  if (Platform.isAndroid &&
      purchaseDetails.status == PurchaseStatus.restored) {
    if (purchaseDetails is GooglePlayPurchaseDetails) {
      final state = purchaseDetails.billingClientPurchase.purchaseState;
      if (state == PurchaseStateWrapper.pending) {
        purchaseDetails.status = PurchaseStatus.pending;
      }
    } else {
      logger.w('Failed to access google purchase details.');
    }
  }
}
```
Repository: next.js
Issue: Middleware breaks with next config compress: false
Labels: bug,Runtime

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home
    Binaries:
      Node: 16.14.0
      npm: N/A
      Yarn: N/A
      pnpm: 8.2.0
    Relevant packages:
      next: 13.1.1
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0

-- It says 13.1.1 for next but im testing on the latest 13.3.1-canary.10 canary
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Middleware / Edge (API routes, runtime)

### Link to the code that reproduces this issue

https://github.com/Djboy08/next-canary-bug

### To Reproduce

Simply create a middleware js file, and mark compress: false in the config file.

Whatever routes that match the matcher, are rendered as a blank page.


### Describe the Bug

The bug will render a blank page and nothing will show.

### Expected Behavior

Should just show the page

### Which browser are you using? (if relevant)

Edge

### How are you deploying your application? (if relevant)

localhost dev
Repository: PowerToys
Issue: Update Default AlwaysOnTop Hotkey to script-able key and add command-line support
Labels: Idea-Enhancement,Product-Always On Top,Needs-Triage

### Description of the new feature / enhancement

By default the AlwaysOnTop Hotkey is set to Win + Ctrl + T. Unfortunately this key combination is not able to be called by the SendKeys class as SendKeys does not support the Win key. To circumvent this issue and enable out of the box script-able functionality I propose updating the default hotkey to Ctrl + Alt + T.

Required updates are in files:
src\modules\alwaysontop\AlwaysOnTop\Settings.h
src\settings-ui\Settings.UI.Library\AlwaysOnTopProperties.cs

Note: At a future date it may also be desirable to be able to call AlwaysOnTop via command line. A cmd syntax could look something like
```
AlwaysOnTop -window <TargetWindowName> -boarder <#px> -enabled <Bool>
```

### Scenario when this would be used?

This is a simple update to default settings to enable the possiblity of calling AlwaysOnTop via native classes which is currently not possible.

### Supporting information

_No response_
Repository: go
Issue: proposal: cmd/go: option to disable caching for specific packages
Labels: Proposal,ToolSpeed,GoCommand,compiler/runtime

When embedding large amounts of data with `embed`, the data is then stored in the Go build cache.

This can cause the Go build cache to grow quite rapidly in size.

This proposal is to add a variable similar to GOPRIVATE like GONOCACHE which would disable the Go build cache for a specific list of Go packages (or package patterns).

We want to cache compiling most packages, but some, which carry large "embed" data, should not be cached.
Repository: next.js
Issue: FOUC in with-emotion-swc
Labels: examples

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.4.0: Mon Mar  6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103
    Binaries:
      Node: 18.15.0
      npm: 9.6.2
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.3.0
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
```


### Which example does this report relate to?

with-emotion-swc

### What browser are you using? (if relevant)

Chrome 112.0.5615.49

### How are you deploying your application? (if relevant)

next build && next start

### Describe the Bug

The use of Emotion's `CacheProvider` in with-emotion-swc seems to be causing a flash of unstyled content (FOUC). 

For what it's worth, someone else has reported this issue directly on the [emotion](https://github.com/emotion-js/emotion/issues/3002) repository in February and my hypothesis is that they've based their app on this example before too, and that the cache provider doesn't work as expected with the latest version of the compiler toolchain. There's a chance we can keep using the cache provider and just need to update some options to make it work again. Someone with an understanding of what the emotion SWC plugin does should take a look at this.

I wasn't able to reproduce this issue in a production build of the example, only the dev build but in our app, this is noticeable in both dev and production with a lot of styles. See the issue for yourself:

https://user-images.githubusercontent.com/613647/232622568-e95dbb82-21a1-48e6-acae-44640223a327.mp4



### Expected Behavior

The example code out of the box should not be causing the FOUC.

### To Reproduce

Create a new app based on this example:

```sh
yarn create next-app --example with-emotion-swc with-emotion-swc-app
```

cd into the new app directory

```sh
cd with-emotion-swc-app
```

update dependencies

```sh
yarn upgrade -L
```

and run the app

```sh
yarn dev
```

Now refresh the app a number of times and notice the FOUC
Repository: storybook
Issue: [Bug]: Error "Storybook preview hooks..." in setState()
Labels: question / support,has workaround,args

### Describe the bug

If you have controlled component and need to use React state in story file to control component's state you may have the template like this one:
```js
// Component.stories.js
const Template = {
  render: function Render(args) {
    const [args_, setArgs] = useArgs()
    const [value, setValue] = useState()
    useEffect(() => {
      args.value = value
    }, [value])

    const onChange = (value) => {
      action('onChange')(value)
      setArgs({ value: value })
      // error executing this line if there is decorator with <Story /> in preview.js
      setValue(value)
    }

    return <InputField {...args} onChange={onChange} />
  },
  args: {
    value: '',
  },
}
```

In my case it generated error:
```
Storybook preview hooks can only be called inside decorators and story functions. 
```

I couldn't peroduce it in Stackblitz sandbox. It appeared that it reproduces for decorators with JSX variant of Story in my `preview.js` file, for example:
```js
  // preview.js
  (Story) => (
    <>
      <GlobalStyle />
      <Story />
    </>
  ),
```
This applies to any imported decorator too.
When I changed Story to function, error went away:
```js
  (Story) => (
    <>
      <GlobalStyle />
      {Story()}
    </>
  ),
```
Similar case was mentioned in some comments but I cannot find it.

### To Reproduce

https://stackblitz.com/edit/github-uixpen-fdysyn?file=.storybook%2Fpreview.js,src%2Fstories%2FInputField.stories.js)

### System

```shell
Storybook 7, any system.
```


### Additional context

_No response_
Repository: next.js
Issue: Unexpected crash for semantically invalid HTML
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64
    Binaries:
      Node: 18.12.1
      npm: 8.19.2
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.3.1-canary.10
      eslint-config-next: 13.3.0
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

_No response_

### Link to the code that reproduces this issue

https://github.com/peabnuts123/next-bug

### To Reproduce

  1. Create a new repo with `npx create-next-app@latest`
    - Pick all defaults / whatever options (it doesn't matter)
  1. In the project add somewhere the following markup
  ```html
  <table>
    <thead>
      <th>Heading</th>
    </thead>
  </table>
  ```
  3. Run the app using next's development server `npm run dev`
  4. Open the page (i.e. http://localhost:3000)

### Describe the Bug

The app crashes and an error is shown. The error is not related to the issue, and I wouldn't expect an error at all anyway:

```
Error: Hydration failed because the initial UI does not match what was rendered on the server.

Warning: Expected server HTML to contain a matching <th> in <thead>.

See more info here: https://nextjs.org/docs/messages/react-hydration-error
```

There are obviously no mismatched/unclosed tags, and there is no conditional logic that would cause a mismatch between the client/server. The real error is because the `<th>` is not inside a `<tr>` which is semantically invalid HTML.

### Expected Behavior

I would expect one of the following outcomes in this scenario:
  1. Error message should report the actual problem (or at least how to fix it)
    - e.g. `Your HTML is not valid: <th> cannot be a child of a <thead>`
  1. Throw no error in this scenario
    - Considering browsers will still render this markup and no other tooling picks up on this error (e.g. typescript, eslint), I would argue this should not be a throwing an error at all anyway.
  
  

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: godot
Issue: Calling an array function on a variable that contains a string causes a lock up / screen corruption
Labels: platform:linuxbsd,needs testing

### Godot version

4.0.2 - Stable

### System information

Linux Mint 20.3 cinnimon 

### Issue description

While trying to set a variable to act as an array to call, I mistakenly set the variable as a string instead. When I attempted to run the scene it initially throws the error "cannot call .pop_back() on type string." and then lags, then the screen display corrupts and requires a hard reboot.

### Steps to reproduce

Just running the scene should it.

### Minimal reproduction project

[Array Crash.zip](https://github.com/godotengine/godot/files/11256458/Array.Crash.zip)
Repository: PowerToys
Issue: Adjacent letter swapping
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

A global macro that allows the user to swap two adjacent letters wherever one is typing. Position the cursor between them, hit CTRL-T (or some such) and have letters change place.

### Scenario when this would be used?

The most common typo is a swap of adjacent letters. In the old times one could often choose an editor to use for whatever one was doing and so choosing - in my case - emacs or epsilon, one could CTRL-T the letters (and even ALT-T words. This is no longer the case and so it would be nice to have the possibility to enable a global macro to swap two adjacent letters. It would save time.

### Supporting information

_No response_
Repository: node
Issue: Watched variable declared in a while retains its watched value across iterations
Labels: v8 engine,debugger

### Version

v18.16.0

### Platform

Microsoft Windows NT 10.0.19044.0 x64

### Subsystem

Debugger

### What steps will reproduce the bug?

1. Create a file named `index.js` containing the following script:
   ```js
   let i = 5;
   while (--i > 0) {
     const foo = "bar" + i;
   }
   ```

2. Inspect it using `node inspect index.js`
3. watch `foo`: `watch('foo')`. Optionally, `watch('i')` too.
4. Go to l3 for the first time, assert that `foo = undefined`)
5. Continue until you reach l3 again: the watched value of foo is then `bar4` (and `i=3`): the debugger show the `foo` declared in the previous iteration

### How often does it reproduce? Is there a required condition?

The reproducing steps are systematic, I reproduced similar behavior in longer scripts too

### What is the expected behavior? Why is that the expected behavior?

I'd expect the watch value to stay undefined or in error until the declaration statement

### What do you see instead?

![image](https://user-images.githubusercontent.com/12366410/232632052-92d1c772-aab4-4d4e-a746-dcb43c489444.png)

### Additional information

_No response_
Repository: stable-diffusion-webui
Issue: [Bug]: Incorrect API operation with Hires. fix
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

  I am trying to generate an image using the API and this payload, I am not getting low quality images
payload = {
        "prompt":prompt+",(Masterpiece:1.1), detailed",
        "steps": 30,
        "cfg_scale": 7,
        "width": 720,
        "height": 720,
        "sampler_name": "Euler a",
        "restore_faces": False,
        "negative_prompt": "low quality,(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation"
    }
![photo_2023-04-18_02-33-47](https://user-images.githubusercontent.com/123499933/232632781-3beeadc6-0689-4ee8-bb45-83896b20c4b4.jpg)

I think the problem is in the Hires. fix because when I open this image in png info and then send it to txt2img, the Hires. fix is enabled, although it should be disabled by default, if you disable it and generate an image, then it is of good quality
![image](https://user-images.githubusercontent.com/123499933/232632826-c7f43cab-d62c-4044-8366-3f214ec71de1.png)
![image](https://user-images.githubusercontent.com/123499933/232632897-b2a0a650-4c38-4cda-afeb-1d1fd6793c14.png)



### Steps to reproduce the problem

1. connect the API
2. Generate an image

### What should have happened?

The image had to be of good quality

### Commit where the problem happens

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/a9eab236d7e8afa4d6205127904a385b2c43bb24

### What platforms do you use to access the UI ?

Other/Cloud

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
!python /content/gdrive/$mainpth/sd/stable-diffusion-webui/webui.py $share --api --disable-safe-unpickle --enable-insecure-extension-access --no-download-sd-model --no-half-vae --opt-sdp-attention $auth --disable-console-progressbars
```


### List of extensions

![image](https://user-images.githubusercontent.com/123499933/232633347-1c9f90e8-0bca-498b-91c9-7ac1cc204577.png)


### Console logs

```Shell
There are no errors in the console
```


### Additional information

_No response_
Repository: godot
Issue: RenderingServer.create_local_rendering_device() crashes with RenderDoc v1.26
Labels: topic:rendering,documentation,topic:thirdparty,crash

### Godot version

4.0.stable

### System information

Windows 10, Vulkan API 1.2.131, Forward+, Intel UHD Graphics 26.20.100.7926

### Issue description

Launching Godot from RenderDoc will crash if RenderingServer.create_local_rendering_device() is called.

The program will crash with the error:  
USER ERROR: Condition "err" is true. Returning: RID()
   at: local_device_create (drivers/vulkan/vulkan_context.cpp:2576)

Not sure what Godot devs can do to make this work, but RenderDoc is a critical tool for developing compute shaders, I wouldn't work on them without it working.

### Steps to reproduce

Open RenderDoc v1.26  
Open the "Launch Application" tab. File -> Launch Application or Ctrl + N.  
Under executable path, enter the path for the Godot executable.  
Under working directory, enter the path for the Godot project


### Minimal reproduction project

[RenderDoc.zip](https://github.com/godotengine/godot/files/11256709/RenderDoc.zip)
Repository: neovim
Issue: Text objects not detected correctly on complex lines
Labels: bug-vim,needs:vim-patch

### Problem

On a very long and complex lines, certain text objects do not work. Wrong text is selected, hence the operations that rely on text objects do not work properly.

### Steps to reproduce

nvim --clean
:e [aaa.txt](https://github.com/neovim/neovim/files/11256925/aaa.txt)

```bash
# all the following steps/commands are in normal mode

1. move cursor to line 1, col 50
2. type: va)  # visual select all () block
```



### Expected behavior

EXPECTED: A chunk of text is selected on line 1 from col 6 to col 105 (inclusively).


What we get, however, is a selection from col 6 till next line. Similar problems if you put cursor in another place and try selecting `()` or `[]` blocks.

Also, problems with `[(` and `])` commands.

### Neovim version (nvim -v)

NVIM v0.10.0-dev-114+g84a431954

### Vim (not Nvim) behaves the same?

yes, VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 10 2022 11:51:44) Included patches: 1-4051

### Operating system/version

Ubuntu 20.04.4 LTS

### Terminal name/version

SSH from Windows  via PUTTY, then tmux

### $TERM environment variable

tmux-256color

### Installation

buid from repo