sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: react
Issue: Bug: Unexpected automatic batching behavior?
Labels: Type: Needs Investigation

When running a heavy computation between two "setState" in a `useEffect`, one being out of a `setTimeout` and the other inside it, React does not re-render twice. 

This is a problem because it prevents us from showing a "loading state" to the user while the heavy computation is running.

React version: `18.2.0`

## Steps To Reproduce

See [this](https://codesandbox.io/s/practical-dew-qkfy29?file=/src/App.tsx) sandbox.

## Main part of the sandbox code

```ts
  useEffect(() => {
    setData(undefined);
    setTimeout(() => {
      const res = slowFibonacci(counter);
      setData({ res });
    });
  }, [counter]);
```
## The current behavior

It changes depending on some things I'm unfortunately not sure about. 
Sometimes the loading state is correctly showed on mount, sometimes it's on update. 
Sometimes the loading state displays smoothly, sometimes it seems that it is stuck mid-render (I don't know this for a fact). 
And finally some other times, the loading state is not displayed at all, and the component is only rendered once the computation is done.

## The expected behavior

I'd expect this code to behave as described in [this](https://github.com/reactwg/react-18/discussions/21#discussioncomment-1565892) comment from the _"Automatic batching for fewer renders in React 18"_ discussion on the [React 18 repo](https://github.com/reactwg/react-18) of the React Working Group:

> The updates outside setTimeout will be batched together and updates inside setTimeout will be batched together separately so it will be 2 separate renders.


Thanks to @gaearon for taking a look at this beforehand and suggesting to submit this issue.
Repository: flutter
Issue: `edge_insets.dart` should be reviewed
Labels: framework,c: API break,a: quality,c: proposal,P3,team-framework,triaged-framework

Here is the link to the file: https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/painting/edge_insets.dart#L23 

Some things found about the classes in this file.

-In edge_insets.dart on lines 894 and 997 the assert(direction != null); is called even tho on lines 893 and 996 we accept a nullable parameter. These assertion is redundant or we shouldn't accept a nullable parameter.

-The constructor EdgeInsetsDirectional.all is more expensive than EdgeInsets to resolve and this hasn't been documented. Also I don't think there's a proper reason for EdgeInsetsDirectional.all to exist in the codebase.
I propose that EdgeInsetsDirectional.all is removed. Same goes for EdgeInsetsDirectional.symmetrical.

-The way inheritance is used here could be argued as bad practice. Every sibling class(whose parent is EdgeInsetsGeometry) has to be aware of the EdgeInsets class.
I propose that someone with deeper knowledge of the framework or the file itself would review the file with this thought in their mind.

-Someone experienced should review the whole file imo
Repository: godot
Issue: Calling "create_trimesh_shape()" in a WorkerThreadPool task freezes the game
Labels: enhancement,topic:core,crash,topic:3d

### Godot version

4.0. beta 6 official [7f8ecffa5]

### System information

Windows 10, Vulkan API 1.2.0, NVIDIA GeForce RTX 3070 

### Issue description

Edit: Originally posted as an issue for version 4.0. beta 5 official [89a33d28f]. Issue exists for beta 6 as described.

Calling the `<ArrayMesh>.create_trimesh_shape()` function in a worker pool task causes the game to hang for what seems to be indefinitely. The same behavior happens with a single task and with group tasks.

One way I've found to make the problematic code work is to call the trimesh function as deferred:
```gdscript
trimesh.shape = mesh_array.create_trimesh_shape.call_deferred()
```
This fixes both of the example scripts.

I'm submitting this as a bug because doing the whole process of generating a mesh by specifying vertices, indices, materials and even generating normals and calling `st.index()` all work fine on the WorkerThreadPool task and the trimesh function is the only issue I've stumbled upon.

### Steps to reproduce

Create a new project with a `Node3D` node and attach one of the two following scripts to it:

_Example script with one task:_
```gdscript
extends Node3D

func do_stuff() -> void:
	var st := SurfaceTool.new();
	
	st.begin(Mesh.PRIMITIVE_TRIANGLES)
	
	st.add_vertex(Vector3(0, 0, 0))
	st.add_vertex(Vector3(1, 0, 1))
	st.add_vertex(Vector3(0, 0, 1))
	
	st.add_index(0)
	st.add_index(1)
	st.add_index(2)
	
	var mesh_array: ArrayMesh = st.commit()
	var mesh := MeshInstance3D.new()
	mesh.mesh = mesh_array
	
	var trimesh := CollisionShape3D.new()
	
	# This is the problematic function call:
	trimesh.shape = mesh_array.create_trimesh_shape()
	
	self.add_child.call_deferred(mesh)

func _ready():
	var task = WorkerThreadPool.add_task(Callable(self, "do_stuff"))
	WorkerThreadPool.wait_for_task_completion(task)
```

_Example script with a group task:_
```gdscript
extends Node3D

@onready var tasks: Array = []

func do_stuff(_element: int) -> void:
	var st := SurfaceTool.new();
	
	st.begin(Mesh.PRIMITIVE_TRIANGLES)
	
	st.add_vertex(Vector3(0, 0, 0))
	st.add_vertex(Vector3(1, 0, 1))
	st.add_vertex(Vector3(0, 0, 1))
	
	st.add_index(0)
	st.add_index(1)
	st.add_index(2)
	
	var mesh_array: ArrayMesh = st.commit()
	var mesh := MeshInstance3D.new()
	mesh.mesh = mesh_array
	
	var trimesh := CollisionShape3D.new()
	
	# This is the problematic function call:
	trimesh.shape = mesh_array.create_trimesh_shape()
	
	self.add_child.call_deferred(mesh)

func _ready():
	for x in range(0, 5):
		tasks.append(x)
	
	var task = WorkerThreadPool.add_group_task(do_stuff, tasks.size())
	WorkerThreadPool.wait_for_group_task_completion(task)

```



Run the game and it will hang/freeze/become unresponsive

### Minimal reproduction project

N/A
Repository: vscode
Issue: Enable debugging Code OSS with "break on caught exceptions" enabled
Labels: debt,editor-core,engineering

# Context
I find it difficult to debug/spot thrown errors, when they are caught and just logged.
VS Code's debugger has the ability to break on caught/uncaught exceptions.
Unfortunately, we usually have generic `try`...`catch` blocks to recover from unexpected errors, so most unexpected errors (like reading a property of undefined/null) are actually caught.
However, breaking on every caught error is not practical, as there are many expected errors (such as `NotModifiedSinceFileOperationError`, `EntryNotFound`, `throw new Error('No extension gallery service configured.');`, `FileOperationError`, ...).

Here is an actual code example:
```ts
export function parse(text: string): any {
	let data = JSON.parse(text);
	data = revive(data);
	return data;
}
// ...
try {
    data = parse(part);
} catch (e) {
    // ignore
}
```
If `revive` throws because some property is read from null/undefined, it will be very hard to spot that.

# Proposal
All errors that are expected to be thrown should have a property `expected` with value `true`.

Then the condition for `Caught Exceptions` could simply be `!(typeof error === 'object' && error && error.expected)` to exclude all the expected caught exceptions.

Then, the debugger would only break on those errors that should not be thrown (such as trying to read a property of a null/undefined object etc.).

FYI @connor4312 @jrieken @alexdima
Repository: pytorch
Issue: Caching a model's weights and state_dict to disk to save RAM
Labels: module: nn,triaged

### 🚀 The feature, motivation and pitch

Hello, is there a way that I could cache a model's weights to the disk to save RAM? Similar to how the `.cpu` could be invoked to move the model's weights from the GPU to the CPU to save VRAM. There was an [issue](https://github.com/pytorch/pytorch/issues/24119) on this from a few years ago on MMAPed tensors from disk but I haven't been able to find anything on achieving something similar with model weights and state dicts.  I'm not sure if this is possible in the current PyTorch implementation but any help would be much appreciated.

### Alternatives

`torch.load` but that incurs basically the same time penalty as just loading a model directly from the disk. 

### Additional context

_No response_

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are
Repository: godot
Issue: Some SFX are truncated when applying a reverb effect to the audio bus
Labels: bug,topic:audio

### Godot version

v3.5.1.stable.arch_linux

### System information

Arch Linux (latest stable kernel)

### Issue description

When applying a reverb to SFX, some sounds are truncated - they abruptly end. Lengthening the audio files with silence doesn't seem to resolve the problem.

### Steps to reproduce

- Add a new audio bus and add the default reverb effect
- Create an audio player that uses that bus and plays a sound-effect
- Rig up a button to play audio on click

Notice that, with some audio sounds, the SFX is truncated.

With the MVP project, press any of the buttons.

### Minimal reproduction project

[ReverbBug.zip](https://github.com/godotengine/godot/files/10079836/ReverbBug.zip)
Repository: PowerToys
Issue: Add a function of displaying the last second's picture when the camera is silent
Labels: Needs-Triage

### Description of the new feature / enhancement


![新建位图图像](https://user-images.githubusercontent.com/118799398/203665927-8060b82c-0efb-4d65-bc13-8e099b0b8652.jpg)

Add a function of displaying the last second's picture when the camera is silent. I think it's helpful. 

### Scenario when this would be used?

When someone is having a meeting, but there is a courier is outside.

### Supporting information

_No response_
Repository: pytorch
Issue: NVFuser failing masked.{amax|amin|sum} extremal and correctness tests
Labels: triaged,module: nvfuser

### 🐛 Describe the bug

See https://github.com/pytorch/pytorch/actions/runs/3535610687/jobs/5934088992

### Versions

https://github.com/pytorch/pytorch/pull/87880

cc @kevinstephano @jjsjann123
Repository: PowerToys
Issue: Issues with spell checking
Labels: Issue-Bug,Needs-Triage,Needs-Team-Response,Product-Quick Accent

### Microsoft PowerToys version

0.64.1

### Installation method

PowerToys auto-update

### Running as admin

No

### Area(s) with issue?

General, Quick Accent

### Steps to reproduce

I have two problems with spell checking in PowerToys. One is linked to Quick Accent, the other one not.
The problem I have with Quick Accent is described in the following fields.
For the other one, while I am typing, I see tooltips that propose me several other typings. In one case they have been modal, and none of the proposed values were correct, this has led to crash Firefox, and I have lost everything I was typing. Further more, sometimes those tooltips take place on the screen near the keyboard cursor and prevent me from reading what is behind.



### ✔️ Expected Behavior

If I type "ça m'oblige à" (in a French text), I should expect that the text "ça m'oblige à" is kept, it is perfectly well written.

### ❌ Actual Behavior

"ça m'oblige à" is replaced by "ça m'obligéà", which has absolutely no meaning in French, except that it suggests a "text typed with the feet", as my neighbour says.


### Other Software

_No response_
Repository: TypeScript
Issue: `Date.getVarDate()` function seems incorrectly defined
Labels: Bug,Help Wanted

```typescript
interface Date {
    getVarDate: () => VarDate;
}
```

https://contest-server.cs.uchicago.edu/ref/JavaScript/developer.mozilla.org/en-US/docs/Web/JavaScript/Microsoft_Extensions/Date.html

TypeScript has defined `Date` type to has a functional property `getVarDate`, but such function does not exist in the real `Date` instance. Looking at some API documents, the `Date.getVarDate()` is a non-standard method forActiveX. Therefore, I hope TypeScript to remove the functional property or change it like below:

```typescript
interface Date {
    // no reason to be property assigned functional value
    getVarDate?(): VarDate;
}
```
Repository: rust
Issue: `dyn*` does not support trait upcasting
Labels: T-types,F-dyn_star

Currently trait upcasting is done via the `Unsize`/`CoerceUnsized` traits -- however, since `CoerceUnsized` [works *structurally*](https://doc.rust-lang.org/reference/type-coercions.html#unsized-coercions), implementing `dyn*` upcasting via the same codepaths allows this erroneous code to make it to codegen and ICE:

https://github.com/rust-lang/rust/blob/d8cb8c37adfbfb641a1b30d3a2de3ba7226bb744/src/test/ui/dyn-star/no-unsize-coerce-dyn-trait.rs#L1-L13

That's why although `dyn*` trait upcasting was implemented in #101832, I removed it in #104594 due to introduced ICEs.

1. We should decide first whether we actually want the burden of implementing `dyn*` upcasting first, since `dyn*` is not currently intended to be user-facing syntax. Due to this, the feature is not currently needed even if it is interesting and possible theoretically.
2. If we decide that we do want `dyn*` upcasting, then it needs to be implemented separately from `dyn Trait` upcasting with a much narrower scope.
Repository: ant-design
Issue: DirectoryTree Multiple Dragging
Labels: 💡 Feature Request,Inactive

### What problem does this feature solve?

Can i drag multiple items in DirectoryTree ?

### What does the proposed API look like?

onDragStart event should give array of nodes

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: BakedLightmap doesn't properly light dynamic objects
Labels: bug,topic:rendering,topic:3d

### Godot version

3.5.1.stable.official

### System information

Windows 11 22H2, GTX 1650 Mobile, NVIDIA Driver 526.98, GLES3

### Issue description

Dynamic objects within a BakedLightmap seem to be lit incorrectly compared to their baked static object counterparts. While I'm not expecting perfectly matched lighting, I would expect dynamic objects to at least "fit in" reasonably well in a static lightmap baked environment.

![BakedLight1_Godot](https://user-images.githubusercontent.com/39361911/203704375-26235e65-843d-47d9-aa18-b86ac8249e28.png)
![BakedLight1_Unity](https://user-images.githubusercontent.com/39361911/203704393-bfedfe4c-f795-4fb2-bf1d-ec57d2f7496f.png)

(The projects pictured above can be found at [GodotLightingTest](https://github.com/Jamsers/GodotLightingTest) and [UnityLightingTest](https://github.com/Jamsers/UnityLightingTest).)

### Steps to reproduce

Create an enclosed room with an opening to allow some skylight and direct lighting in. Enable lightmap baking for all elements the room is made out of.
Put an object in the room, and disable lightmap baking for this object. This is our dynamic object.
Put another object right next to it, and enable lightmap baking for this object. This is our static object.
Bake lightmaps.
The lighting won't match between the two objects.

### Minimal reproduction project

[GodotLightmapIssue.zip](https://github.com/godotengine/godot/files/10081234/GodotLightmapIssue.zip)
Repository: neovim
Issue: (Vim:E322: line number out of range: 1 past the end) with nvim_buf_set_lines
Labels: bug,event-loop

### Neovim version (nvim -v)

NVIM v0.8.0 release

### Vim (not Nvim) behaves the same?

not sure, might be N/A

### Operating system/version

Arch Linux

### Terminal name/version

xterm (374)

### $TERM environment variable

xterm-256color

### Installation

system package manager

### How to reproduce the issue

1. Using the following vimrc:
```
lua <<EOF
local buffer = vim.api.nvim_create_buf(false, false)
vim.api.nvim_buf_set_option(buffer, "buftype", "nofile")

local lines = {'a', 'b'}   -- seems to only happen when #lines >= 2
local timer = vim.loop.new_timer()
timer:start(0, 100, vim.schedule_wrap(function()
    vim.pretty_print(vim.fn.getbufinfo())
    vim.api.nvim_buf_set_lines(buffer, 0, -1, false, lines)
end))
EOF
```
2. Run `nvim --clean -u /path/to/vimrc`
3. Quit nvim (I seem to get error more often when using `ZZ` or `ZQ`).

In actual usage, I'm getting this from the interaction of two plugins (https://github.com/nvim-zh/colorful-winsep.nvim and https://github.com/rhysd/committia.vim), and I'm including those steps in here for reference:
1. Download/git clone the following plugins: 
    * https://github.com/nvim-zh/colorful-winsep.nvim
    * https://github.com/rhysd/committia.vim
1. Make the following vimrc:
```
set runtimepath+=/path/to/colorful-winsep.nvim
set runtimepath+=/path/to/committia.vim
let g:committia_min_window_width = &columns / 2
lua require('colorful-winsep').setup{}
```
1. Inside any git repo, run `GIT_EDITOR='nvim --clean -u /path/to/above/vimrc' git commit`
1. Quit nvim by typing `ZQ`

### Expected behavior

No error is printed.

### Actual behavior

About 50% of the time, the following error is printed back to the terminal after the nvim tui has exited
```
{ {    bufnr = 1,    changed = 0,    changedtick = -1,    hidden = 0,    lastused = 1669270126,    linecount = 1,    listed = 1,    lnum = 1,    loaded = 0,    name = "",    variables = {      changedtick = -1    },    windows = { 1000 }  }, {    bufnr = 2,    changed = 0,    changedtick = 5,    hidden = 0,    lastused = 0,    linecount = 2,    listed = 0,    lnum = 0,    loaded = 0,    name = "",    variables = {      changedtick = 5    },    windows = {}  } }
Error executing vim.schedule lua callback: [string ":lua"]:8: Vim:E322: line number out of range: 1 past the end
stack traceback:
	[C]: in function 'nvim_buf_set_lines'
	[string ":lua"]:8: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>
```

I don't think this causing any adverse functional impact, i.e. nvim still works, it just prints this error as well.
Repository: rust
Issue: Tracking Issue for `impl_unified_exhaustive_const_traits`
Labels: C-tracking-issue,A-const-generics

The feature gate for the issue is `#![feature(impl_unified_exhaustive_const_traits)]`.

### About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

### Steps
<!--
Include each step required to complete the feature. Typically this is a PR
implementing a feature, followed by a PR that stabilises the feature. However
for larger features an implementation could be broken up into multiple PRs.
-->

- [ ] Implement the RFC (cc @rust-lang/XXX -- #104803)
- [ ] Adjust documentation ([see instructions on rustc-dev-guide][doc-guide])
- [ ] Stabilization PR ([see instructions on rustc-dev-guide][stabilization-guide])

[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs

### Unresolved Questions
<!--
Include any open questions that need to be answered before the feature can be
stabilised.
-->

XXX --- list all the "unresolved questions" found in the RFC to ensure they are
not forgotten

### Implementation history

<!--
Include a list of all the PRs that were involved in implementing the feature.
-->
Repository: stable-diffusion-webui
Issue: [Feature Request]: Make use of Optimum / BetterTransformer optimisations
Labels: enhancement

### 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 ?

- https://huggingface.co/docs/optimum/bettertransformer/overview
  - > `Optimum` provides an integration with `BetterTransformer`, a stable API from PyTorch to benefit from interesting speedups on CPU & GPU through sparsity and fused kernels.
  - > Since its 1.13 version, PyTorch released the stable version of BetterTransformer in its library. You can benefit from interesting speedup on most consumer-type devices, including CPUs, older and newer versions of NIVIDIA GPUs. You can now use this feature in 🤗 Optimum together with Transformers and use it for major models in the Hugging Face ecosystem.
- https://huggingface.co/docs/optimum/bettertransformer/tutorials/contribute
  - > Adding BetterTransformer support for new architectures
- https://twitter.com/huggingface/status/1594783600855158805
  - > A collaboration with [@PyTorch](https://twitter.com/PyTorch) to make transformer-based models faster using optimum library! Up to 4.5x speedup for text, vision and audio models using a one liner! 🔥
- https://twitter.com/PyTorch/status/1594766050851102720
  - > Better Transformer for [#PyTorch](https://twitter.com/hashtag/PyTorch?src=hashtag_click) out of the box performance on 🤗
[@huggingface](https://twitter.com/huggingface) models now available! Want to know more about the collaboration? 👀 the blog
    - https://medium.com/pytorch/bettertransformer-out-of-the-box-performance-for-huggingface-transformers-3fbe27d50ab2

### Proposed workflow

1. Explore what would be required to integrate with Optimum / BetterTransformer
2. Make those integrations
3. ???
4. Profit!


### Additional information

See also:

- https://github.com/huggingface/diffusers/issues/1389
- https://github.com/huggingface/optimum/issues/512
Repository: angular
Issue: Improve ICU-related error messages at runtime
Labels: feature,help wanted,area: i18n,area: core,P4,feature: in backlog

### Which @angular/* package(s) are the source of the bug?

localize

### Is this a regression?

No

### Description

`ICU: "Ergebnis: Sie haben {counter, plural, zero {keine Klinik} one {eine Klinik} other {mehrere Kliniken} gefunden.}"`

produces this error message in console:

`ERROR Error: Unable to parse ICU expression in "Ergebnis: Sie haben....`

Does this mean localize won't parse any ICU or it can't parse this ICU?

Version: 14.2.7


### Please provide a link to a minimal reproduction of the bug

_No response_

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

_No response_

### Anything else?

No
Repository: stable-diffusion-webui
Issue: [Feature Request]: Save model file name in log.csv along with the other information
Labels: enhancement

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

When I press save for the result, it saves all the information related to the image generation except the model file (ckpt file) used to generate the image. It would be extremely helpful to add model_file_name in the csv file after the negative_prompt.

### Proposed workflow

1. Generate Image
2. Save the generated image
3. The log.csv should also include the model file name


### Additional information

_No response_