sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Exponential compile time with nested closures and missing binop
Labels: I-compiletime,T-compiler,C-bug

Found by fuzzing and probably only affects fuzzing

### Code

```rust
struct S;

fn main() {
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    (|| S +
    S
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )()
    )();
}
```

### Error output

Multiple instances of this error, which seems reasonable:

error[[E0369](https://doc.rust-lang.org/error_codes/E0369.html)]: cannot add `S` to `S`

<details>
<summary>Error details</summary>

```text
error[E0369]: cannot add `S` to `S`
  --> tq.rs:10:11
   |
10 |       (|| S +
   |           - ^
   |           |
   |           S
11 | /     (|| S +
12 | |     (|| S +
13 | |     (|| S +
14 | |     (|| S +
...  |
30 | |     )()
31 | |     )()
   | |_______- S
   |
note: an implementation of `Add` might be missing for `S`
  --> tq.rs:1:1
   |
1  | struct S;
   | ^^^^^^^^ must implement `Add`
note: the trait `Add` must be implemented
  --> /rustc/fdaaaf9f923281ab98b865259aa40fbf93d72c7a/library/core/src/ops/arith.rs:76:1
```

</details>

### Where it's slow

With `-Z time-passes`: the slowness is in `type_check_crate`

`check_expr_coercible_to_type` is on the stack multiple times ([sample head](https://github.com/rust-lang/rust/files/13323701/Sample.of.rustc.txt))

### Regression

Regression in nightly-2023-04-18

<details>
<summary>Commits in range</summary>

```text
  commit[0] 2023-04-16UTC: Auto merge of #109133 - weihanglo:make-cargo-a-workspace, r=ehuss
  commit[1] 2023-04-17UTC: Auto merge of #109061 - saethlin:leak-backtraces, r=oli-obk
  commit[2] 2023-04-17UTC: Auto merge of #109247 - saethlin:inline-without-inline, r=oli-obk
  commit[3] 2023-04-17UTC: Auto merge of #109588 - Nilstrieb:dropless-expr, r=compiler-errors
  commit[4] 2023-04-17UTC: Auto merge of #110440 - matthiaskrgr:rollup-eit19vi, r=matthiaskrgr
  commit[5] 2023-04-17UTC: Auto merge of #110367 - saethlin:no-truncations, r=oli-obk
  commit[6] 2023-04-17UTC: Auto merge of #110458 - matthiaskrgr:rollup-1xcxmgc, r=matthiaskrgr
  commit[7] 2023-04-17UTC: Auto merge of #110343 - saethlin:encode-initmask, r=lqd
  commit[8] 2023-04-17UTC: Auto merge of #110243 - WaffleLapkin:bless_tagged_pointers🙏, r=Nilstrieb
```

</details>

### Version

```
rustc 1.75.0-nightly (fdaaaf9f9 2023-11-08)
binary: rustc
commit-hash: fdaaaf9f923281ab98b865259aa40fbf93d72c7a
commit-date: 2023-11-08
host: x86_64-apple-darwin
release: 1.75.0-nightly
LLVM version: 17.0.4
```

@rustbot label +I-compiletime
Repository: rust
Issue: Poor codegen for derived `==` on simple 2-field struct
Labels: A-LLVM,I-slow,A-codegen,T-lang,T-opsem

Given a basic struct like this,
```rust
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct Entity {
    g: u32,
    i: u32
}
```
The generated `==` is suboptimal:
```rust
#[no_mangle]
pub fn derived_eq(x: &Entity, y: &Entity) -> bool {
    x == y
}
```
```asm
derived_eq:
        movq    xmm0, qword ptr [rdi]
        movq    xmm1, qword ptr [rsi]
        pcmpeqd xmm1, xmm0
        pshufd  xmm0, xmm1, 80
        movmskpd        eax, xmm0
        cmp     eax, 3
        sete    al
        ret
```
<https://rust.godbolt.org/z/1b1xsnzx6>

For comparison, not using short-circuiting
```rust
#[no_mangle]
pub fn good_eq(x: &Entity, y: &Entity) -> bool {
    (x.g == y.g) & (x.i == y.i)
}
```
gives a much-simpler codegen
```rust
good_eq:
        mov     rax, qword ptr [rsi]
        cmp     qword ptr [rdi], rax
        sete    al
        ret
```

This appears to be related to LLVM not knowing whether the second field is poison, as Alive2 confirms that LLVM isn't allowed to convert the former into the latter (at least for the optimized forms): <https://alive2.llvm.org/ce/z/bAsJGN>

Is there maybe some metadata we could put on the parameter attributes to tell LLVM that reading them isn't poison?  It appears that just reading them first, like (same godbolt link above)
```rust
#[no_mangle]
pub fn failed_workaround(x: &Entity, y: &Entity) -> bool {
    let Entity { g: g1, i: i1 } = *x;
    let Entity { g: g2, i: i2 } = *y;
    g1 == g2 && i1 == i2
}
```
still isn't enough for it to remove the short-circuiting, as even though that emits the `!noundef` loads first, it seems like LLVM's `SROAPass` moves them behind the branch from `&&`.

---

FWIW, clang(trunk) has the same codegen difference: <https://cpp.godbolt.org/z/bbaz196GP>

It might not have a choice, though, since C++ references are mostly just pointers.
Repository: flutter
Issue: Tableview widget janks execessively with >250k rows
Labels: framework,c: performance,f: scrolling,package,has reproducible steps,P2,team-framework,triaged-framework,found in release: 3.13,p: two_dimensional_scrollables,found in release: 3.17

### 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)

### Steps to reproduce

1. Update the [example app in the 2d-scrollables package](https://github.com/flutter/packages/tree/da3bf27a527ca82b5054de02230f61bbb2ed80b4/packages/two_dimensional_scrollables/example) to start with 1.5 million rows by editing `int _rowCount = 1500000;`
2. Run the app `flutter run -d mac --release`
3. Click the "Jump to bottom"
4. Attempt to scroll

### Expected results

Scroll without janking

### Actual results

Getting ~1 frame every 1-2 seconds

### Code sample

Update the [example app in the 2d-scrollables package](https://github.com/flutter/packages/tree/da3bf27a527ca82b5054de02230f61bbb2ed80b4/packages/two_dimensional_scrollables/example) to start with 1.5 million rows by editing `int _rowCount = 1500000;`

### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>


https://github.com/flutter/flutter/assets/22898670/43e49aba-9c4d-4709-97a9-4253d27a7620




</details>


### Logs

_No response_

### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.13.9, on macOS 14.1 23B74 darwin-arm64, locale
    en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    ✗ Unable to get list of installed Simulator runtimes.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.84.0)
[✓] Connected device (2 available)
[✓] Network resources
```

</details>
Repository: flutter
Issue: Make ThemeExtension methods no-op 
Labels: framework,f: material design,P2,team-design,triaged-design,Design Systems Study

Maybe.

This would mean subclasses would not have to implement the methods if they did not want to (copyWith and lerp). We heard in the Design Systems study that some developers don't care about these methods and do not want to have to implement them just to use ThemeExtensions.

Or...

- Make a color-specific ThemeExtensions that automatically handles methods like copyWith or lerping
- Consider adding object(s) of type X in the form of maps or lists so we could better implement these methods for developers.

In the study workshops, we discussed a lot of options. Not sure of the best path forward yet now that we recognize there is an issue here.
Repository: flutter
Issue: Add support for interactively creating color schemes with any colors in M3 demo
Labels: f: material design,d: examples,P2,team-design,triaged-design,Design Systems Study

From the Design Systems study

The M3 demo is a great way to generate color schemes and see how they apply to components. Currently, there are some built in color seeds, as well as images to generate a color scheme from.

We should add support for developers to provide their own colors so they can see those color values reflected in the components of the demo.
Repository: flutter
Issue: Support for a generic slider widget
Labels: c: new feature,framework,c: proposal,P2,team-framework,triaged-framework,Design Systems Study

Part of the design systems study


The slider widget is in the material library, but developers want to be able to customize it - a lot!
There are already a lot of ways to customize the existing slider widget, but it is worth considering
if we could support something that (maybe?) boils down to a RenderObjectWidget that takes a Widget thumb and a Widget track that Flutter stitches together for developers so they can provide whatever they like.

Ideally this generic slider would implement the gesture model for the slider, as that is the most complicated part that developers face when trying to create their own from scratch.
Repository: flutter
Issue: Support for a generic switch widget
Labels: c: new feature,framework,c: proposal,P2,team-framework,triaged-framework,Design Systems Study

Part of the design systems study

A switch widget is available in the material and cupertino libraries, but developers want to be able to customize them - a lot!
There are already ways to customize the existing widgets, but it is worth considering
if we could support something that (maybe?) boils down to a RenderObjectWidget that takes a Widget thumb and a Widget track that Flutter stitches together for developers so they can provide whatever they like.

Ideally this generic switch would implement the gesture model for the switch, as that is the most complicated part that developers face when trying to create their own from scratch.
Repository: flutter
Issue: Make MaterialStateColor concrete
Labels: P2,team-design,triaged-design,Design Systems Study

Or add more examples of how to use it.

This allows you to use MaterialStateProperties for Colors interchangeably with Color properties.

Context/Use case:

This came up in the Design Systems Study when looking at the `TextButton.styleFrom` versus the `ButtonStyle`. One takes colors, the other MaterialStateProperties. This is annoying for developers when they want to configure one property to be stateful, but the rest are just the same color. Enumerating `MaterialStateProperty<Color>.all(myColor)` is a lot for all those ButtonStyle properties when you just want to use a MaterialStateProperty on one.

- [ ] we should probably audit the material library to ensure this interchangeable color feature is supported everywhere as well. AppBar supports this for background color for example.
- [ ] make MaterialStateColor concrete for easier use
- [ ] Make some examples to help folks learn how to use it
Repository: terminal
Issue: Inconsistent margins on color schemes settings page
Labels: Issue-Bug,Product-Terminal,In-PR,Area-SettingsUI

### Windows Terminal version

1.18.2822.0

### Windows build number

10.0.22635.0

### Other Software

_No response_

### Steps to reproduce

Open the color scheme settings page.

### Expected Behavior

_No response_

### Actual Behavior

The left margins of the disclaimer text "Schemes defined here...", the "Add new" button and the ListView below are too small and do not line up with the page header "Color schemes". On other settings pages, the controls line up properly.

![image](https://github.com/microsoft/terminal/assets/15180557/24a3b679-1973-4001-ac50-fc2d5d00258b)
Repository: node
Issue: test runner (--test, node:test)  subtest test context lack `.skip`, `.only` and `.todo` functions
Labels: confirmed-bug,test_runner

### Version

20.7.0

### Platform

Linux void-desktop 6.5.9_1 #1 SMP PREEMPT_DYNAMIC Thu Oct 26 12:11:50 UTC 2023 x86_64 GNU/Linux

### Subsystem

_No response_

### What steps will reproduce the bug?

```js
const test = require('node:test');

test('Parent', t => {
	t.test.only('Child only', () => {});
	t.test.skip('Child skip', () => {});
	t.test.todo('Child todo', () => {});
});
```

Run with `node --test <file>` (same result without the `--test` flag)




### How often does it reproduce? Is there a required condition?

Consistently

### What is the expected behavior? Why is that the expected behavior?

All functions work as described here: https://nodejs.org/docs/latest-v20.x/api/test.html#subtests

> This method behaves identically to the top level test() function. The following example demonstrates the creation of a top level test with two subtests.

### What do you see instead?

```
TypeError [Error]: t.test.todo is not a function
```

```
TypeError [Error]: t.test.skip is not a function
```

```
TypeError [Error]: t.test.only is not a function
```

### Additional information

These functions work for top-level test, they don't work for nested tests.
Maybe it doesn't make sense to expose those functions for subtests (use just `describe` - maybe it's enough), but in that case the documentation is misleading
Repository: pytorch
Issue: DISABLED test_vit_aten_export (__main__.TestQuantizePT2EModels)
Labels: triaged,oncall: mobile,skipped

Platforms: linux, mac, macos

This test was disabled because it is failing on main branch ([recent examples](https://hud.pytorch.org/failure?name=pull%20%2F%20linux-focal-py3.8-clang10%20%2F%20test%20(dynamo%2C%201%2C%202%2C%20linux.2xlarge)&jobName=linux-focal-py3.8-clang10%20%2F%20test%20(dynamo%2C%201%2C%202%2C%20linux.2xlarge)&failureCaptures=%5B%22test_model_exports_to_core_aten.py%3A%3ATestQuantizePT2EModels%3A%3Atest_vit_aten_export%22%5D)).

This test was never run in trunk, and it's broken atm.

cc @kimishpatel
Repository: terminal
Issue: Use default page transition for settings pages instead of drill-in transition
Labels: Help Wanted,Product-Terminal,Issue-Task,Area-SettingsUI

# Description of the new feature/enhancement
The settings content frame currently specifies `DrillInNavigationTransitionInfo` as content transition mode: https://github.com/microsoft/terminal/blob/d14524cd4cc4970bb1b6456f9667e2dd661b9854/src/cascadia/TerminalSettingsEditor/MainPage.xaml#L179

The drill-in effect, as its name suggests, is in my opinion suitable when navigating further down in a hierarchy (e.g. viewing a list of folders and navigating into a subfolder) but less appropriate when switching between settings pages which are on the same logical level. 

Instead, I suggest to use the default page transition mode "slide from bottom", which is also used in the Windows Settings, and whose UI is very similar to the settings in Windows Terminal. By using the same transitions, Windows Terminal will feel more consistent with the inbuilt OS apps.

# Proposed technical implementation details (optional)
Replace lines https://github.com/microsoft/terminal/blob/d14524cd4cc4970bb1b6456f9667e2dd661b9854/src/cascadia/TerminalSettingsEditor/MainPage.xaml#L177-L181 with 
```xaml
<NavigationThemeTransition />
```
(There is a difference between specifying `<NavigationThemeTransition />` and not setting `Frame.ContentTransitions` at all. If it is not set at all, the Frame will still use the "slide from bottom" transition between page transitions as a default but it will not show the animation on initial displaying of the page. Since the Windows Settings app does show an animation on initial loading of the page, my suggestion is to do it here, as well.)
Repository: pytorch
Issue: Revisit test_edge_op_registration on PyTorch CI
Labels: triaged,oncall: export

The test was added by https://github.com/pytorch/pytorch/pull/89596 before ExecuTorch becomes open source, so it's probably outdated.  It will be run as part of the new ExecuTorch job on PyTorch (https://github.com/pytorch/pytorch/pull/113364)

cc @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4 @larryliu0820 to flesh out the details here
Repository: next.js
Issue: middleware.ts - rewriting /_next/data/ paths is producing incorrect output (nexturl.href)
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://github.com/ben-aggus-gateway/middlewarebug.git

### To Reproduce

1. Run the application locally. Since this is middleware, it logs the nexturl object to the console.
2. In the local browser for the site, add a filepath that mimics a /_next/data path. This is a working example: http://localhost:3000/_next/data/TN22pxNPSlmN59JSJ1pFb/support/security.json
3. Observe the console output. The 'href' key will show the mangled output. (path repeats, ends with .json.json) This is the result of the URL above:
rewrite {
  href: **'https://www.mydomain.com/_next/data/TN22pxNPSlmN59JSJ1pFb/_next/data/TN22pxNPSlmN59JSJ1pFb/support/security.json.json',**
  origin: 'https://www.mydomain.com',
  protocol: 'https:',
  username: '',
  password: '',
  host: 'www.mydomain.com',
  hostname: 'www.mydomain.com',
  port: '',
  pathname: '/_next/data/TN22pxNPSlmN59JSJ1pFb/support/security.json',     
  search: '',
  searchParams: URLSearchParams {
  [Symbol(query)]: [],
  [Symbol(context)]: URL {
  [Symbol(context)]: URLContext {
  href: 'https://www.mydomain.com/_next/data/TN22pxNPSlmN59JSJ1pFb/support/security.json',
  protocol_end: 6,
  username_end: 8,
  host_start: 8,
  host_end: 28,
  pathname_start: 28,
  search_start: 4294967295,
  hash_start: 4294967295,
  port: 4294967295,
  scheme_type: 2
}
}
},
  hash: ''
}

Providing "normal" URLs like /test/path will not produce the issue.

I have enabled skipMiddlewareUrlNormalize: true, in nextjs.config

### Current vs. Expected behavior

Current behavior:
nexturl.href= https://www.mydomain.com/_next/data/TN22pxNPSlmN59JSJ1pFb/_next/data/TN22pxNPSlmN59JSJ1pFb/support/security.json.json

(the path seems to repeat twice)

Expected behavior:
nexturl.href should = https://www.mydomain.com/_next/data/TN22pxNPSlmN59JSJ1pFb/support/security.json when that path is provided to the redirector (and a host has been provided like our case)

This code currently works in our production Next 13.4.19 environment and produces the expected behavior.

### 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 Enterprise
Binaries:
  Node: 18.18.2
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.0.3-canary.2
  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)

### Additional context

We are running 2 next sites. The need to rewrite /_next/data URLs is due to rewriting pages from 1 site to the other for certain pages.
Repository: ollama
Issue: Support for additional formats such as `yaml`
Labels: feature request

Good afternoon!

Recently, Ollama received an update that introduces [JSON mode](https://github.com/jmorganca/ollama/blob/main/docs/api.md#json-mode) to the generate method. Although it works well, there is an issue: it is not possible to decode JSON during generation. Meanwhile, YAML is completely decodable while being generated. Therefore, I propose the addition of YAML mode as a response format.

Thank you for your work!
Repository: godot
Issue: Can't select a virtual class to inherit from using "Create Script -> Inherit Object" UI
Labels: bug,topic:editor

### Godot version

4.2beta5.mono; 4.1.3.stable.mono

### System information

Windows 10

### Issue description

Attempting to inherit from a virtual class via the `Create Script -> Inherit Object` UI is not possible. Attempting to click `Inherit` does nothing. Instead, the name of the virtual class must be manually typed in.

Bug happens for both GDScript and C#.

Presumably this happens because this is one of the few palces where it makes sense for the class selection UI to be able to select an virtual class.

![Godot_v4 2-beta5_mono_win64_WqkE4ppLwj](https://github.com/godotengine/godot/assets/145553014/ad26d103-48d7-44b7-8af0-db2ecfcdb7fe)


### Steps to reproduce

- Create a new script by right clicking in the FileSystem.
- Try to fill the `Inherits` field by clicking on the tree icon.
- Select any virtual class, such as `BaseButton`.
- Press `Inherit` button. Observe that nothing happens; the window remains open.

- Press `Cancel`. Manually type in the name of the virtual class. Press `Create`. Observe that the script file is created, and that it correctly derives from the virtual class.

### Minimal reproduction project

N/A
Repository: next.js
Issue: Revalidate broken with top-level await
Labels: bug

### Link to the code that reproduces this issue

https://github.com/sinasab/next-revalidate-bug-repro

### To Reproduce

1. locally build & start the app (bug doesn't occur in dev)
2. observe that the page doesn't revalidate when refreshing (if it was revalidating the rendered date would be updating on refreshes)

(steps to go from fresh create-next-app to repro are below)

### Current vs. Expected behavior

Expected behavior is for the page to revalidate every 1 sec, and for refreshes of the page to periodically pull the fresh version of the page.

I have the current timestamp rendering on page load, which should update on each revalidation, but you can see that it remains the same.

You can also go into the response headers and see the cache control maxage set to a large number, rather than the 1 second that I'm attempting.
<img width="476" alt="image" src="https://github.com/vercel/next.js/assets/3280221/8035598f-8fe5-4367-894a-4295deab2a81">


Removing the top-level await seems to fix the issue.

### 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 23.1.0: Mon Oct  9 21:28:12 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T8103
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: N/A
  pnpm: 8.10.2
Relevant Packages:
  next: 14.0.3-canary.2
  eslint-config-next: 14.0.1
  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

This seems to work properly when deployed on vercel, but fails locally and on other "serverful" deployment environments (tested on railway.app).

This can be trivially repro'd locally via the create-next-app CLI tool:
1. `npx create-next-app@canary`
2. replace the contents of `app/page.tsx` with below
3. update `tsconfig.json`'s target to `es2017`

Now running `npm run build && npm start` should give you the repro as described above.

```tsx
// app/page.tsx
export const revalidate = 1;

const response = await fetch("https://www.randomnumberapi.com/api/v1.0/random");

const randVal = await response.json();

export default async function Page() {
	return (
		<>
			<div>{new Date().toString()}</div>
			<div>{randVal}</div>
		</>
	);
}

```