sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/playground: no error reported when program gets stuck
Labels: NeedsInvestigation

This program gets stuck in an endless function recursion: https://go.dev/play/p/6NKY1ZpmDV9:

```go
func g() {
	g()
}

func main() {
	println("start")
	g() // expect to see "stack overflow" or perhaps "killed by timeout". Nope
	println("end")
}
```

but the playground simply reports "Program exited". It should either print "timeout running program" or print a stack trace if it ran out of stack. (Running on [gotipplay](https://gotipplay.golang.org/p/dblkBvAvCjH) reports "exited: status 137", which to cognoscenti means 128 + SIGKILL, which is better but still cryptic.)

Contrast with this program which gets stuck in a simple loop https://go.dev/play/p/Oq1QfpRiGk_5. It does report "timeout running program":

```go
func main() {
	println("start")
	for {
	}
	println("end")
}
```
Repository: godot
Issue: `Engine.get_frames_per_second()` returns inconsistent numbers when thread model is Multi-Threaded and V-Sync is enabled
Labels: bug,topic:core,topic:rendering

### Godot version

3.5 RC3

### System information

OS: Ubuntu 18.04, GPU: Geforce 1030

### Issue description

In Project Settings when Rendering's Thread Model = Multi-Threaded and Use V-Sync = ON, Engine.get_frames_per_second() returns inconsistent numbers. I don't know this is expected or is a bug.
This isn't a regression in the mentioned version, previous versions have same issue.

### Steps to reproduce

In Project Settings set:
Rendering -> Threads -> Thread Model = Multi-Threaded
and
Display -> Window -> Use V-Sync = on
Print Engine.get_frames_per_second()  result in _process

### Minimal reproduction project

[vsync-issue.zip](https://github.com/godotengine/godot/files/8871044/vsync-issue.zip)
Repository: TypeScript
Issue: Generics with default type broke intellisensing
Labels: Bug,Help Wanted,Domain: Completion Lists

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms
Intellisense
<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.7.2#code/GYVwdgxgLglg9mABMAjAHgCqIKYA8rZgAmAzolAE4jaIA+iA3ogIYD8AXOVTQL4B8ACiicMAShGMAUIkQVsUEBSRRJPSagFNEPUYgD0emGAIAbEzBKFLiC4gDucCgGsjAc0nrw0eEmAAmTBx8QlIuajpGFg4w3kQAXhjBYUQxCQZpWXlFZVV1P00ZHX09G2NsMwsrGlswOCh7RxcwVyA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
function f1<T extends true | { a?: true }>(t: T): T {
  return t
}
f1({  }) //intellisense is working

function f2<T extends true | { a?: true } = true>(t: T): T {
  return t
}
f2({  }) // intellisense is not working
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->
The problem arises when specifying a default type on a generic and trying to get hints from the intellisense.

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->
Once I define `{ }` as a parameter of function `f2` the intellisense should understand that between the union `true | { a?: true }` the type is already narrowed to `{ a?: true }` as in function `f1`.
Repository: flutter
Issue: Confusing error message : dependOnInheritedElement() was called before ${state.runtimeType}.initState()
Labels: framework,d: api docs,a: error message,P2,team-framework,triaged-framework

Confusing error message is :

> 'When an inherited widget changes, for example if the value of Theme.of() changes, '
>             "its dependent widgets are rebuilt. If the dependent widget's reference to "
>             'the inherited widget is in a constructor or an initState() method, '
>             'then the rebuilt dependent widget will not reflect the changes in the '
>             'inherited widget.'

![image](https://user-images.githubusercontent.com/26296915/172876570-3880b043-3104-4fa9-a433-8af8692f5d48.png)

In fact , when  similar usage of inherited widget  (example: Theme.of()) is  in constructor indeed **_will not reflect_** the changes .
when in initState()indeed **_will reflect_** the changes .

Cause,_state.initState()_ and _state.didChangeDependencies()_ are both in __firstBuild_ which indeed after _super.mount_ when element first mount, So **_"If the dependent widget's reference to the inherited widget is in an initState() method then the rebuilt dependent widget will reflect the changes in the inherited widget"_**

OverAll ， I think the _StateLifecycle should make a litte change :

Before chagne :
![image](https://user-images.githubusercontent.com/26296915/172872273-75cf5682-eab4-43aa-90a1-e73b02f41f64.png)
After chagne : 
```
enum _StateLifecycle {
  /// The [State] object has been created. [State.initState] is called at this
  /// time.
  created,

  /// ------- Add -----------
  beforeInitialized;

  /// The [State.initState] method has been called but the [State] object is
  /// not yet ready to build. [State.didChangeDependencies] is called at this time.
  initialized,

  /// The [State] object is ready to build and [State.dispose] has not yet been
  /// called.
  ready,

  /// The [State.dispose] method has been called and the [State] object is
  /// no longer able to build.
  defunct,
}
```
_firstBuild code flow should be : 

```
_firstBuild {
  assert(state._debugLifecycleState == _StateLifecycle.created);
  assert(() {
      state._debugLifecycleState = _StateLifecycle.beforeInitialized;
      return true;
    }());
 ...
  state.initState();
 ...
  assert(() {
      state._debugLifecycleState = _StateLifecycle.initialized;
      return true;
    }());
 ...
    state.didChangeDependencies();
 ...
    assert(() {
      state._debugLifecycleState = _StateLifecycle.ready;
      return true;
    }());
 ...
}
```
Repository: pytorch
Issue: [feature request] Support dataclass derivations of nn.Module
Labels: module: nn,triaged

### 🚀 The feature, motivation and pitch

Discussed in:
- https://github.com/pytorch/pytorch/issues/72901#issuecomment-1042408766
- https://github.com/pytorch/pytorch/issues/72901#issuecomment-1046011310
- https://github.com/pytorch/pytorch/issues/72901#issuecomment-1046014180

Usecase: eliminating boiler-plate module constructor such as in https://huggingface.co/blog/annotated-diffusion#position-embeddings . This happens a lot in simple composed modules. They could benefit from auto-generated constructors.

### Alternatives

Could nn.Module-derived classes support auto-generated constructors (that would probably mean adjusting the default nn.Module constructor to allow `**kwargs`) without marking the class as dataclass (that allow setting fields by passing constructor kwargs)? Would IDE's support hints of declared fields? (akin to dataclasses?) (afaik one can now declare and type fields in the class definition)

### Additional context

_No response_

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345
Repository: rust
Issue: Mismatched wasm output on darwin vs Ubuntu
Labels: C-bug,A-reproducibility

<!--
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
// Crate A
use std::cell::{RefCell};
use std::collections::HashMap;

use internet_identity_interface as other;

#[export_name = "the name"]
fn dummy()
{
    let _err_info = "hello".to_string(); // Removing this makes the outputs match

    other::unreachable(); // Calling unreachable! from this crate makes the outputs match
}


pub type SomeType = u8; // Inlining 'u8' in the ASSETS below makes the outputs match

thread_local! {
    static ASSETS: RefCell<HashMap<&'static str, (Vec<SomeType>, &'static [u8])>> = RefCell::new(HashMap::default());
}

fn main() {}
```

``` rust
// Crate B ("other")
pub fn unreachable() {
    unreachable!();
}
```


When building using the `wasm32-unknown-unknown` target, I expect the output to be the same on Ubuntu and macOS. Instead, I'm getting different outputs. I've tried on different Ubuntu and macOS versions, and the output is consistent across all versions of the same platform. What's really odd is that the slightest various of the code above makes the output match again.

This is the command I use to build:

```
cargo build --manifest-path ./src/path/to/Crate/A/Cargo.toml --target wasm32-unknown-unknown --release -j1
```

This _could_ be a cargo issue, I'm not sure of what's happening under the hood.

### 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.58.1 (db9d1b20b 2022-01-20)
binary: rustc
commit-hash: db9d1b20bba1968c1ec1fc49616d4742c1725b4b
commit-date: 2022-01-20
host: x86_64-apple-darwin
release: 1.58.1
LLVM version: 13.0.0

---

rustc 1.58.1 (db9d1b20b 2022-01-20)
binary: rustc
commit-hash: db9d1b20bba1968c1ec1fc49616d4742c1725b4b
commit-date: 2022-01-20
host: x86_64-unknown-linux-gnu
release: 1.58.1
LLVM version: 13.0.0
```
Repository: TypeScript
Issue: Tail recursion optimization limit 999 may be manipulated
Labels: Bug,Help Wanted

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

tail recursion, tail recursion optimization, tail recursion detection, tail recursion limit

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

Please keep and fill in the line that best applies:
-->
- This is a crash: yes
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about: yes

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?#code/C4TwDgpgBAcgrgWwEYQE4BUD265gDYQCMAPPAlBAB7AQB2AJgM5S2IqoA0UO+0VNDZgAYA2gF0oAXijiAfFKhCK1OkyiEoAfhYQAbmigAuAFBRuuAiIDkBWgHNgACysT+q5mS3neR2GzRYPAQkZFwiAHSRQRBcQmKyANxQAPTJUE4Alsx4GbQQxsagkH7IAdgWEABMpIjKAmqspZzeBHXuiuIKclKmLRDWtg7OriqCJV7RvmTsgRXVoTKR4dGx8UmpUFnpjtCMAIYI0HvMmdm5+YXg0ABCGXbRAPoAwpgIYHA09ArTZdEkhEJAbICkUbndHgBRVCoTCob7+DDlXjVAFAqBAA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
type NumberToTuple1<Num extends number, Tuple extends 0[] = []> = 0 extends 1 ? never :
  Tuple['length'] extends Num ? Tuple : NumberToTuple1<Num, [...Tuple, 0]>; // this line

type NumberToTuple2<Num extends number, Tuple extends 0[] = []> =
  Tuple['length'] extends Num ? Tuple : NumberToTuple2<Num, [...Tuple, 0]>; // is the same as this line

type BigTuple_Computed = NumberToTuple1<1000>

type BigTuple_Error = NumberToTuple2<1000> // Type instantiation is excessively deep and possibly infinite.(2589)
```

### 🙁 Actual behavior

`NumberToTuple1` is using the tail recursion optimization so `BigTuple_Computed` type is `[0, 0, 0, ..., 0]`, just as expected.
`NumberToTuple2` is ~NOT using tail recursion optimization~ using tail recursion optimization in a different maneer so `BigTuple_Error` type is `any`.
The difference between them is only in junk piece of code `0 extends 1 ? never :` that is doing nothing.

UPD: `NumberToTuple2` is working up to 999, while `NumberToTuple1` is working up to 3153

### 🙂 Expected behavior

~According to the [article introducing tail call optimization](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#tail-recursion-elimination-on-conditional-types) to TypeScript, tail call optimization should be applied to both `NumberToTuple1` and `NumberToTuple2` the same, because non of them is doing any on-stack transformations with the call results.~ Recursion limit is expected to remain the same
Repository: pytorch
Issue: out-of-place functional optimizers: functional optimizers may not be composite compliant
Labels: module: optimizer,triaged,needs research,module: __torch_dispatch__,tensor subclass

## The Problem

Claim: today, the functional optimizers API is not "Composite Compliant". In other words, the implementation uses in-place operations that do not interact well with Tensor Subclasses.

For example, consider the implementation of [sgd](https://github.com/pytorch/pytorch/blob/e99c8ec3c267228c9ff9fefbfb0235dd41698948/torch/optim/sgd.py#L166-L179)

```
def sgd(params, grads, momentum_buffers: "aka, the state"):
  pass
```
Let's assume that some of the momentum buffers are Tensor subclasses, but none of params and grads are Tensor subclasses. Then we would run into a situation where we are performing `Tensor.mul_(TensorSubclass)` ([see here](https://github.com/pytorch/pytorch/blob/e99c8ec3c267228c9ff9fefbfb0235dd41698948/torch/optim/sgd.py#L233))

The "Tensor-Subclass-ness" of the buffers would be lost.

## Concrete examples

- Maybe the user has (params, grad), but want to test the effect of a different set of momentum_buffers. So they'll create a BatchedTensor for the momentum_buffers, and given (params, grad, momentum_buffers), what the user really wants is to obtain a BatchedTensor that represents the updates to apply to the params. Then, the user will manually apply the updates to the params out-of-place (instead of in-place!) to avoid an error
```
params = Tensor(...)
grads = Tensor(...)
momentum_buffers = BatchedTensor(...)
updates = sgd(params, grads, momentum_buffers)

# The following operation doesn't work, because params is a Tensor but momentum_buffers is a BatchedTensor
params.add_(updates)

# So the user's workaround, and our recommended approach, is the following:
new_params = params + updates
```

## Pitch

- Introduce a version of functional optimizers that just returns the (Tensor) updates to be applied to the parameters. This gives our users more flexiblity (they can perform the in-place themselves, or decide to do an out-of-place).
- Fix the internals of functional optimizers to ensure that if any of the inputs are Tensor subclasses, the output (the updates) propagate the Tensor-Subclass-ness.




cc @vincentqb @jbschlosser @albanD @Chillee @ezyang @zou3519 @samdow
Repository: tauri
Issue: [bug] macOS dev window incorrectly launching within full-screen editors
Labels: type: bug

### Describe the bug

On macOS, running `tauri dev` from a full-screen editor will cause the launched window to appear within that full-screen editor:

<img width="1536" alt="Screen Shot 2022-06-09 at 12 43 13 PM" src="https://user-images.githubusercontent.com/41397226/172900393-3485ecd0-1b7f-4159-a4ea-9c516523ee1c.png">

This breaks the macOS window model and doesn't allow the launched application to be moved. The dev application and the full-screen window are stuck together in Mission Control:

<img width="202" alt="Screen Shot 2022-06-09 at 12 43 32 PM" src="https://user-images.githubusercontent.com/41397226/172900665-a0660894-4b7e-4566-b4a3-67c54e4edde1.png">



### Reproduction

On macOS, open an editor with an integrated terminal like VS Code and run `tauri dev`. The launched application will be on top of the editor, unable to be moved.

### Expected behavior

I would expect a new application to go to an open desktop like any other launched macOS application does (and even like the `tauri build` disk image window).

### Platform and versions

```shell
Environment
  › OS: Mac OS 12.4.0 X64
  › Node.js: 18.2.0
  › npm: 8.9.0
  › pnpm: Not installed!
  › yarn: Not installed!
  › rustup: 1.24.3
  › rustc: 1.60.0
  › cargo: 1.60.0
  › Rust toolchain: stable-x86_64-apple-darwin 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.13
  › @tauri-apps/api [NPM]: 1.0.0-rc.6
  › tauri [RUST]: 1.0.0-rc.8,
  › tauri-build [RUST]: 1.0.0-rc.7,
  › tao [RUST]: 0.8.4,
  › wry [RUST]: 0.15.1,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../build
  › devPath: http://localhost:3000/
  › framework: Svelte

App directory structure
  ├─ tauri
  ├─ node_modules
  ├─ static
  ├─ .svelte-kit
  ├─ build
  ├─ .git
  └─ src
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: vscode
Issue: Explorer root is hard to work with when in a repo with many folders
Labels: file-explorer,polish

- using the `vscode` repo, create a file in `.vscode` and have the window not maximized
- try to drag and drop the file to the top level
- the zones i'm offered aren't what I want
Repository: flutter
Issue: [Android] Avoid hidden navigation bar icons
Labels: platform-android,framework,a: quality,a: error message,P2,team-android,triaged-android

On Android APIs 26-28, when the navigation bar is set to be transparent and the navigation bar icons brightness is set to dark, the icons become invisible. This cannot be avoided by setting the `systemNavigationBarContrastEnforced` since this is not available until API 29 ([see documentation](https://developer.android.com/reference/android/view/Window#setNavigationBarContrastEnforced(boolean))). See the following reproduction:

<p align="center">
<img src="https://user-images.githubusercontent.com/43054281/172911148-b669a852-78e4-4778-884c-2c2640e3937c.png"  width="350" height="700">
</p>

<details>
<summary>Reproduction code:</summary>
<br>

```
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Disappearing NavBar Icons Example',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
        body: AnnotatedRegion(
            value: SystemUiOverlayStyle(
              systemNavigationBarColor: Colors.transparent,
              systemNavigationBarContrastEnforced: true, //Has no effect API 26-28, allowing this issue
              systemNavigationBarIconBrightness: Brightness.light,
            ),
            child: Center(child: Text('Disappearing NavBar Icons Example'))
        )
    );
  }
}
```
</details>

Original issue: [#90098](https://github.com/flutter/flutter/issues/90098).
Repository: flutter
Issue: Proposal to override pubspec.yaml in flavor dedicated yaml
Labels: c: new feature,tool,c: proposal,P3,team-tool,triaged-tool

I propose the possibility to override the pubspec.yaml from a flavor yaml. (Something similar to dotenv files)

Some examples :
```
pubspec.yaml
pubspec_prod.yaml
pubspec_client_a.yaml
pubspec_client_b.yaml
```

Inside sub yaml file, we will have possibility to override pubspec properties like version, assets etc.
Pubspec flavor file should depend on the flutter flag '--flavor' or depend of a dedicated flag to manual specify a yaml.

Flavor file override the original one.
Repository: go
Issue: x/tools/gopls: add source test for inlay hints
Labels: Testing,gopls,Tools

Track progress of source tests for inlay hints.
Repository: flutter
Issue: Child is drawn above a border while animating
Labels: a: text input,framework,a: quality,d: stackoverflow,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-framework,triaged-framework

## Steps to Reproduce

[Dartpad](https://dartpad.dev/?id=1a26608234fe8f03e025c94649f45a8f)
I know it really isn't visible here ; it is however jumps to the eye on mobile. Here's a [screenshot](https://user-images.githubusercontent.com/5080204/172926821-0cebd5ad-2282-466c-b4dc-084a539cbb9a.png) I took where you can see two white pixels on the right side of the border, which come from the TextField. Screenshot taken as I was spamming the right-side arrow (used to open/close the widget), try it yourself but you'll need to squint your eyes.

I'm mainly here to understand if this is intended behavior from Flutter, and if so, what is the standard way to go about solving this particular issue.

**Expected results:**
The child isn't drawn above the specified border of the container.
Repository: godot
Issue: Resource Reference Cycle causes crash
Labels: bug,topic:core,confirmed,crash

### Godot version

3.4.4-stable

### System information

Windows 10

### Issue description

I created a Season-System where each season references the season after it. I created 4 seasons which create a cycle (1 > 2 > 3 > 4 > 1). As soon as is edit the last season and add the reference (which references the first resource) Godot crashes and therefore undos the addition.

This is my first submit so if I can provide anything else, let me know.

### Steps to reproduce

I tried this issue on a new project and another person from the godot discord tested it aswell. 

Open the project, open the "fourth.tres" and drag the "first.tres" into the Next Resource export variable. Godot should crash now

### Minimal reproduction project

[resource_cycle.zip](https://github.com/godotengine/godot/files/8873361/resource_cycle.zip)
Repository: godot
Issue: Child Area2D collides with parent KinematicBody2D moved in opposite direction with velocity exceeding distance between their shapes
Labels: bug,topic:physics,topic:2d

### Godot version

3.2; 3.4.4.stable; 3.5.RC3; 4.0.alpha9

### System information

Windows 10, GLES 2

### Issue description

Area2D, child of KinematicBody2D, reports collision with its parent when parent is moved by basic "position" increment or move_and_slide method in direction opposite from Area2D shape with velocity >= distance between shapes.
![изображение](https://user-images.githubusercontent.com/8860283/172925756-f5f1c184-7208-4a00-bbda-e4d7b01a5503.png)

**Expected behavior:**
KinematicBody2D moved in any direction with any velocity never triggers collision with its child Area2D, which is static relative to its parent.

### Steps to reproduce

1. Create KinematicBody2D, add its CollisionShape2D
2. Add child Area2D with its own CollisionShape2D
3. Make sure there is a space between them
4. Attach script somewhere and connect Area2D body_entered/body_shape_entered signal with some printing
5. Move KinematicBody2D in direction away from Area2D's shape with velocity same or exceeding distance between shapes by changing position or using move_and_slide (other methods will probably cause bug too)

### Minimal reproduction project

[Area2D_child_of_KB2D_collision_bug_3.4.4.stable.zip](https://github.com/godotengine/godot/files/8873381/Area2D_child_of_KB2D_collision_bug_3.4.4.stable.zip)