sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: `State.dispose` is synchronous but `StreamSubscription.cancel` may be asynchronous
Labels: c: new feature,framework,dependency: dart,d: api docs,c: proposal,P3,team-framework,triaged-framework,dependency:dart-triaged

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

I have a `StatefulWidget` that sets up a stream in its `initState`. `onListen`, the stream starts a `Timer`. In `dispose`, all `StreamSubscriptions` are `cancel`ed, which also `cancel`s all `Timer`s. However, `StreamSubscription.cancel` may be asynchronous (and it seems to be so for streams that include an `addStream`?), which can result in timers leaking beyond `dispose`.

Demo: https://dartpad.dev/?id=aa9938512f792217570748e5123a6e7d

A widget smoke test exposes this. It is unclear to me whether there is a more serious case where events may be delivered to a subscriber after `dispose` even though `cancel` was called. If this case exists, [`StreamBuilder`](https://api.flutter.dev/flutter/widgets/StreamBuilder-class.html) may be affected as well, as it similarly has to call `cancel` unawaited in its `dispose`.

This use case was discussed briefly on #24166, but the resolution is not explicitly applicable since simply waiting for the timer to complete is a different test case from ensuring that timers are properly canceled.

Seeing as how we end up needing a `runAsync` to test the cancellation case, there may be a bug behind this, possibly an instance of dart-lang/sdk#40131.

Related issue: #91814

### Proposal

Naively, I might imagine that `dispose` might be allowed to be asynchronous, but I also imagine that could be a tough sell. Possibly, we might do with documented guidance on whether an event may indeed be delivered after `cancel` (so, whether listeners should be gated on `mounted`), with maybe guidance on what to do about the outstanding timer warning.

The current wording at [`StreamSubscription.cancel`](https://api.flutter.dev/flutter/dart-async/StreamSubscription/cancel.html) states:

> After this call, the subscription no longer receives events.

It is not clear to me whether this applies to after the call has been started but before the future has completed. The author of #91814 would seem to concur.
Repository: rust
Issue: rustc randomly fail to link with C program
Labels: A-linkage,A-FFI,C-bug

Here is a minimal test case to reproduce: https://github.com/xclaesse/rustc-bug.

I believe this is the same issue than https://github.com/rust-lang/rust/issues/55931.I initially discovered this issue while working on this Meson PR: https://github.com/mesonbuild/meson/pull/11714.

I suspect the problem is when compiling both cdylib and staticlib for the same stuff.rs with the same crate name, they use some common intermediary files.
Repository: rust
Issue: constant evaluation errors can superscede (and be caused by) unsafeck errors
Labels: A-diagnostics,T-compiler

### Code

```Rust
use std::hint::unreachable_unchecked;

const S: &'static str = unreachable_unchecked();
pub const BYTES: &[u8] = &[0; { S.len() }];
```


### Current output

```Shell
error[E0080]: evaluation of constant value failed
 --> /rustc/9ecda8de85ce893cc3fc748ab06be0b8250147a7/library/core/src/hint.rs:105:9
  |
  = note: entering unreachable code
  |
note: inside `unreachable_unchecked`
 --> /rustc/9ecda8de85ce893cc3fc748ab06be0b8250147a7/library/core/src/hint.rs:105:9
note: inside `S`
 --> src/lib.rs:3:25
  |
3 | const S: &'static str = unreachable_unchecked();
  |                         ^^^^^^^^^^^^^^^^^^^^^^^

note: erroneous constant used
 --> src/lib.rs:4:33
  |
4 | pub const BYTES: &[u8] = &[0; { S.len() }];
  |                                 ^

For more information about this error, try `rustc --explain E0080`.
```


### Desired output

```Shell
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
 --> src/lib.rs:3:25
  |
3 | const S: &'static str = unreachable_unchecked();
  |                         ^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
  |
  = note: consult the function's documentation for information on how to avoid undefined behavior

note: erroneous constant used
 --> src/lib.rs:4:33
  |
4 | pub const BYTES: &[u8] = &[0; { S.len() }];
  |                                 ^

For more information about this error, try `rustc --explain E0133`.
```


### Rationale and extra context

If the `const BYTES` is removed and `const S` is not operated on as part of an item, then just E0133 is emitted. In theory, the fix should be as "simple" as adding a `if !tcx.unsafety_check_result(def_id).violations.is_empty() { return ERRONEOUS_CONSTANT; }` guard before doing constant evaluation, but it certainly could be more involved than that.

### Other cases

_No response_

### Anything else?

[[playground]](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=68ca83c53acec65f16db0065ef7324e1)

Tested on `rustc 1.71.0-nightly (9ecda8de8 2023-04-30)` and `rustc 1.69.0 (84c898d65 2023-04-16)` with essentially identical output
Repository: tensorflow
Issue: About the Tensorflow C++ API documentation
Labels: stat:awaiting tensorflower,type:docs-feature,TF 2.12

The lack of documentation for the Tensorflow C++ API makes it difficult to build and use. Can you write how to use and build in README.md?
Repository: next.js
Issue: Server Component:  Dynamic server usage: cookies when using generateStaticParams with next/headers
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: linux
      Arch: x64
      Version: #202303130630~1681329778~22.04~d824cd4 SMP PREEMPT_DYNAMIC Wed A
    Binaries:
      Node: 18.15.0
      npm: 9.5.0
      Yarn: 1.22.19
      pnpm: 7.29.0
    Relevant packages:
      next: 13.3.4
      eslint-config-next: 13.3.4
      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

Unable to provide

### To Reproduce

1. Follow install docs for nextjs supabase: https://supabase.com/docs/guides/auth/auth-helpers/nextjs-server-components
2. add a generateStaticParams

### Describe the Bug

Using `generateStaticParams` with supabase is causing an Unhandled Runtime Error Error: Dynamic server usage: cookies 

![image](https://user-images.githubusercontent.com/66818636/235572128-bb1f1107-0370-42c5-a066-6ae746c19255.png)


### Expected Behavior

Able to use `generateStaticParams` with supabase

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

Firefox 112.0.2(64-bit)

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

Vercel
Repository: next.js
Issue: Cannot create a simple jest test
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: linux
      Arch: x64
      Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023
    Binaries:
      Node: 16.17.0
      npm: 8.15.0
      Yarn: 1.22.19
      pnpm: 7.1.0
    Relevant packages:
      next: 13.3.1
      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/lively-leftpad-ket1gt

### To Reproduce

Run tests with `npx jest`

### Describe the Bug

When I use jest with `nextJest` the tests fail

### Expected Behavior

Tests should pass

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

_No response_

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

_No response_
Repository: godot
Issue: Constructing a varying vector exceeding a declaration limit within a shader freezes the editor
Labels: bug,topic:rendering,confirmed,topic:shaders

### Godot version

4.0.2.stable.official

### System information

Windows 10, NVIDIA GeForce RTX 2080 SUPER, Driver 516.94, Vulkan backend

### Issue description

If there is a shadermaterial being rendered when a varying vector that exceeds a declaration limit is constructed within the vertex function of its shader, the editor will freeze.

Example code:

```
shader_type spatial;

varying vec3 vA01;
varying vec3 vA02;

varying vec3 Va01;
varying vec3 Va02;
...
varying vec3 Va20;

void vertex() {
	vA01 = vec3(1); // safe
	vA02 = vec3(1); // will freeze
}
```

### Steps to reproduce

1. Set up a shadermaterial and give it a shader.
2. In the shader's code, include only the "shader_type spatial;" tag and an empty vertex function. 
3. Declare 22 varying vectors of any type, use any combination of letter cases for the beginning of the names
4. In the vertex function, construct the last lowercase vector that was declared (or last uppercase if none)
5. Render the shadermaterial in the inspector preview or some other way
### Minimal reproduction project

[issue_just_why.zip](https://github.com/godotengine/godot/files/11370146/issue_just_why.zip)
Repository: vscode
Issue: Custom task shell executable doesn't work
Labels: bug,tasks

<!-- ⚠️⚠️ 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/No

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. -->
Version: 1.77.3 (user setup)
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Date: 2023-04-12T09:16:02.548Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: Yes

pwsh:

![image](https://user-images.githubusercontent.com/68118705/235596512-f1c8a581-29bf-47f9-acdf-47ecb41cd512.png)

git bash:

![image](https://user-images.githubusercontent.com/68118705/235595831-e57f0c14-eb48-419b-aad5-13377eab36de.png)

without custom shell executable (default pwsh)

![image](https://user-images.githubusercontent.com/68118705/235596795-713bab8e-191b-4b75-b1f4-74f99ec69cd8.png)
Repository: PowerToys
Issue: Should be able to apply external display settings to a NEW monitor without manually re-configuring the display settings
Labels: Needs-Triage

### Description of the new feature / enhancement

In office, developers use mobile workspace where they can use any desk (and its monitors) on any day. 

As of now, display settings remember the settings only for those monitors which have been connected previously. But, if a developer/engineer/PM is using a new monitor on a new desk, he/she has to reconfigure the settings. 

For example, for me, these are the settings which I configure every time I use a NEW external monitor in the office:

1. Extend the display
2. Make the external monitor my main display

These seem  a very small task but becomes very cumbersome when people don't have a fixed desk in the office and they get to change desk everyday.

### Scenario when this would be used?

This would be useful in any flexible office setting. Especially after Return-To-Office, majority of offices have introduced flexible desks instead of fixed ones. Since, people can use any monitors, this feature can apply the previous setting to an external monitor automatically and save them from manually re-configuring.

### Supporting information

_No response_
Repository: puppeteer
Issue: [Feature]: [New headless] Simultaneously rendering multi page
Labels: feature,new-headless

### Feature description

With the new headless mode, multi pages are not rendering simultaneously, but one by one.
I have timeouts or bad triggers waitUntil networkidle0.
When generating pdf I get blank pdfs.

I workaround this by add waitForSelector. PDF is good and no more timeout.
But it's very slow to generate thousands of pdf compared to old mode.

Is it possible to add parameter to activate simultaneously rendering multi page like in old headless mode for best compatibility and performance.
Repository: opencv
Issue: Python bindings not copied to site-packages directory on install for Debug config in Visual Studio 
Labels: bug,category: python bindings,category: build/install

### System Information

OpenCV version: 4.7.0
Operating System / Platform: Windows 11
Compiler & compiler version: Visual Studio 2022
Python Version: 3.9.16

### Detailed description

When installing the OpenCV python bindings with Visual Studio **Debug** configuration the `cv2.cp39-win_amd64.pyd` file is not copied into the `site-packages` directory, i.e.
```
site-packages\cv2\python-3.9\cv2.cp39-win_amd64.pyd
```
does not exist and calling 
```
import cv2
```
results in the following error because they are missing.
> ImportError: ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.

In **Release** configuration and if I manually copy the bindings when building **Debug** the import is successful.

### Steps to reproduce

Build the install target of OpenCV after configuring with CMake, including the following flags at the command line
```
-DBUILD_opencv_python3=ON
-DOPENCV_SKIP_PYTHON_LOADER=OFF
```

Try to import the bindings as
```
import cv2
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: next.js
Issue: For multiple dynamic segments in a route the child generateStaticParams function gets params returned from the parent generateStaticParams as undefined
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 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101
    Binaries:
      Node: 16.15.1
      npm: 8.11.0
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.3.1
      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/ClemannD/next-13-test-repo/blob/main/app/%5BcategorySlug%5D/%5BproductId%5D/page.tsx#L10

### To Reproduce

1. Run npm run dev. 
2. Access the product slug page as defined in the route. 
3. Check the console.log for categorySlug.


### Describe the Bug

For multiple dynamic segments in a route the docs mention. The child generateStaticParams function can use the params returned from the parent. But i am getting undefined as a param inside child generateStaticParams.

### Expected Behavior

As per the [docs](https://beta.nextjs.org/docs/api-reference/generate-static-params#multiple-dynamic-segments-in-a-route) rather than getting undefined, i should have access to params returned from the parent generateStaticParams inside the child generateStaticParams. 

I can confirm the issue exists latest Next.js canary release as well. 

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

_No response_

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

_No response_
Repository: next.js
Issue: Development server exposes different request headers like content-encoding
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: linux
      Arch: x64
      Version: #39~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 21:16:15 UTC 2
    Binaries:
      Node: 18.12.1
      npm: 8.19.2
      Yarn: 1.22.19
      pnpm: 7.17.1
    Relevant packages:
      next: 13.3.5-canary.2
      eslint-config-next: 13.3.4
      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://stackblitz.com/edit/vercel-next-js-vhqros

### To Reproduce

Start dev server:

```bash
npm run dev
```

Send request with a `Content-Encoding` header to the endpoint:

```bash
echo '{"mydummy": "json"}' | gzip | curl --data-binary @- -H "Content-Encoding: gzip" http://localhost:3000/api/hello
```

### Describe the Bug

The Next.js 13.3.x dev server returns

```json
{}
```

Whereas the production server (and Next.js 13.2.x dev server) returns:

```json
{"content-encoding":"gzip"}
```

[Potentially related discussion](https://github.com/vercel/next.js/discussions/48265)

### Expected Behavior

I would expect Next.js 13.3.x dev server to have the same behavior as the production server in regards to handling headers, like how Next.js 13.2.x did.

```ts
import type { NextApiRequest, NextApiResponse } from 'next';

export default function handler(req: NextApiRequest, res: NextApiResponse) {
  res.status(200).json({ 'content-encoding': req.headers['content-encoding'] });
}
```

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

N/A

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

N/A
Repository: flutter
Issue: Flutter Markdown: Allow aligning table cell content
Labels: c: new feature,package,c: proposal,team-ecosystem,P3,p: flutter_markdown,triaged-ecosystem

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

When using flutter markdown, the text in the table cell is always aligned to the center of a table cell, horizontally and vertically. It would be my preference to be able to align the text to a specific side of the table cell.
```dart
Markdown(
              data: """
|   |   |
|---|---|
|  **09.00** | Test thing about this really long column that should wrap when doingstusfff jasijifjsai jgisajgisajigfaj jsaigfjsaigfjsai jgisajijisjgijasigfj  |
""",
              styleSheet: MarkdownStyleSheet(
                codeblockPadding: EdgeInsets.zero,
                tableBorder: TableBorder.all(color: Colors.black, width: 0),
                tableColumnWidth: IntrinsicColumnWidth(),
                tableCellsPadding: EdgeInsets.only(bottom: 10, left: 10),
                tableHeadAlign: TextAlign.start,
              ),
            ),
```


![image](https://user-images.githubusercontent.com/59021155/235653670-469059ca-53bb-4f85-9e6b-d2b84c7eca85.png)

### Proposal

Adding a field to the MarkdownStylesheet for aligning table cell elements
```dart
Markdown(
              data: """
|   |   |
|---|---|
|  **09.00** | Test thing about this really long column that should wrap when doingstusfff jasijifjsai jgisajgisajigfaj jsaigfjsaigfjsai jgisajijisjgijasigfj  |
""",
              styleSheet: MarkdownStyleSheet(
                codeblockPadding: EdgeInsets.zero,
                tableBorder: TableBorder.all(color: Colors.black, width: 0),
                tableColumnWidth: IntrinsicColumnWidth(),
                tableCellsPadding: EdgeInsets.only(bottom: 10, left: 10),
                tableHeadAlign: TextAlign.start,
               // Allow aligning content of table cells
                tableCellAlignment: Alignment.topCenter,

              ),
            ),
```
Repository: next.js
Issue: Incorrect cache-control for stale pages on ISR
Labels: bug,Output (export/standalone),Pages Router

### Verify canary release

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

### Provide environment information

```bash
Operating System:
      Platform: linux
      Arch: x64
      Version: #42~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 18 17:40:00 UTC 2
    Binaries:
      Node: 16.13.1
      npm: 8.1.2
      Yarn: 1.22.15
      pnpm: 7.20.0
    Relevant packages:
      next: 13.3.5-canary.2
      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)

Data fetching (gS(S)P, getInitialProps), Standalone mode (output: "standalone")

### Link to the code that reproduces this issue

https://github.com/conico974/isr-stale

### To Reproduce

Just run next start

### Describe the Bug

`cache-control` header is set to  `s-maxage=x, stale-while-revalidate` when the pages is stale.
This cause issue when used with a cdn because the cdn will cache stale data for the duration of revalidate

![image](https://user-images.githubusercontent.com/2964339/235651279-77eb0380-9a02-4486-9e20-d0e8004c6f1b.png)


### Expected Behavior

We should set the `cache-control` header to `s-maxage=0, must-revalidate` to force the cdn to revalidate stale data.

To solve this we could replace this line https://github.com/vercel/next.js/blob/e76c881d4d4def2e511354b3b69f20762229f63b/packages/next/src/server/base-server.ts#L1952 with 
```typescript
private: isPreviewMode || (is404Page && cachedData) || cachedData?.isStale
```

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

_No response_

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

next start or any standalone output