sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Function identifiers no longer receive semantic highlighting tokens
Labels: Needs Investigation,Rescheduled

# Bug Report
Function identifiers (including methods) don't appear to be receiving semantic highlighting tokens from the LSP as of TS 4.2.x.

This is important to me because I prefer the terser style of passing callbacks directly by identifier instead of always wrapping them in anonymous lambdas (e.g., `myArray.filter(myPredicate)` instead of `myArray.filter(it => myPredicate(it))`), but with the semantic colorization missing, it's much harder to recognize where this is happening when scanning code.

### 🔎 Search Terms
semantic highlight, highlighting, function, token

### 🕗 Version & Regression Information
- Semantic function tokens worked as expected in 4.1.5
- They appear to be missing in 4.2.4 (VS Code's version at time of writing)

### 💻 Code
**CodeSnap with TS v4.0.7:**
![ts40-func-tokens](https://user-images.githubusercontent.com/13191586/118323394-902c0a00-b4ce-11eb-9e9a-4fbd76b77744.png)

**CodeSnap with TS v.4.2.4:**
![ts42-func-tokens](https://user-images.githubusercontent.com/13191586/118323444-a6d26100-b4ce-11eb-8c23-0fb904ba9009.png)

Textual representation for the sake of screen-readers and whatnot:
```typescript
let result = [...newFiles];

const compareFileName: Comparator<INewFile|IDisplayFile> = (a, b) => a.FileName === b.FileName;
const isDisplayFile = (item: INewFile|IDisplayFile): item is IDisplayFile => !!item.ExternalId;

const currentFiles = this._displayFiles$.value ?? [];
const dupes = intersectionWith(compareFileName, newFiles, currentFiles);

if (!dupes.length) {
	return result;
}

// Find the sets of current files and new uploads that are unique.
const [currentUniques, newUniques] = flow(
	xorWith(compareFileName),
	partition(isDisplayFile),
)(currentFiles, newFiles);
```

### 🙁 Actual behavior
In the newer snap, notice that references to `compareFileName` and `isDisplayFile` are colored as ordinary variables after their declarations. Invoking VS Code's "Inspect Editor Tokens and Scopes" command on those tokens indicates that they're falling back to their TextMate scopes instead of using the semantic information.

### 🙂 Expected behavior
In the older snap, all references to the function names are colored as functions, making it easier to spot which arguments are callbacks when scanning the code. Invoking the "Inspect..." command on these shows that they're marked with the `function` semantic token type, with `readonly` and `local` modifiers.
Repository: rust
Issue: On Windows the maximum size of the main thread's stack should at least match that of new threads
Labels: A-linkage,O-windows,T-compiler,C-feature-request

On Windows an area of virtual memory is reserved for the main thread's stack to grow in to. The size of this area is requested by the application via the binary's header. Currently Rust does not set the size of this reserved area so instead the linker uses a fallback value (often only 1 MiB).

I think Rust should set the maximum stack size to at least match the default size for new threads (if not larger). This can be done via linker flags. E.g. reserving 16 MiB of virtual memory for stack space is done using `/STACK` argument on MSVC:

`/STACK:16777216`

And on Mingw it's `--stack`:

`-Wl,--stack,16777216`

However, if Rust does set the stack size it would need a way to override this value. Perhaps via a `-C` codegen option?
Repository: flutter
Issue: Consider refactoring Link widget
Labels: team,p: url_launcher,package,team-ecosystem,P3,triaged-ecosystem

Right now the Link header is a bit weird in that it tries to act as both framework code (talking to the engine via channels) and engine code (talking to the framework via channels). We really should have it pick a side and be consistent in how it handles all kinds of links on all platforms.

cc @chunhtai who had opinions here
Repository: rust
Issue: Invalid trait bounds and equality constraints should suggest appropriate code
Labels: A-diagnostics,A-trait-system,T-compiler,A-suggestion-diagnostics,F-associated_type_bounds,D-newcomer-roadblock

[Given](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=06daad8a89b274a90c78b630231aedfe)

```rust
trait Z {}
trait Bar {
    type A;
}

trait Foo {
    fn foo<T, X: Z>()
    where
        T: Bar<A: Z>,
        T::A = X,
        T: Bar<A = X>, // valid
        T::A: Z, // valid
    {       
    }
}
```

we currently emit:

```
error: equality constraints are not yet supported in `where` clauses
  --> src/lib.rs:10:9
   |
10 |         T::A = X,
   |         ^^^^^^^^ not supported
   |
   = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information

error[E0658]: associated type bounds are unstable
 --> src/lib.rs:9:16
  |
9 |         T: Bar<A: Z>,
  |                ^^^^
  |
  = note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information
```

We should be suggesting the alternative, correct form:

```
error: equality constraints are not yet supported in `where` clauses
  --> src/lib.rs:10:9
   |
10 |         T::A = X,
   |         ^^^^^^^^ not supported
   |
   = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: constrain the associated type directly
  |
9 |         T: Bar<A = X>,
  |                ^^^^^

error[E0658]: associated type bounds are unstable
 --> src/lib.rs:9:16
  |
9 |         T: Bar<A: Z>,
  |                ^^^^
  |
  = note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information
help: introduce a new trait bound to constrain the assocated type
   |
 9 |         T: Bar,
10 |         T::A: Z,
   |
```

Also, when encountering

```rust
trait Foo {
    fn foo<T, X: Z>()
    where
        T::A: X,
    {}
}
```

we emit

```
error[E0404]: expected trait, found type parameter `X`
 --> src/lib.rs:9:15
  |
1 | trait Z {}
  | ------- similarly named trait `Z` defined here
...
9 |         T::A: X,
  |               ^ help: a trait with a similar name exists: `Z`

error[E0220]: associated type `A` not found for `T`
 --> src/lib.rs:9:12
  |
9 |         T::A: X,
  |            ^ associated type `A` not found
```

Where it should instead be

```
error[E0404]: expected trait, found type parameter `X`
 --> src/lib.rs:9:15
  |
7 |     fn foo<T, X: Z>()
  |               ---- `X` constrained to trait `Z` here
8 |     where
9 |         T::A: X,
  |               ^ help: you might have meant to use the trait this type parameter was constrained by: `Z`

error[E0220]: associated type `A` not found for `T`
 --> src/lib.rs:9:12
  |
9 |         T::A: X,
  |            ^ associated type `A` not found
help: trait `Bar` has an associated type `A`, you might have meant to constrain type parameter `T` with `Bar`
   |
9  |        T: Bar,
10 |        T::A: X,
   |
```
Repository: godot
Issue: Godot crashing on launch
Labels: platform:windows,topic:editor,needs testing

**Godot version:**
This was on Godot v3.2.3-stable

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
I'm using Windows 10 on a laptop, specs:

Processor:Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz   2.20 GHz
Installed RAM:8.00 GB
64bit os

**Issue description:**
This issue is one i've had before, and i didn't know how to fix it then either. I've been using Godot for a couple of months perfectly fine, and i've been following along with tutorials and the like. I was in the middle of one of said tutorials when i decided to stop coding after numerous frustrations in code constantly having errors in it and not running right. When I went to close out godot, I accidentally closed out the console instead, closing the whole thing. I didn't think anything of it, until I went to reopen godot later, and found that it wouldn't launch. Everytime I click the button, the console will open up quickly on the screen, before immediately closing. No matter what I do I can't figure out why it won't launch, or what i did to break it.


**Steps to reproduce:**
Close out of the console immediately after saving a scene??? I genuinely don't know how this happened.
Repository: nvm
Issue: Install cmd should pipe to zsh on OSX (not bash)
Labels: shell: zsh,installing nvm: profile detection,pull request wanted

<!-- Thank you for being interested in nvm! Please help us by filling out the following form if you‘re having trouble. If you have a feature request, or some other question, please feel free to clear out the form. Thanks! -->

#### Operating system and version:
OSX Catalina

#### How did you install `nvm`?
I tried to install following the steps in the README:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

However, it didn't update my .zshrc. I tried to follow the "troubleshooting" section but that also didn't help as even after making sure I had a .zshrc file, it didn't update it. I figured (apparently correctly) that the way to get it to update my zshrc file was to pipe to "zsh" and not "bash". After making that change everything appears to be working. Perhaps add this detail to the readme or update the install cmd.

<details>
<!-- do not delete the following blank line -->

```sh

```
</details>
Repository: flutter
Issue: Feature Request: Implement InlineSpan for TextFields
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design

I'm using a TextSpan where I alternate between static text and user input (think of the game madlibs). The issue is that the TextField, when wrapped in a WidgetSpan, is treated as a single block, whereas a TextSpan, can be line broken on spaces.

So I may have text that ends up like the following (a '-' represents static text and a '+' represents text from a textfield). and the '|' represents the contraints of the textspan:
```
---    ---  --- |
-- --  ---      | 
++ ++ + ++ + ---|
--  ---  ----   |
```
As you can see, some of the +'s would clearly fit on the previous line, but since  a widgetspan is treated as one line it can't. I'd be  happy to accomplish the same goal in some other mechanisms than TextSpan by the way.

I've thought about using a single textfield, and a custom inputformatter to prevent edits within the static portions, but it means that the cursor can go over the static text which i want to avoid.

Any thoughts on how to accomplish this, or can we add a feature to line break TextFields?
Repository: go
Issue: net/http: pool GZIP readers to amortise initialisation costs 
Labels: Performance,NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.16.3
</pre>

### Does this issue reproduce with the latest release?
Yes

### What did you do?
Ran a HTTP server that returns a mix of small and large responses.

### What did you expect to see?
Less of a memory spike when returning results


### What did you see instead?
The GZIP Reader and Writer taking up ~50% of the total allocations for my server. 

I propose we use a `sync.Pool` (or similar) to pool the GZIP readers and writers in the underlying HTTP client and server. This should be able to reduce GC churn and make memory allocations for clients and servers more in line with the size of the body associated with the request. 

Alternatively, we could do this at the `flate` layer and bring the reduction of GC churn to anything that uses Huffman Encoding. 

Happy to submit a PR for this. It's burnt me enough to justify just fixing it once upstream rather than re-fixing it in every HTTP service I review or write.
Repository: flutter
Issue: Register platform-specific decoders from from their respective platform embedders
Labels: platform-android,platform-ios,engine,platform-mac,platform-windows,e: embedder,P2,team-engine,triaged-engine

Some platform-specific decoders are installed when the image generator registry is initialized (see https://github.com/flutter/engine/pull/25987), but they should be installed though the embedder API when possible.
Repository: pytorch
Issue: Add the features like Keras
Labels: feature,module: convolution,triaged

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

1. The following layers are from Keras but PyTorch does NOT have these layers yet.

```
Conv2D(..., padding='same')
Conv2DTranspose(..., padding='same')
DepthwiseConv2D(..., padding='same')
SeparableConv2D(..., padding='same')

```

2.  Why does a PyTorch layer require an input channel surely?
    Keras does not require this and determines this value from a previous layer.
    Is it impossible in PyTorch?     

## Motivation

I think that PyTorch has many strong points in customizing the network training workflow.
So far, Tensorflow backend Keras has been used widely but many developers have several troubles in implementing several custom losses and so on.
So I am going to use PyTorch from now but I have some troubles in implementing Keras layers like Conv2D, Conv2DTranspose with 'same' padding in PyTorch too.
Also when composing a network in PyTorch, it is hard to enumerate an input channel value in each layer.
This results in many difficulties in implementing a DNN in PyTorch.
Repository: godot
Issue: Mesh Array changes in Inherited scene does not save
Labels: documentation,topic:import,topic:3d

**Godot version:**
3.3-stable


**OS/device including version:**
Windows 10


**Issue description:**
Any change to the mesh array from a mesh instance in a scene that inherits from a model file (glTF, Collada, etc.) is discarded. Changes are expected to be kept. An example would be generating a second UV map in the editor. Also going into the mesh array and changing lightmap size hint does not save. Adding nodes works as expected, so adding collision from mesh still works. This problem can be solved by making the mesh array unique. The documentation seems to suggest that this is incorrect: [Baked Lightmaps](https://docs.godotengine.org/en/stable/tutorials/3d/baked_lightmaps.html)


**Steps to reproduce:**
Create a model in a external 3D modeling program without a second UV map. Import the model into godot. Open the newly imported scene and select 'New Inherited'. Select any mesh instance. In the 'Mesh' tab next to 'View', select 'Unwrap UV2 for Lightmap/AO'. Close all instances of the scene and then reopen. Click on the same mesh as before and again click 'Mesh'. Click 'View UV2'. An alert pop up with the message 'Model has no UV in this layer' will appear.


**Minimal reproduction project:**
[MeshBug.zip](https://github.com/godotengine/godot/files/6482419/MeshBug.zip)
Repository: scrcpy
Issue: Resize keeping the right scale
Labels: feature request

 - [x] I have checked that a similar [feature request](https://github.com/Genymobile/scrcpy/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) does not already exist.

**Is your feature request related to a problem? Please describe.**
When a window resize is performed, it always creates black bars.

**Describe the solution you'd like**
It would be great if resizing is always keeping the original scale

**Describe alternatives you've considered**
Instead of double clicking the black bars or using the shortcut
Repository: transformers
Issue: Import `SPIECE_UNDERLINE` from `file_utils` instead of WET definition
Labels: WIP

Many places define `SPIECE_UNDERLINE` in the code like this: `SPIECE_UNDERLINE = "▁"`

Instead it should me imported: `from transformers.file_utils import SPIECE_UNDERLINE`.

I can provide a PR...
Repository: rust
Issue: Does not warn `unused_imports` for unused modules imports with the same name as a type
Labels: A-lints,A-resolve,T-compiler,C-bug,L-unused_imports

I tried this code:

```rust
use std::str;

fn main() {
    let _: &str = "";
}
```

I expected to see this happen: Warn `unused_imports` for `std::str`.

Instead, this happened: Nothing.

### Meta

`rustc --version --verbose`:

```
binary: rustc
commit-hash: 9bc8c42bb2f19e745a63f3445f1ac248fb015e53
commit-date: 2021-05-09
host: x86_64-pc-windows-msvc
release: 1.52.1
LLVM version: 12.0.0
```
Repository: vscode
Issue: Git panel incorrectly shows case-sensitive renames on case-insensitive FS
Labels: bug,scm

Issue Type: <b>Bug</b>

When a file is renamed to a name that only differs by case, the Git pane incorrectly labels both the old and new names as `D` for delete.

# Reproducing

1. Create a new repo and commit a file named `makefile`.

    ```sh
    $ git init
    $ echo '# Hello' > makefile
    $ git add makefile
    $ git commit -m 'Add makefile'
    [main (root-commit) 5c624f8] Add makefile
    1 file changed, 1 insertion(+)
    create mode 100644 makefile
    ```

2. Rename `makefile` to `Makefile` using `git mv`, without changing the file contents. Both Git and VS Code correctly detect the rename.

   (Note: Make sure to use `git mv`. If `mv` was used instead, neither Git nor VS Code detect the move)

    ```sh
    $ git mv makefile Makefile
    $ git status
    On branch main
    Changes to be committed:
      (use "git restore --staged <file>..." to unstage)
            renamed:    makefile -> Makefile
    ```

    <img width="176" alt="Screen Shot 2021-05-14 at 23 51 00" src="https://user-images.githubusercontent.com/8071784/118351237-10c32880-b518-11eb-9e0e-2ff7a33ea4c9.png">

3. Modify the contents of `Makefile`. VS Code incorrectly shows `Makefile D`/`makefile D`, when it should show `Makefile A`/`makefile D`.

    ```sh
    $ echo '# World' > Makefile
    $ git add Makefile
    $ git status
    On branch main
    Changes to be committed:
      (use "git restore --staged <file>..." to unstage)
            new file:   Makefile
            deleted:    makefile
    ```

    <img width="176" alt="Screen Shot 2021-05-14 at 23 51 57" src="https://user-images.githubusercontent.com/8071784/118351242-19b3fa00-b518-11eb-84ab-c84d361c248a.png">

I am using a case-insensitive APFS file system, so my hunch is that VS Code looks up the status indicator case-insensitively for the filename, when it should be case-sensitive.

VS Code version: Code 1.56.2 (054a9295330880ed74ceaedda236253b4f39a335, 2021-05-12T17:44:30.902Z)
OS version: Darwin x64 18.7.0
Repository: youtube-dl
Issue: Write categories/tags to filename
Labels: request,yt-dlp

## Checklist

- [x ] I'm reporting a site feature request
- [x ] I've verified that I'm running youtube-dl version **2021.04.26**
- [x ] I've searched the bugtracker for similar site feature requests including closed ones


## Description

Is it possible to make youtube-dl add a video's categories/tags to filename? With an argument like `category` or `tag`

For example a syntax like this for this video (NSFW obviously) [Example video](https://www.pornhub.com/view_video.php?viewkey=ph5fc3d626b12d2)

`%(uploader)s - %(title)s - %(category)s.%(ext)s`

Would result in a filename like this

`paXionfruit - Red Lipstick Close Up BlowJob. - PaxionFruit - Amateur, Big Dick, Blowjob, Brunette, Cumshot, HD Porn, Teen (18+), Verified Amateurs, Verified Couples.mp4`
Repository: go
Issue: x/tools/gopls: move jsonrpc2_v2 out of internal
Labels: gopls,Tools

This is probably better classed as a Feature Request, than issue.

The gopls is designed purely for the Go language.  But it would we great if other languages could use the same library to create LSP Servers for more than just Go. For example:

* https://github.com/Kirides/DaedalusLanguageServer

* https://github.com/hashicorp/terraform-ls

* https://github.com/go-language-server/protocol

Both of these had to create the LSP (or vendor it).

Are there any plans to release the LSP and JSON RPC packages so they can consumed as a library instead of having to vendor it?

I've had a look at the jsonrpc_v2 work and it looks really good!

### What version of Go are you using (`go version`)?
N/A

### Does this issue reproduce with the latest release?
N/A

### What operating system and processor architecture are you using (`go env`)?
N/A

### What did you do?
N/A

### What did you expect to see?
N/A

### What did you see instead?
N/A
Repository: rust
Issue: Array repeat expressions with nested blocks do not recognize constants
Labels: A-array

I tried the following code:
```rust
pub fn make_vecs() -> [Vec<i32>; 5] {
    [{
        const C: Vec<i32> = Vec::new();
        C
    }; 5]
}
```
I thought this would be accepted, since `C` is a constant.
But it does get rejected, probably because of the surrounding curly braces.

This code may look unnatural, but it is the kind of code that arises from a macro-based implementation of anonymous/inline constants.
Cc @oli-obk
Repository: pytorch
Issue: need  sampled softmax loss  function to train model to get user vector and item vector with a large dictionary
Labels: feature,module: loss,triaged

## 🚀 Feature
refer to https://www.tensorflow.org/api_docs/python/tf/nn/sampled_softmax_loss


## Motivation
 I want to use the trained model result for model recall. The existing torch.nn.AdaptiveLogSoftmaxWithLoss does not return the nearest neighbor topN result. And pytorch lacks the sampled softmax loss function (refer to https://www.tensorflow.org/api_docs/python/tf/nn/sampled_softmax_loss), which is very inconvenient for us to recall based on the model vector results（user vector and item vector）. The sampled_softmax_loss function is the my largest motivation to use tensorflow, especially eager for pytorch to add this function
Repository: pytorch
Issue: Broadcasting multiple tensors to all procs in distributed training
Labels: oncall: distributed,triaged

If I got a tensor `a = tensor(100)` then `torch.distributed.broadcast(a, src=0)` works very fine, but I got an issue while broadcasting a list/tuple of tensors, for example `a_list = [tensor(100), tensor(100)]` and I want to broadcast It but I can't. Is there any way/hack to do that?
I tried to loop through and broadcast the list tensor by tensor, It broadcasts the first tensor successfully then fails.
I always get these errors 
```
.......
.......
if async_op:
        return work
else:
        work.wait()
        RuntimeError: [/pytorch/third_party/gloo/gloo/transport/tcp/unbound_buffer.cc:84] Timed out waiting 60000ms for recv operation to complete
```

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23