sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Problems with dynamic imports in `generateMetadata`
Labels: bug

### Link to the code that reproduces this issue

https://github.com/pomber/nextjs-generateMetadata-bug

### To Reproduce

Run `npm run build`

### Current vs. Expected behavior

The build fails with this error: 

```
$ npm run build

> build
> next build

 ✓ Creating an optimized production build    
 ✓ Compiled successfully
 ✓ Linting and checking validity of types    
 ✓ Collecting page data    
   Generating static pages (0/4)  [==  ]Error: Unsupported Server Component type: undefined
    at ev (/workspace/nextjs-generateMetadata-bug/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:109:11854)
    at /workspace/nextjs-generateMetadata-bug/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:109:21907
    at Object.toJSON (/workspace/nextjs-generateMetadata-bug/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:109:25197)
    at stringify (<anonymous>)
    at eP (/workspace/nextjs-generateMetadata-bug/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:109:13686)
    at e$ (/workspace/nextjs-generateMetadata-bug/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:109:14212)
    at Timeout._onTimeout (/workspace/nextjs-generateMetadata-bug/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:109:12034)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)
```



### Verify canary release

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

### Provide environment information

```bash
$ npx --no-install next info

Operating System:
  Platform: linux
  Arch: x64
  Version: #202308111259 SMP PREEMPT_DYNAMIC Fri Aug 11 14:20:00 UTC 2023
Binaries:
  Node: 18.17.1
  npm: 9.6.7
  Yarn: 1.22.19
  pnpm: 8.7.5
Relevant Packages:
  next: 13.5.3-canary.3
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router

### Additional context

This is the `page.tsx`:

```tsx
let slug = "foo";

export async function generateMetadata() {
  const { title } = await import(`./${slug}.js`);
  return {
    title: `${title}`,
  };
}

export default async function Home() {
  const { Content } = await import(`./${slug}.js`);
  // bug! Content is undefined during build
  return <Content />;
}
```

We are dynamic-importing a js file with multiple exports both in `generateMetadata` and `Home`, but any export that we don't use in `generateMetadata` will be `undefined` when we import it in `Home`. 

It works well in dev mode. 

It works well if I remove the `generateMetadata` function.

It works well if I add `Content` import in `generateMetadata`:

```tsx
...
export async function generateMetadata() {
  const { title, Content } = await import(`./${slug}.js`);
  ...
}
```
Repository: rust
Issue: Bootstraping ignores make jobserver
Labels: T-bootstrap,T-cargo,C-bug

I'm currently working on enhancing the [Rust package](https://github.com/openwrt/packages/blob/master/lang/rust/Makefile) (currently 1.72.0) in OpenWrt (the build system is based on buildroot). After ensuring the x.py command is prefixed with `+` and that `MAKEFLAGS` is set correctly, bootstraping continues to use all of my CPUs instead of the `-jN` jobs from the make command line.

I have tried patching out [these lines](https://github.com/rust-lang/rust/blob/1.72.0/src/bootstrap/builder.rs#L1217-L1219) that remove `MAKEFLAGS` from the environment for cargo; the `MAKEFLAGS` value does reach cargo but cargo continues to set up its own jobserver instead.

I can see that removing `MAKEFLAGS` from the environment was deliberate (as noted in https://github.com/rust-lang/rust/pull/50629#issuecomment-389683073), but it would be great if building rustc can cooperate with the rest of the build system by using the same jobserver.
Repository: go
Issue: proposal: x/net/html: add ability to parse from a tokenizer
Labels: Proposal

Package html implements an HTML5-compliant tokenizer and parser.

Both elements are separate despite the parser internally using the tokenizer. There are times when the ability to use a separate tokenizer or filter some tags from the tokenizer while parsing might be helpful, however the package does not allow this.

It can however be implemented easily by adding a parser method that would accept a generic tokenizer interface without affecting existing code.

In my specific use case I am looking to filter out some tags that `x/net/html` does not handle well. I'm sure other people will have other use cases where the parser would be a lot more useful with the ability to specify a tokenizer.

The parser only uses the following methods from the tokenizer:

```go
// TokenizerInterface is the minimum implementation required for the parser to be able to work
type TokenizerInterface interface {
        AllowCDATA(allowCDATA bool)
        Err() error
        NextIsNotRawText()
        Next() TokenType
        Token() Token
}
```

Which makes an implementation as simple as this:

```diff
diff --git a/html/parse.go b/html/parse.go
index 46a89ed..46a308b 100644
--- a/html/parse.go
+++ b/html/parse.go
@@ -17,7 +17,7 @@ import (
 // https://html.spec.whatwg.org/multipage/syntax.html#tree-construction
 type parser struct {
        // tokenizer provides the tokens for the parser.
-       tokenizer *Tokenizer
+       tokenizer TokenizerInterface
        // tok is the most recently read token.
        tok Token
        // Self-closing tags like <hr/> are treated as start tags, except that
@@ -2368,8 +2368,14 @@ func ParseOptionEnableScripting(enable bool) ParseOption {
 
 // ParseWithOptions is like Parse, with options.
 func ParseWithOptions(r io.Reader, opts ...ParseOption) (*Node, error) {
+       return ParseTokenizer(NewTokenizer(r), opts...)
+}
+
+// ParseTokenizer is like Parse or ParseWithOptions, but using an already instanciated
+// tokenizer instead of a reader
+func ParseTokenizer(tok TokenizerInterface, opts ...ParseOption) (*Node, error) {
        p := &parser{
-               tokenizer: NewTokenizer(r),
+               tokenizer: tok,
                doc: &Node{
                        Type: DocumentNode,
                },
```
Repository: godot
Issue: AMD and KDE Plasma crash
Labels: bug,topic:rendering,crash

### Godot version

4.1.1.stable

### System information

Godot v4.1.1.stable unknown - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 08:37:16 +0000 - Vulkan (Forward+) - dedicated AMD Radeon RX 6500 XT (RADV NAVI24) () - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)

### Issue description

If you set `Camera3D.near = 0` instead of `0.001`, the whole desktop freezes. Journalctl shows the error:
`[drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx_0.0.0.0 timeout, but soft recovered`

Godot logs output:
`ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2360)`

I don't know what happens on Windows, but on Linux the whole system freeze (with AMD and Plasma, idk about Nvidia and etc)

I understand that there is no reason to assign 0, but I have a moment in _process() when `distance_to` gives 0 at the very beginning and it causes the whole system to freeze. The fix is simple 
```
var near_pos = link_cam.global_position.distance_to(linked_portal.global_position)
if near_pos == 0: near_pos = 0.001
link_cam.set_near(near_pos)
```

### Steps to reproduce

Create `Camera3D` and in `_process()` set `$Camera3D.near = 0 `

### Minimal reproduction project

N/A
Repository: godot
Issue: GPUParticles3D huge GPU artifacts (only in exported build, works fine in DEBUG mode)
Labels: bug,topic:rendering,needs testing,topic:particles

### Godot version

v4.1.1.stable.mono.official [bd6af8e0e]

### System information

MacOS 13.5.2 (Macbook M1 Pro, 16Gb) - Mobile and Forward+

### Issue description
You can see the demo of the issue here: [reddit link](https://www.reddit.com/r/godot/comments/16pnboc/artifacts_in_release_build/)

Notes:
- The GPU artifacts issue happens only when running exported binary (Macbook M1 Pro). No issue when running from the editor (reproducible in both Mobile and Forward+ renderers)
- There is MultiMeshFlock node (it does nothing - hidden) - but the problem disappears if you remove it.
- There is gradient-based coloring of the particles in Process Material - if you disable it - the problem disappears.

### Steps to reproduce

1. Download the test project [https://github.com/curvednebula/godot-particle-issue](https://github.com/curvednebula/godot-particle-issue)
2. Build/export the project into a binary (MacOS M1)
3. Run the binary and wait for a few seconds - GPU artifacts will appear shortly.


### Minimal reproduction project

[https://github.com/curvednebula/godot-particle-issue](https://github.com/curvednebula/godot-particle-issue)
Repository: vscode
Issue: Nested for statements in JavaScript breaks in wrong indention
Labels: typescript,editor-autoindent,under-discussion,on-unit-test

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.82.2
- OS Version: macOS Ventura Version 13.6 (22G120)

Steps to Reproduce:

1. Nest 2 for statements in JavaScript or TypeScript inside of a block scope
```ts
{
    for(;;)
    for(;;)
}
```
2. Open a block scope
```ts
{
    for(;;)
    for(;;) {
    
}
}
```

Expectation is that the closing bracket is indented on the same level as the for statement, instead, it's one scope below.

https://github.com/microsoft/vscode/assets/78360666/0e8ccb9b-938e-4546-b385-39eb494f20f1
Repository: PowerToys
Issue: Add profiles feature to powertoys
Labels: Idea-Enhancement,Cost-Large,Needs-Triage

### Description of the new feature / enhancement

My idea is a profiles feature, where enabled powertoys and their settings could be changed/toggled quickly without having to manually edit each setting.

### Scenario when this would be used?

Sometimes I would turn off multiple powertoys because I don't need it, to improve performance or to avoid triggering the keybinds by accident, but then I would have to turn each of them on individually.

### Supporting information

_No response_
Repository: godot
Issue: Scale resets to (0,0,0) when scene is saved with one component set to zero (0,1,1)
Labels: discussion,topic:core,documentation

### Godot version

v4.1.1.stable.arch_linux

### System information

Manjaro linux

### Issue description

When setting scale to (0, 1, 1) and save the scene, it reopens as (0, 0, 0)

I would expect to open with the same values it was saved

### Steps to reproduce

The given scene has a cube with saved scale (0.001, 1, 1).
Set it to (0, 1, 1) and save the scene.
Close and reopen the scene, now the scale is (0, 0, 0)

### Minimal reproduction project

[ScaleComponentBug.zip](https://github.com/godotengine/godot/files/12706506/ScaleComponentBug.zip)
Repository: TypeScript
Issue: `never` as keyof tuples/arrays behaves the same as `number`
Labels: Possible Improvement

### 🔎 Search Terms

tuple keyof never, tuple[never], array keyof never

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about this issue

Versions I tried:
- 5.2.2
- nightly (playground)



### ⏯ Playground Link

https://www.typescriptlang.org/play?ts=5.3.0-dev.20230923#code/C4TwDgpgBAglC8UDeBfA2gOwgNwgJwF0oB6YqQUHIotc8AoUSKAIQWSgEMAuKAZ2DwCWGAOZR01fEVIUqOfPXDQAwqzQFMcwiTKUJdBtAAiqvoJHq9UsoBlyXvyHCFjAKKtTDtRppWot9yKdoADFWAAp-UQAfKgBXAFsAI3wASk9LKG1fOzMo2MT8IA

### 💻 Code

```ts
type A = {}[never] // ✅ never
type B = { a: string }[never] // ✅ never
type C = [][never] // ✅ never
type D = [string][never] // ❌ string
type E = string[][never] // ❌ string
type F = (string | number)[][never]  // ❌ string | number
```


### 🙁 Actual behavior

After using a `never` key on tuples/arrays you get back the entirety of the tuple/array elements type.

### 🙂 Expected behavior

After using a `never` key on tuples/arrays you get back `never`, as when dealing with objects.

### Additional information about the issue

Not sure if this has historical reasons to behave like it does, but couldn't find any specific info about it.
Repository: next.js
Issue: Revalidate on dynamic route does not cache the route
Labels: bug

### Link to the code that reproduces this issue

https://github.com/steebchen/chaininfo

### To Reproduce

1. pnpm install
2. pnpm build && pnpm start
3. put `MORALIS_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJub25jZSI6IjhkYTVhNjk4LTZlZDEtNGQzOC1hMTdkLTJiMzU2NDJlZmY5ZSIsIm9yZ0lkIjoiMTA2NTExIiwidXNlcklkIjoiMTA2MTU3IiwidHlwZUlkIjoiZTIwY2I5ZGItNjUyMC00YThhLWI5NTAtZDJhYjllNzJjYjJkIiwidHlwZSI6IlBST0pFQ1QiLCJpYXQiOjE2ODQ5NDQ5NzMsImV4cCI6NDg0MDcwNDk3M30.wNw62dF_sZK6lvjAb7siGhKSeIB21zClq1PdvuX3NVo` (temp access key) in `.env.production.local`
4. IMPORTANT: replace `x` with `getAddressDataUnstable` https://github.com/steebchen/chaininfo/blob/main/app/address/%5Bslug%5D/page.tsx#L20
5. pnpm start
6. go to http://localhost:3000/address/0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326
7. see the logs
```
render address page
getAddressData 0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326
```
8. reload the same page

### Current vs. Expected behavior

It keeps logging 'render address page', even though [revalidate is set on the page level](https://github.com/steebchen/chaininfo/blob/f6df81e62acbb2c3e7072df73154bebfde1f39df/app/address/%5Bslug%5D/page.tsx#L7). That's not supposed to be the case.

### 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.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000
Binaries:
  Node: 18.16.0
  npm: 9.5.1
  Yarn: 1.22.19
  pnpm: 8.6.3
Relevant Packages:
  next: 13.5.3-canary.3
  eslint-config-next: 13.5.2
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router

### Additional context

_No response_
Repository: godot
Issue: Usability: Resource Field changes not saving on Save / Click Play
Labels: bug,topic:core,topic:editor

### Godot version

4.1

### System information

Windows 10

### Issue description

When the user changes a value of a field of a resource in the Inspector, but doesn't click away or press enter (and instead only saves or presses play), the changed value of the field is not propagated to objects referencing the field.

### Steps to reproduce

1) Create a resource with a field
2) Attach the resource and reference the field in another Node
3) Change the field in the Inspector -- do not click away or press enter
4) Save or press play

### Minimal reproduction project

[ResourceFieldUsabilityError.zip](https://github.com/godotengine/godot/files/12706788/ResourceFieldUsabilityError.zip)
Repository: TypeScript
Issue: String#matchAll is too restrictive in its parameter type
Labels: Suggestion,Awaiting More Feedback

### 🔎 Search Terms

matchAll

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about RegExps and matchAll


### ⏯ Playground Link

https://www.typescriptlang.org/play?target=7#code/MYewdgzgLgBAtgTwMIFdojgeQEYCsCmwsAvDAN4CwAUDLTAFQDaAygnNiADYB0cAhlGAALAIKdOAXQAU0AE4BLMAHMAXDDmKlASjUBxfGHyyBIWQB4ASviUBRAB4AHe4RGzjCAHzlqdGAF9qAKpqUEgufG5OECUpRm54gHIAMxAQBN4BYTFOKURUdCw8QigtCS0AbmogA

### 💻 Code

```ts
const myCustomObject = {
    *[Symbol.matchAll](string: string): Generator<RegExpExecArray> {
    }
}

console.log([...'foo'.matchAll(myCustomObject)]);
```


### 🙁 Actual behavior

TS rejects this code, because `myCustomObject` is not an instance of `RegExp`.

### 🙂 Expected behavior

Any value matching the following type should be accepted, including `myCustomObject`. The other parts of the RegExp object are not used.

```ts
type MatchAllRegExpLike = {
  [Symbol.matchAll](string: string): IterableIterator<RegExpExecArray>;
  // If the object has a [Symbol.match] property that is truthy, its flags are checked. However, neither
  // must be present, and even if it is present, [Symbol.match] doesn't have to be a function.
  readonly [Symbol.match]?: any;
  readonly flags?: string;
};
```

### Additional information about the issue

This is distinct from #47310. That issue is about string-to-regexp conversion; this is about regexp-like objects.
Repository: next.js
Issue: React cache from app router docs does not work
Labels: bug

### Link to the code that reproduces this issue

https://github.com/steebchen/chaininfo

### To Reproduce

1. pnpm install
2. pnpm build && pnpm start
3. put `MORALIS_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJub25jZSI6IjhkYTVhNjk4LTZlZDEtNGQzOC1hMTdkLTJiMzU2NDJlZmY5ZSIsIm9yZ0lkIjoiMTA2NTExIiwidXNlcklkIjoiMTA2MTU3IiwidHlwZUlkIjoiZTIwY2I5ZGItNjUyMC00YThhLWI5NTAtZDJhYjllNzJjYjJkIiwidHlwZSI6IlBST0pFQ1QiLCJpYXQiOjE2ODQ5NDQ5NzMsImV4cCI6NDg0MDcwNDk3M30.wNw62dF_sZK6lvjAb7siGhKSeIB21zClq1PdvuX3NVo` (temp access key) in `.env.production.local`
4. IMPORTANT: replace `x` with `getAddressDataCache` https://github.com/steebchen/chaininfo/blob/main/app/address/%5Bslug%5D/page.tsx#L20
5. pnpm start
6. go to http://localhost:3000/address/0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326
7. reload the same page & see the logs

### Current vs. Expected behavior

Nothing gets cached. From the logs if you refresh multiple times

```
render address page
getAddressData 0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326
render address page
getAddressData 0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326
render address page
getAddressData 0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326
```


The `getAddressData` is not supposed to be logged multiple times, as I set the revalidate. It works fine with `unstable_cache` from next, but it does not with `cache` from react.

Relevant code:

https://github.com/steebchen/chaininfo/blob/f6df81e62acbb2c3e7072df73154bebfde1f39df/data/address-cache.ts#L4-L9

### 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.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000
Binaries:
  Node: 18.16.0
  npm: 9.5.1
  Yarn: 1.22.19
  pnpm: 8.6.3
Relevant Packages:
  next: 13.5.3-canary.3
  eslint-config-next: 13.5.2
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router

### Additional context

I followed the docs for this: https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#example
Repository: flutter
Issue: [go_router] Using browsers back button is not able to backout of the page. 
Labels: platform-web,package,has reproducible steps,P2,p: go_router,team-go_router,triaged-go_router,found in release: 3.13,found in release: 3.15

I found this bug in my own project when im in screen3 and I logout it takes me to login because of screen3's redirect method but broswers backbutton does nothing anymore. We need to have control over the browser history it seems like.

### Is there an existing issue for this?

- [X] I have searched the [existing package issues](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3Apackage)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### What package does this bug report belong to?

go_router

### What target platforms are you seeing this bug on?

Web

### Have you already upgraded your packages?

Yes

### Dependency versions

_No response_

### Steps to reproduce

Run the packages own example code 

from https://github.com/flutter/packages/blob/main/packages/go_router/example/lib/redirection.dart

1. press login
2.  Press browsers backbutton. You cant leave. Check video



### Expected results

1. Backbutton should atleast take you out of the website or whatever is the common procedure in a case like this.

### Actual results

1. See the video. Library breaks browsers backbutton in all similar redirection cases. 

### Code sample

<details><summary>Code sample</summary>

```dart
[Paste your code here]
```
redirect
</details>


### Screenshots or Videos

<details>
<summary>Screenshots / Video demonstration</summary>


https://github.com/flutter/flutter/assets/36403567/957bd6b4-0456-467b-861d-3d595cd45632



</details>


### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[Paste your output here]
```

</details>