sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: kubernetes
Issue: Codegen tools need to ignore struct fields named `_`
Labels: sig/api-machinery,triage/accepted

This is apparently a trick used by some Go devs to force fields to be named in struct initializing code.

From: https://github.com/kubernetes/gengo/issues/133

Running deepcopy-gen against structs that have `_` fields in them generates invalid go code.

Source struct:

```
type CreateBucketConfiguration struct {
	_ struct{} `type:"structure"`

	LocationConstraint BucketLocationConstraint `type:"string" enum:"true"`
}
type BucketLocationConstraint string
```

`doc.go` directives to deepcopy:

```
// +k8s:deepcopy-gen=package,register
```

deepcopy directives above structs that the above struct is a child of  (not sure if this makes a difference or not - this is autogenerated code from the operator sdk)

```
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
```

Output by deepcopy-gen:
```
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CreateBucketConfiguration) DeepCopyInto(out *CreateBucketConfiguration) {
	*out = *in
	out._ = in._
	return
}
```

Setting or accessing `_` fields is invalid. 

I applied the following patch locally and it outputs correct code (ie does not attempt to copy the `_` field).  No idea if this is the _correct_ way to solve the problem though.

```
diff --git a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go b/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go
index 4548108..1d90578 100644
--- a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go
+++ b/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go
@@ -823,6 +823,9 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) {

 	// Now fix-up fields as needed.
 	for _, m := range ut.Members {
+		if m.Name == "_" {
+			continue
+		}
 		ft := m.Type
 		uft := underlyingType(ft)
```

After applying this patch, output is as expected:

```
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CreateBucketConfiguration) DeepCopyInto(out *CreateBucketConfiguration) {
	*out = *in
	return
}
```
Repository: PowerToys
Issue: Mouse Pointer crosshairs: setting to toggle vertical crosshair
Labels: Idea-Enhancement,Needs-Triage,Product-Mouse Utilities

### Description of the new feature / enhancement

I like to use the crosshairs as a reading ruler, increasing the thickness to 50px is the trick. However, the vertical crosshair is a mild annoyance while using this tool as a reading ruler, I have to stick it to either the right or left side to avoid it.
Having a toggle to show/hide the vertical arm would be nice.

### Scenario when this would be used?

1. as a reading ruler
2. to check the alignment of things on UI 😅

### Supporting information

_No response_
Repository: PowerToys
Issue: FancyZones: Application recognizes on multiple displays after sleep (makes application un-recoverable)
Labels: Issue-Bug,Product-FancyZones,Needs-Triage

### Microsoft PowerToys version

0.79.0

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

setup: Win 10-Professional (admin account) (KB5034843)
all displays connected by a GTX 1070 both Windows and NVidea control panel recognize the displays as
-display 1: Acer VG272LV (DP->DP) Center
-display 2: LG 34UM94-P (HDMI->HDMI) (rotated 90-degrees) Left
-display 3: Dell U2515H (DVI-D->HDMI) Right

monitor 2 has 2 zones setup about bottom 2-thirds as one zone, and the upper third as another
each of the other monitors is there own Zone. Displays 1 and 3 are aligned vertically to the center of display 2 (

Window Behavior options set to True:
-Keep Windows in their zones when the screen resolution or work area changes
-Move newly created windows to their last know zone
-Allow child window snapping

applications that have been effected:
Windows Explorer
Notepad++
Google Chrome (will only effect one of the windows but not all the windows, this can sometimes be fixed by closing the window and using the browser to re-open the window))
Steam (running as administrator)
Visual Studio Community 2022 (running as administrator)

### ✔️ Expected Behavior

Window should be either in the zone it was last left in, or in a reachable location, and application windows should only be on one display at a time. if a application is registered to multiple displays it should pick one of those displays and be assigned to that unless moved by the user.
the application being on a different display the expected is more desirable then having to terminate the program, or reboot the system.
perhaps a command to force all windows to a given zone/display, or have "cascade windows" detect when a window is registered to multiple displays and send it to like the main display.

### ❌ Actual Behavior

when I put the system to sleep randomly some of the application windows will be registered as being on all 3 of my displays (recognized by me when using Win+Tab) selecting the application via any means (task-bar, Alt+Tab, Win+Tab) has not effect.
with the application selected (through Win+Tab or Alt+Tab) and then moving it with Win+Arrow_Key has no effect (this does have effect on other application windows.

selecting Cascade windows has no effect

steps to work around: terminate the application and re-open it
if problem persists: force close the application through Task manager, and re-open it
if problem still persists: reboot system... (problem has not persisted through reboot)

### Other Software

_No response_
Repository: terminal
Issue: Starting directory as legacy cmd
Labels: Issue-Bug,Needs-Tag-Fix,Tracking-External

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->
When the command prompt is opened by the Win+X shortcut without administrator privilege, the working directory is `%USERPROFILE%`. If opened with administrator privilege, the working directory is `%WINDIR%\system32`.

But when the terminal is set to be the default terminal for the system and opened by the Win+X menu, if starting directory is set to `.`, it is always `%WINDIR%\system32`.

Is it possible to set the starting directory in windows terminal to make it behave like cmd?
Repository: electron
Issue: [Bug]: Electron seems to ignore the monitor config of hyprland
Labels: bug :beetle:,has-repro-gist,28-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

28.2.0

### What operating system are you using?

Other (specify below)

### Operating System Version

archlinux 6.7.8-arch1-1

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

This issue is first found in another project using Electron, [reference](https://github.com/kando-menu/kando/issues/347)

When using `screen.getDisplayNearestPoint`, with such a screen position on hyprland 0.35.0-2:

```
(0,0)
┌───────────────────┐┌─────────────┐
│                   ││   Primary   │
│     Secondary     ││  2880x1800  │
│     3840x2160     │└─────────────┘
│                   │
└───────────────────┘
```

This is the config, which is a common one:

```
monitor=,preferred,auto,1
monitor=DP-1,3840x2160@60,0x0,1,bitdepth,10
monitor=DP-2,3840x2160@60,0x0,1,bitdepth,10
```

The expected return value should either be (0,0,3840,2160) or (3840,0,2880,1800)


### Actual Behavior

But Electron will actually return either (0,0,2880,1800) or (2880,0,3840,2160)

So the screen position in the view of Electron is :

```
┌─────────────┐┌───────────────────┐
│   Primary   │|                   │
│  2880x1800  ││     Secondary     │
└─────────────┘│     3840x2160     │
               |                   │
               └───────────────────┘
```

Which seems to be the default position if not configured.

No matter how I changed the position, the return value just stay still. It seems that Electron is not aware of this config.

### Testcase Gist URL

https://gist.github.com/Schneegans/95b5146eb253b0fe0ffe780742b33a05

### Additional Information

The specification for the gist above:

If you hit the "Run" button, a hello-world window will pop up. If you move the window around, the console in Electron Fiddle will print the current position of the window's top left corner. It will also print the position and the extend of the screen which Electron thinks the window is on.
Repository: go
Issue: proposal: net/http/httputil: custom logger support for httputil.ReverseProxy ErrorLog
Labels: Proposal

### Proposal Details

Hello Go team,

I hope this message finds you well. I'm reaching out to suggest an enhancement for the `httputil.ReverseProxy` struct, specifically regarding its logging capabilities.

Currently, `httputil.ReverseProxy` allows for an `ErrorLog` of type `*log.Logger` to be specified, which it uses internally to log errors. This is incredibly useful for monitoring and debugging purposes. However, in many applications, logging is handled by more sophisticated systems than the standard `log` package provides, such as `slog` or other structured logging libraries.

This limitation means that developers must either redirect standard logger output or miss out on integrating `ReverseProxy` error logging with their application's central logging system. Neither of these solutions is ideal, as the former can be cumbersome and the latter can lead to fragmented logging.

Therefore, I propose adding support for custom logger interfaces that could be used in place of the standard `*log.Logger`. This change would allow developers to seamlessly integrate `ReverseProxy` logging with whatever logging system they are using, improving the flexibility and usability of the `ReverseProxy` for modern Go applications.

A potential approach could involve defining a simple logging interface within the `httputil` package that could then be implemented by any logging library. For example:

```go
type Logger interface {
    Errorf(format string, args ...any)
}
```

Then, `ReverseProxy` could accept this interface instead of a concrete `*log.Logger` type, allowing for any custom implementation that matches the interface.

I believe this enhancement would significantly benefit the Go community by providing more flexibility in how errors are logged and integrated with existing systems.

Thank you for considering my suggestion. I look forward to any feedback or thoughts on this proposal.
Repository: ant-design
Issue: Re-exported Ant Design components don't have same style with the original components in Nextjs project
Labels: Inactive,Next.JS

### Reproduction link

https://codesandbox.io/p/devbox/pedantic-hooks-ft2yzk?file=%2Fpages%2Fmenu1.tsx%3A9%2C55

### Steps to reproduce

- Create a library 
- In this library, export Antd components (i.e: export * from 'antd')
- Bundle library using Rollup, and publish it
- Install library in a Nextjs project which using Antd
- Make 2 Button components: 1 imported from library, 1 imported from antd, wrap them with ConfigProvider, ConfigProvider has some styles (i.e: colorPrimary).

### What is expected?

Both 2 Buttons have the same style (i.e: backgroundColor) from the ConfigProvider

### What is actually happening?

Only the component imported directly from antd has the style from ConfigProvider

| Environment | Info |
| --- | --- |
| antd | 5.15.1 |
| React | React |
| System | All version |
| Browser | All browsers |

---
I created my own library, by re-export Ant Design component. I install my library in my Nextjs project, this project has been wrapped with ConfigProvider, in the app i have 2 input: 1 imported from my library and 1 imported from antd, the one from my library doesn't have style from the ConfigProvider. The issue only happens in Nextjs project, in pure Reactjs, it works fine.
Here is my library repo: https://github.com/phantomtet/rollup-react-library-starter
<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: rust
Issue: suboptimal codegen when initializing an array of padded structs
Labels: A-LLVM,A-codegen,T-compiler,I-heavy,C-optimization

in the following code, `reset_implicit_padding` generates somewhat worse assembly under `-C opt-level=3` than `reset_explicit_padding`. with explicit padding generates to a `memset` - i'd hoped both would `memset`:
```rust
#[repr(Rust, align(2))]
#[derive(Default, Copy, Clone)]
pub struct ImplicitPadding {
    v: u8,
}

#[repr(Rust, align(2))]
#[derive(Default, Copy, Clone)]
pub struct ExplicitPadding {
    v: u8,
    _pad: [u8; 1],
}

#[no_mangle]
pub fn reset_implicit_padding(array: &mut [ImplicitPadding; 160]) {
    *array = [ImplicitPadding::default(); 160];
}

#[no_mangle]
pub fn reset_explicit_padding(array: &mut [ExplicitPadding; 160]) {
    *array = [ExplicitPadding::default(); 160];
}
```

which compiles to these two implementations:
```
reset_implicit_padding:
        mov     eax, 7
.LBB0_1:
        mov     byte ptr [rdi + 2*rax - 14], 0
        mov     byte ptr [rdi + 2*rax - 12], 0
        mov     byte ptr [rdi + 2*rax - 10], 0
        mov     byte ptr [rdi + 2*rax - 8], 0
        mov     byte ptr [rdi + 2*rax - 6], 0
        mov     byte ptr [rdi + 2*rax - 4], 0
        mov     byte ptr [rdi + 2*rax - 2], 0
        mov     byte ptr [rdi + 2*rax], 0
        add     rax, 8
        cmp     rax, 167
        jne     .LBB0_1
        ret

reset_explicit_padding:
        mov     edx, 320
        xor     esi, esi
        jmp     qword ptr [rip + memset@GOTPCREL]
```

[godbolt](https://rust.godbolt.org/z/M7sGj36dd) for reference.

it turns out that when an array like this _does_ become a memset it's seemingly often because llvm realized in loop-idiom that the stores can be turned into a memset, rather than ever being emitted as a memset from rustc?

i don't know enough to know if this would need rustc to initialize padding bytes as undef (?), or if they're already undef and there's some other reason llvm doesn't figure out this could be a memset. i also can't tell if this would be in conflict with [this issue about padding copies](https://github.com/rust-lang/rust/issues/56297) or the [regression test for it](https://github.com/rust-lang/rust/pull/115096). there are certainly cases where copying large amounts of padding would be counterproductive, though if writing a padding byte could turn 4+2+1 bytes of stores into one 8-byte store, that's probably always a net win.

(the original code i've minimized had 6-byte or 14-byte structs aligned to 8 and 16 respectively, and for entirely indecipherable reasons also got the assignment fully unrolled, yielding ~600 `mov` rather than a memset. i would much rather that be a call to memset, and have added a `_pad` field for the time being.)
Repository: tauri
Issue: [feat] Send an event or run a callback when a context menu is dismissed
Labels: type: feature request,status: upstream

### Describe the problem

In tauri 2.0, I'm opening a context menu using the new window.popup_menu() API. I can respond to selections by listening to menu events. However, I would also like to know when the user exits the menu without picking any items. 

### Describe the solution you'd like

A MenuEvent sent to the existing handler would be fine - perhaps popup_menu() could take an id parameter? Alternatives include adding more functions, like popup_with_dismiss_callback().

### Alternatives considered

_No response_

### Additional context

The reason I want to know when the menu is dismissed is because when the context menu opens, I modify the UI to highlight the element that the user has clicked on - I want to remove that highlight when they stop viewing the menu, even if they didn't make a selection
Repository: godot
Issue: set_custom_data for TileData with negative y-axis in TileMap does not work correctly
Labels: documentation,topic:2d

### Tested versions

4.2.1.stable

### System information

Windows 10 - Godot 4.2.1.stable - Vulkan (Forward+)

### Issue description

When `TileData` is obtained from the `get_cell_tile_data` function of `TileMap`, `set_custom_data` does not work well if the Y axis of the obtained `TileData` is negative. After executing `set_custom_data`, `get_custom_data` for the same TileData will contain a different value.

```gdscript
for map_point in get_used_cells(0): # Prepare a TileMap that returns [(0, -1), (1, -1)]
	var tile_data = get_cell_tile_data(0, map_point)
	tile_data.set_custom_data("coordinate", map_point)

var tile_data2: TileData = get_cell_tile_data(0, Vector2i(0, -1))
var coordinate = tile_data2.get_custom_data("coordinate")
assert(coordinate == Vector2i(0, -1)) # (0, -1) is expected but an error occurs
```
Maybe `get_custom_data` is not working correctly.


### Steps to reproduce

It is reproduced by running the sample project.
https://github.com/inoutch/godot_issue_set_custom_data

### Minimal reproduction project (MRP)

https://github.com/inoutch/godot_issue_set_custom_data
Repository: stable-diffusion-webui
Issue: [Bug]: ./webui.sh
Labels: bug-report

### Checklist

- [ ] 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
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

```
Installing torch and torchvision
Looking in indexes: https://download.pytorch.org/whl/rocm5.4.2
Collecting torch==2.0.1+rocm5.4.2
  Downloading https://download.pytorch.org/whl/rocm5.4.2/torch-2.0.1%2Brocm5.4.2-cp310-cp310-linux_x86_64.whl (1536.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 1.5/1.5 GB 13.4 MB/s eta 0:00:01Killed
Traceback (most recent call last):
  File "/home/go/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/home/go/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/home/go/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 "/home/go/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/home/go/stable-diffusion-webui/venv/bin/python3" -m pip install torch==2.0.1+rocm5.4.2 torchvision==0.15.2+rocm5.4.2 --index-url https://download.pytorch.org/whl/rocm5.4.2
Error code: 137
go@sd:~$ /home/go/stable-diffusion-webui/venv/bin/python3 --version

```

### Steps to reproduce the problem

1.  wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh
2. chmod +x webui.sh
3. ./webui.sh

### What should have happened?

Assertion and hint about the reason for error when install script runs.
Version of Python, pip, and setuptools.

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

_No response_

### Sysinfo

Not needed. Look at additional information.

### Console logs

```Shell
Not needed. Look at additional information.
```


### Additional information

1. Add Python version assert and throw error if more than Python3.10.6.
2. Add upgrade pip and setuptools to the install script.
```
pip install --upgrade pip
pip install --upgrade setuptools
```
When Python3.10.6 is installed, pip and setuptools versions are not the latest.
There is neither assertion nor a hint in this install script.
Repository: stable-diffusion-webui
Issue: [Feature Request]: Syntax highlighting for the Infotext
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 ?

Add syntax highlighting for the Infotext to make it more readable for humans.
Would be really nice to also group the parameters in the same order as they appear in the UI.

### Proposed workflow

1. Go to PNG Info
2. Select a generated image
3. See something like:

> **Parameters:**
**$\color{#0ff}{\textsf{Prompt:}}$** best piece, master quality, all the good words
**$\color{#0ff}{\textsf{Negative prompt:}}$** bad stuff that nobody wants to see
**$\color{#0ff}{\textsf{Model:}}$** yourFavouriteModel_v5, **$\color{#0ff}{\textsf{Sampler:}}$** DPM++ 2M Karras, **$\color{#0ff}{\textsf{Steps:}}$** 20, **$\color{#0ff}{\textsf{Size:}}$** 512x768, **$\color{#0ff}{\textsf{CFG scale}}$:** 7, **$\color{#0ff}{\textsf{Seed:}}$** 1234567890,
**$\color{#0ff}{\textsf{Hires upscaler:}}$** 16x_SuperCoolUpscale_90000, **$\color{#0ff}{\textsf{Denoising strength:}}$** 0.25, **$\color{#0ff}{\textsf{Hires upscale:}}$** 2, etc,
**$\color{#0ff}{\textsf{ADetailer model:}}$** face_yolov8n.pt, **$\color{#0ff}{\textsf{ADetailer confidence:}}$** 0.3, etc, etc,
**$\color{#0ff}{\textsf{ControlNet 0}}$**: "**$\color{#0ff}{\textsf{Model:}}$** controlnet11Models_openpose, **$\color{#0ff}{\textsf{Weight:}}$** 1, etc, etc, etc"
**$\color{#0ff}{\textsf{Version:}}$ v1.X.0**

Instead of:
> parameters:
prompt
negative prompt
awalloftextwithrandomlymixedupnwordsandnumberssogoodluckfindingtheimagesizeorwhichmodelitwasgeneratedwithorwasitusingacontrolnetorwhateverotherthingthatyouwantedtoknowaboutthisimageespeciallyDenoisingstrengththatissomewhereinthebeginningwhiletherestoftheHiresfixparametersareforsomereasonplacedaftereverythingelse

### Additional information

_No response_