sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Cache-Control should be set by default for pages and api routes
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/lucid-haslett-2k2psv

### To Reproduce

1. Build the application: `next build`
2. Start the application: `next start`

### Current vs. Expected behavior

Current behavior: pages (`/`) and api (`/api/test`) do not respond with a `Cache-Control` header, resulting in random stale responses.
Expected behavior: a default (maybe configurable) cache-control policy is used, like when deploying to Vercel - see https://vercel.com/docs/edge-network/headers#cache-control

### Provide environment information

```bash
https://vercel.com/docs/edge-network/headers#cache-controlOperating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 14.1.1-canary.6 // Latest available version is detected (14.1.1-canary.6).
  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)

Middleware / Edge (API routes, runtime)

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

next start (local)

### Additional context

_No response_
Repository: opencv
Issue: Deprecate convertFp16() in favor of convertTo() with CV_16F
Labels: category: core,RFC

On 4.x branch we have CV_16F support, so we don't need to emulate FP16 buffers as CV_16S.

Tasks:
- [x] deprecate convertFp16()
- [x] improve OpenCL performance of convertTo()
- [x] replace usage of convertFp16() in DNN module
- [x] replace usage of convertFp16() in other modules (imgcodecs?)
- [ ] deprecate CUDA's convertFp16()
- [ ] remove convertFp16() in 5.x


P.S. convertFp16() API returns CV_16S buffer by default.
Repository: rust
Issue: `assert_eq!(x, y)` doesn't coerce as well as `assert!(x == y)` does
Labels: C-enhancement,A-coercions,T-libs

<!--
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.
-->

(I don't know that this is a bug, exactly, but. Was still the best-fit template.)

I tried this code:

```rust
fn main() {
    let x: Option<&[u8]> = Some(&[1, 2]);
    assert_eq!(x, Some(&[3, 4]));
}
```

I expected to see this happen: This should compile, and then fail the assertion.

Instead, this happened: This fails to compile with the following error:
```
error[E0308]: mismatched types
 --> src/main.rs:3:19
  |
3 |     assert_eq!(x, Some(&[3, 4]));
  |                   ^^^^^^^^^^^^^ expected `Option<&[u8]>`, found `Option<&[{integer}; 2]>`
  |
  = note: expected enum `Option<&[u8]>`
             found enum `Option<&[{integer}; 2]>`
```

Re-writing the code as
```rust
fn main() {
    let x: Option<&[u8]> = Some(&[1, 2]);
    assert!(x == Some(&[3, 4]));
}
```
works as expected.

Also, yes, I know that it's possible to manually coerce this by writing `assert_eq!(x, Some(&[3, 4][..]));`, but it's disappointing that I should have to.

### 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`:
```
Used the playground; it reports 1.77.0-nightly (2024-01-22 d5fd0997291ca0135401)
```
Repository: angular
Issue: Refused to apply inline style because it violates the following Content Security Policy
Labels: security,area: core,core: stylesheets,cross-cutting: CSP

### Which @angular/* package(s) are the source of the feature request?

core

### Is this a regression?

No

### Description

(changed this to a feature request... see comments)

Trying to use strict CSP script-src and style-src policies and I have added ngCspNonce to my application root element, but inline styles are not loading. The nonce shows up in index.html script and style elements, but when the page loads there are many errors emitted from JS code in mainXXX.js. Feel like I must be missing something obvious, but I've double checked everything (including that the nonce value in the CSP header matches).

Looking at the call stack, the source of the errors seems to be template html files that are being created at runtime. Note that I have prerender and ssr disabled and am just deploying the packed "browser" files to AWS S3 and Cloudfront and manually setting the CSP nonce for now. I do have an external UI library that I was expecting to have some difficulty with, but removing that made no difference and the current errors seem to be generated when adding inlined styled Angular Material elements

### Please provide a link to a minimal reproduction of the bug

Check error in the JS console for:
https://testcsp.schicks.net/

### Please provide the exception or error you saw

```t[rue
main-5TORSPFS.js:8 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'nonce-ew26COJKMG8qrA/bjTcl0w=='". Either the 'unsafe-inline' keyword, a hash ('sha256-rMuFfE8Uore3ZjKvUao/SW5yWTAZjyzCj88QtGdRqjk='), or a nonce ('nonce-...') is required to enable inline execution...]
```

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 17.1.0
Node: 21.6.0 (Unsupported)
Package Manager: npm 10.3.0
OS: linux arm64

Angular: 17.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, platform-browser-dynamic
... platform-server, router, ssr

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1701.0
@angular-devkit/build-angular   17.1.0
@angular-devkit/core            17.1.0
@angular-devkit/schematics      17.1.0
@schematics/angular             17.1.0
rxjs                            7.8.1
typescript                      5.3.3
zone.js                         0.14.3
```


### Anything else?

Source code is here: https://github.com/bschick/test-csp
Can be opened in stackblitz: 
https://stackblitz.com/github/bschick/test-csp
Repository: ollama
Issue: Unable to push: max retries exceeded on slower connections
Labels: bug,networking

I was able to push the `q4_0` tag to https://ollama.ai/sqs/starchat, but when I try to push other tags, I am getting an error (see below). Note the `%!F(MISSING)` below in case that is an issue.

The file size of the one that failed is 7.7GB. The `q4_0` push that succeeded was 8.4 GB.

```
$ for i in q3_K_M q4_K_M q5_K_S q5_K_M f16 f32; do ollama create sqs/starchat:beta-$i -f Modelfile.$i && ollama push sqs/starchat:beta-$i; done
transferring model data 
creating model layer 
creating template layer 
using already created layer sha256:62b0be00997dd300b03868d7858d28f41488c0222bfc4fbb6ceb3eae39a5d4d7 
using already created layer sha256:ca40f7f0151766210faa524fa8710aabf07284671aaac525eeac350d64d05132 
using already created layer sha256:dd473af9080c0674443f41cb6feb59ac1e24c34f18255c78d083f138f3275a0c 
writing manifest 
success 
retrieving manifest 
pushing 62b0be00997d...   0% ▕                                                                ▏ 1.3 MB/8.2 GB  5.2 MB/s  26m34s
Error: max retries exceeded: Put "https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/repositories/sqs/starchat/_uploads/55c91d69-edf4-4a50-a278-2c7c697ba4e4/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=XXX%!F(MISSING)20240123%!F(MISSING)auto%!F(MISSING)s3%!F(MISSING)aws4_request&X-Amz-Date=20240123T072755Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&partNumber=29&uploadId=XXX&X-Amz-Signature=XXX": write tcp 192.168.2.154:51301->104.18.9.90:443: write: broken pipe
```

(Note: I replaced URL query params that may contain credentials with `XXX`.)

This may just be an ephemeral error. I'll close this tomorrow if the other pushes succeeded.
Repository: PowerToys
Issue: PowerToys Run settings.json should not change all the time (bad for version control)
Labels: Needs-Triage

### Description of the new feature / enhancement

The settings.json files should change as little as possible to allow for better version control.
It should also only contain actual settings. Cached data (strings) should be saved in a separate file if it is even needed.

I know that PowerToys has a backup feature, but I prefer to version all my preferences of various apps myself with Git.
That way, I can update and sync all of them in one go via a script and don't have to fiddle with the backup buttons inside the PowerToys settings screen every time on every one of my machines. I do this by versioning all the settings.json files in the ...\AppData\Local\Microsoft\PowerToys.

This works fine for all modules of PowerToys, except Run, as it always updates the description of the "Time and Date" on application start since it uses the current time and date to generate a description string.
![image](https://github.com/microsoft/PowerToys/assets/4066646/64905f4b-08d5-49db-acb6-033935e5a1e8)
It could also just use a fixed time and date to generate the string.

Another (way more complex) solution would be to implement proper settings sync. Like for example in VS Code, where I also do not have to resort to Git.

Also: For the purpose of version control, it would be nice to have a formatted (indented) version of the settings.json files, as it makes it much easier to diff the changes. I get that the minified version saves some space, but I think it is extremely negligible on a modern PC and it could also be a setting if you wish to have minified or pretty settings files.

### Scenario when this would be used?

If you want to use a version control system to keep track of your settings.
The backup feature is nice for some people, but not exactly what I want.

### Supporting information

_No response_
Repository: vscode
Issue: Testing #203089: `Format` alert not read for format by extension
Labels: bug,accessibility,accessibility-signal

Testing #203089

So I made a little change to a testing file and forced the format of a document through the command palette. I was expecting to hear an alert that the documented was just formatted.

https://github.com/microsoft/vscode/assets/61460952/e6484ff3-c012-4ad4-ba20-e3732acad93e
Repository: PowerToys
Issue: FancyZones - Maximize Window with [ctrl+win+up] on W11.
Labels: Needs-Triage

### Description of the new feature / enhancement

Add functionality to maximize a window pressing [ctrl+win+up].

This feature is available on W10,
but it seems not available on W11.

### Scenario when this would be used?

I have the same setttings file used on a W11 machine, coming from a W10 machine.

Override Windows Snap is active.
Move windows based on > Relative position.

### Supporting information

_No response_
Repository: godot
Issue: Failed loading resources on web on converted project from Godot 4.1 to 4.3
Labels: bug,platform:web,topic:rendering,topic:3d,topic:export

### Tested versions

Reproducible on 4.3

### System information

Windows 11. Godot 4.3 dev Compatibility

### Issue description

I'm trying to use the Kenney Platformer Starter Kit 3d, I even developed a tech demo for my app for it, and it looks and work fine on godot editor, but when exported to web all models are white because they are missing the textures. I tried with the tool to convert texture but is doing nothing. The kenney platformer starter kit I think is godot 4.0 or 4.1, so I had to convert it to 4.3 to be able to export to web with no threads.

![image](https://github.com/godotengine/godot/assets/115882542/05bf4d6c-db20-4c47-8b67-55cfc9305481)


### Steps to reproduce

- Download Kenneys platformer starter template: https://github.com/KenneyNL/Starter-Kit-3D-Platformer
- Open it on Godot 4.3
- Export to web
- You can see is missing textures, is all white, but on editor it looks fine.

### Minimal reproduction project (MRP)

https://github.com/KenneyNL/Starter-Kit-3D-Platformer
Repository: vscode
Issue: Make message scrollable
Labels: bug,editor-contrib

Testing #203045

* have a fs provider that does `isReadonly: new vscode.MarkdownString('').appendCodeblock('// hello\nfunction foo() {\nconsole.log(this);\n}\n'.repeat(100), 'typescript'),`
* type in one of its files
* the message is very large, doesn't scroll

I believe with the new capability of custom text the `MessageController` needs some tweaking, like it having a scrollbar or some content caps

<img width="1311" alt="Screenshot 2024-01-23 at 11 21 17" src="https://github.com/microsoft/vscode/assets/1794099/26a4b8ea-cd3a-4fca-b5d0-61e3f9587815">
Repository: PowerToys
Issue: Automatically detect the matching part of the name in the Powerename 
Labels: Idea-Enhancement,Product-PowerRename,Needs-Triage

### Description of the new feature / enhancement

PowerRename could find and suggest the similar parts of the filenames for the user, to streamline the renaming process. 

### Scenario when this would be used?

When I rename for example image sequences, I "find" and copy the matching part manually. My steps are: 

1. F2 to open "rename" in file in explorer so I can copy the name
2. Ctrl+C to copy the name
3. Ctrl+V to paste it to PowerRename
4. Remove the number part of the name

So, instead of this, it would be great if PowerRename could find and suggest the matching parts for the user. 
Power Rename should suggest the longest matching string. If there are multiple with similar length, then it could propose them all.

These could be in a dropdown list in the input field, or as a list under it.



### Supporting information

In this case, for example, PowerRename could suggest the "LastComposed" for the user automatically. 

![image](https://github.com/microsoft/PowerToys/assets/103999702/8462f46c-42dc-4945-a473-63bbf951b251)
Repository: flutter
Issue: Focus issues when embedding a Flutter app inside an iframe
Labels: framework,f: focus,has reproducible steps,P2,f: selection,fyi-web,found in release: 3.16,found in release: 3.19,team-text-input

### Steps to reproduce

I've been investigating an issue with Cmd+C not always correctly working to copy text from embedded DevTools. I think I've finally tracked down what's happening, and I think it may be a Flutter issue. I can reproduce what seems like the same bug using DartPad without any VS Code/Flutter.

The issue seems to be that when some SelectableText is selected (by clicking and dragging or double-clicking), focus is not changed, so pressing Cmd+C is then handled by whatever else had focus at the time. A single left-click first does move focus and then things work correctly.


### Expected results

Selecting text with a drag or double-click should move focus so that pressing Ctrl+C copies the selection.

### Actual results

Focus does not change, so Ctrl+C is handled by another part of the application (in this case the DartPad editor, but when embedded in VS Code, it's the VS Code editor).

### Code sample

Here's an example testing on DartPad using the following code:

```dart
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(body: SelectableText('This is selectable text')),
    );
  }
}
```

### Screenshots or Video



In this first video, I do the following (this works as expected):

1. Select "SelectableText" in the editor on the left
2. Click once in the Flutter app on the right
3. Double-click to select the word "This" in the Flutter app on the right
4. Press Ctrl+C to copy to clipboard
5. Click in the editor on the left
6. Press Ctrl+V to paste to see what was in the clipboard (it was "This" as expected)

https://github.com/flutter/flutter/assets/1078012/e9dfc551-4d43-4879-81b0-5a1b467dd8b4

In this second video, I do the same as above - but without step 2. I do not left-click in the app to give focus to the Flutter app. Instead, I go straight to double-clicking to select "This". However this time, when I paste, I have actually copied "SelectableText" because focus was really still in the left editor.

https://github.com/flutter/flutter/assets/1078012/4c9760ba-507f-4ab5-b449-4d689103bad3

### Logs

_No response_

### Flutter Doctor output

N/A - reproduced on DartPad with Flutter 3.16.5.
Repository: react
Issue: [DevTools Bug]: react-devtools depends on vulnerable versions of electron and got
Labels: Type: Bug,Status: Unconfirmed,Component: Developer Tools

### Website or app

https://github.com/facebook/react/blob/main/packages/react-devtools/package.json

### Repro steps

electron 23.3.13 has a vulnarability, should be updated to 24+, see links below

```
# npm audit report

electron  23.0.0-alpha.1 - 23.3.13
Severity: moderate
ASAR Integrity bypass via filetype confusion in electron - https://github.com/advisories/GHSA-7m48-wc93-9g85
fix available via `npm audit fix --force`
Will install react-devtools@4.27.2, which is a breaking change
node_modules/electron
  react-devtools  >=2.1.8
  Depends on vulnerable versions of electron
  Depends on vulnerable versions of update-notifier
  node_modules/react-devtools
```

Also the used update-notifier relies on a version of got that has vulnerabilities
```
got  <11.8.5
Severity: moderate
Got allows a redirect to a UNIX socket - https://github.com/advisories/GHSA-pfrx-2q88-qq97
fix available via `npm audit fix --force`
Will install react-devtools@4.27.2, which is a breaking change
node_modules/package-json/node_modules/got
  package-json  <=6.5.0
  Depends on vulnerable versions of got
  node_modules/package-json
    latest-version  0.2.0 - 5.1.0
    Depends on vulnerable versions of package-json
    node_modules/latest-version
      update-notifier  0.2.0 - 5.1.0
      Depends on vulnerable versions of latest-version
      node_modules/update-notifier
```

### How often does this bug happen?

Every time

### DevTools package (automated)

_No response_

### DevTools version (automated)

_No response_

### Error message (automated)

_No response_

### Error call stack (automated)

_No response_

### Error component stack (automated)

_No response_

### GitHub query string (automated)

_No response_
Repository: vscode
Issue: Testing #203097: Unecessary screen jumping on chevron clicking
Labels: polish,notebook-sticky-scroll

Testing #203097

For the testing I was using the `my-work.github-issues` notebook. I scrolled down in the file until the header `Missing Type Label` appeared. I clicked on the chevron next to this header and In noticed that the screen jumped up, I suppose the reveal the header. The original header however was already revealed, so I am wondering if it is necessary to reveal the header here? 

https://github.com/microsoft/vscode/assets/61460952/ce66e0dd-174f-4cd7-9dca-e31891bda2bf
Repository: vscode
Issue: Testing #203097: Notebook sticky scroll appears after header completely disappears
Labels: polish,notebook-sticky-scroll

Testing #203097

This issue is unrelated to the folding icon work. I was testing on the following notebook https://github.com/donnemartin/data-science-ipython-notebooks/blob/master/kaggle/titanic.ipynb and I noticed that the sticky header for 'Kaggle Machine Competition: Predicting Titanic Survivors' appeared after the header completely disappeared out of the viewport. I found that curious because I noticed that in other cases, the sticky header appears before the header starts disappeared behind the sticky scroll.

https://github.com/microsoft/vscode/assets/61460952/9ed18fad-43a1-43de-aca1-f6c06447325a
Repository: vscode
Issue: Provide a setting to always use device flow for login
Labels: feature-request,good first issue,github-authentication

That would be especially helpful in WSL since we could use a browser in Windows to login without pressing two times cancel.
Repository: pytorch
Issue: DTensorConverter::successful returns False on no Tensor args causing test failures
Labels: oncall: distributed

### 🐛 Describe the bug

I noticed that `test_dtensor_op_db_empty_strided_cpu_float32` failing on 2.1.2 which was recently even marked as xfail in https://github.com/pytorch/pytorch/commit/49d826bcd3de952eb84a33c89ed399a1a2821c15

The reason for this is simple: The test always fails the check https://github.com/pytorch/pytorch/blob/905a7cc340bf7aaa44ba64142cfd0f68b7b403c5/test/distributed/_tensor/test_dtensor_ops.py#L648 and raises

> RuntimeError: failed to convert args to DTensor; originally (*[(), ()], **{'requires_grad': True, 'dtype': torch.float32, 'device': 'cpu'})

That check is:
https://github.com/pytorch/pytorch/blob/905a7cc340bf7aaa44ba64142cfd0f68b7b403c5/torch/testing/_internal/distributed/_tensor/common_dtensor.py#L349

And `self.hit` can only be set by a call to `to_dist_tensor` which won't ever happen if the args and kwargs don't contain any tensor, see https://github.com/pytorch/pytorch/blob/905a7cc340bf7aaa44ba64142cfd0f68b7b403c5/torch/testing/_internal/distributed/_tensor/common_dtensor.py#L404-L425

This is the case for op-functions not expecting any inputs, such as `empty_strided` so the check in the test doesn't make sense for those functions.

So I suggest to skip tests not expecting any inputs and/or improve `DTensorConverter` to detect the absence of any tensors by checking `choices_for_args` before passing it to `itertools.product` at https://github.com/pytorch/pytorch/blob/905a7cc340bf7aaa44ba64142cfd0f68b7b403c5/torch/testing/_internal/distributed/_tensor/common_dtensor.py#L345

An option would be to raise an Exception at this point stating that this test should be marked to be skipped in the `op_db` or to instead create an empty iterable: `iter(itertools.product(*choices_for_args) if choices_for_args else [])`   
This way the iteration over the `DTensorConverter` instance would never execute, while currently `itertools.product()` (no arguments)  produces an iterable yielding an empty tuple which obviously leads to fails when asserting at least one tensor in that tuple gets converted/distributed.

### Versions

PyTorch 2.1.2, code unchanged in main

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225