sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: confusing dead code warning inside macro annotated function
Labels: A-diagnostics,T-compiler

If I instrument an _unused function_ using the _tokio-tracing_ library I get a dead code warning that seems impossible.

The `instrument` procedural macro rewrites the _unused function_. Somewhere this causes the dead code warning for the function to not be reported. However dead code warnings from the function body, caused by the function not being used, are reported. As you miss the dead code warning regarding the function body you could get really confused how the function body code can be dead. 

The hiding of the dead code warning for the function is a known [issue](https://github.com/tokio-rs/tracing/issues/1366) of the tracing library. It has happens to another procedural macro:  [fn-error-context](https://github.com/andrewhickman/fn-error-context/issues/3) where it could be resolved.

Given the following [code](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=9238421a4bfb74ad191bc552b0fdaff1):

```rust
use tracing; // 0.1.29

struct Test;
impl Test {
    #[tracing::instrument]
    fn never_used(var: i32) {
        const IS_USED: &str = "I get a dead code warning";

        if IS_USED == "" {
            println!("");
        }
    }
}

fn main() {
    let _test = Test;
}
```

The current output is:

```
warning: constant is never used: `IS_USED`
 --> src/main.rs:7:9
  |
7 |         const IS_USED: &str = "I get a dead code warning";
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: `playground` (bin "playground") generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 1.10s
```
_note how the unused code warning regarding the function argument is also hidden and only the dead code warning from the function body is emitted making this case extra confusing_

Ideally the output should look like:

```
warning: unused variable: `var`
 --> src/main.rs:5:19
  |
5 |     fn never_used(var: i32) {
  |                   ^^^ help: if this is intentional, prefix it with an underscore: `_var`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: associated function is never used: `never_used`
 --> src/main.rs:5:8
  |
5 |     fn never_used(var: i32) {
  |        ^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: constant is never used: `IS_USED`
 --> src/main.rs:6:9
  |
6 |         const IS_USED: &str = "I get a dead code warning";
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

If `never_used()` is not a member of `Test` the code compiles without any warnings, which while sub optimal is less confusing (and maybe more desirable) then having the single unused code warning.

A next step in investigating this could be writing a minimal macro that still causes this behavior. Unfortunately I do not have time for that right now.

Compiler: `stable 1.57 ` but also confirmed to happen on `nightly`
Repository: godot
Issue: Mobile: keyboard goes over FileDialog's content: can't see what you're typing
Labels: bug,platform:ios,platform:android,usability,topic:gui

### Godot version

3.3.4 stable

### System information

Android

### Issue description

Writing on FileDialog's path while on mobile, the smartphone's keyboard goes over the FileDialog, therefore you can't see what you're typing.
Not sure how this could be fixed, though.
However there probably is no need to fix this since [accessing the OS's default file manager](https://github.com/godotengine/godot-proposals/issues/1123) will make FileDialog useless for mobile.


### Steps to reproduce

--

### Minimal reproduction project

--
Repository: flutter
Issue: Bug: Tests using rootBundle.loadString(...) hang
Labels: a: tests,framework,a: assets,has reproducible steps,P3,found in release: 2.8,found in release: 2.9,team-framework,triaged-framework

*Affected Flutter versions:*
2.5.3 as well as 2.8.1 (probably more, I only tested with those two versions)

*Steps to reproduce:*
1. `flutter create myapp`
2. `cd myapp`
3. create file _test/demo_test.dart_ with the following Dart code:
```
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  testWidgets('load asset twice', (tester) async {
    final s1 = await rootBundle.loadString('AssetManifest.json');
    final s2 = await rootBundle.loadString('AssetManifest.json');
    expect(s2, same(s1));
  });

  testWidgets('load asset again in another test', (tester) async {
    await rootBundle.loadString('AssetManifest.json');
  });
}
```
4. `flutter test test/demo_test.dart`

*Expected behaviour*: The test run should succeed.

*Actual behaviour*: The test run does not finish.

Here is my short analysis of the issue:

`rootBundle` is a `PlatformAssetBundle` which extends `CachingAssetBundle`.
Therefore the first call to `loadString` will put a `Future` into `rootBundle._stringCache`.
When we try to `await` that `Future` in the same test, everything works fine (as the first test demonstrates).
But when we try to `await` that `Future` in another test, the test hangs.

I suppose this is because every test uses a different `Zone`.

A possible solution might be to clear the caches in `rootBundle` between tests,
but unfortunately I don't see a way to do this with the current public API.
Repository: material-ui
Issue: Theming: Checkbox indeterminate is not being treated the same as checked/disabled
Labels: discussion,waiting for 👍,component: checkbox

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯


When overriding the `indeterminate` state's style, is not throwing the same warning/error message as `disabled`.

Example code:
```
  MuiCheckbox: {
    styleOverrides: {
      root: {
        '&.Mui-checked': {
          // will tell me to use this instead
          // color: 'rebeccapurple'
        },
      },
      checked: {
        // MUI will throw console error, telling devloppers to use '&.Mui-checked'
        color: 'rebeccapurple'
      },
      indeterminate: {
        color: 'rebeccapueple'
      }
    }
  }
```

I am greeted with a message such as
> MUI: The `MuiCheckbox` component increases the CSS specificity of the `checked` internal state.

However, not for `indeterminate`?


### Expected behavior 🤔

`indeterminate` should be treated the same as `checked` and `disabled`, hence should throw the same error message?

Example:
> MUI: The `MuiCheckbox` component increases the CSS specificity of the `indeterminate` internal state.

The expected behavior is that all of them should behave the same, if for some reason MUI team decided that `indeterminate` would be treated differently, then I believe you guys should revert the same steps you guys did on the `checked` and `disabled`... the theme should override them the same ways.

### Steps to reproduce 🕹

See example in **Current behavior** section

### Context 🔦

_No response_

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
  System:
    OS: Linux 5.11 Ubuntu 21.04 (Hirsute Hippo)
    CPU: (16) x64 Intel(R) Xeon(R) Silver 4108 CPU @ 1.80GHz
    Memory: 2.12 GB / 15.33 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 10.24.1 - ~/.config/nvm/versions/node/v10.24.1/bin/node
    Yarn: 1.22.10 - ~/.config/nvm/versions/node/v10.24.1/bin/yarn
    npm: 6.14.15 - ~/projects/gravity/ui-components/packages/ui-components/node_modules/.bin/npm
  Managers:
    Apt: 2.2.4 - /usr/bin/apt
    Maven: 3.6.3 - /usr/bin/mvn
    pip2: 20.3.4 - ~/.local/bin/pip2
    pip3: 20.3.4 - /usr/bin/pip3
  Utilities:
    Make: 4.3 - /usr/bin/make
    GCC: 10.3.0 - /usr/bin/gcc
    Git: 2.30.2 - /usr/bin/git
  Virtualization:
    Docker: 20.10.7 - /usr/bin/docker
  IDEs:
    Nano: 5.4 - /usr/bin/nano
    VSCode: 1.63.1 - /home/eto/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/bin/code
    Vim: 8.2 - /usr/bin/vim
  Languages:
    Bash: 5.1.4 - /usr/bin/bash
    Java: 1.8.0_312 - /usr/bin/javac
    Perl: 5.32.1 - /usr/bin/perl
    Python: 2.7.18 - /usr/bin/python
    Python3: 3.9.5 - /usr/bin/python3
  Browsers:
    Chrome: 96.0.4664.45
    Chromium: 96.0.4664.110
    Firefox: 95.0.1

```
</details>
Repository: go
Issue: cmd/go: `go test -fuzz='^FuzzName$'` uses default value of -run flag and runs all regular tests as well
Labels: NeedsInvestigation,GoCommand,fuzz

### What version of Go are you using (`gotip version`)?

<pre>
$ gotip version
go version devel go1.18-95b240b2 Mon Jan 3 23:45:12 2022 +0000 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes, this was reproduced on latest tip (95b240b2) and had also been seen to reproduce on my previously installed version of gotip from Sep 22nd (09d3df0) too

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
darwin/amd64
</pre></details>

### What did you do?

- wrote a simple fuzz_test.go and attempted to run it with `gotip test -fuzz=FuzzName` as per the docs, but was surprised to find it taking a long time to run
- added `-v` to see the output and noted that all of my others tests were being run too

### What did you expect to see?

I expected `-fuzz=^FuzzName$` to match the docs and spec and behave like `-run=^TestName$`:
> In order to run a fuzz test with the mutation engine, -fuzz will take a regexp which must match only one fuzz test. In this situtation, only the fuzz test will run (ignoring all other tests)

### What did you see instead?

`gotip test` proceeded to execute all of my regular tests in addition to the single fuzzing test that I'd specified. A workaround was to change the cmd to `gotip test -fuzz='^FuzzName$' -run='^FuzzName$'` and then it behaved as expected, running a single fuzzing test and nothing else.
Repository: vscode
Issue: Runtime API to disable user activation per frame per origin
Labels: upstream,electron,workbench-os-integration

The terminal ligatures exploration in https://github.com/microsoft/vscode/pull/139537 ended up hitting an issue where Electron now requires a user activation in order to read ligatures, even when ligatures bypass the permissions prompt/handler. This is a blocker to get terminal ligatures working, at least without something hacky like piggybacking on the next user activation event.

IMO Electron should allow disabling the user activation requirement outright, potentially automatically when the permissions dialog will be bypassed?
Repository: pytorch
Issue: Cannot compile C++ documentation: Sphynx assertion
Labels: module: docs,triaged

### 🐛 Describe the bug

Trying to compile C++ documentation leads to large number of warnings/errors and then an assertion in Sphynx code:

```
Exception occurred:
  File "C:\Users\ikriv\AppData\Roaming\Python\Python39\site-packages\breathe\renderer\sphinxrenderer.py", line 1784, in visit_friendclass
    assert typ in ("friend class", "friend struct")
AssertionError
```

Steps to reproduce:
1.  git clone --recurse-submodules https://github.com/pytorch/pytorch
2.  Optional: cd pytorch 
     python setup.py install
3. cd docs/cpp
4. make html

### Versions

The error here is for Windows, but I was getting the same on Linux.
Pytorch commit 1e67570f3a47f654ee38359e51b589b4246c3e8a
Sphinx version: 4.3.2
Python version: 3.9.7 (CPython)
Docutils version: 0.16 release
Jinja2 version: 3.0.1
Doxygen 1.9.
[output.txt](https://github.com/pytorch/pytorch/files/7809137/output.txt)
[sphinx-err-7k9fc47r.log](https://github.com/pytorch/pytorch/files/7809138/sphinx-err-7k9fc47r.log)
2

cc @brianjo @mruberry
Repository: go
Issue: x/website/_content/doc/tutorial: tutorials leave developer in broken state
Labels: NeedsInvestigation

At the end of tutorial, "[Add a test](https://go.dev/doc/tutorial/add-a-test)", the tutorial leaves the code in a broken state.  The next tutorial "[Compile and install the application](https://go.dev/doc/tutorial/compile-install.html)", assumes that the code is fully functional.

I recommend that the fix be done in the "[Add a test](https://go.dev/doc/tutorial/add-a-test)" tutorial, so that the user is left with a working example, as that is where the code was initially broken.  Otherwise, if the fix is done in [Compile and install the application](https://go.dev/doc/tutorial/compile-install.html), the text would have to deal with the developer who goes directly to that tutorial, without going through the previous tutorials.

If the fix is done in "[Add a test](https://go.dev/doc/tutorial/add-a-test)" tutorial, you just need to add a paragraph that has the developer edit the broken file, by un-commenting the working code, and deleting the broken code.
Repository: frp
Issue: use multiple plugins possible?[Feature Request] 
Labels: future

### Describe the feature request

Is it possible to use multiple plugins? 

I would like to use the "HTTP Basic Auth" function, the "https2http" plugin and "Custom Subdomain Names".
Is this possible?

I have already tried several things. But so far never all parameters are recognized by frp.

for example the following frpc.ini configuration:
frpc.ini
[common]
server_addr = 127.0.0.1
server_port = 7000

[https2http_all]
type = https
plugin = https2http
local_ip = 192.168.178.xyz
local_port = 80
custom_domains = test.abc
subdomain = web02
plugin_crt_path = /home/frp_0.38.0_linux_amd64/cert1.pem
plugin_key_path = /home/frp_0.38.0_linux_amd64/privkey1.pem
plugin_host_header_rewrite = 192.168.178.xyz
plugin_header_X-From-Where = frp
http_user = abc
http_pwd = abc
proxy_protocol_version = v2


### Describe alternatives you've considered

_No response_

### Affected area

- [ ] Docs
- [ ] Installation
- [ ] Performance and Scalability
- [ ] Security
- [ ] User Experience
- [ ] Test and Release
- [ ] Developer Infrastructure
- [ ] Client Plugin
- [ ] Server Plugin
- [ ] Extensions
- [ ] Others
Repository: rust
Issue: `std::env` uses `getenv` instead of `secure_getenv`
Labels: A-security,C-bug,T-libs,A-process

The glibc manual at https://www.gnu.org/software/libc/manual/html_node/Environment-Access.html#Environment-Access says:
> Libraries should use secure_getenv instead of getenv, so that they do not accidentally use untrusted environment variables.

libstd is a library, and many (most?) Rust crates are libraries, so it seems like we either should follow glibc's advice and use `secure_getenv`, or we should document a clear rationale for going against its advice.

See https://github.com/rust-lang/rust/blob/1d71ba862309d59df710078a845c8772ffb22aba/library/std/src/sys/unix/os.rs#L533

musl 1.1.24+ and glibc 2.17+ both support `secure_getenv` so I suggest we just assume any libc on Linux has it.
Repository: excalidraw
Issue: "canvas panning" hint shouldn't display when dragging elements
Labels: bug
Repository: yt-dlp
Issue: How to download and merge video from "X" and audio from "best" when both files have video and audio?
Labels: regression,core:post-processor

### Checklist

- [X] I'm asking a question and **not** reporting a bug/feature request
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar questions including closed ones

### Question

There is no separate audio files. Bigger resolution = better audio.
For example 480p+best download only first. 
--compat-options multistreams give file with two video and audio tracks.
Is it possible to take video from one and audio from another using one command or I have download both and remux using selected tracks for example by ffmpeg?

### Verbose log

_No response_
Repository: flutter
Issue: Run Windows desktop tests under Visual Studio 2022
Labels: a: tests,engine,platform-windows,team-infra,P2,triaged-infra

In https://github.com/flutter/flutter/issues/85922 (resolved by https://github.com/flutter/flutter/pull/93426) we added support for Visual Studio 2022, however our LUCI/devicelab tests still run Visual Studio 2019.

In order to prevent regressions, we should add support for Visual Studio 2022 to our LUCI and devicelab infra and migrate our tests to run under VS 2022. Ideally, we should also continue to run tests on VS 2019 to prevent any breakages, but this isn't something we do today on other platforms (e.g. with Xcode on macOS).
Repository: godot
Issue: Gizmos and meshes flicker or do not render at all with a quadmesh and world environment (GLES3, Intel Windows driver bug)
Labels: bug,platform:windows,topic:rendering,topic:thirdparty,topic:3d

### Godot version

3.1.stable .. 3.4.2.stable

### System information

Windows 10 GLES3,Intel(R) UHD Graphics 620, driver date: 12/3/2021 driver version: 30.0.101.1191

### Issue description

Gizmos and meshes flicker and disappear in the editor and at runtime.

GLES2 UHD 620 on windows is **OK**
GLES3 Intel(R) Iris(R) Xe Graphics 30.0.100.9864, 30.0.101.1191 **OK**
GLES3 nvidia + linux is **OK**
GLES3 UHD 620 on Pop!_OS 20.10 linux 5.8.0-7642-generic is **OK**

Works fine until the default WorldEnvironment is added.

### Steps to reproduce

Load the minimal reproduction attached.

### Minimal reproduction project
[repro_gizmos_disappear_GLES3.zip](https://github.com/godotengine/godot/files/7810706/repro_gizmos_disappear_GLES3.zip)
Repository: vscode
Issue: Show all options in settings.json hovers
Labels: feature-request,settings-editor

Currently when you hover over a settings id in the JSON settings editor, the hover displays the description, but only shows the description of the current value:

![image](https://user-images.githubusercontent.com/641685/148136634-456a3386-8ebf-407e-9291-79c48c18eb84.png)

This also happens when you hover over a settings value (which imo is good). But it would be great when hovering over the id that it would show all available options to avoid having to make an editor to see them.

/cc @roblourens
Repository: vscode
Issue: Allow ctrl+click/go to definition to work in settings.json split editor
Labels: feature-request,settings-editor

It would be great if you could ctrl+click or run a _Go to Definition_ command on a settings.json setting when using the split editor, which would allow quick jumping to the setting on the left pane to see easily see the descriptions and available options.

/cc @roblourens
Repository: vscode
Issue: Clean up notebook CSS
Labels: debt,notebook-layout

- [ ] Break up [notebook.css](https://github.com/microsoft/vscode/blob/af598630a60f3f0809959dd43fec7483a540746c/src/vs/workbench/contrib/notebook/browser/media/notebook.css) into parts corresponding to CellParts
- [ ] Move [dynamic styles](https://github.com/microsoft/vscode/blob/633c9465ae6ea6202f3a57594a83c4d6412855cd/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L690) into real css files, with css variables for the layout parameters
Repository: vscode
Issue: Support Variable Substitution for Keyboard Binding Command Arguments
Labels: feature-request,keybindings

## Issue Type: <b>Feature Request</b>

I am working on a debugger extension for VSCode that provides a command to run a configurable script in a configurable host. Users would very much benefit from the ability to specify the same [variables](https://code.visualstudio.com/docs/editor/variables-reference) that they can in `launch.json` in the [Command Arguments](https://code.visualstudio.com/docs/getstarted/keybindings#_command-arguments) for a given keyboard binding that triggers the "Run Target Script" command.

An example might look like:

```json
{
    "key": "cmd+alt+j",
    "command": "extension.extendscript-debug.evalInHost",
    "args": {
        "hostAppSpecifier": "premierepro-22",
        "engineName": "NewWorld",
        "filePath": "${file}",    // <-- Variable Substitution!
        "debugLevel": 0,
    },
}
```

### System Information

**VS Code version:** Code 1.63.2 (Universal) (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:37:28.172Z)
**OS version:** Darwin arm64 21.2.0
**Restricted Mode:** No
**Remote OS version:** Linux arm64 5.10.76-linuxkit
**Remote OS version:** Linux arm64 5.10.76-linuxkit


<!-- generated by issue reporter -->
Repository: pytorch
Issue: [FSDP] Run parity tests for activation checkpoint and offload
Labels: oncall: distributed,triaged,better-engineering,module: fsdp

### 🚀 The feature, motivation and pitch

FSDP has tests that test parity with DDP to ensure correctness is never impacted: https://github.com/pytorch/pytorch/blob/master/test/distributed/fsdp/test_fsdp_core.py

We have added a couple new features that large model training with FSDP is highly reliant on, such as activation checkpoint and activation offload. We should add tests that use these configs to the parity tests to ensure there are no correctness issues introduced.

### Alternatives

_No response_

### Additional context

_No response_

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: godot
Issue: Viewport property "Handle Input Locally" gets set to false for no apparent reason, including in the editor, when it is a child of ViewportContainer.
Labels: enhancement,topic:core,confirmed,topic:input,topic:gui

"Handle Input Locally" won't stay checked on 3.4.2-stable. The inspector will show the "revert to default" icon, but even if the property is manually written into the file as being explicitly true, it will always appear as false in the editor when you stop looking at the scene and look back. When running a project, checking it it during the ready function of the viewport's container will return false. Attempting to set it to true during the ready function succeeds, and getting it during the same function call returns true, but it gets reverted at some point between that and the first call of the container's process function, where it will return false. Calling the set function deferred from ready will not be reverted, however, nor will setting it at any point after that... Unless there's some trigger that'll cause it that I simply haven't tripped, like changing the viewport container size or something.

I have no idea why this would happen. Malevolent spirits?

Can be reproduced with the same project as in the below issue.

_Originally posted by @SuperSuit12 in https://github.com/godotengine/godot/issues/25525#issuecomment-1005330138_