sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: RenderParagraph reports inconsistent heights when empty vs non-empty
Labels: framework,a: typography,has reproducible steps,P2,team-framework,triaged-framework,found in release: 3.24,found in release: 3.26

Given a `RenderParagraph`, which can be achieved with a standard `Text` widget, the reported height of a line of text has a 1px difference depending on whether the text is empty, or non-empty.

This is a problem for text editing situations in which the surrounding UI is based on the intrinsic height of the text.

Consider a chat UI. At the bottom of the screen there's a text editor to write your chat message. The chat message UI makes itself as tall as the message that the user is writing (e.g., expands as the user inserts more lines). This message UI has some hint text that says "Send a message". The user places the caret in the editor, types a character, and the whole editor shrinks by 1px. 

While this shift might seem minor, it's very noticeable, and we've got customer complaints tied to this.

Possibly related issued: https://github.com/flutter/flutter/issues/107196

Reproduction code:

```dart
import 'package:flutter/material.dart';

void main() {
  print("Running app");
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  MyApp({super.key});

  final _emptyTextKey = GlobalKey();
  final _nonEmptyTextKey = GlobalKey();

  void _checkHeights() {
    final emptyTextBox =
    _emptyTextKey.currentContext!.findRenderObject() as RenderBox;
    final nonEmptyTextBox =
    _nonEmptyTextKey.currentContext!.findRenderObject() as RenderBox;

    print(
        "Empty text height: ${emptyTextBox.size.height}, Non-empty text height: ${nonEmptyTextBox.size.height}");
  }

  @override
  Widget build(BuildContext context) {
    print("Building the widget tree");
    WidgetsBinding.instance.addPostFrameCallback((_) {
      _checkHeights();
    });

    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Column(children: [
          Text(key: _emptyTextKey, ""),
          Text(key: _nonEmptyTextKey, "F"),
        ]),
      ),
    );
  }
}
```

Reproduction output from Mac desktop (also verified on iOS simulators):

```
Empty text height: 21.0, Non-empty text height: 20.0
```
Repository: vscode
Issue: ASCII characters should not be part of the editing undo/redo stack
Labels: bug,editor-input-IME,undo-redo

Testing #229383

* Use Chinese IME on macOS
* Put cursor in the middle of a document
* Type `nihao`, press space to accept
* With `textarea`, undo once, all Chinese characters are removed
* :bug: With EditContext, undo once, Chinese characters are replaced with `nihao`, and you can continue to undo each ASCII

**Textarea**

https://github.com/user-attachments/assets/05abddb9-a83f-45d1-903e-9998ce79b992


**EditContext**

https://github.com/user-attachments/assets/7405f435-a523-49d0-b0f9-c0f03ee1c6a1
Repository: pytorch
Issue: The doc of `linalg.vector_norm()` should not say `ord` parameter accepts the `str` value `fro` or `nuc`
Labels: triaged,module: norms and normalization,topic: docs

### 📚 The doc issue

[The doc](https://pytorch.org/docs/stable/generated/torch.linalg.vector_norm.html) of `linalg.vector_norm()` says `ord` parameter accepts the `str` value `fro` or `nuc` as shown below:

> ord ([int](https://docs.python.org/3/library/functions.html#int), [float](https://docs.python.org/3/library/functions.html#float), inf, -inf, 'fro', 'nuc', optional) – order of norm. Default: 2

But `ord` parameter with `fro` or `nuc` doesn't work as shown below:

```python
import torch
from torch import linalg

my_tensor = torch.tensor([[-2., -1., 0.],
                          [1., 2., 3.]])
linalg.vector_norm(input=my_tensor, ord='fro') # Error
                                  # ↑ ↑ ↑ ↑ ↑
linalg.vector_norm(input=my_tensor, ord='nuc') # Error
                                  # ↑ ↑ ↑ ↑ ↑
```

> TypeError: linalg_vector_norm(): argument 'ord' must be Number, not str

> TypeError: linalg_vector_norm(): argument 'ord' must be Number, not str

### Suggest a potential alternative/fix

[The doc](https://pytorch.org/docs/stable/generated/torch.linalg.vector_norm.html) of `linalg.vector_norm()` should not say `ord` parameter accepts the `str` value `fro` or `nuc` as shown below:

> ord ([int](https://docs.python.org/3/library/functions.html#int), [float](https://docs.python.org/3/library/functions.html#float), inf, -inf, optional) – order of norm. Default: 2
Repository: pytorch
Issue: [RFC] Offload collectives to NVSwitch when possible
Labels: oncall: distributed,module: cuda

### 🚀 The feature, motivation and pitch

NVLink SHARP is an engine in NVSwitch that can perform collectives (e.g. all-reduce).

This feature reduces GPU SM consumption by as much as 6x (24 to 4), while boosting performance by 2x (its mechanism is like one-shot all-reduce, hence the 2x theoretical speedup). 

To leverage this feature, please see this doc:
https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/usage/bufferreg.html#nvlink-sharp-buffer-registration

It requires the input / output buffers be allocated through a NCCL API -- `ncclMemAlloc`. The mem alloc is now enabled by a stack of PRs allowing CUDACachingAllocator to use different mem alloc backends. See:
original RFC: https://github.com/pytorch/pytorch/issues/124807 and 
PR impl: https://github.com/pytorch/pytorch/pull/133603.

## Target use
A first target of the feature can be DDP (in cases where we manage the gradient bucket internally). 

Second target would be TP. (For example, "async-tp" -- but we'd need to know whether "async-tp" does all-reduce or not). Otherwise, if "general" TP is in Inductor's hand, we can ask Inductor to allocate specific memory for the result of matmul. 

Cc: @syed-ahmed 

### Alternatives

_No response_

### Additional context

_No response_

cc @XilunWu @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @ptrblck @msaroufim
Repository: PowerToys
Issue: Windows File Explorer compatable file name fix and paste
Labels: Needs-Triage,Needs-Team-Response,Product-Advanced Paste

### Description of the new feature / enhancement

paste with Windows File Explorer file naming compatability.
(or some form of regex)

### Scenario when this would be used?

naming files/folder/ in Windows File Explorer.  pasting url of saved article.  pasting "date-time stamps" formats.  etc...

### Supporting information

Since Powertoys is a Windows only app.  File Explorer doesn't correct invalid characters, but instead deletes it THEN just errors out.  The existing "paste as markdown" feature is a form of this feature, but it would be very helpful to have a windows file explore file naming version.
Repository: pytorch
Issue: Setting a `complex` tensor to `linalg.vector_norm()` returns a `float` tensor
Labels: triaged,module: complex,module: norms and normalization

### 🐛 Describe the bug

Setting an `int` tensor to [linalg.vector_norm()](https://pytorch.org/docs/stable/generated/torch.linalg.vector_norm.html) got the error message as shown below:

```python
import torch
from torch import linalg

my_tensor = torch.tensor([-2, -1, 0, 1, 2, 3])

linalg.vector_norm(input=my_tensor) # Error
```

> RuntimeError: linalg.vector_norm: Expected a floating point or complex tensor as input. Got Long

So, I set a `complex` tensor to `linalg.vector_norm()` but a `float` tensor is returned instead of a `complex` tensor even though I set `dtype=torch.complex64` to `linalg.vector_norm()` as shown below:

```python
import torch
from torch import linalg

my_tensor = torch.tensor([-2.+0.j, -1.+0.j, 0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])

linalg.vector_norm(input=my_tensor)
# tensor(4.3589)
                                  # ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
linalg.vector_norm(input=my_tensor, dtype=torch.complex64)
# tensor(4.3589)
```

### Versions

```python
import torch

torch.__version__ # '2.3.0'
```

cc @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved @amjames
Repository: TypeScript
Issue: Specialized error message when too new a lib is provided
Labels: Suggestion,Awaiting More Feedback

### 🔍 Search Terms

lib es2024 es2025 esnext

### ✅ Viability Checklist

- [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [X] This wouldn't change the runtime behavior of existing JavaScript code
- [X] This could be implemented without emitting different JS based on the types of the expressions
- [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

If a `lib` value is provided that's an ES* version newer than what the current version of TypeScript supports, it'd be nice to have a specialized error message saying so. Today we just get the general _"`Argument for '--lib' option must be: ...`"_ error with >=59 unique values to read through. It would be nice to explicitly indicate the lib is an ES* that's not yet supported. Maybe...

```plaintext
Error: npm error tsconfig.json(3,13): error TS####: Argument 'ES2027' for '--lib' option is a year not yet supported by TypeScript as of version 5.6.7.
```

### 📃 Motivating Example

In practice, if a single package in a monorepo falls out of date, then this error is likely to occur. Having that specialized error can help speed up debugging & make it clear what's going wrong.

Example in the wild:  https://github.com/eslint/js/pull/631 -> https://github.com/eslint/js/actions/runs/11017802958/job/30596589705?pr=631 -> https://github.com/eslint/js/pull/632

### 💻 Use Cases

1. What do you want to use this for? - Purely for debugging incorrect TS setups.
2. What shortcomings exist with current approaches? - The error is accurate, but not precise.
3. What workarounds are you using in the meantime? - Remembering to check the ES year & TypeScript version every time this comes up.
Repository: rust
Issue: [adt_const_params] consider to avoid using specialization when implement traits for Foo<const B: Bar>
Labels: F-adt_const_params,T-types

Not sure this should be a lacking in RFC or a bug in compiler, sorry if I issued to the wrong place.

The title is a little confusing, here is an exmple for illustating:
```rs
#![feature(adt_const_params)]

#[derive(PartialEq, Eq, ConstParamTy)]
enum Number {
    Int,
    Float,
}

struct PropWrapper<const N: Number> {}

trait Prop {
    type Ty;
}

impl Prop for PropWrapper<{Number::Int }> {
    type Ty = usize;
}

impl Prop for PropWrapper<{Number::Float }> {
    type Ty = f32;
}

struct Foo<const N: Number> {
    n: <PropWrapper<N> as Prop>::Ty,
}
```

As you can see, I listed all the possible trait implementations `Prop` for types of `PropWrapper` (in this case, two possible types), but the compiler still complains:
```
error[E0277]: the trait bound `PropWrapper<N>: Prop` is not satisfied
  --> src/main.rs:29:8
   |
29 |     n: <PropWrapper<N> as Prop>::Ty,
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Prop` is not implemented for `PropWrapper<N>`
   |
   = help: the following other types implement trait `Prop`:
             PropWrapper<Number::Float>
             PropWrapper<Number::Int>
```

Currently my workaround is to use specialization:
```rs
impl<const N: Number> Prop for PropWrapper<N> {
    default type Ty = ();
}
```

This is unnecessary and the default case will never hit.

Is it reasonable for the compiler to check if all possible implementations are all listed for the case of using `adt_const_params`?

I use the nigthly build rustc 1.77.0-nightly (f688dd684 2024-01-04)
Repository: neovim
Issue: Output more than 50 lines in `vim.schedule_wrap` when triggered `VimLeavePre`, stuck.
Labels: bug,event-loop,system,messages

### Problem

Running `:wq` with following Lua code:

```lua
-- string with 51 lines
local result = ""
for _ = 0, 50 do
   result = result .. "\n"
end

-- output `result` just generated when triggered VimLeavePre
-- cannot reproduce when triggered VimLeave
vim.api.nvim_create_autocmd("VimLeavePre", {
    callback = function()
        vim.system({ "ls" }, vim.schedule_wrap(function(obj)
            vim.notify(result)
            -- `vim.print` and `print` also get stuck
        end))
    end,
})
```

Neovim will get stuck (can't do anything, expect `pkill nvim`).

Thanks for all the amazing work in Neovim.

### Steps to reproduce

Add above Lua codes to `~/.config/nvim/init.lua` and run `:q`.

May not be reproduced with `nvim --clean -u minimal.lua`.

### Expected behavior

Neovim should exit after running `:q`.

### Nvim version (nvim -v)

0.11.0-dev-828+g052875b9dc

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

Vim doesn't support Nvim API.

### Operating system/version

Arch Linux rolling

### Terminal name/version

Alacritty 0.13.2

### $TERM environment variable

alacritty

### Installation

Arch User Repository (AUR)
Repository: godot
Issue: Unable to load GDExtension in Web export due to LinkError
Labels: bug,platform:web,topic:gdextension

### Tested versions

 4.3.stable.official.77dcf97d8

### System information

Windows 11 - Vulkan (Forward+)

### Issue description

```
Uncaught (in promise) LinkError: WebAssembly.instantiate(): 
Import #69 "env" "memory": mismatch in shared state of memory, declared = 1, imported = 0
```

### Steps to reproduce

1. Open MPR
2. Click `Remote Debug` > `Run in Browser` in the top-right corner.
3. Open the browser console, and you will see the error.

The exported project also has the same error.

### Minimal reproduction project (MRP)

[MPR.zip](https://github.com/user-attachments/files/17120643/MPR.zip)
Repository: pytorch
Issue: [ONNX] Dynamic shapes: support `torch.sym_not`
Labels: module: onnx,triaged

`torch.sym_not` does not belong to the `torch.ops.[...]` namespace so we need to have a convention for registering the `sym` ops.

This is a part of the sym support in ONNX. We additionally need to support proper dispatching for float/int/bool types. 

For now, users can do

```python
from onnxscript import opset18 as op
import torch

def sym_not(x):
    return op.Not(x)

onnx_program = torch.onnx.export(..., dynamo=True, custom_translation_table={torch.sym_not: sym_not})
```

cc @xadupre @gramalingam @titaiwangms @shubhambhokare1
Repository: rust
Issue: Tracking Issue for `const_mut_cursor`
Labels: T-libs-api,final-comment-period,C-tracking-issue,disposition-merge

Feature gate: `#![feature(const_mut_cursor)]`

This is a tracking issue for marking the `get_mut` and `set_position` methods in `std::io::Cursor` as const.

### Public API

```rust
// std::io

impl<T> Cursor<T> {
    pub const fn get_mut(&mut self) -> &mut T;

    pub const fn set_position(&mut self, pos: u64);
}
```

### Steps / History

- [x] Implementation: #130800 
- [ ] Final comment period (FCP)
- [ ] Stabilization PR

### Unresolved Questions

- Can we also "constify" `into_inner`?
Repository: vscode
Issue: Focus is lost when it enters an image preview
Labels: bug,panel-chat

Testing #229263

1. Tab to an attached image
2. Press space to preview it
3. Tab to try to get out of it
4. 🐛 focus is reset to the start of the window
Repository: vscode
Issue: Delayed tooltip on tab focus is weird
Labels: bug,panel-chat

Testing #229263

@meganrogge may know more but the behavior of showing the image preview on delay when focus is inside the image attachment is strange, I've not seen that pattern anywhere else. I think it should only be shown on explicit space action
Repository: vscode
Issue: Attached image hover flashes when tabbing in the attachment
Labels: bug,panel-chat

Testing #229263

1. Tab to an image attachment
2. Wait so that the image preview appears
3. Tab again to be on the "close" action of the image
4. 🐛  the hover flashes

Is there a need for the "close" action to be a separate focus element at all? I think the only possible action for an attachment is to remove it, so maybe it doesn't need to be focused and the default `Enter` action could remove it...
Repository: tauri
Issue: [feat] [v2] Scope for root filesystem
Labels: type: feature request

### Describe the problem

There isn't a clean way to access files and directories in the root filesystem.
Example:
SD cards are mounted under the `/Volumes` directory in OSX and there is currently no clean way to access the mounted directories.

### Describe the solution you'd like

Something like a scope for `$ROOT` for interacting with system-level files would be useful.

Context: https://v2.tauri.app/plugin/file-system/#scopes

### Alternatives considered

Running the app with sudo permissions works, but it is difficult to package.

### Additional context

_No response_
Repository: rust
Issue: Tracking Issue for `file_buffered`
Labels: T-libs-api,C-tracking-issue,A-filesystem

Feature gate: `#![feature(file_buffered)]`

This is a tracking issue for `File` constructors that return files wrapped with a buffer.

In addition to the light convenience, these are intended to raise visibility that buffering is something you should consider when opening a file, since unbuffered I/O is a common performance footgun to Rust newcomers.

### Public API

```rust
// std::fs

impl File {
    pub fn open_buffered<P: AsRef<Path>>(path: P) -> io::Result<io::BufReader<File>>;
    pub fn create_buffered<P: AsRef<Path>>(path: P) -> io::Result<io::BufWriter<File>>;
}
```

### Steps / History

<!--
For larger features, more steps might be involved.
If the feature is changed later, please add those PRs here as well.
-->

- [x] API Change Proposal (ACP): rust-lang/libs-team#446
- [x] Implementation: #130803
- [ ] Final comment period (FCP)[^1]
- [ ] Stabilization PR

### Unresolved Questions

- None yet.

[^1]: https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html
Repository: transformers
Issue: Saving model with shared tensors fails on cpu but succeeds on gpu
Labels: bug

### System Info

platform: linux: `ubuntu 22.04`
python version: `3.10.12`
transformers version: `4.44.2`

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [x] My own modified scripts

### Tasks

- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

```python3
# example.py

import torch
import pytest
from transformers import AutoModelForCausalLM

@pytest.mark.parametrize(
    "torch_dtype,tie_word_embeddings,device_map",
    [
        (torch.float16, True,  "cpu"   ),  # passes
        (torch.float16, False, "cpu"   ),  # passes
        (torch.float32, True,  "cpu"   ),  # passes
        (torch.float32, False, "cpu"   ),  # fails
        (torch.float32, False, "cuda:0"),  # passes
    ],
)
def test_model_save(torch_dtype, tie_word_embeddings, device_map, tmp_path):
    model = AutoModelForCausalLM.from_pretrained(
        "Xenova/llama2.c-stories15M",
        torch_dtype=torch_dtype,
        tie_word_embeddings=tie_word_embeddings,
        device_map=device_map,
    )
    model.save_pretrained(tmp_path, safe_serialization=True)

    # test that the model saved correctly
    reloaded = AutoModelForCausalLM.from_pretrained(
        tmp_path,
        torch_dtype="auto",
        device_map=device_map
    )

    model_dict = model.state_dict()
    reloaded_dict = reloaded.state_dict()
    assert model_dict.keys() == reloaded_dict.keys()
    for key in model_dict:
        assert torch.equal(model_dict[key], reloaded_dict[key])
        assert model_dict[key].device == reloaded_dict[key].device
```

```bash
python3 -m pytest example.py
```

```
RuntimeError: 
  Some tensors share memory, this will lead to duplicate memory on disk and potential differences when loading them again: [{'lm_head.weight', 'model.embed_tokens.weight'}].
  A potential way to correctly save your model is to use `save_model`.
  More information at https://huggingface.co/docs/safetensors/torch_shared_tensors
```

### Expected behavior

I expect `save_pretrained` to have the same behavior, regardless of model data type, and regardless of device
Repository: flutter
Issue: [go_router] Preserve pathParameters when navigating to a route under the same parent route with mutual parameters
Labels: c: new feature,package,c: proposal,P2,p: go_router,team-go_router,triaged-go_router

### Use case

I develop applications where the user can use multiple accounts. In order to make it as robust as possible, I am utilizing GoRouter for keeping the state of which account is active.

Needing to fetch the current route's state, picking out the required path parameters, and then passing them to e.g. `push()` is a bit tiresome.

My routes usually look like this:

- /
- /:account
  - a
  - b
  - c

In this example, I'd like to push to `c`, while on `a`, but keep the `account` path parameter.

### Proposal

Make GoRouter's methods automatically carry over mutual path parameters. Maybe make it an optional parameter flag, so it doesn't break other applications.
Repository: godot
Issue: EditorPlugin scene_changed signal not fired when opening a scene when the current scene is empty
Labels: discussion,topic:editor,topic:plugin,needs testing

### Tested versions

- Tested in 4.3.stable
- Tested in 4.4.dev (c3e16cda0)

### System information

Godot v4.3.stable (77dcf97d8) - Linux Mint 21.3 (Virginia) - X11 - Vulkan (Forward+) - dedicated AMD Unknown (RADV GFX1102) - AMD Ryzen 5 2600X Six-Core Processor (12 Threads)

### Issue description

When the current edited scene is an empty scene, opening any scene file will replace the empty scene without firing the `EditorPlugin.scene_changed` signal.

### Steps to reproduce

1. Make an `EditorPlugin`.
2. Connect to the `scene_changed` signal.
3. Have an empty scene open (can be the only scene, or just create a new empty scene).
4. Open any scene file (either through the filesystem dock or `EditorInterface.open_scene_from_path`).
5. `scene_changed` signal will not be fired with the newly open scene.

### Minimal reproduction project (MRP)

[scene-changed-mrp.zip](https://github.com/user-attachments/files/17121244/scene-changed-mrp.zip)

1. Open project.
2. Open output panel and observe the `<Object#null>` showing that `EditorPlugin.scene_changed` was called for the empty scene (correct, expected behvaiour).
3. Open `test_scene.tscn`.
4. Observe no new messages in the output panel.