sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Unbounded arrays cannot be used as rest elements in a tuple type except at the end
Labels: Docs

# Bug Report

### 🔎 Search Terms

A rest element must be last in a tuple type. 

### 🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about rest elements and tuples.

Specifically, I  tried it with 4.1.5 right now. Note that 4.0.5 behaved a bit differently (but still buggy), see below.

Note that the behavior is normal in versions ≤4.0, since that’s when non-final rest elements were allowed in tuples.

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?#code/C4TwDgpgBAysBOBLAdgcwM5QLxQNroRVQBooCk0BdAbgChRIoA5AVwFsAjCeTHZdrvFw1a9cNACqyDgHsWyACYQF2PADoNcChlIa1rTt3SlZMgDYQAhshFA)

### 💻 Code

```ts
type Strings = [string, string];
type Numbers = number[];

type Unbounded = [...Strings, ...Numbers, boolean]; 
```

### 🙁 Actual behavior

The `...Numbers` part generates an error: *TS1256: A rest element must be last in a tuple type.*

This exact code appears in [TypeScript 4.0 release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html), thus presumably should work. (Search for “the resulting type becomes unbounded”.)

Note: I encountered something similar with 4.0.5 earlier. There, the non-final unbounded rest elements worked, but only via a type alias. They *didn’t* work with literal arrays in the tuple definition:

```ts
type Numbers = number[];

type Unbounded1 = [boolean, ...number[]]; // OK
type Unbounded2 = [...Numbers, boolean]; // OK
type Unbounded3 = [...number[], boolean]; // NOK
```

[Playground Link for TS 4.0.5](https://www.typescriptlang.org/play?ts=4.0.5&ssl=5&ssc=49&pln=1&pc=1#code/C4TwDgpgBAcgrgWwEYQE4GcoF4oDtEqoDaAugNwBQFokUAqrkgPZy4AmEbAjNlEc0wA2EAIa4ANFAB0M-MjSlyUAPTKoAeQDS1cNAbNWHNgCZeRGVPjyMkgcLFLVG7TT2MW7TgGYzFuYVJbJiFRXEc1GC0KIA)

### 🙂 Expected behavior

The feature should work as documented. TypeScript should generate unbounded tuples type that work the “obvious” way.
Repository: ant-design
Issue: Autocomplete: handle mouse leave event on list to remove active state
Labels: Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
State: Presently when we hover on an option then mouse leave the list, the last hovered option is still 'active'.


Problem: This can produce unexpected behaviors when, for exemple: typing something, hover some options, finally mouse leave the list and type enter (this input still focused), this will select the last hovered option, what is not expected.


Solution: By handling the mouse leave event on the list, it could deactivate the last hovered option.

### What does the proposed API look like?
May be an optional behavior with a 'canDeactivate' option.


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: next.js
Issue: ISR not working properly with custom server and dynamic routes.
Labels: bug

**What version of Next.js are you using?**

10.0.5

**What version of Node.js are you using?**

14.15.4

**What browser are you using?**

Chrome

**What operating system are you using?**

Windows

**How are you deploying your application?**

next start

**Describe the Bug**

When using a custom server alogside with dynamic routes ISR pages are saved in the wrong path.
I have the following dynamic route : `pages/test_app/[hostname]/[[...path]].js` and if in my custom server i render the page like this `app.render(req, res, '/test_app/randomname/path', query)`  next.js wont save the page in the correct directory.

**Expected Behavior**

I expect pages saved inside `.next/server/randomname/path`

**To Reproduce**

Create a dynamic route :

`pages/test_app/[hostname]/[[...path]].js`

[[...path]].js : 
```

import React from 'react';
import { useRouter } from 'next/router';
export async function getStaticPaths() {
  return { paths: [], fallback: "blocking" };
}

export const getStaticProps = async (context) => {
  return {
    props: {
      path : JSON.stringify(context.params)
    },
    revalidate: 1, // In seconds
  }
}

export default function App({ json,path, ssrData }) {
  const { isFallback,query } = useRouter();
  if (!isFallback) {
    return (
      <>
        <span>{path}</span>
      </>
    )
  } else { // no need sice fallback is blocking
    return <p>loading</p>
  }
}


```
My custom server.js : 
```
const express = require('express')
const next = require('next')
const { parse } = require('url');
const port = parseInt(process.env.PORT, 10) || 3889
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
app.prepare().then(() => {
    const server = express()

    server.all('*', (req, res) => {
        const { hostname } = req;
        const orginalurl = req.originalUrl
        const parsedUrl = parse(req.url, true);
        const { pathname = '/', query } = parsedUrl;
        if (pathname?.startsWith('/_next') || pathname?.startsWith('/assets')) {
            handle(req, res);
            return;
        }
        const path = `/test_app/${hostname}${orginalurl}`
        return app.render(req, res, path, query)
    })

    server.listen(port, (err) => {
        if (err) throw err
        console.log(`> Ready on http://localhost:${port}`)
    })
})
```
Add this to package.json  `"servedev": "node server.js",` and run `npm run servedev`

The correct params are shown in the page (correct hostname) however the page is not saved in the correct path, indeed if you point two domains to the same port the page keep being ovewritten.
Repository: pytorch
Issue: [proposal] Parameter dim for F.linear (and maybe nn.Linear)
Labels: module: nn,triaged,enhancement

So that we can do linear transforms without doing transposes/permutes/movedims back and forth

cc @albanD @mruberry @jbschlosser
Repository: TypeScript
Issue: Can use 'readonly' as type-name but cannot make use of it
Labels: Bug

# Bug Report

* ts 4.1.3
* take the snippet below
* you get unexpected compile errors on the property declaration

```ts
type readonly = 'readonly';
class Fun {
	readonly readonly: readonly = 'readonly';
}
```
Repository: pytorch
Issue: Concatenation of Java tensors (Android for mobile)
Labels: oncall: mobile

## ❓ Questions and Help

### Please note that this issue tracker is not a help form and this issue will be closed.

We have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:

- [Discussion Forum](https://discuss.pytorch.org/)

I have the following Java commands:

import org.pytorch.Tensor;

Tensor var1 = ...(some definition);
Tensor var2 = ...(some definition);
Tensor var3;

I want var3 to be the concatenation tensor of var1 and var2

What is the command for that and where can I find a list of possible commands?
Thank you.
Repository: rust
Issue: repr(C) on MSVC targets does not always match MSVC type layout when ZST are involved
Labels: O-windows,A-FFI,P-medium,T-lang,O-windows-msvc,I-unsound,C-bug,A-repr

*Also see this [summary](https://github.com/rust-lang/rust/issues/81996#issuecomment-805340241) below.*

Consider

```rust
#![allow(dead_code)]

use std::mem;

#[no_mangle]
pub fn sizeof_empty_struct_1() -> usize {
    #[repr(C)]
    struct EmptyS1 {
        f: [i64; 0],
    }

    // Expected: 4
    // Actual: 0
    mem::size_of::<EmptyS1>()
}

#[no_mangle]
pub fn sizeof_empty_struct_2() -> usize {
    #[repr(C, align(8))]
    struct X {
        i: i32,
    }

    #[repr(C)]
    struct EmptyS2 {
        x: [X; 0],
    }

    // Expected: 8
    // Actual: 0
    mem::size_of::<EmptyS2>()
}

#[no_mangle]
pub fn sizeof_enum() -> usize {
    #[repr(C)]
    enum E {
        A = 1111111111111111111
    }

    // Expected: 4
    // Actual: 8
    mem::size_of::<E>()
}

#[no_mangle]
pub fn sizeof_empty_union_1() -> usize {
    #[repr(C)]
    union EmptyU1 {
        f: [i8; 0],
    }

    // Expected: 1
    // Actual: 0
    mem::size_of::<EmptyU1>()
}

#[no_mangle]
pub fn sizeof_empty_union_2() -> usize {
    #[repr(C)]
    union EmptyU2 {
        f: [i64; 0],
    }

    // Expected: 8
    // Actual: 0
    mem::size_of::<EmptyU2>()
}
```

and the corresponding MSVC output: https://godbolt.org/z/csv4qc

The behavior of MSVC is described here as far as it is known to me: https://github.com/mahkoh/repr-c/blob/a04e931b67eed500aea672587492bd7335ea549d/repc/impl/src/builder/msvc.rs#L215-L236
Repository: pytorch
Issue: Trying to initialise CUDA twice in a process with no visible devices hangs the process and terminal permanently
Labels: module: cuda,triaged,module: deadlock

## 🐛 Bug
Calling `torch.cuda.init` twice when there are no visible devices hangs the process and terminal. It can't be escaped from with Ctrl+C.

## To Reproduce
Stick this in a `bug.py` file and run it with `python bug.py`. 

**Warning**: Do this in a fresh terminal so you don't lose anything if you have to kill it

```python
import os 
os.environ['CUDA_VISIBLE_DEVICES'] = ''

import torch

try:
    torch.cuda.init()
except:
    pass

torch.cuda.init()
```

## Expected behavior
Comment out the `os.environ` line and it'll run to completion instantly.

## Environment
```
PyTorch version: 1.7.1+cu110
Is debug build: False
CUDA used to build PyTorch: 11.0
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.19.3

Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: 11.1.105
GPU models and configuration: 
GPU 0: GeForce RTX 2080 Ti
GPU 1: GeForce RTX 2080 Ti

Nvidia driver version: 460.32.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.5
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] geotorch==0.2.0
[pip3] numpy==1.18.5
[pip3] pytorch-memlab==0.0.4
[pip3] torch==1.7.1+cu110
[pip3] torchaudio==0.7.2
[pip3] torchvision==0.8.2+cu110
[conda] geotorch                  0.2.0                    pypi_0    pypi
[conda] mkl                       2020.2                      256  
[conda] mkl-include               2020.2                      256  
[conda] numpy                     1.18.5                   pypi_0    pypi
[conda] pytorch-memlab            0.0.4                    pypi_0    pypi
[conda] torch                     1.7.1+cu110              pypi_0    pypi
[conda] torchaudio                0.7.2                    pypi_0    pypi
[conda] torchvision               0.8.2+cu110              pypi_0    pypi
```

## Additional context
Weird things about my setup: I'm running with `cuda-mps` on a Docker container on top of an Ubuntu 20.04 instance. 

Also tested on PT 1.7.0 10.2.

cc @ngimel
Repository: excalidraw
Issue: Expose reconcilation Algo for collaboration
Labels: discussion,package:excalidraw

We should expose our [reconcile Algo](https://github.com/excalidraw/excalidraw/blob/ecbd5ba55d6af86dcc533dda2242ccb134bac570/src/excalidraw-app/collab/CollabWrapper.tsx#L380) as util. It can help the host to implement their own collaboration.

cc @dwelle
Repository: pytorch
Issue: Pointer passed where number is expected for PYTORCH_CUDA_FUSER_JIT_OPT_LEVEL leading to crash
Labels: oncall: jit

## 🐛 Bug

The CUDA API expects a `void**` for option values for functions like `cuModuleLoadDataEx`. The documentation seems to be unclear, what that should be but according to other sources (see below) that value should be simply the value casted to a `void*`, not a pointer to that value.
Hence the code at https://github.com/pytorch/pytorch/blob/7763c127cd5630ba4123ad89fc5243c28e91aa4a/torch/csrc/jit/codegen/cuda/executor_utils.cpp#L320 is wrong and may lead to failed executions or wrong optimization levels.

I've seen this in one of the PyTorch tests (see below) where I get:
```
======================================================================
ERROR: test_unary_ops (test_jit_cuda_fuser.TestCudaFuser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/install_pt/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py", line 827, in wrapper
    method(*args, **kwargs)
  File "/dev/shm/s3248973-EasyBuild/PyTorch/1.7.1/fosscuda-2020b/pytorch-1.7.1/test/test_jit_cuda_fuser.py", line 369, in test_unary_ops
    self._unary_test_helper(op)
  File "/dev/shm/s3248973-EasyBuild/PyTorch/1.7.1/fosscuda-2020b/pytorch-1.7.1/test/test_jit_cuda_fuser.py", line 328, in _unary_test_helper
    jit_o = t_jit(x, 2.0)
  File "/tmp/install_pt/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py", line 126, in prof_func_call
    return prof_callable(func_call, *args, **kwargs)
  File "/tmp/install_pt/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py", line 123, in prof_callable
    return callable(*args, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter2.
Traceback of TorchScript (most recent call last):
RuntimeError: CUDA driver error: a PTX JIT compilation failed
```

And to verify I added the following code to torch/csrc/jit/codegen/cuda/executor_utils.cpp above the call to `cuModuleLoadDataEx`:
```
  options.push_back(CU_JIT_ERROR_LOG_BUFFER);
  options.push_back(CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES);
  std::string errors(8000, '\0');
  option_vals.push_back((void*) errors.data());
  option_vals.push_back((void*) errors.size());
```

When printing this string on failure I got: 
> ptxas fatal   : 32-bit integer value (3849789140) out of range

This is exactly the pointer to `jit_opt_level` which confirms the above.

PS: It is likely a good idea to include the JIT error buffer in PyTorch and report it on failure.

References:
- https://stackoverflow.com/a/17070844/1930508
- https://github.com/HongjianLi/cuda/blob/dd52fd563558667315de3fecea3559ac6ba2a89a/vectorAdd/vectorAdd.cpp#L74
- https://github.com/MentorEmbedded/nvptx-tools/blob/59e0b755e3ab085a3a348bd001bad4f010fd9c00/nvptx-run.c#L77-L88

## To Reproduce

Steps to reproduce the behavior:

1. `python test_jit_cuda_fuser_legacy.py -k test_unary_ops`

## Environment

 - PyTorch Version (e.g., 1.0): 1.7.1, master


cc @gmagogsfm
Repository: vscode
Issue: Allow code folding in the diff editor
Labels: feature-request,diff-editor

I often find myself wanting to fold code blocks when looking at diffs, and it isn't currently supported.
Repository: PowerToys
Issue: [Run][Plugin Manager] Direct shortcut to execute a single plugin
Labels: Idea-Enhancement,Product-PowerToys Run,Run-Plugin Manager

Link to parent issue #5273.
Repository: PowerToys
Issue: Setting "Move newly created windows to their last known zone" is not obeyed by all apps
Labels: Issue-Bug,Product-FancyZones,Priority-3

Using PowerToys release v0.31.2, some app windows return to their last known zone regardless of whether the PowerToys setting "Move newly created windows to their last known zone" is enabled, presumably because of how they were written. Other apps never return to their last known zone, regardless of this setting.
An example of the latter is PowerToys itself.
Here’s a screenshot of PowerToys manually put into a zone by “Shift-dragging” it:
![1-Window Manually Put into a Zone](https://user-images.githubusercontent.com/65745002/106079185-ba55e980-60e2-11eb-87e4-e403c79e54f9.png)

After PowerToys is closed and reopened it does not return to its last known zone, as shown in this screenshot:
![2-Window Reopened is not in its Zone](https://user-images.githubusercontent.com/65745002/106079204-c5107e80-60e2-11eb-8fd2-867c7ac81153.png)

This is not behavior I expect. After enabling "Move newly created windows to their last known zone", should I expect the PowerToys window to again be positioned as in the first screenshot?

The Zip file created by a Report Bug command has been attached.

  Robert

_Originally posted by @Robert-Tortorelli in https://github.com/microsoft/PowerToys/issues/7854#issuecomment-768742603_
[PowerToysReport_2021-02-11-12-39-22.zip](https://github.com/microsoft/PowerToys/files/5967361/PowerToysReport_2021-02-11-12-39-22.zip)
Repository: flutter
Issue: Verify that non-CORE resources are loaded correctly through the service worker
Labels: framework,platform-web,P2,team-web,triaged-web

https://github.com/flutter/flutter/pull/75535 fixed application and service worker versioning issue. However, reportedly there's still an issue with us loading stale resources when the app is updated. Our tests may not be covering this, so we should revisit this specifically and make sure this is covered by tests.
Repository: godot
Issue: Unexpected behavior when creating a new inherited scene with an AnimatedSprite child node
Labels: discussion,topic:editor

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:** v3.2.3-stable_mono_win64
<!-- Specify commit hash if using non-official build. -->


**OS/device including version:** win10 home (19042.746) 64bit
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->


**Issue description:** When you create a new inherited scene with an AnimatedSprite node, and then make changes on the inherited scene, these changes are propagated back to the parent scene as well, which is not intuitive, counter productive and destroys the purpose of the inheritance feature.  The root of the issue might be, that both parent and child scenes are still referencing to the same SpriteFrames instance.
<!-- What happened, and what was expected. -->


**Steps to reproduce:**
- Create a scene with an AnimatedSprite child node
- Add SpriteFrames to the child
- Create a new inherited scene
- make changes on the frames
Repository: terminal
Issue: Add a Home Page to the Settings UI
Labels: Issue-Feature,Product-Terminal,Area-SettingsUI

# Description of the new feature/enhancement

The Settings UI should have a Home page with release notes and other information on it. A rough design idea is to have a `GridView` with cards of different releases. Clicking on the card would display the release notes for that release.

I'm curious to look at AdaptiveCards and see if they may make any of this easier? Maybe we could hook up this page to a templating service and this would be generated automatically?

**Questions for the community**
- What would you like to see in the home page?

**Analysis**
We should take a look at what VS Code adds in and how they do this.
Repository: flutter
Issue: Feature Request: Support Linux ARM64 Host -> Android target Flutter development
Labels: c: new feature,tool,P3,team-tool,triaged-tool

This is currently blocked because Android Studio currently only supports x64 hosts: https://developer.android.com/studio/?gclid=Cj0KCQiAyJOBBhDCARIsAJG2h5cJrKYAIGwkcWYGm2GJQDQyC9hEcwamG9pSxoyT8PgBpX9dLcbg4ToaAq3oEALw_wcB&gclsrc=aw.ds#downloads
Repository: TypeScript
Issue: Consider allowing packages to define multiple canonical names for their modules
Labels: Suggestion,In Discussion

# Suggestion

This is based on a change in the NodeJS definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/51107. For Node's ESM support, you can import NodeJS core packages (i.e., `fs`, `path`, etc.) using a fully-qualified URN with the `node:` prefix. The approach taken in https://github.com/DefinitelyTyped/DefinitelyTyped/pull/51107 is to re-export a module like `fs` using another ambient module:

```ts
declare module "node:fs" {
  export * from "fs";
}
declare module "fs" {
 ...
}
```

However, this belies the actual behavior of the import. `"node:fs"` is not a *different* module that happens to re-export `"fs"`, it is actually the *same* module, and ideally would be handled in a way similar to how we currently handle symbolic links.  With the above definitions, any module augmentations must always be made against the non-prefixed form of the module. Augmentations of the prefixed-form would be missing when importing the non-prefixed form.

We already have some mechanisms for handling this in your *own* project (i.e., via `"paths"`, etc.), but not when importing from an external package (such as is the case with `"fs"`, `"path"`, etc.).

Should we consider adding a mechanism, be it either via syntax or via configuration (stored in `package.json`)?

### Syntax
We can bikeshed on syntax, but I've presented a few options below:

```ts
// 1) variation of `export as namespace ...`
declare module "fs" {
  export as module "node:fs"; // essentially a symbolic link from `"node:fs"` to `"fs"`
}

// 2) declare a module with multiple names
declare module "fs", "node:fs" {
}
```

### Configuration
If we consider approaching this problem from a configuration standpoint there are a number of directions we could take. I can update this section as we discuss this issue.

## 🔍 Search Terms

NodeJS, ESM, prefix, symlink
Repository: flutter
Issue: Move file.dart and process.dart repos into flutter/packages
Labels: team-ecosystem,P2,c: tech-debt,triaged-ecosystem

These are dependended on heavily in the flutter tool (and goldens) and are primarily maintained by members of the flutter team. To avoid needing to maintain a one-off infra config for these libraries, we should move them into flutter/packages and turn down their old repos.

This will also require us to update the g3 copybara configuration.