sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: [proposal] provide a way to detect/get current device orientation
Labels: c: new feature,framework,would be a good package,c: proposal,P3,team-framework,triaged-framework

From https://api.flutter.dev/flutter/widgets/Orientation-class.html.

This is useful because I want to implement functionality similar to Pokemon Go's "Battery Saver" setting, where the screen is dark and non responsive when the device is upside down.
Repository: PowerToys
Issue: Ability to adjust locations of taskbar items
Labels: Idea-New PowerToy,Product-Tweak UI Design

## 📝 Provide a description of the new feature

_What is the expected behavior of the proposed feature?  What is the scenario this would be used?_

It would be nice to have a feature where you can swap the windows button and date&time. I have my taskbar on the side of my screen to save real-estate, but having the windows button on the bottom of the screen still feels more natural to me. 🤷‍♂️

Probably not an easy one, but I doubt any of the already features are. Thank you for this useful tool!

Edit: Grammar for clarity.
---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: rust
Issue: Addition of Option<NonZero*> can compile suboptimally
Labels: I-slow,E-needs-test,T-compiler,A-result-option,C-optimization

I'm fairly certain `foo` and `bar` are equivalent (though let me know if I'm overlooking something!):

```rust
use std::num::NonZeroUsize;

pub fn foo(x: Option<NonZeroUsize>, y: Option<NonZeroUsize>) -> Option<NonZeroUsize> {
    if let (Some(x2), Some(y2)) = (x, y) {
        NonZeroUsize::new(x2.get() + y2.get())
    } else {
        None
    }
}

pub fn bar(x: Option<NonZeroUsize>, y: Option<NonZeroUsize>) -> Option<NonZeroUsize> {
    x.zip(y)
        .map(|(x2, y2)| NonZeroUsize::new(x2.get() + y2.get()))
        .flatten()
}
```

([Playground](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=062f1d6b46290a8dbf5b453ad7c10025))

but the compilation of `bar` seems suboptimal (current stable, 1.49.0):

```asm
playground::foo:
	leaq	(%rsi,%rdi), %rax
	testq	%rsi, %rsi
	cmoveq	%rsi, %rax
	testq	%rdi, %rdi
	cmoveq	%rdi, %rax
	retq

playground::bar:
	testq	%rsi, %rsi
	movq	%rdi, %rcx
	cmoveq	%rsi, %rcx
	testq	%rdi, %rdi
	cmoveq	%rdi, %rcx
	leaq	(%rsi,%rcx), %rax
	testq	%rcx, %rcx
	cmoveq	%rcx, %rax
	retq
```

Same result with 1.51.0-nightly (2021-01-23 4d0dd02ee07bddad9136).

In particular, the middle `testq` / `cmoveq` pair -- immediately preceding the `leaq` -- seem entirely redundant unless I'm missing something, as:
* After the `movq`, `rcx` is equal to `rdi`.
* After the first `cmoveq`, `rcx` is therefore either equal to `rdi`, or 0,
* The second `cmoveq` moves `rdi` into `rcx` when `rdi` is 0. But when `rdi` is 0, `rcx` must already be 0.

I played around with some other `NonZero*` types (including some signed) and observed the same pattern.
Repository: terminal
Issue: VkKeyScanW(0) is a constant during runtime independent of keyboard layout changes
Labels: Area-Input,Issue-Bug,Area-TerminalControl,Product-Terminal,Priority-2

# Environment

```none
Windows build number: 10.0.19042.0
```

# Steps to reproduce

1. Add the "US" keyboard layout within the "English (United States)" language
2. Add the "United Kingdom Extended" layout within the "English (United Kingdom)" language
3. Run the following code:
    ```cpp
    #define NOMINMAX
    #include <Windows.h>
    #include <cstdio>
    
    int main() {
        while (true) {
            printf("0x%x\n", LOBYTE(VkKeyScanW(0)));
            Sleep(1000);
        }
        return 0;
    }
    ```
4. Change the keyboard layout using Win+Space or similar

# Expected behavior

`VkKeyScanW(0)` prints `0x32` if the US and `0x40` if the UK layout is selected. The value changes during runtime if the layout is changed.

# Actual behavior

`VkKeyScanW(0)` will continue to return its initial value and not change if the keyboard layout is changed during runtime. `MapVirtualKeyW` appears similarly affected. (I haven't tried to reproduce this yet though.)

This has far reaching implications due to the widespread use of these functions in this code base and manifests itself in key combinations either not working at all, or producing incorrect VT sequences. The only way to fix the issue is by restarting the application.
Repository: godot
Issue: Relative Z indexes do not carry through to scripts
Labels: bug,topic:core,confirmed

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
3.2.3

**OS/device including version:**
Win 7

**Issue description:**
Relative Z-Indexes do not carry through to stand-alone script functions that are called from a parent.
This despite the fact that both the parent and the script have (default to) `is_z_relative()`== true`


**Steps to reproduce:**
Parent scene:
-> Background sprite (z-index 0)
-> A scene (z-index 100) with a script attached calls a stand alone script that has a `_draw()` call in it. That draw call will be placed underneath the background.

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Will produce if this is confirmed as a bug
Repository: vscode
Issue: Native Notebooks - Collapsing output from bottom leads to incorrect scroll location
Labels: ux,under-discussion,notebook-layout

Transfer from https://github.com/microsoft/vscode-jupyter/issues/4473

> Not sure whether to classify this as a bug, as it's more a UX issue than a real bug.
> 
> Currently, when collapsing a very long cell output (by doing right-click and then "collapse cell output"), it appears that the notebook retains the previous scroll coordinates.
> 
> This is an issue with long outputs, especially if they span more than the total screen height. In those cases, after collapsing the cell I often end up with a view of cells that are much further down in the notebook, forcing me to scroll up and waste time trying to find back where I was.
> 
> It would probably make more sense to automatically scroll so that the cell whose output was collapsed is visible?

I am only able to repro this behavior if I try to collapse the output from the bottom of the output. Scroll location remains correct when collapsing from the top of the output. 

![Collapse Scroll Off](https://user-images.githubusercontent.com/19276747/105639725-c31e9500-5e2e-11eb-80e9-874653fcbaae.gif)
Repository: rust
Issue: Track memory usage with -Z self-profile
Labels: T-compiler,I-compilemem,WG-compiler-performance,A-self-profile

RSS is only tracked with time-passes, not self-profile, so making an event less verbose can actually lose information. It would be nice to have an opt-in way to record memory usage with `-Z self-profile-events`.

_Originally posted by @jyn514 in https://github.com/rust-lang/rust/issues/81284#issuecomment-766363831_
Repository: go
Issue: runtime/race: race detector truncates command-line arguments on ppc64le
Labels: NeedsFix,compiler/runtime

When the program below is run with the race detector enabled, it truncates the command-line arguments list at the `""` argument. In particular, this prevents using a race-detector-enabled cmd/compile on ppc64le, because cmd/go typically passes `-D ""`.

I only see this on linux/ppc64le. I'm not able to reproduce the issue on linux/amd64.

```
$ go run hi.go -- one two "" three four
["/tmp/go-build2867456842/b001/exe/hi" "--" "one" "two" "" "three" "four"]
["one" "two" "" "three" "four"]

$ go run -race hi.go -- one two "" three four
["/tmp/go-build2206806436/b001/exe/hi" "--" "one" "two"]
["one" "two"]
```

```
package main

import (
	"flag"
	"fmt"
	"os"
)

func main() {
	fmt.Printf("%q\n", os.Args)
	flag.Parse()
	fmt.Printf("%q\n", flag.Args())
}
```

/cc @dvyukov
Repository: godot
Issue: Mouse breaks when clicking and dragging on second spinner
Labels: bug,topic:input,topic:gui

**OS:** Windows 10

**Godot version:** 3.2.3

if you have 2 spinners and you click and drag on the second spinner, the mouse gets disabled and ends up in the middle of the screen, im running the latest version of godot on windows 10

https://user-images.githubusercontent.com/53024392/105641506-e73b9f80-5e49-11eb-8e46-d28d3d3f0456.mp4
Repository: create-react-app
Issue: Docs: discourage to react-snap & react-snapshot
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

<!--
  Provide a clear and concise description of what the problem is.
  For example, "I'm always frustrated when..."
-->

[Pre rendering into static html files](https://create-react-app.dev/docs/pre-rendering-into-static-html-files) docs page recomends using [react-snap](https://github.com/stereobooster/react-snap) or [react-snapshot](https://www.npmjs.com/package/react-snapshot), but they haven't been maintained for at least a year. Therefore both have lots of unresolved issues.

### Describe the solution you'd like

<!--
  Provide a clear and concise description of what you want to happen.
-->

Usage should be discouraged by pointing out their states and suggesting to contribute an alternative if found

### Describe alternatives you've considered

<!--
  Let us know about other solutions you've tried or researched.
-->

Haven't found a posible alternative to them.

### Additional context

<!--
  Is there anything else you can add about the proposal?
  You might want to link to related issues here, if you haven't already.
-->

It's my fault here, but I blindly followed the recomendations without checking the active state of the packages.
Repository: PowerToys
Issue: Manage screens layout
Labels: Idea-New PowerToy,Product-Display management

When you have 2 or 3 screens that can move, moreover when one of them is TV that you sometimes want to watch something, not from PC, you need an ability to create several presets of screen layouts and easily switch between them. Like:
* Screen 2 on top of screen 1
* Screen 2 left to screen 1
* Screen 3 on top of screen 1 and screen 2 left to screen 3

---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: go
Issue: proposal: x/term: expose tcflush functionality
Labels: Proposal


### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.14.2 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env

</pre></details>

I'm the developer of the popular github.com/gdamore/tcell package.

I'm skipping the rest of this questionaire as I think it's not terribly relevant to this feature request.

Essentially, I'd like golang.org/x/term to expose a method to flush I/O on the tty.   This would permit us to ensure that we can pause the text UI, and not wind up sucking in a bunch of I/O when restoring back to raw mode.

Alternatively, having a version of term.MakeRaw (and probably also term.Restore) that let me specify TCSFLUSH behavior would also work.
Repository: next.js
Issue: URL resolution case sensitivity is inconsistent
Labels: bug

**What version of Next.js are you using?**

10.0.5

**What version of Node.js are you using?**

14.15.0

**What browser are you using?**

Chrome

**What operating system are you using?**

Windows

**How are you deploying your application?**

Local

**Describe the Bug**

*File system routes*

http://localhost:3000/about -> renders pages/about.js
http://localhost:3000/ABOUT -> 404 not found

Result: case sensitive.

*Redirects*

Using this example: https://github.com/vercel/next.js/tree/canary/examples/redirects

http://localhost:3000/team -> redirects to /about -> renders pages/about.js
http://localhost:3000/TEAM -> redirects to /about -> renders pages/about.js

Result: case insensitive.

*Rewrite*

Using this example: https://github.com/vercel/next.js/tree/canary/examples/rewrites

http://localhost:3000/team -> rewrites to /about -> renders pages/about.js
http://localhost:3000/TEAM -> rewrites to /about -> renders pages/about.js

Result: case insensitive.

**Expected Behavior**

All URL resolution should have a consistent default behavior

*Proposal:*

1) Resolving should be case insensitive, but, if the wrong case is used, a 301 redirect should send the request to the URL with the right case.
2) Same behavior for UTF-8 characters (e.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase to compare UTF-8 characters dependency on https://github.com/vercel/next.js/issues/10084)

Benefits:

- Can be good for people who "type" URLs with the wrong case (e.g. URLs shared using traditional media ads)
- SEO friendly (no duplicate content found on the same case insensitive URL - Google indexes URL case-insensitively)

**To Reproduce**

See description - make sure to open each URL in a new incognito window to avoid Chrome cache hits.
Repository: flutter
Issue: [webview_flutter] handle onWebResourceError in onReceivedSslError on Android
Labels: platform-android,p: webview,package,c: proposal,P3,team-android,triaged-android

## Description

Currently, on Android, there is no possibility to get a notification in Flutter that an SSL error occurred while loading a resource.
The user sees a white screen, and the developer doesn't receive any error callbacks from [WebView](https://pub.dev/documentation/webview_flutter/latest/webview_flutter/WebView-class.html). Only in log developer can see some error:
```
[ERROR:ssl_client_socket_impl.cc(962)] handshake failed; returned -1, SSL error code 1, net_error -200
```

By the way, on iOS, the developer receives `onWebResourceError` callbacks with an appropriate error.

The reason that Android implementation doesn't implement/provide [onReceivedSslError](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedSslError(android.webkit.WebView,%20android.webkit.SslErrorHandler,%20android.net.http.SslError)) notifier.

My proposal is to left the default behavior of this notifier (call [SslErrorHandler#cancel](https://developer.android.com/reference/android/webkit/SslErrorHandler#cancel())), but handle `onWebResourceError` callback from [WebView](https://pub.dev/documentation/webview_flutter/latest/webview_flutter/WebView-class.html), so the developer can see this error and provide some actions.

## Related Issues & Pull requests
* flutter/plugins#2285
Repository: rust
Issue: [rustdoc-json] Output is currently under-tested
Labels: A-testsuite,T-rustdoc,C-tracking-issue,A-rustdoc-json

Currently, the output of rustdoc's JSON backend has very few tests, which only assure some of the most simple functionality. It would be nice to at least have tests for basic forms of each item, as well as any known issues. A quick list of things not really tested (non-exhaustive):

- [ ] Impls
- [ ] Associated Items
- [ ] Consts/Statics
- [ ] Extern items (all forms)
- [ ] Macros
- [ ] Types

It also would be nice to know the desired layout of the tests. Currently, the directory holds the form
```
root
| structs
- | plain
  | tuple
  | generic
| traits
- | has_body
| unions
- | plain
| ...
```
This is slightly different from how normal rustdoc ui tests are structured, but on the other hand HTML output is very different and serves a somewhat different goal. If we want to establish guidelines on the test directory layout, now is a good time to discuss it, before the directories fill up.
Repository: create-react-app
Issue: docs: updating README.md to react-scripts 4+
Labels: issue: proposal,needs triage

I have noticed these parts are not up to date yet. Might cause little bit frustration to see that the project structure is slightly different than this one.
```my-app
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│   ├── favicon.ico
│   ├── index.html
│   └── manifest.json
└── src
    ├── App.css
    ├── App.js
    ├── App.test.js
    ├── index.css
    ├── index.js
    ├── logo.svg
    X *serviceWorker.js*
    └── setupTests.js
```

```
What’s Included?

X Only when using PWA template

    An offline-first service worker and a web app manifest, meeting all the Progressive Web App criteria. (Note: Using the service worker is opt-in as of react-scripts@2.0.0 and higher)
   
```
Repository: pytorch
Issue: len of ModuleList is incorrect for jitted models
Labels: oncall: jit

## 🐛 Bug

```py
from typing import Final

import torch


class Test(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.models: Final = torch.nn.modules.container.ModuleList([])

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        if len(self.models) != 0:
            x = self.models[0](x)
        return x


print(torch.__version__)  # 1.7.1+cu101
model = Test()
torch.jit.script(model)
```

```traceback-python
Traceback (most recent call last):
  File "test_pytorch.py", line 19, in <module>
    torch.jit.script(model)
  File "/home/twoertwe/.cache/pypoetry/virtualenvs/python-tools-XWCSm5JO-py3.8/lib/python3.8/site-packages/torch/jit/_script.py", line 897, in script
    return torch.jit._recursive.create_script_module(
  File "/home/twoertwe/.cache/pypoetry/virtualenvs/python-tools-XWCSm5JO-py3.8/lib/python3.8/site-packages/torch/jit/_recursive.py", line 352, in create_script_module
    return create_script_module_impl(nn_module, concrete_type, stubs_fn)
  File "/home/twoertwe/.cache/pypoetry/virtualenvs/python-tools-XWCSm5JO-py3.8/lib/python3.8/site-packages/torch/jit/_recursive.py", line 410, in create_script_module_impl
    create_methods_and_properties_from_stubs(concrete_type, method_stubs, property_stubs)
  File "/home/twoertwe/.cache/pypoetry/virtualenvs/python-tools-XWCSm5JO-py3.8/lib/python3.8/site-packages/torch/jit/_recursive.py", line 304, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)
RuntimeError:
Index 0 out of range of length 0:
  File "test_pytorch.py", line 13
    def forward(self, x: torch.Tensor) -> torch.Tensor:
        if len(self.models) != 0:
            x = self.models[0](x)
                ~~~~~~~~~~~~~~ <--- HERE
        return x
```

cc @gmagogsfm
Repository: godot
Issue: uniform TEXTURE_PIXEL_SIZE bugged
Labels: bug,needs testing,topic:shaders

**Godot version:**
3.2.2 stable
3.2.3 stable
3.2.4 beta6 (everywhere act same)

**OS/device including version:**
**confirmed in AMD and Nvidia**
WIndows and Linux
*bug works with Angle in Web*

**Issue description:**
when Viewport size changed by "some" event like a fullscreen event or double click on window header
TEXTURE_PIXEL_SIZE uniform has wrong value

Screenshots:
![1](https://danilw.github.io/godot-utils-and-other/BUG_TEXTURE_PIXEL_SIZE/1.png)
![2](https://danilw.github.io/godot-utils-and-other/BUG_TEXTURE_PIXEL_SIZE/2.png)

second image from Chromium browser
**Values on image**:
two text lines on top - is viewports size from gdscript
White number - `VIEWPORT_SIZE` uniform in 3d scene
Yellow number - `iResolution` value, is `vec2 iResolution=1./TEXTURE_PIXEL_SIZE;`
Aqua number - `textureSize(TEXTURE,0)` value

**Expected:**
all numbers should be the same

**Real result** - `vec2 iResolution=1./TEXTURE_PIXEL_SIZE;` not correct

**Steps to reproduce:**
Launch my web build in your webbrowser [link to web build](https://danilw.github.io/godot-utils-and-other/BUG_TEXTURE_PIXEL_SIZE/texture_size_bug.html) and double click on browser header, or F11 to fullscreen page. Or open source project and launch in Godot, and double click on launched window header.

**Minimal reproduction project:**
[texture_size_bug.zip](https://danilw.github.io/godot-utils-and-other/BUG_TEXTURE_PIXEL_SIZE/texture_size_bug.zip)
Repository: godot
Issue: Building from source does not support non-standard Visual Studio installs
Labels: enhancement,platform:windows,topic:buildsystem

**Godot version:**
3.2.3

Visual Studio is required to build Godot from source. SCons locates the Visual Studio install location using vswhere.exe, which is part of the Visual Studio installer. However, it only checks a few directories:

os.path.expandvars(r"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"),
os.path.expandvars(r"%ProgramFiles%\Microsoft Visual Studio\Installer"),
os.path.expandvars(r"%ChocolateyInstall%\bin"),
(Source: https://github.com/SCons/scons/blob/master/SCons/Tool/MSCommon/vc.py)

SCons has an environment variable, VSWHERE, which overrides the above paths. So if your Visual Studio installer is not located in one of the above directories, you need to set the VSWHERE variable to tell SCons where it is. Because SCons uses it's own, self contained environment variables, this parameter must be set as part of the Godot build scripts, which it is not. This means that you can only build Godot from source if your Visual Studio installer is in one of the above directories.

To fix this, a parameter should be added to Godot's build scripts that allow specification of the VSWHERE environment variable for use by SCons. Alternatively, it could be copied to SCons environment variables from the system/user environment variables. Either way, it would need to be documented.
Repository: flutter
Issue: [image_picker] Image imported from Google Photos is missing Exif data
Labels: p: image_picker,package,team-ecosystem,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,triaged-ecosystem

Using image_picker plugin, when I am selecting an image from Google Photo, the exif metadata is incomplete 

`
    final pickedFile = await picker.getImage(source: widget.imageSource);
    var r = await readExifFromFile(File(pickedFile.path));
    debugPrint(r.toString());`

Prints something like 
`
  {Image Software: Google, Image ExifOffset: 46,
  EXIF ExifVersion: 0220,
  EXIF UserComment:,
  EXIF ColorSpace: sRGB,
  Interoperability InteroperabilityIndex: R98,
  Interoperability InteroperabilityVersion: [48, 49, 48, 48],
  EXIF InteroperabilityOffset: 356}
`
GPS information, as well as the date, for example, are missing from the exif metadata. 

The image has exif data as I see it in the Google Photo application

> ~/source λ flutter doctor                                                                                   ✘ 130
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.6 19G2021 darwin-x64, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
[!] Android Studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Ultimate Edition (version 2020.2.3)
[✓] VS Code (version 1.52.1)
[✓] Connected device (1 available)

! Doctor found issues in 2 categories.
Repository: flutter
Issue: Make PointerInterceptor support PopupMenuItem
Labels: c: new feature,framework,f: material design,customer: google,c: proposal,team-design,triaged-design

## Use case
I have a `PopupMenuButton` overlaid on a Google Map widget, and I would like to use `PointerInterceptor` with it so clicks on the popup menu don't get passed through to the Google Map IFRAME underneath when used on Web. Also, if I click outside of the popup menu when it is open to dismiss the menu, it should not pass that click to the IFRAME. There doesn't seem to be a way to do this without integrating `PointerInterceptor` into `PopupMenuButton` itself.