sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Tracking issues for unstable library features used by `std`
Labels: T-libs-api,C-tracking-issue,T-libs

`std` uses a lot of unstable library features. While `core` will most likely always have to use *language* features, we can strive for `std` to eventually be free of both unstable language and unstable library features.

Some of these we'll need to stabilize, but some others we might be able to simply remove with some small changes to the code.

(See also https://github.com/rust-lang/rust/issues/94970 for the language features.)

These are the library features we currently use in `std`:

- Not yet stable core features:
  - [ ] duration_constants - https://github.com/rust-lang/rust/issues/57391
  - [ ] exact_size_is_empty - https://github.com/rust-lang/rust/issues/35428
  - [ ] extend_one - https://github.com/rust-lang/rust/issues/72631
  - [ ] maybe_uninit_slice - https://github.com/rust-lang/rust/issues/63569
  - [ ] maybe_uninit_write_slice - https://github.com/rust-lang/rust/issues/79995
  - [x] mixed_integer_ops - https://github.com/rust-lang/rust/issues/87840
  - [x] nonnull_slice_from_raw_parts - https://github.com/rust-lang/rust/issues/71941
  - [ ] portable_simd - https://github.com/rust-lang/rust/issues/86656
  - [ ] ptr_as_uninit - https://github.com/rust-lang/rust/issues/86656
  - [x] raw_os_nonzero - https://github.com/rust-lang/rust/issues/82363
  - [ ] slice_ptr_get - https://github.com/rust-lang/rust/issues/74265
- Not yet stable alloc features:
  - [ ] alloc_layout_extra - https://github.com/rust-lang/rust/issues/55724
  - [ ] allocator_api - https://github.com/rust-lang/rust/issues/32838
  - [ ] get_mut_unchecked - https://github.com/rust-lang/rust/issues/63292
  - [x] new_uninit - https://github.com/rust-lang/rust/issues/63291
  - [ ] toowned_clone_into
  - [ ] try_reserve_kind - https://github.com/rust-lang/rust/issues/48043
  - [ ] vec_into_raw_parts - https://github.com/rust-lang/rust/issues/65816
- core::panic:
  - [x] panic_info_message - https://github.com/rust-lang/rust/issues/66745
  - [ ] panic_internals
  - [ ] panic_can_unwind - https://github.com/rust-lang/rust/issues/92988
- Core's internals: (Should we make some of these public/stable?)
  - [ ] char_internals
  - [ ] core_intrinsics
  - [ ] hashmap_internals
  - [ ] std_internals
  - [ ] str_internals
- The unwind crate:
  - [ ] panic_unwind
- These become unnecessary if we move `trait Error` to core:
  - [ ] array_error_internals
  - [ ] char_error_internals
  - [ ] int_error_internals
  - [x] duration_checked_float - https://github.com/rust-lang/rust/issues/83400
  - [ ] map_try_insert - https://github.com/rust-lang/rust/issues/82766
Repository: pytorch
Issue: Create secure credential storage for metrics credentials and associated documentation on how to regenerate them if needed
Labels: module: ci,triaged

cc @seemethere @malfet @pytorch/pytorch-dev-infra
Repository: rust
Issue: Redundant vtable entries are generated, resulting in unnecessary amounts of LLVM IR being emitted
Labels: A-LLVM,A-codegen,T-compiler,C-bug

Rust appears to generate LLVM IR for vtable entries unnecessarily, such as for types that never get coerced into a trait object. This realisation came as a result of discussion [here](https://github.com/zesterer/chumsky/issues/13).

I've also theorised that it does this for all trait methods outright, although I've yet to confirm that this is the case. It might be that in this latter case, the compiler only generates trait methods for types that it *observes* that implement a given trait, although this still results in *a lot* of redundant LLVM IR being generated, but might be less easy to fix owing to issues with compilation units.

The result of this is that the compilation performance of combinator-like APIs is massively pessimised, with LLVM needing to eat through enormous quantities of redundant IR, only for it to be dropped by the linker.

For example, the following code, when compiled with `cargo rustc -- --emit=llvm-ir`, results in Rust generating vtable entries of `Foo` for both `u8` and `u16`, despite the fact that only `u8` is ever actually coerced into a trait object.

```rust
trait Foo {
    fn x(&self);
}
impl Foo for u8 {
    fn x(&self) {
        unsafe { use_foo("xu8"); }
    }
}
impl Foo for u16 {
    fn x(&self) {
        unsafe { use_foo("xu16"); }
    }
}

fn main() {
    let foo: &dyn Foo = &123_u8;
    foo.x();
    123_u8.x();
    123_u16.x();
}
```

Initially, I thought that Rust might have been conservatively generating vtable entries on the assumption that other compilation units might be making use of those vtable entries, but in hindsight this doesn't make sense because each compilation unit gets a copy of any vtable entries that it requires *anyway* and so there should be no reason for the compiler to need to generate vtable entries for types that it does not observe being coerced into a trait object.

### Meta

This appears to occur for all compiler versions, including the latest nightly.

### I don't know what I'm doing

I've not done serious work on the Rust compiler myself, so it might be that I'm missing some essential piece of the puzzle. Apologies if I've made errors in my account above.
Repository: PowerToys
Issue: Ability to customize Text Highlight color
Labels: Idea-Enhancement,Product-Tweak UI Design

### Description of the new feature / enhancement

Hello,

I'd like the ability to change the click and drag highlight color from blue to whatever the user would like. 
This would be a great addition under the "mouse" section.

I've wanted to do this to match my linux systems that use matcha-dark-aliz. So my highlight color would be red.

Thanks.

### Scenario when this would be used?

Having the ability to customize your OS easily without having to make regedits.

### Supporting information

I grabbed a screenshot of my laptops manjaro install. My highlight color for buttons and highlighting text is red. So is my click and drag.
![Screenshot_2022-03-15_17-07-59](https://user-images.githubusercontent.com/49052130/158474558-6b2a1abb-ad48-4346-887a-338c5c6be6e0.png)
Repository: rust
Issue: Compile fail with implicit return
Labels: A-borrow-checker,T-compiler,C-bug

<!--
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.
-->

I tried this code:

```rust
use std::sync::{Arc, Mutex, Weak};

fn main() {
    let value = Arc::new(Mutex::new(String::new()));
    let weak = Arc::downgrade(&value);
    let _ = foo(weak);
}

fn foo(weak: Weak<Mutex<String>>) -> usize {
    let upgraded = weak.upgrade().unwrap();
    match upgraded.try_lock() {
        Ok(guard) => guard,
        _ => unreachable!(),
    }
    .len()
}
```

I expected to see this happen: it compiles!

Instead, this happened: 
```
error[E0597]: `upgraded` does not live long enough
  --> src/main.rs:11:11
   |
11 |     match upgraded.try_lock() {
   |           ^^^^^^^^^^^^^^^^^^^
   |           |
   |           borrowed value does not live long enough
   |           a temporary with access to the borrow is created here ...
...
16 | }
   | -
   | |
   | `upgraded` dropped here while still borrowed
   | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Result<MutexGuard<'_, String>, TryLockError<MutexGuard<'_, String>>>`
   |
   = note: the temporary is part of an expression at the end of a block;
           consider forcing this temporary to be dropped sooner, before the block's local variables are dropped
help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
   |
11 ~     let x = match upgraded.try_lock() {
12 |         Ok(guard) => guard,
13 |         _ => unreachable!(),
14 |     }
15 ~     .len(); x
   |

For more information about this error, try `rustc --explain E0597`.
error: could not compile `explret` due to previous err
```

What's weird is changing to an explicit return fixes the problem:

```rust
fn foo(weak: Weak<Mutex<String>>) -> usize {
    let upgraded = weak.upgrade().unwrap();
    return match upgraded.try_lock() {
        Ok(guard) => guard,
        _ => unreachable!(),
    }
    .len();
}
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.59.0 (9d1b2106e 2022-02-23)
binary: rustc
commit-hash: 9d1b2106e23b1abd32fce1f17267604a5102f57a
commit-date: 2022-02-23
host: x86_64-apple-darwin
release: 1.59.0
LLVM version: 13.0.0
```

</p>
</details>
Repository: terminal
Issue: Conhost PowerShell is always slightly offscreen when launched on a SP6 or Surface Go or small VMs
Labels: Product-Conhost,Help Wanted,Issue-Bug,Area-UserInterface,Priority-3

Ported from MSFT-34162568
Repository: next.js
Issue: router.asPath shows homepage as "/index" and excludes query string
Labels: Navigation

### Verify canary release

- [X] I verified that the issue exists in Next.js canary release

### Provide environment information

Standard Vercel env (nextjs auto-detected)

### What browser are you using? (if relevant)

Chrome, Safari, all the same result

### How are you deploying your application? (if relevant)

Vercel on push

### Describe the Bug

Part 1. When using router.asPath on Vercel, it'll return "/index" for the homepage "/" route.
Part 2. Also, when using query strings in the url i.e. "/zzz=1", it'll also return just "/index"

**To observe this behaviour, look at source via "View Page Source" in browser and not "Inspect Element"**

### Expected Behavior

Part 1. When using router.asPath on Vercel, expect it to return "/" instead of "/index"
Part 2. Also, when using query strings in the url i.e. "/zzz=1", it'll also return just "/index" - I'd expect it to show "/zzz=1" - it basically skips the query string which is against what the official router documentation states that query will be included.

**Again, please observe this behaviour via "View Page Source" and not "Inspect Element"**

It is especially important for Open Graph URLs etc.

### To Reproduce

```
import Head from "next/head";
import {useRouter} from 'next/router'

const HTTP_HOST = process.env.NEXT_PUBLIC_HTTP_HOST;

export default Layout;

function Layout({
                    children
                }) {
    const router = useRouter()
    const currentUrl = HTTP_HOST + router.asPath;

    console.log('router.asPath: ' + router.asPath) // this will show as expected
    console.log('router.pathname: ' + router.pathname)

    return (
        <>
            <Head>
                <meta property="og:url" content={currentUrl}/> {/* use View Page Source to see it being incorrect */}
                <meta property="og:asPath" content={router.asPath}/>
            </Head>
            <main>
                <div>
                    {children}
                </div>
            </main>

        </>
    );
}
```
Repository: create-react-app
Issue: Hot reload doesn't work for react-scripts 5
Labels: needs triage,issue: bug report

### Describe the bug

With webpack 5 and the latest react-scripts, on updating a file, hot reload doesn't work and gives an error.
```
jsonp chunk loading:81 Uncaught TypeError: Cannot set properties of undefined (setting './src/components/footer/Footer.tsx')
    at self.webpackHotUpdatexxx (jsonp chunk loading:81:1)
    at src_components_footer_Footer_tsx.38cb2e07728e395b6891.hot-update.js:2:45
```
Related dependencies: 
```
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-intl": "^5.20.10",
"react-loaders": "^3.0.1",
"react-scripts": "^5.0.0",
"react-swipeable-views": "0.14.0",

"react-app-rewired": "^2.1.6",
"react-error-overlay": "6.0.9",
"ts-node": "^9.1.1",
"typescript": "^4.2.4"
```
Node: v14.17.3
NPM: 7.21.1

### Did you try recovering your dependencies?
Yes
Repository: rust
Issue: Statically linking `libc++` requires disabling `static-libstdcpp`
Labels: A-linkage,P-medium,regression-from-stable-to-stable,T-bootstrap,A-contributor-roadblock

In 737ef08ea066cbdc9f4b93373b1a1a108e6691ab, the default value of `static-libstdcpp` was changed from `false` to `true`. When statically linking `libc++` on linux, this has a rather unfortunate cascade of effects:

1. If `static-libstdcpp` is set to true, then `bootstrap/compile.rs` will ask `clang++` where `libstdc++.a` is located.
2. For pure-LLVM toolchains, only `libc++.a` is provided and `clang++` will unhelpfully return "`libstdc++.a`". `compile.rs` stores this in `LLVM_STATIC_STDCPP`.
3. `rustc_llvm`'s build script checks whether `LLVM_STATIC_STDCPP` is set. Seeing that it is, it adds `cargo:rustc-link-search=native=<PARENT_DIR>` to the command line where `<PARENT_DIR>` is the directory containing `LLVM_STATIC_STDCPP`.
4. Because there is no parent directory, this winds up adding `-L native=`, which triggers the error "empty search path given via `-L`" in `rustc_session/src/search_paths.rs`.

To get the behavior that we actually want, we need to fall into the case where `LLVM_STATIC_STDCPP` is not defined, and instead add `-stdlib=libc++` to `cxxflags`. To do so, we have to set `static-libstdcpp = false` in `config.toml`. This is unintuitive behavior as it appears that we're disabling static linking entirely, but in reality we're just statically linking against `libc++` instead of `libstdc++`.
Repository: flutter
Issue: Create better names for the DisplayList transform methods
Labels: engine,c: proposal,P3,team-engine,triaged-engine

The Dispatcher transform methods have an odd set of names that is hard to keep consistent. In general the Dispatcher/Builder names follow a verb() or verbNoun() format. For transforms we have:

- translate
- scale
- rotate
- skew
- transform2DAffine
- transformFullPerspective
- transformReset (to be added in a pending PR)

The last three are odd in that they use transform as either a noun or a verb for a nounVerb or verbAdverb format.

Perhaps better names would be:

- concat2DAffine[Transform]
- concatFullPerspective[Transform]
- resetTransform
Repository: flutter
Issue: [Proposal]Add parameter to display only numbers in CupertinoTimePicker
Labels: c: new feature,framework,f: date/time picker,f: cupertino,c: proposal,team-design,triaged-design

## Use case

By default, `CupertinoTimePicker` displays the number and what it represents like `1 hour 24 min.`. But if we take a closer look at Apple's native Clock app, we can see that the TimePicker displayed there is built only with numbers

![image](https://user-images.githubusercontent.com/47798920/158496351-3c8d656c-cb5e-4d56-a8eb-3edf1156015d.png)

## Proposal

I believe a boolean parameter could be added in order to either display or hide the text.
Repository: pytorch
Issue: Move torchbench workflow to `workflow_dispatch`?
Labels: module: ci,triaged

I'm trying to clean up how many different workflows we run on PRs. The [TorchBench CI](https://github.com/pytorch/pytorch/blob/master/.github/workflows/run_torchbench.yml) runs on every pull request, but is skipped almost all the time.

It seems that we want this workflow to be available but only run on demand. There is a special workflow trigger called [workflow_dispatch](https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/) which implements this behavior—if you want to run torchbench on a specific PR, just manually schedule a workflow for it, either in GitHub UI or the `gh` cli.

@xuzhao9: can I move this workflow to being triggered on workflow_dispatch?

cc @seemethere @malfet @pytorch/pytorch-dev-infra
Repository: pytorch
Issue: RuntimeError: cuDNN error: CUDNN_STATUS_VERSION_MISMATCH for torchvision models
Labels: module: binaries,module: cudnn,triaged,module: vision

### 🐛 Describe the bug

While trying to pre-process the lfw dataset by using [face_recognition](https://github.com/ageitgey/face_recognition) module to crop the faces I got the following error, particularly for torchvision models (`PC version : torch==1.11.0+cu113, torchvision==0.12.0+cu113`).

This error doesn't rise in Googele Collab and everything works fine for `Collab version : torch==1.10.0+cu111, torchvision==0.11.1+cu111, Python 3.7.12`.

Reinstalling CUDA, cuDNN or PyTorch library doesn't solve my problem

**Error** 
```RuntimeError: cuDNN error: CUDNN_STATUS_VERSION_MISMATCH```

**Code**
```python
import face_recognition
import torch
import torchvision
import torch.nn as nn

device = 'cuda'

# model = nn.Sequential(*[nn.Linear(10,1)])
model = torchvision.models.resnet18(pretrained=True)

model.to(device)
x = torch.rand(1,3,224,224).to(device)

print(model(x).shape)
```

This problem seems to be occurring only while using CUDA for torchvision all pre-trained models while the CPU version works. It also works fine for Sequential models in both CUDA and CPU versions.

### Versions

**Library**
```shell
torch==1.11.0+cu113
torchaudio==0.11.0+cu113
torchinfo==1.6.1
torchsummary==1.5.1
torchvision==0.12.0+cu113
face-recognition==1.3.0
face-recognition-models==0.3.0
```

**Environment**
```
Python: 3.9.9
OS: Windows 10
CUDA: cuda_11.3.r11.3/compiler.29745058_0
GCC: 6.3.0
```

cc @ezyang @seemethere @malfet @csarofeen @ptrblck @xwang233 @fmassa @vfdev-5 @pmeier
Repository: TypeScript
Issue: Values typed as `Function` should not be callable
Labels: Suggestion,Awaiting More Feedback

# Bug Report
### 🔎 Search Terms
builtin function interface callable constructor narrow unsound

### 🕗 Version & Regression Information
This goes back at least as far as 3.3.3.
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about anything mentioning functions.

### ⏯ Playground Link
[Playground link with relevant code](https://www.typescriptlang.org/play?target=7&ts=4.6.2#code/C4TwDgpgBA8gdgGxAYQIYIagRg6BeKACgDpTUAnAcwGcAuKVOEASijwD4GmBuAWAChQkWIhQB7ONWDkArgGNgY8mgzZcbKHAgB3IqWIUa9RizacTAodACCTAGIy4CgJYSN8JCsw5oAHxGeElKyCkpeahACAgBmji5ucugIhLFO9LYgDk7ArnCsAN4CUFAA9CVQAALA1AC0EAAekAp15ORKUACyqADWENRQ1BCSkfzFqXKEzHyjpeVVtQ1NwC1t5J09fQNDg0WaOlDjk9O7ZZXVdY0QzRCt7V29-YPDu3JBwAz0HihJERrj08VTvMLksVncNo9tiNiq9JO8sJ9RMg3iFFMofj4-nFjjNTgB1AAWICgzn6wAJpM0YnejCgN1WAH4Xm8oHJ6Fl4nAsU4ccVUEcTnNzosrst6eCHltnjMtLp+VMojL9lgBbihQtLtdbmt7psnjsZiqFfxBVBCcTKeTKXBqVw6dqmTMJsbAeUAEIyd5W-qkx3FWWs1UAXyAA)

### 💻 Code
```ts
type OnlyCallable = (...args: any) => any;
type OnlyConstructorCallable = new (...args: any) => any
type AnyFunction = OnlyCallable | OnlyConstructorCallable

function call(func: AnyFunction) {
  // @ts-expect-error Makes sense
  func();
  // @ts-expect-error Makes sense
  new func();

  // @ts-expect-error Makes sense
  const a: OnlyCallable = func;
  // @ts-expect-error Makes sense
  const b: OnlyConstructorCallable = func;

  // Why is this not an error?
  const c: Function = func;

  a();
  // @ts-expect-error Makes sense
  new a();

  new b();
  // @ts-expect-error Makes sense
  b();

  // Why is this not an error?
  c();
  // But this is?
  new c();
}
```

### 🙁 Actual behavior
`Function` seems to be an unsafer version of `(...args: any) => any`, since it allows assigning `AnyFunction` to it.

### 🙂 Expected behavior
`Function` should behave either like `(...args: any) => any` or `AnyFunction`, or even `OnlyCallable & OnlyConstructorCallable`.

What's worse is that
```ts
function foo(value: unknown) {
  if (typeof value === 'function') {
    // `value` is narrowed to `Function`
    value();
  }

  if (value instanceof Function) {
    // `value` is narrowed to `Function` 
    value();
  }
}

// @ts-expect-error Makes sense
Promise()

// No type error but this will throw at runtime
foo(Promise)
```
Repository: ant-design
Issue: Form support grid layout
Labels: Inactive

### What problem does this feature solve?
simply form layout

### What does the proposed API look like?

https://github.com/ant-design/pro-components/pull/4859


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: opencv
Issue: no COLOR_BGR2YUV_NV12! , how can i convert rgb to yuv_nv12
Labels: question (invalid tracker)

only COLOR_BGR2YUV_YV12
Repository: vscode
Issue: CTRL delete/backspace navigation is different from CTRL arrow navigation
Labels: under-discussion,editor-wordnav

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.65.2
- OS Version: Windows 10 - 21H2 (Build 19044.1586)

When you navigate code from right to left with the help of `CTRL + Left`, some tokens (like punctuation) are skipped, while others aren't.
However, when you do `CTRL + Backspace`, it does not make a difference between punctuation and other tokens.

**Steps to Reproduce:**

**Navigation with `CTRL + Left`**
I end up with both cursors in different places
![ctrl+left](https://user-images.githubusercontent.com/2950505/158559395-be913e39-2c57-4e42-9cd8-eb6335e6f2c0.gif)

**Navigation with `CTRL + Backspace`**
I end up with both cursors in the same column
![ctrl+del](https://user-images.githubusercontent.com/2950505/158559450-2aa29204-aa5c-4dd5-aa1f-3e08c3082084.gif)


Code to test for your reference:
```
  processData_Modes            ProcessData_Mode[]            @ignore
  replayConfig                 ReplayConfig?                  @ignore
```

In any other application (browser textarea, MS teams, notepad) `CTRL + Left` navigation behaves the same as `CTRL + Backspace` when it comes to where the cursor will stop next. In my opinion, the `CTRL + backspace` behavior is correct, `CTRL + Left` is incorrect.
Repository: vscode
Issue: Timeline: support multi select commands
Labels: feature-request,timeline

I would like to enable bulk-operations for the local history entries (e.g. "Delete") and was expecting a multi-select context menu invocation to receive all the selected items, but it seems only the focused one is passed on.

Related/Enabled: https://github.com/microsoft/vscode/issues/117261