sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: possible append inside a method escape analysis optimization
Labels: NeedsInvestigation,compiler/runtime

```go
type Builder struct {
	buf []byte
}

func (b *Builder) DoSth() {
	b.buf = append(b.buf, 1)
}

func escapes() {
	b := Builder{make([]byte, 0, 10)}
	b.DoSth()
}
```

`BenchmarkEscapes-4              48139129                37.46 ns/op           16 B/op          1 allocs/op`
```go
func doesNotEscape() {
	b := Builder{make([]byte, 0, 10)}
	b.buf = append(b.buf, 1)
	_ = b
}
```
`BenchmarkDoesNotEscape-4       1000000000               0.3443 ns/op          0 B/op          0 allocs/op`

I think we might just mark the append function implicitly in compiler as noescaping.
Doing so, but explicitly, removes the allocation: 
```go
func (b *Builder) DoSth() {
	b.buf = append2(b.buf, 1)
}

//go:noescape
//go:linkname append2 aa.append2helper
func append2(buf []byte, elems ...byte) []byte

func append2helper(buf []byte, elems ...byte) []byte {
	return append(buf, elems...)
}
```
`BenchmarkNoescapeAppend-4              170689034                7.031 ns/op           0 B/op          0 allocs/op`

I think it is safe to do so. I can't think of any case where the slice passed to append must be forced to be heap allocated.
Repository: vscode
Issue: Git - no-verify option for git push command
Labels: feature-request,git

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
It would be nice to have no-verify option for git push command
Repository: go
Issue: cmd/compile: windows/amd64 invalid binary when allocating array near symbol size limit
Labels: OS-Windows,NeedsInvestigation,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.19 windows/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Argusdusty\AppData\Local\go-build
set GOENV=C:\Users\Argusdusty\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=O:\Code\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=O:\Code
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.19
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=O:\Code\src\foo\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\ARGUSD~1\AppData\Local\Temp\go-build1331241143=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?


<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->
https://go.dev/play/p/x7RM0aBCBYz:
```golang
package main

var A [2000000000]byte

func main() {
	A[0] = 0
}
```

Create this locally as foo.go, Then `go run foo.go`

### What did you expect to see?

Successful execution

### What did you see instead?
<pre>
$ go run foo.go
fork/exec C:\Users\ARGUSD~1\AppData\Local\Temp\go-build1278580373\b001\exe\foo.exe: %1 is not a valid Win32 application.
</pre>

Binary search testing different numbers of bytes shows the code works up to 1995296640 bytes, produces the above error for 1995296641-2000000000, and produces `symbol too large` errors above that.
Repository: deno
Issue: Relax permission for Deno.UnsafePointerView
Labels: permissions,suggestion,FFI

Currently for ffi I can limit `--allow--ffi` to a specific library using `--allow-ffi=lib` but if my code uses `Deno.UnsafePointerView` deno requires using `--allow-ffi` (with no path)

This makes it impossible to limit ffi usage to certain libraries.
Repository: godot
Issue: Calling tile_set.tile_set_texture() on TileMap causes Areas that had entered it to emit body_exited.
Labels: topic:core,topic:physics,topic:2d

### Godot version

Godot Engine v3.5.stable.official.991bb6ac7

### System information

Windows 10

### Issue description

I am using an atlas texture to animate the tilemap, and every time I change the atlas.region.position I need to call tile_set.tile_set_texture(0, atlas) on the tilemap to "redraw" the texture.
When I do that, Areas that had previously entered it appear to act like they exited the TileMap body, even though the collision shapes never stopped intersecting. Collision with bodies and the TileMap, for example standing on the animated TIleMap appears to work correctly.

### Steps to reproduce

Reproduction project has a TileMap with 1 tile with a collision shape, and an Area2D that will print "Entered" and "Exited" when it enters and exits the TileMap. The Area and it's shape are placed on top of a tile from the TileMap. When the project starts the area will print "Entered". Press down_arrow to call  tile_set.tile_set_texture(0, tile_set.tile_get_texture(0)), and the area will print "Exited".

### Minimal reproduction project

[tile_set_texture.zip](https://github.com/godotengine/godot/files/9388082/tile_set_texture.zip)
Repository: godot
Issue: [3.x] Resource with Built-in script doesn't have autocompletion until the editor is restarted.
Labels: bug,topic:gdscript,topic:editor

### Godot version

3.5 rc6

### System information

OpenGL ES 2.0 Renderer: Intel(R) HD Graphics 5500

### Issue description

When you save Resource to the disk and then add a built in script to it, it lacks autocompletion of code until you restart the editor.

### Steps to reproduce

1) Create a resource (in my case it's the base `Resource` type)
2) Save it to the disk.
3) Add built-in script to it.
4) Write a function (in my example)
```gdscript
func test():
	print("test")
```
5) `preload()` it in a different script
6) Notice the lack of auto completion when you try to write code.
7) Restart the editor. The `test()` function now works in autocomplete.

### Minimal reproduction project

_No response_
Repository: godot
Issue: Godot 4.0 Terrain tiles not updating
Labels: bug,topic:editor,topic:2d

### Godot version

4.0.alpha14

### System information

MacOS 12.5, 2.3 GHz Dual-Core Intel Core i5

### Issue description

The terrain tile placement in Godot 4 is often bugged, and will end up with tiles I didn't place, or tiles not updating after placing new ones

https://user-images.githubusercontent.com/32573897/185769867-32bde2b3-d81d-4d19-bd63-c7f122f60c82.mov

.

### Steps to reproduce

1. Create a minimal tileset setup with terrain.
2. Draw an odd shape.
3. About 30% of the time it will be broken.

### Minimal reproduction project

[Archive.zip](https://github.com/godotengine/godot/files/9388184/Archive.zip)
Repository: rust
Issue: "Consider borrowing here" message does not show up when argument is a format call
Labels: A-diagnostics,T-compiler

<!--
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.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ee83cc45a558eccd6b784e17065e71a5

```rust
fn takes_str(_: &str) {}

fn main() {
    takes_str(String::from("e"));
    takes_str(format!("e"));
}
```

The current output is:

```
error[[E0308]](https://doc.rust-lang.org/stable/error-index.html#E0308): mismatched types
 --> src/main.rs:4:15
  |
4 |     takes_str(String::from("e"));
  |     --------- ^^^^^^^^^^^^^^^^^
  |     |         |
  |     |         expected `&str`, found struct `String`
  |     |         help: consider borrowing here: `&String::from("e")`
  |     arguments to this function are incorrect
  |
note: function defined here
 --> src/main.rs:1:4
  |
1 | fn takes_str(_: &str) {}
  |    ^^^^^^^^^ -------

error[[E0308]](https://doc.rust-lang.org/stable/error-index.html#E0308): mismatched types
 --> src/main.rs:5:15
  |
5 |     takes_str(format!("e"));
  |               ^^^^^^^^^^^^ expected `&str`, found struct `String`
  |
  = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
```

Using `String::from` directly tells us we can borrow it with `&`. Using `format!` does not.

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"chenyukang"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: godot
Issue: Vulkan: ReflectionProbe consumes far too much VRAM
Labels: enhancement,topic:rendering,confirmed,documentation,topic:3d,performance

### Godot version

4.0.dev 11abffbf + patches

### System information

Windows 10, Vulkan Nvidia Rtx 2080 Ti

### Issue description

I've been noticing extraordinarily huge VRAM usage when playing a test scene in my game, upwards of 5GB.

This issue is about Reflection Probes having an effect on memory usage. There's a sister issue #64677 about WorldEnvironment radiance size.

The test project I use has reflection size set to 1024. This causes half my VRAM to be consumed. Normally a 1024x1024x6 reflection probe should only take about 25MB or so.

Godot's default reflection size is 256, which is 16 times less VRAM, but even at 256, it is taking way more than it should be (you can still see a spike when toggling on the reflection probe).

Here is a screenshot of task manager
![task manager showing VRAM usage](https://user-images.githubusercontent.com/39946030/185778019-1fe0e51f-2461-482a-a3e3-96cee8366ddf.png)

### Steps to reproduce

1. Open the attached project.
2. Open task manager's GPU Performance tab or a VRAM monitor.
3. Play the scene. Note the VRAM usage.
4. toggle on the ReflectionProbe object.
5. Check the VRAM usage again.

### Minimal reproduction project
[reflectionprobe_vram.zip](https://github.com/godotengine/godot/files/9440590/reflectionprobe_vram.zip)
Repository: pytorch
Issue: [feature request] Add new device type works on CPU
Labels: triaged,enhancement

### 🚀 The feature, motivation and pitch

When we write code on a CPU machine and it runs on a GPU machine, we sometimes forget to transfer tensor GPU to CPU or opposite.
Because we write `device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")` on head of code.
When we test it on a CPU machine, all tensors are put on the CPU and do not tell us whether the tensor will transfer as we expect or not.
So, how about adding a new device type that works on a CPU? (like a fake-gpu)

In my assumption, 

Now(no GPU machine)
```
device = torch.device("cuda:0" if torch.cuda.is_available else "cpu")
a = torch.arange(10).to(device)
a.numpy()  # actually need a.cpu() before numpy()
>>> No Error
```

New Feature(no GPU machine)
```
device = torch.device("cuda:0" if torch.cuda.is_available else "fake-gpu")
a = torch.arange(10).to(device)
a.numpy() # need a.cpu() before numpy()
>>> Error
```


### Alternatives

_No response_

### Additional context

_No response_
Repository: TypeScript
Issue: Add BooleanConstructor as an overload to .filter to allow for easy type predicate filtering
Labels: Suggestion,In Discussion

# lib Update Request

## Configuration Check

My compilation *target* is `ES2015` and my *lib* is `the default`.

## Missing / Incorrect Definition

I would love to add an overload to Array.filter which takes in a common use case of passing a `Boolean` directly to `.filter`. This would offer a simple, intuitive workaround for a common pain point with `.filter`.

This could be achieved via an overload adding `BooleanConstructor`, and a type predicate.

https://www.typescriptlang.org/play?#code/PTAEHUEsBcAtTgU1AewG6IE4BsUEMATAWACgBjFAOwGdpQ9NNQBeUAbQCIBGDgGlACulAogBmkSogIBdANykQoJaAB6AflKkJ0LKLxlkAQUZ4AngB4AKgD5QAb1JLx2HZgAUAB0xTIZPDoAuUAAhFBRsRDxKAGEqWkwBMmgUTABKIIA5KgAxPGxqCxs2OVIAX00SaFMPZCzKXPzC21ZLUEQADx1halAABlAAH1AAcmHB0EoBbGxxoRFxSQJQNQnEDCYgy3kSUgoaOmdXKWMmVgZMADpDrDdQ8MjKVO3FZXUgA

## Sample Code

```ts
const arr = ['1', undefined];

const filteredArr = arr.filter(Boolean);
```

`filteredArr` should be `string[]`, not `(string | undefined)[]`.
Repository: PowerToys
Issue: Window snapping behavior upon startup
Labels: Idea-Enhancement,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

I would like for my 3 or 4 previously opened windows that have been snapped to a specific location be reopened and automatically snapped to their previously known location upon startup or upon "popup" from file explorer when the drive/location is opened again.

### Scenario when this would be used?

Upon startup of PC when the PC was shut down with file explorer windows open, or upon "popup" of file explorer windows from launching a specific drive/location folder in file explorer.

### Supporting information

Currently when a snapped window is closed and the same drive/folder destination is reopened it no longer snaps to the correct corner that it was originally designated to, the only current feature is to snap to the most recent corner/location that has been snapped. Since I have 4 zones it always snaps a folder to the last snapped corner not the one it has been designated to before. Being able to designate a specific file folder/drive location to be assigned to a corner or snap location would be helpful in my application.
Repository: PowerToys
Issue: Ability to store and retrieve and remember the location of multiple browser windows and assign to a specific fancyZone
Labels: Idea-Enhancement,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

We can save the layout of the zones no problem, but it would be great if we can save a browser window with a specific site (URL/URI) loaded, so we could very quickly reload all the windows into their preset locations after a machine is restarted. At present there is nothing that I have found that will work this way. 

### Scenario when this would be used?

Displaying a large number of PowerBI reports embedded in each zone, for presentation purposes the reports need to be live, and interacted with without a keyboard and mouse, so looking to be able to integrate a system where after a reboot the same specific reports and browser window are loaded into the saved spots, either by autoloading after reboot, or single click with stream deck or keyboard shortcut.

### Supporting information

_No response_
Repository: PowerToys
Issue: Better overlapping zone-finding
Labels: Idea-Enhancement,Product-FancyZones,Needs-Triage,Needs-Team-Response

### Description of the new feature / enhancement

(The short version is below in the picture (link), i think it shows very good, what i mean: seperation of trigger and windows-position. At least as a additional third option to the actual two options (grid and canvas) ).

It would be nice, if we could seperate the trigger, which triggers the windows to go somewhere and resize it and the actual position it goes. First you define (=making zones) where the windows should be placed and how big (current state). Then you define (=making **other** zones), where you have to hover your mouse to make the windows go on the specific position you said on first step (or other way around. First define the trigger). So its like to have an area (or edge/corner) which **triggers** the action (making the window go somewhere and resize it) and an area, which says how the windows should be resized and placed..

So then you could say hover your mouse to the upper left corner (10x10pixeltrigger-window for example), but the windows then goes to the middle of the screen). So you can define specific areas (triggers), where you have to hover (areas, corners, edges), to make the window go somewhere, you defined differently.

Because when you use a lot of window-places, which overlap alot, its veeeery difficult to snap them. My idea is like in the program "Windock" from ivanyu (but his sotfware is buggy for me, thats why i use PowerToys). See picture below in the link:

https://img.creativemark.co.uk/uploads/images/366/17366/img3File.png

### Scenario when this would be used?

It would generally improve or maximize the numbers of windows, you can use in a productive way. Now its very limitied, because the triggers are the same as the Windows-zone itselfe. 

### Supporting information

Like i said above the picture explains it quite good:

https://img.creativemark.co.uk/uploads/images/366/17366/img3File.png
Repository: rust
Issue: False "error[E0502]: cannot borrow 'VARIABLE' as mutable because it is also borrowed as immutable"
Labels: A-diagnostics,T-compiler

<!--
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.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

The following code : "https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=8dcba376fd1970e3e5686bbe18326dbd", produce a "error[E0502]: cannot borrow `self.foo` as mutable because it is also borrowed as immutable".

But this code does not : "https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6cedeec41d9e0aceec4d0f4720f49c55".

Why does exporting the same code in a function create an error ? And how can the line 67 `let bars_with_positive_data = self.get_bars_with_positive_data();`  immutably borrow the variable `foo` since it is not even in the function ?

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

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. The output might also be
different depending on the Edition.
-->
Repository: PowerToys
Issue: Explorer Folder View Presets
Labels: Idea-Enhancement,Product-File Explorer,Needs-Triage

### Description of the new feature / enhancement

Folder View Presets

I am a photographer and in folders that contain images I am working on, I like displayed in a certain way.

![image](https://user-images.githubusercontent.com/7085931/185800421-c4619868-b102-44a2-a424-8f8696f93063.png)

But! I don't want to set all folders to display this way by default. It's also a pain in the butt changing each folder that I am working on one by one.

It would be awesome if there was a way to attach a hotkey to a specific folder view format. In my case, grouped by type and detail view. One-click and files displayed how I would like them.

Perhaps there is a hotkey+Mouse click that could trigger things (WIN Key plus triple click)?

### Scenario when this would be used?

I can see folder view presets being super handy across the board

### Supporting information

I searched around but couldn't find anything related to what I was looking to accomplish. That's why I figured the powertoys peeps might be able to craft something up!
Repository: electron
Issue: [Feature Request]: HTMLElement to NativeImage
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

Currently there is no way in HTML to get the underlying pixelData of an HTMLElement (unless one uses canvas).

This is partially by design in order to protect users / stop fingerprinting etc.

Electron offers a partial solution currently via taking a Screenshot of a given webContent.
However there is 2 problems with that:
(1) Would have to manually crop if only subset of page desired
(2) Alpha / opacity data is lost (since it assumes every pixel to have alpha of 1.0

### Proposed Solution

Since the underlying Chromium exposes Rasterizations APIs and Buffers for pixel- / layerData, it would be trivial to open this up as a feature to be used in Electron.

This would have to of course happen from an elevated process (like preRender).

The following use cases could be supported:
- enable rasterization features, such as exporting content to jpg / png / pdf
- caching previews of content without having to re-render everything


### Alternatives Considered

The only alternative is using the "html2canvas" library.

But thie library is not pixelPerfect, has issues with especially more modern APIs (e.g. backdrop-filter, ...)
and is itself very large and slow.



### Additional Information

Since all the logic is already inbuilt into Chromium, it wouldn't take too much effort to bring it in Electron.

Would also be a great unique selling point for Electron, since we can open up features that are otherwise too "risky" for a normal browser to implement, yet are technically already available under the hood.
Repository: go
Issue: proposal: x/crypto/bcrypt: DefaultCost should be increased to 12 
Labels: Proposal,Proposal-Crypto

The bcrypt package uses a DefaultCost of 10 which has not changed since its initial commit 10 years ago.
https://github.com/golang/crypto/blob/bc19a97f63c84bfb02ed9bb14fb0f8f6bec9a964/bcrypt/bcrypt.go#L22-L24

Processing power has increased and the minimum default should be increased to 12 as recommended in [Best practices for password hashing and storage](https://www.ietf.org/archive/id/draft-ietf-kitten-password-storage-07.html#name-bcrypt).

Many code examples on the internet already use a cost of 12. The library defaults should be equally secure. Because the cost factor is exponential this increase is 4x more work.
Repository: deno
Issue: Add benchmarks for memory usage for long running `deno run`
Labels: benchmarks

We don't have benchmarks for this and it would be useful for catching regressions.

It should check memory usage one the first run with an empty deno dir directory and memory usage on second run once the caches are populated.