sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: container: add generic ordered map
Labels: Proposal

This proposal is just to suggest that an official implementation of an ordered map using the new generics would likely be a widely-appreciated addition to the standard library.

Personally, it took me a while to realize that I was constantly writing some version or another of an ordered map. Now that I've made my own generic version, I've used it several times.

My version is here: https://github.com/goki/kigen/tree/main/ordmap

And here is another example: https://github.com/wk8/go-ordered-map

My version is more "bare metal" and exposes all the impl, so you can add functionality etc as needed, and use standard Go range iteration on the slice or map.  It just saves you the effort of keeping the map and slice coordinated when deleting or inserting.

The other example provides iterator functions instead, and hides the impl.

Obviously, anyone can roll their own as desired, but there might be some benefit to having a standard impl with the incomparable design sensibilities of the Go team.  Again, the only real point here is to suggest that such a thing would likely be widely used and appreciated..

In any case, this is also an opportunity to provide glowing positive feedback for what a pleasure it was to finally use the generics after all those debates etc -- everything was very intuitive, and I have not noticed either of the two evils of generics slowdowns (though I haven't done any benchmarking).  Great job!

ps. did I miss it or is a generic version of Min and Max not yet avail?  That was prominent in the original discussions, but I searched under issues here and didn't find discussion of it.
Repository: rust
Issue: The asm! macro incorrectly zeroes high byte register if both high and low byte registers are used for input, and the low byte input value is zero.
Labels: A-LLVM,O-x86_64,A-inline-assembly,T-compiler,C-bug,O-x86_32

STR:

Compile the following code for 32-bit target (e.g. `i686-unknown-linux-gnu` or `i686-pc-windows-msvc`) in release mode:

```rust
use std::arch::asm;

unsafe fn int_21h(al_mode: u8) -> Result<u16, u16> {
    let mut ax: u16;
    let mut flags: u8;
    asm!(
        "int 0x21",
        "mov {ax:x}, ax",
        "lahf",
        ax = out(reg) ax,
        in("ah") 0x3du8,
        in("al") al_mode,
        in("edx") 0u32,
        lateout("ah") flags,
        lateout("al") _,
    );
    if flags & 0x01 == 0 {
        Ok(ax)
    } else {
        Err(ax)
    }
}

fn main() {
    let x = unsafe { int_21h(0) }.unwrap();
    println!("{}", x);
}
```

```sh
$ cargo build --target i686-unknown-linux-gnu --release
```

Look at the final machine code:

```sh
$ objdump -d target/i686-unknown-linux-gnu/release/test_reg_bytes | grep -B 5 "int "

    514a:	5b                     	pop    %ebx
    514b:	b4 3d                	mov    $0x3d,%ah
    514d:	31 d2                	xor    %edx,%edx
    514f:	31 c0                	xor    %eax,%eax
    5151:	81 c3 62 fd 04 00   	add    $0x4fd62,%ebx
    5157:	cd 21                	int    $0x21
```

AR: As you can see, `eax` is xored after `ah` was set to input `0x3d` value. 

ER: Either the compiler should prevent such high and low byte register usage and refuse to compile such code, either it should not clear `ah` when it is trying to clear `al`.
Repository: three.js
Issue: USDZExporter: Support metalness/roughness factor and Image combination 
Labels: Enhancement

<!-- Ignoring this template may result in your feature request getting deleted -->

**Is your feature request related to a problem? Please describe.**
Currently in usdzExporter , the roughnessMap and metalnessMap is only exported if roughness is 1 and metalness 1. https://github.com/mrdoob/three.js/pull/22201
this was due to the limitation that usdz generated does not have support for both a factor and image .

**A clear and concise description of what the problem is.**
On a metal ring model I exported which had roughness of 0.75 and a dark roughness map , due to the conditions above the image was skipped and the model was exported with just `float inputs:roughness = 0.75`  which made the usdz model very rough and inconsistent with the three js render


**Describe the solution you'd like**
Since there have been some good updates from @sunag and @yuta-hayashi ,I was wondering if we can revisit this topic and implement a alternate solution

[fiddle to Test](https://jsfiddle.net/orion_prime/hxgLjtfn/71/)

![USD](https://user-images.githubusercontent.com/6885294/186715817-6857bd48-8d7d-44fa-8964-280326e1b5a1.png)
Repository: next.js
Issue: Hot reload not working when using an external library with turborepo
Labels: bug

### Verify canary release

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

### Provide environment information

Operating System:         
      Platform: win32         
      Arch: x64               
      Version: Windows 10 Home
    Binaries:                 
      Node: 16.14.0           
      npm: 7.24.0
      Yarn: 1.13.0
      pnpm: N/A
    Relevant packages:
      next: 12.0.8
      react: 17.0.2
      react-dom: 17.0.2

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

Chrome 102.0.5005.63

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

vercel

### Describe the Bug

### Details:

I'm using turborepo with the current folder structure:

apps:
     web (nextjs app with tailwindcss  that uses the plugin I created in UI)
packages:
     UI (shared tailwindcss plugin that has an export function at index.js)

this is my tailwindcss configuration in web app
```
const ui= require('ui');

module.exports = {
    content: [
        "./pages/**/*.{js,ts,jsx,tsx}"
    ],
    theme: {
        extend: {},
    },
    ui: {
        debug: true
    },
    plugins: [
        ui
    ]
}
```

### Problem:
The plugin is working fine and it generates exactly what I need. The issue is when I make a change in the plugin exported function the changes are not reflected in the nextjs app.

### Expected Behavior

Nextjs app should be able to detect changes from external libraries in turborepo, such as in my case changes in the UI function  don't trigger the hot reload

### To Reproduce

1. npx create-turbo@latest
2. create a new tailwind plugin under packages
3. 
with this exported function:

```
const plugin = ({addBase, addComponents , config }) => {
    console.log(config);
    // addComponents({
    //   ".button": {
    //      "-TwBgOpacity": "1",
    //      "padding": "0.5rem",
    //      "-TwTextOpacity": "1",
    //   }
    // })
}

module.exports = require('tailwindcss/plugin')(plugin, {
    theme: {
        extend: {}
    }
})
```

4. set up tailwind in one of the apps
5. import the plugin and inject it
6. launch next app with next dev
7. inject the CSS class .button into the button at pages/index.tsx
8. now uncomment the addComponents from the plugin press save
9. check if button in the browser have now the styles injected
Repository: rust
Issue: Clean up cast categorization
Labels: C-cleanup,T-compiler,A-MIR,A-technical-debt

Currently, our classification of casts is kind of a mess:

- We have `mir::CastKind`, but it has a `Misc` variant and most casts fall in that category (this is what ends up in the MIR).
- We also have `ty::cast::CastKind` that has a seemingly independent classification (no idea where this is used).
- We have a `CastTy` type, but can it really represent all types in a cast? If yes, I'd expect to see `unwrap`s around [here](https://github.com/rust-lang/rust/blob/4dc5d457d86f7414b1a2b4d81bf7428b3ffcbb34/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs#L193).
- In `thir::ExprKind`, we have `Cast` and `Pointer` expressions, the latter also being casts.

I don't know how these all relate, but it looks like some cleanup is dearly necessary here.
Repository: kubernetes
Issue: Should we add `authorization-always-allow-groups` flag as well?
Labels: sig/api-machinery,sig/auth,triage/accepted

Hello, team. I was using apiserver to implement my webhook server, but found these is no flag used to set `always-allow-groups`, but there is a flag to set `authorization-always-allow-paths`: 

https://github.com/kubernetes/apiserver/blob/ac613d389acee636c827a241b1eba448e6b15f3a/pkg/server/options/authorization.go#L157

Should we add `authorization-always-allow-groups` as well? or is there anyway for me to set `AlwaysAllowGroups`?

Thanks and looking forward for your reply.😁
Repository: pytorch
Issue: ValueError during `yaml.dump(dtype)`
Labels: module: serialization,triaged

### 🐛 Describe the bug

```python
import torch
import yaml

yaml.dump(torch.half)
```

```python
Traceback (most recent call last):
  File "/home/carmocca/git/repro.py", line 4, in <module>
    yaml.dump(torch.half)
  File "/home/carmocca/git/py39/lib/python3.9/site-packages/yaml/__init__.py", line 253, in dump
    return dump_all([data], stream, Dumper=Dumper, **kwds)
  File "/home/carmocca/git/py39/lib/python3.9/site-packages/yaml/__init__.py", line 241, in dump_all
    dumper.represent(data)
  File "/home/carmocca/git/py39/lib/python3.9/site-packages/yaml/representer.py", line 27, in represent
    node = self.represent_data(data)
  File "/home/carmocca/git/py39/lib/python3.9/site-packages/yaml/representer.py", line 52, in represent_data
    node = self.yaml_multi_representers[data_type](self, data)
  File "/home/carmocca/git/py39/lib/python3.9/site-packages/yaml/representer.py", line 330, in represent_object
    dictitems = dict(dictitems)
ValueError: dictionary update sequence element #0 has length 1; 2 is required
```

Reported in https://github.com/PyTorchLightning/pytorch-lightning/issues/13158

### Versions

```python
torch==1.11.0+cu113
yaml.__version__==6.0
Python 3.9.7
```

cc @mruberry
Repository: pytorch
Issue: AlBert quantization
Labels: oncall: quantization,triaged

Dynamicly quantized AlBert model shows poor performance
When I quantized fine-tuned albert-base-v2 model, checkpoint size reduced from 43MB to almost 22MB, but F1 score drops to 0.05 whereas on non quantized version it was 0.8.

`
quantized_model = torch.quantization.quantize_dynamic(
    albert_model, { nn.Linear}, dtype=torch.qint8
)
`
I assume that dynamic quantization adds ops to quantize on each layer of encoder part, but because Albert model has shared layers, it quantizes same weights several times (to be precise 12 times). I have tried distillbert and it worked fine.

I fine-tuned on token-classification task, but I believe you can reproduce the issue by comparing quantized and original albert base model outputs.
Thanks in advance!

### Versions

PyTorch version: 1.11.0+cu102
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.3 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.16.3
Libc version: glibc-2.31

Python version: 3.8.10 (default, Mar 15 2022, 12:22:08)  [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.4.0-105-generic-x86_64-with-glibc2.29
Is CUDA available: True
CUDA runtime version: 10.1.243
GPU models and configuration: 
GPU 0: NVIDIA GeForce RTX 3090
GPU 1: NVIDIA GeForce RTX 3090

Nvidia driver version: 470.103.01
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.1.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.22.4
[pip3] pytorch-lightning==1.4.9
[pip3] torch==1.11.0
[pip3] torchmetrics==0.7.2

cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel
Repository: angular
Issue: Router navigate appends second question mark when the provided path has a question mark
Labels: area: router,P5

### Which @angular/* package(s) are the source of the bug?

router

### Is this a regression?

No

### Description

When calling the navigate function on the router with a URL that already contains query parameter **and** when providing additional query parameters via the extras parameter; then the result will be a URL that contains 2 question marks which is not a valid URL.

```
const url = '/test?param1=value1';
this.router.navigate(url, {queryParams: {['param2']: 'value2'}});

// -> The above will result in a navigation to /test?param1=value1?param2=value2
```

Note: setting `queryParamsHandling: 'merge'` in the extras property also results in the same problem. I expected that the existing query parameters from the URL would be merged with those that are passed to the navigate function.

### Please provide a link to a minimal reproduction of the bug

_No response_

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 12.0.3
Node: 16.14.0
Package Manager: npm 8.3.1
OS: darwin arm64

Angular: 12.0.3
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-moment-adapter, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.3
@angular-devkit/build-angular   12.0.5
@angular-devkit/core            12.0.3
@angular-devkit/schematics      12.0.3
@angular/flex-layout            11.0.0-beta.33
@schematics/angular             12.0.3
rxjs                            6.6.7
typescript                      4.2.4
```


### Anything else?

_No response_
Repository: terminal
Issue: Show info message box when terminal is paused
Labels: Issue-Feature,Help Wanted,Area-TerminalControl,Product-Terminal

Would be nice to have some type of info message box that informs that the current terminal tab is paused.

Eg. KDE Konsole has this info box:

![pause_info_box](https://user-images.githubusercontent.com/86900/171637842-e02393ce-efc6-45fd-b0a5-a123d882bf33.png)
Repository: TypeScript
Issue: Strange narrowing when using instanceof on template class with optional field
Labels: Bug,Help Wanted

# Bug Report

TypeScript narrows type wrong when using instanceof for generic class with optional field

### 🔎 Search Terms

typescript instanceof template optional narrowing

### 🕗 Version & Regression Information

It seems the bug present in all versions: old, actual and nightly

### ⏯ Playground Link

https://www.typescriptlang.org/play?target=8&ts=4.8.0-dev.20220602#code/MYGwhgzhAECiA8sB80DeAoaXoFMD8AXHANzoC+66okMAgvAJIo4AeALjgHYAmMCTGbNABmASxwhuRTgFcAtgCMcAJ2gBeaAAZSFKuCjRaARkbN2XXodNpM2MRO5HC0WYpU7K1A7QBM11hw8dNaCduKSRtLySqoaRh7owjKcwGyiAPacIqYAFGBE9K4xSACUNkKiwtB50KKcEGxgKTjpVcZloUJYYAB09hGkQhQVVTV1DU3ALW0+HbZd0L39joPYFBRAA

### 💻 Code

```ts
class E<E> {
    e?: E;
}

class A<I> extends E<I>{
    field: number = 0;
}

class A1<I> extends A<I> {
    field1?: number;
}

class A2<I> extends A<I> {
    field1: number = 1;
}

function f<I>(a: A<number>) {
    if (a instanceof A1) {
        a.field1;
    }
    if (a instanceof A2) {
        a.field1;
    }
}
```

### 🙁 Actual behavior

Property 'field1' does not exists in type A<number> in first if, variable a narrowed to A<number>

### 🙂 Expected behavior

variable a narrowed to A1<number> in first if and property field1 exists
Repository: PowerToys
Issue: Use Mouse Highlighter for touchscreen devices
Labels: Idea-Enhancement,Product-Mouse Utilities

### Description of the new feature / enhancement

Highlight touch points with the default left button color. Or even leave a temporary trace along the finger path on the touchscreen.

### Scenario when this would be used?

Screen sharing via Google Meet or MS Teams on a touchscreen monitor or laptop.

### Supporting information

_No response_
Repository: vscode
Issue: Some shells don't remember history
Labels: bug,windows,terminal-process

<!-- ⚠️⚠️ 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:
- OS Version:

Steps to Reproduce:

1. Open VS code
2. Please see the below images.

![vs1](https://user-images.githubusercontent.com/5206526/171648056-18d407a0-4661-4dc3-af9f-2ec3c6c8de61.png)


When I pressed the top arrow key It shows like so. But no idea from where that CLI is coming. I would like to have `npx cap open android` CLI here.

![vs2](https://user-images.githubusercontent.com/5206526/171648628-8715e879-7b5a-4b09-9a04-da9f5bd75720.png)
Repository: go
Issue: x/build/cmd/coordinator: test “ran over” time limit output doesn't make it easy to tell where
Labels: Builders,NeedsInvestigation

```
#!watchflakes
default <- log ~ `^Test .* ran over .* limit`
```

From https://storage.googleapis.com/go-build-log/a1471cf8/openbsd-amd64-68_eba704c3.log (a TryBot on [CL 400376](https://go.dev/cl/400376)):
```
openbsd-amd64-68 at a1471cf8dea8e0a6025e5ca649cc94871d436211

:: Running /tmp/workdir/go/src/make.bash with args ["/tmp/workdir/go/src/make.bash"] and env ["HOME=/" "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin" "PWD=/" "INRC=1" "_=/bin/sh" "WORKDIR=/tmp/workdir" "GOROOT_BOOTSTRAP=/tmp/workdir/go1.4" "GO_BUILDER_NAME=openbsd-amd64-68" "GOBIN=" "TMPDIR=/tmp/workdir/tmp" "GOCACHE=/tmp/workdir/gocache"] in dir /tmp/workdir/go/src

…

Test "go_test:crypto/internal/subtle" ran over 20m0s limit (20m0.000698974s); saw output:

XXXBANNERXXX:Test execution environment.
# GOARCH: amd64
# CPU: Intel(R) Xeon(R) CPU @ 0.00GHz
# GOOS: openbsd
# OS Version: OpenBSD 6.8 OpenBSD 6.8 (GENERIC.MP) #2: Sat Dec  5 07:17:48 MST 2020     root@syspatch-68-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP  amd64

XXXBANNERXXX:Testing packages.
ok  	crypto/internal/subtle	0.017s
ok  	crypto/md5	0.023s
ok  	crypto/rand	0.054s


Error: tests failed: dist test failed: go_test:crypto/internal/subtle: Test "go_test:crypto/internal/subtle" ran over 20m0s limit (20m0.000698974s); saw output:

XXXBANNERXXX:Test execution environment.
# GOARCH: amd64
# CPU: Intel(R) Xeon(R) CPU @ 0.00GHz
# GOOS: openbsd
# OS Version: OpenBSD 6.8 OpenBSD 6.8 (GENERIC.MP) #2: Sat Dec  5 07:17:48 MST 2020     root@syspatch-68-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP  amd64

XXXBANNERXXX:Testing packages.
ok  	crypto/internal/subtle	0.017s
ok  	crypto/md5	0.023s
ok  	crypto/rand	0.054s
```

There are a few issues with this result:
1. The error message claims that `go_test:crypto/internal/subtle` ran over the time limit, but AFAICT it actually completed in 17ms. I'm not sure how to reconcile that.
2. The output from the test run is duplicated. (But duplicated is better than missing, at least! 😅)
3. The `XXXBANNERXXX` lines have not been stripped as expected.

Of those, I am most concerned with (1), so I'd like to focus this issue on that (but incidentally fixing the others would be nice too).

(attn @golang/release; I think this may be a latent issue uncovered by @dmitshur's recent timeout fix in [CL 407555](https://go.dev/cl/407555).)
Repository: pytorch
Issue: [Better Engineering] Make OpInfo-based test failures easy to reproduce
Labels: module: tests,triaged,better-engineering

Let's update our OpInfo-based tests to better support randomness and reproducibility by using hypothesis (or a hypothesis-like mechanism) and providing a mechanism to acquire the exact sample input being tested when a failure occurs.

This functionality may be inherently limited to acquiring the exact sample input only when using the same hardware (and software) as the failing test.

cc @mruberry
Repository: godot
Issue: [GodotPhysics] Angular/Linear Spring options don't work in Generic6DOFJoint3D 
Labels: bug,topic:physics,topic:3d

### Godot version

v4.0.alpha.calinou [c89d2b8aa]

### System information

Archlinux

### Issue description

The `Angular Spring` and `Linear Spring` options do not work in Generic6DOFJoint3D. I have messed around with the settings and I don't see the joint working in any shape or form.

### Steps to reproduce

- Add Generic6DOFJoint3D
- Disable linear and angular limits
- Enable Linear/Angular springs
- Connect 2 nodes to the joint

### Minimal reproduction project

[spring-joints.tar.gz](https://github.com/godotengine/godot/files/8825242/spring-joints.tar.gz)
`wasd` to control the red ball
Repository: material-ui
Issue: [Select] inputProps type not showing
Labels: component: select,status: expected behavior

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

when i provide `inputProps{{
type: 'test'}}`
there is no `type="test"` in the HTML input element

### Expected behavior 🤔

type prop is visible in the HTML element

### Steps to reproduce 🕹

[Steps:

1.
2.
3.
4.
](https://codesandbox.io/s/multipleselect-demo-material-ui-forked-ju3c8e?file=/demo.tsx:1742-1746)

### Context 🔦

Im trying to change the type of Select through inputProps.

sandbox from the mui site: https://codesandbox.io/s/multipleselect-demo-material-ui-forked-ju3c8e?file=/demo.tsx:1742-1746
Inspect the select and see that `type` is missing.

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>
Repository: go
Issue: proposal: x/time/rate: add tokens apart of time
Labels: Proposal

### What did you do?

I'm trying to add tokens to the bucket apart of the time so this can help to have distributed rate-limiting so that another process can update tokens in the other one if the token is used there.


### What did you expect to see?

There can be a function called `AddToken` that let you add tokens to the bucket apart of the time, but because the scenarios that anyone can have are different (like using `AllowN` and not waiting to fill the tokens again) there should be also a function called `Tokens` to return the current tokens apart of time so based on the current tokens there can be a possibility to decrease the tokens apart of the time.
```golang
// AddTokens will decrease the remaining tokens by n
func (lim *Limiter) AddTokens(n float64) {
	lim.tokens -= n
}

// Tokens will return the current Limiter tokens apart of time
func (lim *Limiter) Tokens() float64 {
	return lim.tokens
}

func (lim *Limiter) AddToken() {
	lim.AddTokens(1)
}
```

> If it makes sense I can propose my change for it. I've tested it locally and I could achieve my goal with it!