sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Progressive Web App (PWA) does not update HTML shell when PWA updates without call to 'JavaScript.pwa_update()'
Labels: bug,platform:web,topic:porting,needs testing

### Godot version

3.5-rc7

### System information

HTML exported on Windows 10 system. Brave browser.

### Issue description

Our PWA has version number visible in both the running app (via GDScript GUI) and its HTML loading page (a custom HTML shell). The running app part updates correctly with new version. The HTML loading page may or may not ever update, depending:

Scenario 1, update via `JavaScript.pwa_update()` (HTML shell updates correctly):
Our app detects update via JavaScript `pwa_update_available` signal. The app shows a confirmation dialog. User presses `Update`. The app calls `JavaScript.pwa_update()`. After download, both the custom HTML loading page and the running app show the correct new version number.

Scenario 2, update without call to `JavaScript.pwa_update()` (HTML shell does not update):
Our app detects update via JavaScript `pwa_update_available` signal. The app shows a confirmation dialog. User presses `Continue` to continue using old version. In this case there is no call to `JavaScript.pwa_update()`. However, when the user exits and restarts, then the new version (at least most of it) downloads and runs. In this case, the GDScript GUI will indicate the correct new version, but the HTML page *never updates* even after many exits and restarts or passage of days. If I uninstall and re-install the app, then the HTML page will have the correct new version number.

I always purge cache in both our web host and CDN after updates. However, I can't rule out some weirdness in my browser that I don't understand. (But PWA user shouldn't have to worry about that to get full version update.)

### Steps to reproduce

Make (or use our) PWA with version number displayed by both the GDScript app and custom HTML shell and load to web host. Update version. Observe behaviors above.

### Minimal reproduction project

I'm not sure if minimal project saves time here since you would have to load it to a web host and update several times. Our PWA built with 3.5-rc7 can be tried at [https://www.ivoyager.dev/app-rc/planetarium.html](https://www.ivoyager.dev/app-rc/planetarium.html). It displays version number in both loading HTML page and running app. If someone asks below, I'll rebuild with updated version number.
Repository: go
Issue: cmd/compile: checkEnabled causes some debug lines tests to fail
Labels: NeedsInvestigation,compiler/runtime

If you set `cmd/compile/internal/ssa/compile.go:checkEnabled` to `true` and run `all.bash`, some tests fail.
```
cmd/compile/internal/ssa/debug_lines_test.go
  TestDebugLinesSayHi
  TestDebugLinesPushback
  TestDebugLinesConvert
cmd/compile/internal/ssa/stmtlines_test.go
  TestStmtLines
```

I suspect this is the randomization done in `cmd/compile/internal/ssa/compile.go` when `checkEnabled` is set.

There is a secondary question here, which is why these tests don't already fail on the ssacheck builder. Maybe the `GO_GCFLAGS` setting doesn't make it through to the subprocess those tests use?

@dr2chase
Repository: godot
Issue: `get_string_size` reports wrong width when compared with the result of `draw_string`
Labels: bug,regression,topic:gui

### Godot version

4.0 alpha12

### System information

Windows 10 64 bits GLES3 GeForce GTX 1060 6GB/PCIe/SSE2

### Issue description

Seems `get_string_size` and `draw_string` produce a string of different width, even if I provide the same font and the same size.

### Steps to reproduce

I used the following code to draw a string:
```gdscript
	var font = DebugDrawFont
	var ascent := Vector2(0, font.get_ascent())
	var pos := Vector2()
	var font_offset := ascent
	var line_height := font.get_height()
	
	var text := "Hello World 123456789"
	var ss := font.get_string_size(text, TEXT_SIZE)
	ci.draw_rect(Rect2(pos, Vector2(ss.x, line_height)), TEXT_BG_COLOR)
	ci.draw_string(font, pos + font_offset, text, HORIZONTAL_ALIGNMENT_LEFT, -1, TEXT_SIZE, TEXT_COLOR)
```

But it results in a background rectangle slightly bigger, which gets bigger the more characters it contains:
![image](https://user-images.githubusercontent.com/1311555/180660510-bd3f085b-9b9f-4a62-850a-3df8da0c1487.png)


### Minimal reproduction project

[StringSize.zip](https://github.com/godotengine/godot/files/9176381/StringSize.zip)
Repository: godot
Issue: Progressive Web App (PWA) no longer has background updating (as it had in early 3.5 beta development)
Labels: bug,platform:web,topic:porting,needs testing

### Godot version

3.5-rc7

### System information

HTML5 export from Windows 10. Brave browser.

### Issue description

I don't know if this is a bug or intended change, but PWA background updating existed briefly and then went away during 3.5 development. Background updating is beneficial for a project like ours that has large asset data with long download time. Here's the early and late 3.5 behaviors:

Early 3.5 beta, based on a custom build using commit bf61f9c of Faless' 3.x_pwa_prefer_cache branch:
When user starts the PWA, it opens immediately running the user cached version. If an update is available, it quietly downloads in the background without interrupting the app. The user gets the new version after exit and restart. The user never has to *wait* for an update to download after they have installed the app.

3.5-rc7:
We now have a JavaScript singleton signal and method for updates (which I love!!!). However, updating is not voluntary and user is forced to wait for download either now or later. The update is either downloaded now (if we call `JavaScript.pwa_update()`), interrupting the current app session, or on exit/restart (without ever calling `pwa_update()`).  Either way the user has to wait for the download and doesn't get the benefit of background updating.

In my mind it seems that we can have either "update op-out" **or** "background updating". Presently we have neither. If we want update op-out, then it should be necessary in all cases to call `pwa_update()` for update to occur. On the other hand, if we are going to force an update anyway, then I'd like to have the background downloading we had in early 3.5. My expectation when I saw the new `pwa_update_available` signal was that it would fire *after* the new version had already downloaded in the background, so then the app could be restarted instantly (if the user so chooses) with no download wait.

I do believe that background updating is more in the spirit of PWA as described [here](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps).


### Steps to reproduce

If anyone asks, I can provide the early 3.5 build described above that generated PWA's with background updating. To observe download lag, you need a PWA with large assets. Upload to web server with multiple updates and observe behavior described above.

### Minimal reproduction project

A large project is needed to observe this issue. Please ask. I have one ;)
Repository: pytorch
Issue: Autocast documentation examples would break
Labels: module: docs,triaged,module: amp (automated mixed precision)

### 📚 The doc issue

In the `torch.autocast` [API reference](https://pytorch.org/docs/stable/amp.html#autocasting) we have several examples of autocasting that use simply `with autocast()`, e.g.

https://github.com/pytorch/pytorch/blob/594652f0e494caadac1076ab58e66af6823c3a83/torch/amp/autocast_mode.py#L44

However, since `torch.autocast` requires an argument `device_type`, this would fail with 
```
__init__() missing 1 required positional argument: 'device_type'
```

Another point of confusion that I have is why is `torch.autocast` defined in the `torch.amp.autocast_mode` file?

### Suggest a potential alternative/fix

Shall we update these docs to: `with torch.autocast("cuda")`?


cc @svekars @holly1238 @mcarilli @ptrblck
Repository: godot
Issue: `NOTIFICATION_APPLICATION_FOCUS_IN / OUT` doesn't trigger with Alt + Tab when a popup is open
Labels: bug,platform:linuxbsd,confirmed,topic:gui

### Godot version

4.0.dev (887a606)

### System information

Kubuntu GNU/Linux, X11

### Issue description

When unfocusing the window (be it in-game on in-editor) while a popup is open using Alt + Tab, the `NOTIFICATION_APPLICATION_FOCUS_IN/OUT` notification isn't sent. This can cause bugs like the popup not hiding until you click on something.

### Steps to reproduce

- On the editor, click on anything that opens a popup menu.
- Alt + Tab.

Notice how the popup will still be opened.

### Minimal reproduction project

_No response_
Repository: rust
Issue: import #[macro_export] from crate root help uses 2015 use syntax
Labels: A-diagnostics,T-compiler,D-invalid-suggestion,D-edition

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: [[playground]](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=de0dfebeda4fa8465ec8b3653401948d)

```rust
mod m {
    #[macro_export]
    macro_rules! nu {
        {} => {};
    }

    pub use self::nu;
}
```

The current output is:

```
error[[E0432]](https://doc.rust-lang.org/nightly/error-index.html#E0432): unresolved import `self::nu`
 --> src/lib.rs:7:13
  |
7 |     pub use self::nu;
  |             ^^^^^^^^ no `nu` in `m`
  |
  = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
help: a macro with this name exists at the root of the crate
  |
7 |     pub use ::nu;
  |             ~~~~

For more information about this error, try `rustc --explain E0432`.
```

This is using the edition2015 syntax to import from the crate root, rather than the edition2018+ required `crate::nu`.

Related: #99695

@rustbot label +D-edition +D-invalid-suggestion
Repository: godot
Issue: Editor translation extractor should work with multiple lines.
Labels: enhancement,topic:editor

### Godot version

v4.0.alpha.custom_build [96401b48e]

### System information

Arch on 5.18.12-arch1-1

### Issue description

We have lots of long lines for translations, they can easily be cut down in C++ using the implicit string concatenation (e.g. `"abcdef" "ghijkl"`) but this currently doesn't work with the translation extractor (file `editor/translations/extract.py`).

You can find the longest translation strings with this command:
```bash
find -name '*.cpp' -exec grep -oP 'TTR\(.+?\)' '{}' \; | awk '{ print length, $0 }' | sort -n -s | cut -d" " -f2-
```

(Everything before `awk` is listing all the lines, and `awk`+`sort`+`cut` is sorting the lines by length)

---

All these examples are in a single line of C++:

> When this option is enabled, using one-click deploy for Android will only export an executable without the project data.\nThe filesystem will be provided from the project by the editor over the network.\nOn Android, deploying will use the USB cable for faster performance. This option speeds up testing for projects with large assets.

> Movie Maker mode is enabled, but no movie file path has been specified.\nA default movie file path can be specified in the project settings under the 'Editor/Movie Writer' category.\nAlternatively, for running single scenes, a 'movie_path' metadata can be added to the root node,\nspecifying the path to a movie file that will be used when recording that scene.

> This animation belongs to an imported scene, so changes to imported tracks will not be saved.\n\nTo enable the ability to add custom tracks, navigate to the scene's import settings and set\n\"Animation > Storage\" to \"Files\", enable \"Animation > Keep Custom Tracks\", then re-import.\nAlternatively, use an import preset that imports animations to separate files.


### Steps to reproduce

_No response_

### Minimal reproduction project

_No response_
Repository: godot
Issue: ConcavePolygonShape2D Set segments not working
Labels: topic:physics,needs testing,topic:2d

### Godot version

v3.4.4.stable.official[419e713a2]

### System information

Linuxmint 20.3 una | GLES3 & GLES2 | Intel HD Graphics 3000

### Issue description

When I add a ConcavePolygonShape2D to a ColisionShape2d and try to edit the number of segments it will not add and the engine throws this error on Console:

servers/physics_2d/shape_2d_sw.cpp:845 - Condition "len % 2" is true.

![godotenginebug](https://user-images.githubusercontent.com/98716417/180668964-cfc19ed9-ab9b-44ba-9e86-60acb706cabc.png)

I've tried to set the segments via gdscript too and it didn't work either. (worked with convex polygon shape 2d)

![godotenginebug2](https://user-images.githubusercontent.com/98716417/180669181-bf424a79-53ee-4d52-b246-ebf53ca36cee.png)



### Steps to reproduce

1 - Create a CollisionShape2D child of a KinematicBody2D or Area2D
2 - Add new ConcavePolygonShape to it
3 - Try to increase the size of the segments on Shape Properties in the Editor Inspector

![godotenginebug3](https://user-images.githubusercontent.com/98716417/180669295-b34af4e7-da8a-4b6c-83e0-3c6c5c634d83.png)


### Minimal reproduction project

[Katon-Klitgh-GodotProject.zip](https://github.com/godotengine/godot/files/9176874/Katon-Klitgh-GodotProject.zip)
Repository: terminal
Issue: Put action shortcut key/keyboard bindings (hotkeys) next to actions in menus
Labels: Help Wanted,Area-UserInterface,Product-Terminal,Issue-Task

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

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!
-->

# Description of the new feature/enhancement

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

In the vast majority of apps, when you open a menu, items that have hotkeys bound to them show those key combinations, usually in lighter-colored text, next to the items, which obviously helps both alert the user to their presence and familiarize them with the shortcuts, or, in the case of rarely used ones, allows them to use them on occasion without having to remember them or open settings to find out what they are. This should be done in Terminal as well. In fact, this is already present in the down arrow menu to the right of the new tab button, but not in the tab context menu.

# Proposed technical implementation details (optional)

<!-- 
A clear and concise description of what you want to happen.
-->

Add text next to entries in the tab right-click menu showing those entries' keyboard shortcuts.
Repository: pytorch
Issue: Could be clearer that Cross Entropy takes logits as input
Labels: module: docs,module: nn,module: loss,triaged,actionable

### 📚 The doc issue

Hi, I felt that it could be made a bit more clear that the cross entropy function is taking logits in as input. Right now, the documentation is correct but I felt that it could be a bit more clear. It says that the input is required to take "raw, unnormalized scores for each class", but for me when reading that, I was a bit uncertain about what that meant. Then I scrolled down a bit more and saw that (target) would take in probabilities as input and incorrectly started to believe that cross entropy takes probabilities as input. Especially since that is the normal mathematical definition of cross entropy, I think it would be nice to be more clear; a lot of people will assume that it takes probabilities and get confused; I noticed that this question has a lot of upvotes 
https://stackoverflow.com/questions/49390842/cross-entropy-in-pytorch  on stackoverflow

### Suggest a potential alternative/fix

Instead of 
`The input is expected to contain raw, unnormalized scores for each class.`
it could say
`The input is expected to contain the logits for each class (which do not need to be positive or sum to 1, in general). This class will compute a softmax followed by cross entropy to compute the final loss.`

Of course, if one reads the documentation carefully enough (e.g. the formulas) they will eventually figure it out, but if you come in with bad assumptions like me and don't read carefully then you might spend a really long time trying to debug your model! Since it's a popular page I think it's worth it to be super clear

cc @svekars @holly1238 @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are
Repository: flutter
Issue: Autocomplete widget calls optionsViewBuilder even when optionsBuilder return empty Iterable
Labels: framework,f: material design,c: proposal,P2,team-design,triaged-design

## Use case

When using `Autocomplete` widget, sometime u want the `optionsView` always visible even the options is empty (for example a header on `optionsView` or 'No suggestion' `optionsView`.

## Proposal

`Autocomplete` widget calls `optionsViewBuilder` even when optionsBuilder return empty Iterable
Repository: material-ui
Issue: [Autocomplete] onHighlightChange does not trigger when options changes but not the length
Labels: bug 🐛,component: autocomplete

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Changing options asynchronously will with `autoHighlight` have weird behaviour with `onHighlightChange` when options are changed but coincidentally the length doesn't change. The `onHighlightChange` don't trigger, or the first item does not get highlighted properly.

The behaviour is normal if options length changes.


### Expected behavior 🤔

With `autoHighlight` it should properly highlight first item on any `options` change including `options.length` , as well as triggering `onHighlightChange`.

### Steps to reproduce 🕹

Steps:

1. Asynchronously change options but does not change the length of the array with a slight delay
2. `autoHighlight` enabled
3. `onHighlightChange` set up to see what's being highlighted
4. Change input to see the first item does not get highlighted after a change
5. Change input again to see the previous first item became the highlighted item
https://codesandbox.io/s/loving-cerf-d212pw

### Context 🔦

I'm trying to use this to fetch options async on every input change, like google search. Using `onHighlightedChange` to track currently highlighted item and direct to it `onKeyDown` on the input component. I couldn't use `onChange` because I wanted to track other keys pressed with `enter` to open in a new tab or a new window. 

Looking at the source code, this line and comment is suspicious: 
https://github.com/mui/material-ui/blob/master/packages/mui-base/src/AutocompleteUnstyled/useAutocomplete.js#L503


### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>
Repository: go
Issue: x/net: drop unused variables and consts that x/sys/unix has
Labels: NeedsDecision

This is a tracking issue for Ian's request and I quoted here. 


> In general, where possible, we should be moving this package to using constants defined in x/sys/unix, rather than using its own constants.
>
>In this case as far as I can see the only of the CTL constants that is referenced is CTL_NET, by route.go.  I think we should just drop all of the sysCTL constants entirely and change route.go to use unix.CTL_NET.

https://go-review.googlesource.com/c/net/+/419015/comments/6790299e_41c7ad76

I've upload CL for FreeBSD and compiled successful with other OSes by `GOOS={darwin,netbsd,dragonfly,openbsd}`

cc @golang/netbsd @golang/dragonfly @golang/openbsd @golang/netbsd
Repository: pytorch
Issue: Untangle TorchScript prim ops in aten namespace
Labels: oncall: jit

### 🐛 Describe the bug

Did you know aten::size.default is an op? It's not defined anywhere in native_functions.yaml. In fact, it gets indirectly registered as part of TorchScript prim registrations (despite not actually living in the prim namespace, which is where most of these are supposed to go). These ended up being relied upon by non-TS users for customizable sizes/strides. Let's properly put these in native_functions.yaml so they are handled the same way as other ops.

### Versions

master
Repository: pytorch
Issue: linear.matrix_power is not composite compliant
Labels: triaged,module: linear algebra

### 🐛 Describe the bug

You have to patch in https://github.com/pytorch/pytorch/pull/81984 to see the error. It's kind of annoying to guess and check what the actual composite compliance error is.

Repro command

```
python test/test_ops.py -k test_operator_linalg_matrix_power
```

cc @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano @zou3519 

### Versions

master
Repository: next.js
Issue: NextJS 12.2 decreases LCP for large eCommerce site
Labels: bug

### Provide environment information

Live Website ~9 million page visits this month

### Describe the Bug

We have just started to investigate but on first glimpse our measurements suggest that it's very likely that NextJS 12.2 is slowing down our LCP significantly from `good` to `needs improvement`

<img width="1364" alt="lcp" src="https://user-images.githubusercontent.com/4113649/180715107-fc04955e-3d7a-4172-a305-fb04e11bfda4.png">

If you have any interest in investigating this case together with us (be it free or paid) just let us know :)


### Expected Behavior

Same LCP for 12.2 and 12.1

### Link to reproduction

https://www.galaxus.ch/en/

### To Reproduce

I don't know how you might reproduce the issue - but if you like we could investigate our live system together