sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: inline functions with only an error wrapper
Labels: Performance,NeedsInvestigation,compiler/runtime

In a number of cases, an input argument only escapes through the error value. Examples of this:
* [`net.UDPConn.WriteToUDP`](https://pkg.go.dev/net#UDPConn.WriteToUDP), the `addr` input only escapes when constructing an error
* [`strconv.ParseXXX`](https://pkg.go.dev/strconv#ParseFloat), the input string `s` only escapes when constructing an error

In order to avoid escaping the input, one possibility is to [copy the input before placing it in an error](https://go-review.googlesource.com/c/go/+/345488). This has the unfortunate downside of always allocating in the error case in situations when the input would have already been treated as being escaped.

Another way to work around this is to [take advantage of "function outlining"](https://blog.filippo.io/efficient-go-apis-with-the-inliner/), where the part that causes an input to escape is moved to an inlineable wrapper function so that the compiler can better prove whether to allocate depending on how the function is used by the caller.

Example attempt at function outlining in `strconv`:
```go
func ParseFloat(s string, bitSize int) (float64, error) {
     n, err := parseFloat(s, bitSize)
     if err != nil {
          err = &NumError{"ParseFloat", s, err}
     }
     return n, err
}
func parseFloat(s string, bitSize int) (float64, error)
```

Unfortunately `ParseFloat` is not inlineable since it exceeds the inline budget. However, if it were within budget, then there are situations where we can avoid the `NumError` allocation and treating `s` as escaping. For example:
```go
n, err := strconv.ParseFloat(s, 64)
ok := err == nil
return n, ok
```
In this snippet, the caller doesn't even care about the error value other than the fact that it was non-nil. If `ParseFloat` was inlineable, the compiler can prove that `NumError` does not escape and avoid heap allocating it. In fact, the compiler can (in theory) go a step further and realize that the error wrapping is dead code and eliminate it entirely (all we cared about was whether it was nil).

It would be nice if functions of the following pattern could be inlinable:
```go
func Foo(...in) (...out, error) {
    out..., err := foo(in...) 
    if err != nil {
        err = ... // wrap the error somehow
    }
    return out..., err
}
```

I don't know if this means increasing the inline budget or matching on such code patterns.

\cc @bradfitz @josharian @martisch @FiloSottile
Repository: flutter
Issue: [image_picker]: Add crop and rotate option in the preview screen when using camera.
Labels: c: new feature,p: image_picker,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->
image_picker
## Use case
After capturing a photo, need to crop, rotate or edit the photo.
<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal
It is already previewing captured image and taking confirmation when using camera. If it is possible to add atleast crop and rotate option in that screen, it will be amazing. 
Currently we need to use image_editor, extended_image to do such operations. And definitely adding these editing options in the preview screen will save a lots of time.
<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: flutter
Issue: [Proposal] flutter_image support on the web
Labels: c: new feature,platform-web,a: images,package,c: proposal,P3,p: flutter_image,team-web,triaged-web

When I run my app on the web platform, flutter_image produces the following exception:
```console
======== Exception caught by package:flutter_image =================================================
The following FetchFailure was thrown NetworkImageWithRetry failed to load https://rvtournament.com/images/final/image_1919.jpg:
FetchFailure(
  attemptCount: 1
  httpStatusCode: null
  totalDuration: 0:00:00.031200
  originalException: Unsupported operation: Platform._version
)
```
I'm wondering if web support is planned for flutter_image? And if not, is there a similar alternative package that supports web?
Thank you.
Repository: godot
Issue: sawtooth with C# empty project in profiler with 30 fps setted in the project
Labels: needs testing,topic:dotnet

### Godot version

3.3.3 stable mono, 3.4 beta 4 mono, 3.2 stable mono

### System information

w10 64

### Issue description

This problem happens with the fps = 30 set in the project.
For example, if the fps is 60 or 0, this problem does not happen.
This does not happen in gdscript version.

Simply with an empty project.
There is no fps value that triggers the problem (that is, if you set 30 it happens and if not, it does not), simply with 0 fps it does not happen and with 60 neither, perhaps when it starts to drop below 60 then the problem begins to increase.
With 30 fps you can clearly see the problem or that curve.

with 30 fps:
![Captura3](https://user-images.githubusercontent.com/19652075/132117452-aca35b20-3474-4e14-8913-e52f53027248.PNG)

with 40 fps:
![Captura](https://user-images.githubusercontent.com/19652075/132122051-52d50a12-29d7-42f4-8c27-8e34df361ddd.PNG)

with 60:
![Captura](https://user-images.githubusercontent.com/19652075/132122111-2a3f7fb7-7c19-453c-bea7-d16f3c3c9eb9.PNG)

with GDScript version in 30 fps
![Captura](https://user-images.githubusercontent.com/19652075/132125651-a4d91afb-0620-4306-ba31-823be36a8c71.PNG)


Watch the video.
The profiler draws a looped sawtooth wave in bucle.

https://youtu.be/nBgWus8n7n8


### Steps to reproduce

just make an empty project
set fps to 30
run it and look at the profiler

### Minimal reproduction project

...
Repository: rust
Issue: rustc doesn't seem to understand ~const bounds on associated types
Labels: A-trait-system,A-associated-items,T-compiler,C-bug,A-const-eval,requires-nightly,F-const_trait_impl

I tried this code ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=abc6cfe40a0911b439606a30554ed7a9)]:

```rust
#![feature(const_trait_impl, const_fn_trait_bound)]

pub trait ConstableTrait {
    fn foo(&self) -> u32;
}

pub trait ExTrait {
    type Assoc: ~const ConstableTrait;
}

struct ShouldBeInferred<T: ExTrait> {
    a: T::Assoc
}
impl<T: ExTrait> ShouldBeInferred<T> {
    pub const fn should_infer(&self) -> u32 {
        self.a.foo()
    }
}
```

I expected to see this happen:
`ShouldBeInferred::should_infer` should understand that `T::AssocTrait: ~const ConstableTrait` and `self.a.foo()` is a const-fn.

Instead, this happened: 
The compiler doesn't seem to infer the `T::AssocTrait: ~const ConstableTrait` bound gives an error `self.a.foo()` is *not* callable in a constant context.

I might be misunderstanding the purpose of `~const` bounds on associated types. Please correct me if I am :)

Also great work so far on `const fn`. It's really starting to shine :) 

### Meta
`rustc --version --verbose`:
```
rustc 1.56.0-nightly (b7404c898 2021-09-03)
binary: rustc
commit-hash: b7404c898a1a6933b71c72428a6dce551bcc1be7
commit-date: 2021-09-03
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 13.0.0
```
Repository: terminal
Issue: Windows Terminal Resize - increase size - no longer renders correctly
Labels: Help Wanted,Product-Conpty,Area-Output,Issue-Bug,Priority-2

### Windows Terminal version (or Windows build number)

Version 10.0.19043.1165

### Other Software

Windows Terminal
Version: 1.9.1942.0

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 12 2019 13:19:27)
MS-Windows 32-bit console version
Compiled by mool@tororo
Huge version without GUI.

### Steps to reproduce

1. Open windows terminal
2. Open cmd.exe
3. edit file with vim for example c:\Windows\system32> vim mytest.txt
4. Resize window in VIM to make it bigger in height - drag bottom of window down
5. In Vim close the file being edited, so colon and q then return eg :q
6. Now window is drawn wrong - still shows Vim file that was being edited
7.
7. If I try and clear the screen with the cls cmd command, it clears all the window apart from the extra part that was extended when editing in vim
8. The resize event in VIM has not been passed on to the size variable that is being used to clear the screen - so the clear screen only clears the original size of the screen - before resizing


### Expected Behavior

Entire window should be cleared when using cls command

### Actual Behavior

Only original size of window is cleared when cls the screen
Repository: go
Issue: unicode/utf8: make DecodeRune and DecodeLastRune inlineable
Labels: Performance,NeedsInvestigation

Code like the following is unfortunately very common:
```go
r, n := rune(b[0]), 1
if r >= utf8.RuneSelf {
    r, n = utf8.DecodeRune(b)
}
```
and we have several examples in the standard library itself:
* [fmt/format.go:347](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/fmt/format.go#L347-L348)
* [fmt/print.go:1101](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/fmt/print.go#L1101-L1102)
* [regexp/regexp.go:418](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/regexp/regexp.go#L418-L419)
* [regexp/regexp.go:465](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/regexp/regexp.go#L465-L466)
* [bytes/bytes.go:482](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/bytes/bytes.go#L482-L483)
* [bytes/bytes.go:560](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/bytes/bytes.go#L560-L561)
* [bytes/bytes.go:781](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/bytes/bytes.go#L781-L782)
* [bytes/bytes.go:836](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/bytes/bytes.go#L836-L837)
* [bufio/bufio.go:295](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/bufio/bufio.go#L295-L296)
* [strings/strings.go:741](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/strings/strings.go#L741-L742)
* [strconv/quote.go:43](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/strconv/quote.go#L43-L44)
* [strconv/quote.go:266](https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/strconv/quote.go#L266-L267)


All of these cases ultimate come down to the caller manually performing inlined logic for the ASCII case. We should make it such that `DecodeRune` and `DecodeLastRune` are inlineable for the ASCII case. Unfortunately my attempts to do so exceed the inline budget by ever so much:
```go
// cannot inline DecodeRune: function too complex: cost 87 exceeds budget 80
func DecodeRune(p []byte) (r rune, size int) {
	if len(p) > 0 && p[0] < RuneSelf {
		return rune(p[0]), 1
	}
	return decodeRune(p)
}

// cannot inline DecodeLastRune: function too complex: cost 93 exceeds budget 80
func DecodeLastRune(p []byte) (r rune, size int) {
	if len(p) > 0 && p[len(p)-1] < UTFMax {
		return rune(p[len(p)-1]), 1
	}
	return decodeLastRune(p)
}
```

We should find a way to make these inlinable whether by special casing them, clever tricks to make the cost lower, by increasing the inline budget, etc.

\cc @CAFxX @josharian @mdempsky @martisch
Repository: pytorch
Issue: TensorPipeDistAutogradTest is frequently failing
Labels: high priority,triage review,oncall: distributed,module: tests,triaged,better-engineering

See [test_backward_unused_tensors failing](https://app.circleci.com/pipelines/github/pytorch/pytorch/376014/workflows/a0c538b3-c58f-4caa-b754-3cf224d04927/jobs/15852378), and [test_backward_multiple_output_tensors failing](https://app.circleci.com/pipelines/github/pytorch/pytorch/376133/workflows/3788fec6-81d1-4bf8-ad82-e3981ac215a3/jobs/15856871) and [test_backward_multiple_round_trips failing](https://app.circleci.com/pipelines/github/pytorch/pytorch/376181/workflows/555f06d9-fe3e-4239-a5f5-5c5fa4f1e2de/jobs/15859072). The failures appear related but their case is unknown. 



cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23 @mruberry
Repository: rust
Issue: Confusing error message about missing crate dependency in build.rs script
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:

Cargo.toml:
```
[dev-dependencies]
savon = "0.2"
```

build.rs:
```rust
use std::env;

fn main() {
    let out_dir = env::var("OUT_DIR").unwrap();
    let s = savon::gen::gen_write("./src/wsdl/serversync.wsd.xml", &out_dir).unwrap();
}
```

The current output is:

```
error[E0433]: failed to resolve: use of undeclared crate or module `savon`
 --> build.rs:5:13
  |
5 |     let s = savon::gen::gen_write("./src/wsdl/serversync.wsd.xml", &out_dir).unwrap();
  |             ^^^^^ use of undeclared crate or module `savon`

For more information about this error, try `rustc --explain E0433`.
```

<!-- The following is not always necessary. -->
Ideally the output should look like:

```
error[E0433]: failed to resolve: use of undeclared crate or module `savon`
 --> build.rs:5:13
  |
5 |     let s = savon::gen::gen_write("./src/wsdl/serversync.wsd.xml", &out_dir).unwrap();
  |             ^^^^^ use of undeclared crate or module `savon`

  note: savon is listed in dev-dependencies but it must be listed in build-dependencies to be used from a build script

For more information about this error, try `rustc --explain E0433`.
```

cc @wycats
Repository: PowerToys
Issue: [Feature Request] File Shredder / Secure delete files
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

I would like to see a module that implements an easy to use option to secure delete files from your hard drive so that they cannot be restored using specialized recovery software.

### Scenario when this would be used?

Files with confidental data e.g. from the corporate context need to be deleted securely, so that they cannot not be restored from the hard drive afterwards for security reasons, like e.g. at the end of life of a drive.

### Supporting information

I'm currently using a software called [File Shredder](https://www.fileshredder.org/), which uses different shredding algorithms to completely wipe data from a drive. However, the program is quite old, which you can also see optically, and doesn't get updated anymore, which could in turn create security risks.
An implementation into PowerToys closely anchors the topic to Microsoft and elevates the security level of such an important feature while making it more accessible to more people.
Repository: rust
Issue: Rustdoc search feature request: support a "field" item kind filter
Labels: T-rustdoc,C-feature-request,A-rustdoc-search,A-rustdoc-js

Currently, according to the help menu,

> Prefix searches with a type followed by a colon (e.g., fn:) to restrict the search to a given item kind.
> Accepted kinds are: fn, mod, struct, enum, trait, type, macro, and const.

However, fields are found by the search, it's just not possible to filter to only include them. It would be useful to be able to do so.

rust version: rustc 1.56.0-nightly (d3e2578c3 2021-08-21)
Repository: svelte
Issue: Keyed each  blocks with 'transition' not all blocks trigger transition
Labels: transition/animation

### Describe the bug

not all blocks trigger transition when 'top' changed

### Reproduction

https://svelte.dev/repl/e59383ae17554625abb27be008602cf9?version=3.42.4

### Logs

_No response_

### System Info

```shell
3.42.4
```


### Severity

annoyance
Repository: go
Issue: cmd/compile: add VBIC, VMVN instructions for ARMv8
Labels: NeedsInvestigation,arch-arm64,compiler/runtime

On Go 1.17. A bunch of other SIMD instructions exist, but I don't see VBIC or VMVN.

Also, if there is an Adding New Assembly Instructions for Dummies guide, I'm more than happy to do the legwork.

/cc: @RuinanSun
Repository: terminal
Issue: Ctrl+Shift+W doesn't work if Ctrl key is remapped.
Labels: Area-Input,Issue-Bug,Area-TerminalControl,Product-Terminal,Priority-3

### Windows Terminal version (or Windows build number)

1.9.1942.0

### Other Software

SharpKeys

### Steps to reproduce

1.  Install SharpKeys (or some other similar app) that maps the Caps+Lock key to the Ctrl key
2. open Windows Terminal, and create a tab or a pane.
3. Attempt to close the tab or pane with Ctrl+Shift+W
(using the Caps+Lock key instead of the Ctrl iey)



### Expected Behavior

pane or tab should close

### Actual Behavior

It doesn't close.  But if you use the actual Ctrl key, it will work.

Please note that this is not SharpKeys related.  That product simply helps construct the data that needs to be placed in the registry.  The key mapping is a Windows feature.
Repository: frp
Issue: Allow tcpmux (httpconnect) clients to set local_port
Labels: future

### Describe the feature request

Is it possible to allow `httpconnect` clients to set different `local_port` than `tcpmux_httpconnect_port`? This will open up frp to a lot more use cases, e.g. proxying port 22 to multiple SSH servers on the client side (each with different subdomains). 

### Describe alternatives you've considered

using static tcp port forwarding for each client-side tcp service, which is cumbersome

### Affected area

- [ ] Docs
- [ ] Installation
- [ ] Performance and Scalability
- [ ] Security
- [ ] User Experience
- [ ] Test and Release
- [ ] Developer Infrastructure
- [X] Client Plugin
- [ ] Server Plugin
- [X] Extensions
- [ ] Others
Repository: flutter
Issue: Cupertino Scrollbar null-safety on handleThumbPressStart
Labels: framework,f: cupertino,a: null-safety,P2,team-design,triaged-design

Hi, I found a small null-safety forced check at line 160 of `cupertino/scrollbar.dart`, the problem is that sometime for various motivation or when we use scrollbars with a draggable item into the ListView we got a null exception.
This occurs when the longpress on draggable item is handled and the direction for scrollbar is null:

![image](https://user-images.githubusercontent.com/6574219/132120767-ba089d36-1a06-4f38-bf30-d10205146995.png)

Into this image we see the showed scrollbar, if the user tap on reorder ListView handler when the scrollbar is visible we got this error.

I see other scrollbar (like material)  source code and this control is there.

```
  void handleThumbPressStart(Offset localPosition) {
    super.handleThumbPressStart(localPosition);
    final Axis direction = getScrollbarDirection()!;
    switch (direction) {
      case Axis.vertical:
        _pressStartAxisPosition = localPosition.dy;
        break;
      case Axis.horizontal:
        _pressStartAxisPosition = localPosition.dx;
        break;
    }
  }
```

must became

```
  void handleThumbPressStart(Offset localPosition) {
    super.handleThumbPressStart(localPosition);
    final Axis? direction = getScrollbarDirection();
    if (direction == null) {
      return;
    }
    switch (direction) {
      case Axis.vertical:
        _pressStartAxisPosition = localPosition.dy;
        break;
      case Axis.horizontal:
        _pressStartAxisPosition = localPosition.dx;
        break;
    }
  }
```

Hope to help you.
Repository: pytorch
Issue: Asking for "git submodule update" when building a specific version
Labels: module: build,triaged

Hi
When I want to build a specific version, 1.7.1, I get the following error:
```
wget https://github.com/pytorch/pytorch/archive/refs/tags/v1.7.1.tar.gz
tar zxf v1.7.1.tar.gz
cd pytorch-1.7.1/
git submodule update --init --recursive
python3 setup.py install --user
Building wheel torch-1.7.0a0
-- Building version 1.7.0a0
Could not find /home/mnaderan/cactus/sources/pytorch/pytorch-1.7.1/third_party/gloo/CMakeLists.txt
Did you run 'git submodule update --init --recursive'?
```
How can I fix that?

cc @malfet @seemethere
Repository: godot
Issue: Cannot debug Godot with GDB on WSL
Labels: bug,platform:windows,topic:core,needs testing

### Godot version

master

### System information

Windows 10, Nvidia GTX 750 Ti

### Issue description

I compiled Godot under WSL/WSL2 and been trying to mess around in the engine in VScode with WSL though I'm being currently halted by a GDB terminal error.

Terminal output:
```
&"warning: GDB: Failed to set controlling terminal: Operation not permitted\n"
[1] + Done                       "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-koccktbn.vlf" 1>"/tmp/Microsoft-MIEngine-Out-ususmfus.ggs"
```

Debug console output:
```
ERROR: Unable to start debugging. Unexpected GDB output from command "-exec-run". Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x401b8b
```

This is the launch.json file that I currently have:
```
{
	// Use IntelliSense to learn about possible attributes.
	// Hover to view descriptions of existing attributes.
	// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Launch Editor",
			"type": "cppdbg",
			"request": "launch",
			"program": "${workspaceFolder}/bin/godot.windows.tools.64.exe",
			"args": [],
			"stopAtEntry": false,
			"cwd": "${fileDirname}",
			"environment": [],
			"externalConsole": false,
			"MIMode": "gdb",
			"miDebuggerPath": "/usr/bin/gdb",
			"setupCommands": [
				{
					"description": "Enable pretty-printing for gdb",
					"text": "-enable-pretty-printing",
					"ignoreFailures": true
				}
			],
		}
	]
}
```

Note that when searching up for a fix on this issue, some people say to set the externalConsole variable to true, though this hasn't worked for me at all as it just completely gets stuck trying to launch Godot.

### Steps to reproduce

Compile for Windows with Linux with these instructions:
https://docs.godotengine.org/en/stable/development/compiling/compiling_for_windows.html#cross-compiling-for-windows-from-other-operating-systems

After that, copy the exact ``launch.json`` code from the issue description debug and put that in the ``.vscode`` in the project root.

### Minimal reproduction project

_No response_