sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [dynamo]RFC/Feature request - cache, guard, and reuse InliningInstructionTranslator inline_call
Labels: feature,triaged,needs research,oncall: pt2,module: dynamo

For a given program, like

```

def bn(x, y, k):
    if k < 1:
        return x.cos() * y.sin()
    else:
        return x * y

def fn(x, y, k):
    a = []
    for i in range(k):
        a.append(bn(x, y, i))
    return a

def p(gm, inputs):
    print(gm)
    return gm

x = torch.randn([2, 2])
y = torch.randn([2, 2])
torch._dynamo.optimize(p, nopython=True)(fn)(x, y, 3)
```

We should only inline through `bn` when the graph would change. Today, we will inline for every single `k`. This causes us to spend a lot of time in tracing.

The steps here would be:

1) Refactor guard builder to be able to produce a python runnable check_fn, that can take arbitrary args (today's is tightly coupled to how it is run in eval_frame.c, and expects f_locals, f_globals)
2) Refactor inline to work more like speculate_subgraph, wherein we return an fx.Graph artifact, and the pythonic-runnable check_fn from (1) 
3) keep a cache object tied to the lifecycle of the current OutputGraph object, this object should store both the graph and guard fn from (3), store this keyed on the `fn` object passed to inlining
4) Rewrite the inlining flow to:
   a) Check the cache
   b) Run the guards if there is an entry
   c) Reuse the cached graph if the guards pass
   d) Drop into the inlining flow if the guards fail, storing the new graph and guards 
   



cc @ezyang @anijain2305 @chauhang @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @msaroufim @wconstab @bdhirsh @zou3519 @aakhundov
Repository: kubernetes
Issue: [StructuredAuthorizationConfig] - cel cache r.Spec
Labels: sig/auth,triage/accepted

Create cache semantics for pre-computed unstructured `r.Spec` so it can be reused in `eval` instead of computing it every time for Authorize for every webhook.

xref: https://github.com/kubernetes/kubernetes/pull/121223#discussion_r1369279268

/triage accepted
/sig auth
Repository: go
Issue: proposal: sync: add Go method to WaitGroup to launch a tracked goroutine
Labels: Proposal

## TL;DR

Add a `func (*WaitGroup) Go(task func())` method to launch a task in a goroutine tracked with a [`sync.WaitGroup`](https://pkg.go.dev/sync#WaitGroup).

Combined with the loopvar change (#60078), writing parallel code would be much less error prone.

## Rationale

A [very common use case](https://gobyexample.com/waitgroups) for [`sync.WaitGroup`](https://pkg.go.dev/sync#WaitGroup) is to track the termination of tasks launched in goroutines.

Here is the [classic example](https://go.dev/play/p/xsPCHPSGs-J):

```go
	var wg sync.WaitGroup
	for i := 1; i <= 5; i++ {
		i := i
		wg.Add(1)
		go func() {
			defer wg.Done()
			work(i)
		}()
	}
	wg.Wait()
```

I propose to add a `func (*WaitGroup) Go(func())` method that would wrap:
* `wg.Add(1)`: the `1` looks like a magic value
* launching the goroutine: the `go` keyword and the `()` after the func body are magic for Go beginners
* `defer wg.Done()`: the `defer` keyword and the appearance of `Done` before the call to the worker are magic

A simple implementation:

```go
func (wg *WaitGroup) Go(task func()) {
	wg.Add(1)
	go func() {
		defer wg.Done()
		task()
	}()
}
```

The example above would be much reduced and many footguns avoided (the last remaining footgun is being addressed by #60078):

```go
	var wg WaitGroup
	for i := 1; i <= 5; i++ {
		i := i  // avoid loopvar footgun for go < 1.22
		wg.Go(func() {
			work(i)
		})
	}
	wg.Wait()
```

[The full modified example](https://go.dev/play/p/OaInX1BFEN0), including an *extended* implementation of `sync.WaitGroup`, is available on the Go playground.

(to handle the case of a task with arguments, I would recommend rewriting the `work` to use the builder pattern: https://go.dev/play/p/g1Um_GhQOyc)
Repository: rust
Issue: `$lit:literal` chokes on `-(1)`
Labels: A-macros,C-discussion

<!--
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 tried this code:

```rust
macro_rules! is_literal {
    ($l:literal) => { true };
    ($e:expr) => { false };
}

fn main() {
    println!("{}", is_literal!(-(1)));
}
```

I expected to see this happen: *one of `true` or `false` being printed*

Given that `-(1)` is a valid expression, it should be picked up by `$e:expr` rather than failing at `$lit:literal`. Or it should be considered a valid literal expression.

Note that it also chokes on similar expressions, such as `-(x)` and `-(x.method())`. 

Instead, this happened: 
```
error: unexpected token: `(`
 --> src/main.rs:8:33
  |
2 |     ($l:literal) => { true };
  |      ---------- while parsing argument for this `literal` macro fragment
...
8 |     println!("{}", is_literal!(-(1)));
  |                                 ^
```
### 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`:
```
rustc 1.73.0 (cc66ad468 2023-10-03)
binary: rustc
commit-hash: cc66ad468955717ab92600c770da8c1601a4ff33
commit-date: 2023-10-03
host: aarch64-apple-darwin
release: 1.73.0
LLVM version: 17.0.2
```
Happens on beta and nightly too.
Repository: godot
Issue: Bugs and crashes during editing caused by AnimatedSprite2D and AnimationPlayer.
Labels: bug,topic:editor,needs testing,crash,topic:animation

### Godot version

4.2.beta3

### System information

Windows 10 - Godot v4.2.beta3

### Issue description

When the AnimatedSprite2D is in play mode and the AnimationPlayer is used to play a keyframe that changes AnimatedSprite2D.animation, it may automatically switch to the AnimatedSprite2D editing panel or crash.

### Steps to reproduce

1.Empty project
2.New Node2D scene
3.Add AnimatedSprite2D and AnimationPlayer nodes
4.Create two new animations for AnimatedSprite2D
5.Set AnimatedSprite2D to loop the first animation
6.Use AnimationPlayer to create a new animation and add keyframes on 0.5s to change AnimatedSprite2D.animation to the second animation
7.Slide the animation track cursor and you can see that it automatically jumps to the AnimatedSprite panel
8.Play the AnimationPlayer and then crash happend

### Minimal reproduction project

[AnimatedSprite.zip](https://github.com/godotengine/godot/files/13194300/AnimatedSprite.zip)
Repository: react-native
Issue: Android - aliasing on borderRadius
Labels: Issue: Author Provided Repro,Platform: Android,Resolution: Fixed

### Description

After upgrading my project to the latest version of react native (from 0.62) I've noticed that antialiasing is no longer applied to the borders of Views when a borderRadius is applied.  This is particularly noticeable on low DPI devices such as tablets.

I mainly use borderRadius for round buttons, or rectangular buttons with rounded corners.  Is there a better way to do it that will give me antialiasing?


I've attached screenshots of a view with a borderRadius applied in both 0.72 and 0.62 and linked to a reproducer project.



### React Native Version

0.72.6

### Output of `npx react-native info`

System:
  OS: macOS 13.6
  CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
  Memory: 1.49 GB / 16.00 GB
  Shell:
    version: 3.2.57
    path: /bin/bash
Binaries:
  Node:
    version: 16.13.2
    path: /usr/local/bin/node
  Yarn: Not Found
  npm:
    version: 8.1.2
    path: /usr/local/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.12.1
    path: /Users/ghee/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10406996
  Xcode:
    version: 15.0/15A240d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.20
    path: /usr/local/opt/openjdk@11/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/ghee/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.6
    wanted: 0.72.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found



### Steps to reproduce

Create a view with a nonzero borderRadius in its style.

### Snack, screenshot, or link to a repository

![rn62](https://github.com/facebook/react-native/assets/42706508/2a3f70aa-17ee-4ed4-8460-5bf88d453272)
![rn72](https://github.com/facebook/react-native/assets/42706508/af4b69fd-ef08-46b1-ab45-e3c021a92cc1)


https://github.com/steven-sh/react-native-72-aliasing
Repository: stable-diffusion-webui
Issue: [Feature Request]: rate image realisticity automatically
Labels: enhancement,extension-request

### Is there an existing issue for this?

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

### What would your feature do ?

It would allow using model like umm-maybe/AI-image-detector to automatically rate the generated image, e.g. _human 65%, artificial 35%_.

### Proposed workflow

1. Enable this feature in options 
2. Generate image as you always do
3. Score should be displayed in `txt2img_results`.


### Additional information

https://huggingface.co/spaces/umm-maybe/AI-image-detector already provides the simplest possible Gradio classification UI as a proof of concept, this feature is only about integrating it with your webui. It could perhaps also be converted into a plugin. It would perhaps be a good idea to also allow other models as a configuration option.
Repository: rust
Issue: non_exhaustive_omitted_patterns should not warn matches! macro
Labels: A-lints,C-bug,T-libs,F-non_exhaustive_omitted_patterns_lint

<!--
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 tried this code:

```rust
#![feature(non_exhaustive_omitted_patterns_lint)]
#![warn(non_exhaustive_omitted_patterns)]

use std::sync::atomic::Ordering; // #[non_exhaustive] enum

pub fn is_seqcst(order: Ordering) -> bool {
    matches!(order, Ordering::SeqCst)
}
```

I expected to see this happen: no warning

Instead, this happened: 

```
warning: some variants are not matched explicitly
 --> src/lib.rs:7:14
  |
7 |     matches!(order, Ordering::SeqCst)
  |              ^^^^^ patterns `std::sync::atomic::Ordering::Relaxed`, `std::sync::atomic::Ordering::Release`, `std::sync::atomic::Ordering::Acquire` and 1 more not covered
  |
  = help: ensure that all variants are matched explicitly by adding the suggested match arms
  = note: the matched value is of type `std::sync::atomic::Ordering` and the `non_exhaustive_omitted_patterns` attribute was found
```

[playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=1b2d1a14933830272c70b8736f7a7a0a)

### 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`:
```
rustc 1.75.0-nightly (2f1bd0729 2023-10-27)
binary: rustc
commit-hash: 2f1bd0729b74787f55d4cbc7818cfd787cd43a99
commit-date: 2023-10-27
host: aarch64-apple-darwin
release: 1.75.0-nightly
LLVM version: 17.0.3
```

---

@rustbot label +F-non_exhaustive_omitted_patterns_lint
Repository: stable-diffusion-webui
Issue: [Bug]: webui started without css loaded
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?

webui started, but css stlye load failed , the web page is lossing layout/images/font....etc

from browser logs, it throws: 
Refused to apply style from 'https://******/theme.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

### Steps to reproduce the problem

1. git clone webui repo 
2. install the dependency using pip install -r requreiment_version.txt
3. webui.sh -f --enable-insecure-extension-access


### What should have happened?

webui start successfully

### Sysinfo

centos 7
torch 2.0.0 
A10 single GPU
CU118

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

Google Chrome

### Console logs

```Shell
Refused to apply style from 'https://******/theme.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
```


### Additional information

_No response_
Repository: rust
Issue: csky targets' atomic RMW is not lock-free
Labels: P-low,I-unsound,C-bug,A-atomic,O-csky

In csky, LLVM always generates libcalls (https://github.com/llvm/llvm-project/commit/ec2de7490813a7593dad59f210c7ec41f1a29002), and atomic implementations are provided by libatomic.

https://github.com/rust-lang/rust/blob/c7224e3c954ce54853364c950608c1f0ed47ea85/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2.rs#L15

However, as mentioned in https://github.com/rust-lang/rust/pull/115577#issuecomment-1732597305, the atomic RMW implementation provided in libatomic.a is not lock-free.

And it violates what the standard library is intended to guarantee.

https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#portability

> All atomic types in this module are guaranteed to be [lock-free](https://en.wikipedia.org/wiki/Non-blocking_algorithm) if they’re available. This means they don’t internally acquire a global mutex.

Also, mixing lock-free load/store and non-lock-free RMW can cause data races.

To fix this, we would need to do one of the following:

- Fix libatomic to make the RMW implementation lock-free.
- Fix LLVM to generate atomic instructions instead of libcalls.

It is not impossible to fix this on our end, but it is not very realistic as it would require writing a lot of inline assembly.

cc @Dirreke (mentioned because you are [target maintainer](https://github.com/rust-lang/rust/blob/2d08657901d8fec8f51f203dc8a38e25c162e834/src/doc/rustc/src/platform-support/csky-unknown-linux-gnuabiv2.md#target-maintainers))

---

@rustbot label +A-atomic +I-unsound
Repository: next.js
Issue: next 14 can not resolve dependencies for installed server side packages correctly using plain js (works with typescript)
Labels: bug

### Link to the code that reproduces this issue

https://github.com/erikarenhill/next-14-dependency-bug

### To Reproduce

1. create a new next project, select no when asked if you want to use typescript
2. install ravendb client (5.4.1) (npm i ravendb)
3. import { DocumentStore } from 'ravendb' in a server component or page
4. run the project, npm run dev

### Current vs. Expected behavior

Expected behaviour: The page loads correctly when using next 14 (as it does with 13.5)

Current behaviour: crash with Error: XRegExp is not a function

### 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: #1 SMP Fri Jan 27 02:56:13 UTC 2023
Binaries:
  Node: 18.18.2
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 14.0.0
  eslint-config-next: 14.0.0
  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, Package manager (npm, pnpm, Yarn)

### Additional context

I have reproduced it locally using both node 18 and 20. 

As it works with next 13.5 I'm adding this bug to the next project, as it looks like it can not resolve dependencies for libraries used correctly in the same way as 13.5.

I have tried with and without turbo and it does not matter
Repository: next.js
Issue: [Next.js 14] Script with strategy='beforeInteractive' will cause dynamic routing error
Labels: bug,Navigation

### Link to the code that reproduces this issue

https://github.com/promise96319/nextjs-dynamic-routing-error

### To Reproduce

First, add a Script with `strategy='beforeInteractive'` in `app/layout.tsx`.

Secondly, click the a link navigating to a dynamic routing，it will throw an error.


### Current vs. Expected behavior

When there is a script with `strategy='beforeInteractive'` and navigate to a dynamic routing, the dynamic routing segment has been encoded for twice，like `/_next/static/chunks/app/post/%255BdocId%255D/page.js`，but the correct file path is `/_next/static/chunks/app/post/%5BdocId%5B/page.js`. The dynamic routing segment is not encoded correctly.

### 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 21.6.0: Mon Apr 24 21:10:53 PDT 2023; root:xnu-8020.240.18.701.5~1/RELEASE_X86_64
Binaries:
  Node: 20.8.1
  npm: 10.1.0
  Yarn: 1.9.4
  pnpm: 8.9.0
Relevant Packages:
  next: 14.0.0
  eslint-config-next: 14.0.0
  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)

Routing (next/router, next/navigation, next/link), Script optimization (next/script)

### Additional context

_No response_
Repository: material-ui
Issue: [joy-ui] Integrate Joy UI with Remix v2
Labels: docs,ready to take,package: joy-ui,examples

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

I would like to see a page on the Joy UI 'Integrations' dropdown menu where there are detailed instructions on how to integrate Joy UI into an up-to-date Remix SSR application (with TypeScript, obviously).

### Examples 🌈

![image](https://github.com/mui/material-ui/assets/71563235/8fe87983-5aa6-4703-b3c5-0f4056cbe3e7)


### Motivation 🔦

I switched from Vite-based React SPAs to server-side rendering. Tried both Next.js (from 13.4) and Remix (from v1.16 or something) and I believe Remix has renewed the way of developing React applications. It has an awesome DX and a growing ecosystem. I would like to continue using MUI (probably switching from Material UI to Joy UI on its production release), but I do not want crucial drawbacks because of the SSR. I have found, read and also implemented myself the [material-ui-remix-ts example](https://github.com/mui/material-ui/tree/master/examples/material-ui-remix-ts), but I had a really hard time integrating that one with other popular Remix-based libraries like remix-i18next because both libraries want developers to **replace code parts in entry.client.tsx and entry.server.tsx**. And neither do I want to spend days of figuring things out on lower levels to have them working together, because I do not feel competent enough to that task with confidence and on time yet.
Repository: flutter
Issue: error in firebase-get-to-know-flutter codelab page
Labels: team-codelabs,p: firebase,P2,triaged-codelabs

In main.dart code of 5th steps(add RSVP functionality) in firebase-get-to-know-flutter codelab page

          routes: [
            GoRoute(
              path: 'forgot-password',
              builder: (context, state) {
                final arguments = state.queryParameters;  // This code seems being written incorrectly
                return ForgotPasswordScreen(
                  email: arguments['email'],
                  headerMaxExtent: 200,
                );
              },
            ),
          ],

I think it needs to be modified like below
final arguments = state.uri.queryParameters;

Thank you
Repository: godot
Issue: When loading a scene in the editor for the first time, AnimationPlayer loads the RESET Animation, instead of the last edited Animation
Labels: bug,topic:editor,topic:animation

### Godot version

4.X

### System information

Win 10, dedicated Nvidea

### Issue description

This is a pretty annoying regression:

Instead of loading with the last used animation like it is in Godot 3.X and early Godot 4 builds, the AnimationPlayer shows the user the RESET animation, upon first opening a scene. The RESET animation is commonly not edited manually at all. This regression is a stumbling block to continue working where the user last left off. Especially annoying during phases where the Godot dev has to focus on animation over longer periods of time.

After spending hours testing this with more than 30 Godot versions and creating new test projects for most of the times, I was able to pinpoint the earliest occurrence of this regression to v4.0.beta14.official [28a24639c]. Godot v4.0.beta13.official [caacade56] and all earlier version as well as the whole Godot 3.X branch remembers the last used animation and start with it on load.

### Steps to reproduce

1. Make sure you have an AnimationPlayer node and edit some animation.
2. Save the scene, close Godot and reopen the scene
3. Click on the AnimationPlayer node to make the bottom Animation Panel appear and observe the RESET animation being shown in Godot 4.0 beta 14 and later instead of the last edited animation

### Minimal reproduction project

[animationplayer_start_animation_reset_bug_40beta14.zip](https://github.com/godotengine/godot/files/13195643/animationplayer_start_animation_reset_bug_40beta14.zip)
[animationplayer_start_animation_reset_bug_40beta13.zip](https://github.com/godotengine/godot/files/13195644/animationplayer_start_animation_reset_bug_40beta13.zip)
Repository: TypeScript
Issue: `keyof FilteringMappedType` can't compute its constraint
Labels: Possible Improvement

### 🔎 Search Terms

keyof index constraint filtering mapped 

### 🕗 Version & Regression Information

- This is the behavior in every version I tried

### ⏯ Playground Link

https://www.typescriptlang.org/play?ts=5.3.0-dev.20231027#code/C4TwDgpgBAaghgGwK4QM4B4AqA+KBeKTAbQGsIQB7AM0IF0BuAKEdEigAUAnCgNwEsAJhAEBBAMbAKnfFADejKFFScxALiXBOfAHYBzJooQVdfNVCTaS2igHdtTAL5NGO4BE5U4Y6AGVgcNwBZLwALHQgAYQptKj5dLHFJTlQoCAAPN20BFK5eQWFEqVx5RR0eCjJ1EsUlFXVMQuSiACJlMWaGBSgnRgdmITEEOE5oKgsJPmilCGAkMASJKRT0zOyoACUIMSkBdFRNHV0AGnNLaztsbAAKAH0qrq8k1HuaqCIAaSgdKDJKGgbFslaPVGqgPp1FD0HABKF5QMQjAIQYJiMLaCDqK5dRTbGJxdR+JEotGRaKxeLYmrwZBodDVV6KD5fbQ-cjUQigqBwFKfABkGi0emBckpDNqZneBjFNSMJjMAKe4KlYp6KuwlOwRy60PwuHKgkcTCAA

### 💻 Code

```ts
type Values<T> = T[keyof T];

type ProvidedActor = {
  src: string;
  logic: unknown;
};

interface StateMachineConfig<TActors extends ProvidedActor> {
  invoke: {
    src: TActors["src"];
  };
}

declare function setup<TActors extends Record<string, unknown>>(_: {
  actors: {
    [K in keyof TActors]: TActors[K];
  };
}): {
  createMachine: (
    config: StateMachineConfig<
      Values<{
        [K in keyof TActors as K & string]: {
          src: K;
          logic: TActors[K];
        };
      }>
    >,
  ) => void;
};
```


### 🙁 Actual behavior

```
Type 'Values<{ [K in keyof TActors as K & string]: { src: K; logic: TActors[K]; }; }>' does not satisfy the constraint 'ProvidedActor'.
  Types of property 'src' are incompatible.
    Type 'keyof { [K in keyof TActors as K & string]: { src: K; logic: TActors[K]; }; }' is not assignable to type 'string'.
      Type 'string | number | symbol' is not assignable to type 'string'.
        Type 'number' is not assignable to type 'string'.(2344)
```

### 🙂 Expected behavior

It should typecheck

### Additional information about the issue

Almost the same thing typechecks OK if we refactor this to `[K in keyof TActors & string]`.