sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: the documentation for the Future trait specifies invariants that are not always true
Labels: T-libs-api,A-docs,C-bug

### Location

https://doc.rust-lang.org/std/future/trait.Future.html

### Summary

> A future represents an asynchronous computation obtained by use of [`async`](https://doc.rust-lang.org/std/keyword.async.html).

this is not always true, a future represents a value that can be joined into an async function using `await`, however futures can be returned by non-async functions, such as `tokio::task::spawn`

> ### Runtime characteristics
> Futures alone are inert; they must be actively polled to make progress, meaning that each time the current task is woken up, it should actively re-poll pending futures that it still has an interest in.

once again, this is true for futures created by calling async functions, but may not be true for all types that implement the Future trait, such as `tokio::task::JoinHandle`.

the distinction between futures that are and are not inert is important, an array of `task::JoinHandle` is useful for performing several operations concurrently, however an array of futures created by calling async functions will not result in concurrent execution if they are `await`ed sequentially.
Repository: angular
Issue: Feat(adev): faster initial loading + iPad availability of the playground
Labels: P3,area: docs-infra

### Describe the problem that you experienced

I’m currently trying to play with angular on my iPad during a short vacation. Unfortunately, I can’t cause "the environment is not supported"… on the other hand, I’m totally capable of doing it with Svelte / Vue / Solid.

I must admit the overall experience of Svelte / Vue / Solid playgrounds on an iPad is quite amazing! 😅

I guess there’s some room for improvements for adev: initial loading performance and iPad (tables) support for occasional usage. 

![IMG_0066](https://github.com/angular/angular/assets/3672842/52eb44ce-5f64-4585-b3bd-fed9d5256f39)


### Enter the URL of the topic with the problem

https://angular.dev/playground

### Describe what you were looking for in the documentation

_No response_

### Describe the actions that led you to experience the problem

_No response_

### Describe what you want to experience that would fix the problem

_No response_

### Add a screenshot if that helps illustrate the problem

_No response_

### If this problem caused an exception or error, please paste it here

_No response_

### If the problem is browser-specific, please specify the device, OS, browser, and version

_No response_

### Provide any additional information here in as much as detail as you can

_No response_
Repository: godot
Issue: RootMotionView is considered for bounding box
Labels: discussion,topic:editor,topic:3d

### Tested versions

- Reproducible in 4.2.2

### System information

Vulkan API 1.2.231 - Forward Mobile - Using Vulkan Device #0: Apple - Apple M1

### Issue description

The orange bounding box takes into consideration the size of the RootMotionView. In my mind, this should not be the case, as the RootMotionView is only a debugging tool with no influence on the actual geometry.

<img width="1600" alt="image" src="https://github.com/godotengine/godot/assets/16414047/6cb536c8-188c-4ad1-b5b4-97e5f64375f9">


### Steps to reproduce

Place a RootMotionView into a 3D scene.

### Minimal reproduction project (MRP)

N/A
Repository: TypeScript
Issue: Discriminated union with an optional discriminator is not being resolved as expected
Labels: Help Wanted,Experimentation Needed,Possible Improvement

### 🔎 Search Terms

discriminated union, discriminated union with an optional discriminator, type inference in objects

### 🕗 Version & Regression Information

I have a simple piece of code (see the playground/below)

The runtime flow is very simple: whatever gets returned by the loader func gets passed as `data` to the `handle`'s `crumbBuilder` method. If the loader is absent then `data` will also be absent

But when it comes to typing those behaviors then 2 issues arise:

1) At first, the discriminated union is not being resolved properly: in the second case it should be a string but TS cannot infer it and defaults to `any`
2) At second, we still have to explicitly annotate or assert the `data` type, however from the `loader` definition it is possible to infer its return type. Is there a syntax way to say 'the type of data is the whatever awaited type the loader function returns?`. I have tried to achieve that behaviour using generics and the `satisifies` keyword but failed to


### ⏯ Playground Link

https://www.typescriptlang.org/play/?#code/C4TwDgpgBACghsAFgZQgcwLYQHbCgXigHsAjAKwgGNgBtAXQG4BYAKFdEigAk5sATADYQAPABUAIgjgA+AlADerKMqiUATgFcMJAEIaAlgL4Q1ALigAKPlPMSpASgKz4SVJhy1GrAL6t24aAAZIjhjNTFJYBk5Czg1NABnc3koMDi4DCSoACUqIjU+YQTgNX1sNAAaKGLS8tlvR3xnNSIMfQSROyjpZjYWDmhsog1gCB5+IXCuuDleEFl8JRUAHwUllRVEXkEIc3Gd4WwIADcTHvWNqAEQsIB+cyPTtV6N3xYN1cV3y+Utid3uNshBEpOdvj9rqETOZglCppEZBdvL1WJQiNhilAWiMxkCTAB1fRIYbAWFhORfDZ-HbJC4bdRaXQGIzQyzWKKNWT0KoAeh57Jm7VU+TUVGAAhAUDKADMTKK+FA4AkoI8TEifNUEO1pfoIMqhjj9pM-Cw0Ri8NjRkaTBSLpCwuYlSBsJRLHFEpy1uDLqLgBo1NhFfEEgA6NJqDKhjQdNQAST4LxU3gqF2pQlp3vpmm0ekMDrZDicUHoUD5AqlyuwRDwMrlEAVSuqJTKaHVLG8muA2t1+pJuP+4RqLekQA

### 💻 Code

```ts
type PathSegment = object[];

type Handle<TData> = {
    crumbBuilder: (data: TData) => PathSegment[];
}

type Loader<TData> = (args: { params: Record<string, string> }) => Promise<TData>;

type RouteHandler<TData = any> =
    | {
        handle: Handle<never>;
        loader?: never;
    }
    | {
        handle: Handle<TData>;
        loader: Loader<TData>
    };

const routeHandlerWithoutLoader = {
    handle: {
        crumbBuilder: (data) => [], //data is correctly inferred as never
    }
} satisfies RouteHandler

const routeHandler = {
    loader: async (args) => {
        return args.params.userId;
    },
    handle: {
        crumbBuilder: (data) => [] //data is not inferred as string
    }
} satisfies RouteHandler<string>
```


### 🙁 Actual behavior

`data` is not inferred as string

### 🙂 Expected behavior

1) data should be inferred as a string

2) there is no need to explicitly annotate or assert the `data` type , and it must be inferred from the loader return type

### Additional information about the issue

_No response_
Repository: go
Issue: cmd/cgo: a type alias of unsafe.Pointer is not treated as unsafe.Pointer
Labels: NeedsInvestigation,compiler/runtime

### Go version

go version devel go1.23-07fc59199b Sun May 12 05:36:29 2024 +0000 linux/amd64

### Output of `go env` in your module/workspace:

```shell
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/dominikh/.cache/go-build'
GOENV='/home/dominikh/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/dominikh/prj/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/dominikh/prj'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/dominikh/prj/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/dominikh/prj/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='devel go1.23-07fc59199b Sun May 12 05:36:29 2024 +0000'
GODEBUG=''
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/dominikh/prj/src/example.com/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1241008282=/tmp/go-build -gno-record-gcc-switches'
```


### What did you do?

Run the following code:

```
package main

// void foo(void *arg) {}
import "C"
import "unsafe"

type T struct {
	self int
	x    *int
}

type up = unsafe.Pointer

func main() {
	x := T{x: new(int)}

	C.foo(unsafe.Pointer(&x))      // reports "cgo argument has Go pointer to unpinned Go pointer", as expected
	C.foo(unsafe.Pointer(&x.self)) // doesn't report anything, as desired
	C.foo(up(&x.self))             // reports "cgo argument has Go pointer to unpinned Go pointer", which is surprising
}
```

### What did you see happen?

The first and third calls panic with `runtime error: cgo argument has Go pointer to unpinned Go pointer`. The second call doesn't panic.

### What did you expect to see?

Only the first call to panic.

Arguably one might also expect all 3 calls to panic, since this also panics, regardless of the use of an alias:

```
y := unsafe.Pointer(&x.self)
C.foo(unsafe.Pointer(y))
```

Which makes the use of the 2nd form rather brittle.
Repository: PowerToys
Issue: Ability to independently change the color picker tooltip text
Labels: Needs-Triage

### Description of the new feature / enhancement

An option to change just the text/format of the tooltip, separate from the default color format.

### Scenario when this would be used?

I like being able to see HSV instead of hex when picking a color as it's easier to visualize. However, hex is easier to paste into programs. So I'm stuck between choosing HSV and hex, but with this new option I could just leave hex as the default and choose HSV to show in the tooltip.

### Supporting information

_No response_
Repository: TypeScript
Issue: Find All References should include composed return value
Labels: Suggestion,Awaiting More Feedback

### 🔍 Search Terms

"Find all References", "find references composable", "find all references returned"

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

Running 'Find all references' on a Function defined within a function and returned in a composed object, should include references to the function defined on the composed object.

### 📃 Motivating Example

It's a common practice to compose objects within functions that are exported for use by the program.
For example, using object composition with pinia and vue:

```typescript
import { defineStore } from "pinia";

export const useMyStore = defineStore('mystore', () => {

	function funcA() { }

	return {
		funcA,
	}

});
```

However, using 'findAllReferences' on the function defined within the composing function does not detect references through the returned object:

![findAllRefs](https://github.com/microsoft/TypeScript/assets/19180097/a77d7395-7480-4982-9f69-08c69fa6e0ea)


Using 'findAllReferences' on the function defined on the returned object itself, does return such references:

![findAllRefsReturn](https://github.com/microsoft/TypeScript/assets/19180097/881a45a1-e8c6-4d57-8fc6-81fb23778fb2)



### 💻 Use Cases

1. When editing a function in a composed store, it is common to check for references to the function being changed.
2. The references of the function defined within the composable function only returns the references within the store, rather than uses linked by the composed object.
3. Currently you must scroll from the function being worked on to the composed object, and run 'Find All References' from there. It is a minor inconvenience, but an extremely common one.
Repository: godot
Issue: Neighbour submenu requires extra mouse move to popup
Labels: bug,topic:gui

### Tested versions

4.2.2.stable / 4.3.dev6 / master[bdc0316217940a8ccc80ce536547d42e6477adf4]

### System information

Arch Linux #‍1 SMP PREEMPT_DYNAMIC Tue, 07 May 2024 21:35:54 +0000 - X11 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3060 Ti (nvidia; 550.78) - 13th Gen Intel(R) Core(TM) i5-13400F (16 Threads)

### Issue description

After moving to another menu item, its submenu does not popup until I move the mouse:

![Peek 2024-05-12 16-00](https://github.com/godotengine/godot/assets/372476/1687b40e-78a3-414a-a0f9-41895e6a74f1)


### Steps to reproduce

Open the Editor menu and move your mouse between Editor Docks and Editor Layout. See the GIF above.

For older versions, you can open the Go To menu in the script editor, and move your mouse between Bookmarks and Breakpoints.

### Minimal reproduction project (MRP)

N/A
Repository: stable-diffusion-webui
Issue: [Bug]: SD is not installed. An error occurred during installation.
Labels: asking-for-help-with-local-system-issues

### Checklist

- [x] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

SD is not installed.

### Steps to reproduce the problem

1. git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
2. run: webui.sh

### What should have happened?

I want everything to install and work as before

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

Google Chrome

### Sysinfo

SD is not installed

### Console logs

```Shell
Use --skip-python-version-check to suppress this warning.
=============================================================================================
Python 3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417]
Version: v1.9.3
Commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121
ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: 2.2.0, 2.2.0+cu121, 2.2.1, 2.2.1+cu121, 2.2.2, 2.2.2+cu121, 2.3.0, 2.3.0+cu121)
ERROR: No matching distribution found for torch==2.1.2
Traceback (most recent call last):
  File "/disks/F/stable-diffusion-webui/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/disks/F/stable-diffusion-webui/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/disks/F/stable-diffusion-webui/stable-diffusion-webui/modules/launch_utils.py", line 380, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "/disks/F/stable-diffusion-webui/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/disks/F/stable-diffusion-webui/stable-diffusion-webui/venv/bin/python3" -m pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121
Error code: 1
```


### Additional information

Operating System: Arch Linux 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.9-arch1-2 (64-bit)
Graphics Platform: Wayland
Processors: 32 × Intel® Core™ i9-14900KF
Memory: 62.6 ГиБ of RAM
Graphics Processor: NVIDIA GeForce RTX 4080/PCIe/SSE2
Manufacturer: ASUS
Repository: svelte
Issue: playground: 'migrate' button resets editor state
Labels: site

### Describe the bug

If you're on any component other than `App.svelte` and you hit the 'migrate' button, it will focus `App.svelte`

### Reproduction

[click on Child.svelte, then 'migrate'](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE32PwQrCMBBEfyUsHlosqNfaFsTPsB5qusVgugnNRpCQfzdtod687ezsm2UCDEqjg_IWgLoRoYSLtVAAf-ws3Bs1Y9LO-EnOm8rJSVluWmpZIwtpPLGoxc5xx5gd83Nykjd4kqwMCUVywhGJs1yE2Wl5Zfa1OM3HHFuqDr9Yqh6eOZGGpFbyVYctIi5vl60rRVhyFnolGojF1uP6VLr_1yTNo-nVoLCHkieP8R6_083AghABAAA=)
Repository: godot
Issue: Slow top to bottom scroll cause jitter
Labels: bug,topic:editor,needs testing

### Tested versions

- v4.2.1.stable.flathub [b09f793f5]
- v4.2.2.stable.flathub [15073afe3]

### System information

Godot v4.2.1.stable (b09f793f5) - Freedesktop SDK 23.08 (Flatpak runtime) - X11 - Vulkan (Forward+) - integrated Intel(R) Graphics (RPL-P) () - 13th Gen Intel(R) Core(TM) i5-13420H (12 Threads)

### Issue description

When scrolling slowly from top to bottom in the `Inspector`, the scroll causes a jitter. Scrolling fast from top to bottom or bottom to top works fine. Even, when scrolling slowly from bottom to top works fine.

### Steps to reproduce

- Click on any node to make it active.
- Navigate to `Inspector`.
- Try to scroll slowly from top to bottom. You should see the jitter.

### Here is a video of the issue
https://github.com/godotengine/godot/assets/49204837/84062069-b594-4d06-9c74-d277cd8aee5e
Repository: stable-diffusion-webui
Issue: [Feature Request]: Add #! python3.10.6 to top of Python scripts to use correct Python version on systems with multiple installed versions
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 ?

Installing this project is a nuisance since it does not clearly report when you have a version of Python that is not compatible with Pytorch. Since in your requirements in the README you state that python version 3.10.6 should be used, add this (#! python3.10.6) to the top of the Python scripts (launch.py and webui.py) to make things easier for the user during install.


### Proposed workflow

This is an automatic feature that will make installation slightly less painful.

### Additional information

_No response_
Repository: go
Issue: proposal: iter: convert between Seq and Seq2
Labels: Proposal

### Proposal Details

Recently we introduce iter package with two Seq types: `Seq` and `Seq2`.

Writing operations on both types are annoying and repetitive.

So I propose add function to convert `Seq` to `Seq2` and `Seq2` to `Seq`

Possible function signatures:
```go
func Join[K, V, R any](s Seq2[K, V], f func(K, V) R) Seq[R] {
    return func(yield func(R) bool) {
        for k, v := range s {
            if !yield(f(k, V)) {
               break
            }
        }
    }
}

func Split[R, K, V any](s Seq[R], f func(R) (K, V)) Seq2[K, V] {
    return func(yield func(K, V) bool) {
        for x := range s {
            if !yield(f(x)) {
                break
            }
        }
    }
}
```
Repository: pytorch
Issue: `torch_save_to_dcp`'s produced dcp checkpoint doesn't fit the load interface for FSDP
Labels: oncall: distributed,triaged,module: distributed_checkpoint,oncall: distributed checkpointing

### 🐛 Describe the bug

`torch_save_to_dcp` converts a torch state dict to a DCP checkpoint. But DCP can't read the produced checkpoint in an FSDP setting, because `dcp.load` only handles dicts that look like `{ "model": ModelWrapper(model) }`, where `ModelWrapper` overrides `state_dict` and `load_state_dict` [as in torchtitan](https://github.com/pytorch/torchtitan/blob/e64c6ca5e4458d0a67073e2d73697cfe8f039d32/torchtitan/checkpoint.py#L126).

As a workaround, I use `torch.distributed.checkpoint.state_dict_saver._save_state_dict({ "model": state_dict }, no_dist=True)` to handle conversion, since `dcp.save()` doesn't support passing in `no_dist`.

DCP has a few gaps in being able to do what I want, such as saving model and optimizer to different directories (so I can delete the optimizer states after training to save disk space), or saving a distributed model's state dict without this dict-in-dict behavior.


### Versions

PyTorch 2.3

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @chauhang @d4l3k @LucasLLC
Repository: ollama
Issue: Feature Request: Customizable JSON Encoder/Decoder Configuration for REST API Endpoints or other that might need
Labels: feature request,api

## Description

Since this repository is written in Go, it is possible to customize the `JSON encoding/decoding` configuration for `REST API endpoints`.

However, it may require refactoring from scratch since there are many `hard-coded` instances of `JSON` using the `standard library`.

## Proposed Feature

The proposed feature would work as follows:

- Users can customize the `JSON Encoder/Decoder` by using `another package`. This idea is inspired by [`Fiber`](https://docs.gofiber.io/guide/faster-fiber), which provides improved flexibility.

- By implementing this feature, users will have more control over the JSON serialization and deserialization process, allowing for optimizations and customizations specific to their needs.

## Benefits

- Improved flexibility in handling JSON encoding/decoding for REST API endpoints.
- Ability to optimize performance by using alternative JSON packages.
- Greater control over the JSON serialization and deserialization process.

## Considerations

- Refactoring the existing codebase may be required to remove hard-coded instances of JSON using the standard library.
- Thorough testing should be conducted to ensure compatibility and performance improvements.

## References

- [`Fiber` - Custom JSON Encoding/Decoding](https://docs.gofiber.io/guide/faster-fiber)
Repository: opencv
Issue: when create new Mat with multi-channels(i.e., 8) with the particular value(i.e. 0.9), it will raise error (error: (-215:Assertion failed) cn <= 4 in function 'scalarToRawData')
Labels: bug,RFC

### System Information

OpenCV version: 4.1.0
Operating System / Platform: Ubuntu 20.04


### Detailed description

None

### Steps to reproduce

```
cv::Mat y = cv::Mat(100, 100, CV_32FC(8), cv::Scalar(0.9));
```
It will raise error:
```
opencv-4.1.1/modules/core/src/array.cpp:3229: error: (-215:Assertion failed) cn <= 4 in function 'scalarToRawData'
```

But, if i create it like this, it success.
```
cv::Mat y = cv::Mat(100, 100, CV_32FC(8), cv::Scalar(0.));
y.setTo(0.9);
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [ ] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: go
Issue: net: no way to detect half-closed tcp connection
Labels: NeedsInvestigation

### Go version

go version go1.22.0 linux/amd64

### Output of `go env` in your module/workspace:

```shell
N/A
```


### What did you do?

I'm trying to write a tcp proxy that accepting connection from client and proxy it to another server. The proxy should:

+ proxy data between client and server.
+ relay `FIN` received from client to server and vice versa.
+ close both legs of connection once `RST` been received from either client or server.

### What did you see happen?

I can send `FIN` by calling `conn.CloseWrite()` but I can't distinguish half-closed from closed tcp connection using `conn.Read`. All I got is `io.EOF`, I need to know whether it's half-closed or not so I can make decision to call `conn.CloseWrite()` or `conn.Close()`.
Reading the source code indicate that the information is lost in src/runtime/netpoll_epoll.go: netpoll which checked `syscall.EPOLLRDHUP` with a bunch of other flags

### What did you expect to see?

Able to wait for half-close and close event for tcp connection