sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: encoding/base32: add Encoding.Strict
Labels: Proposal

`base64.Encoding.Strict` was added in #15656, but there was no equivalent method added to `base32.Encoding`.
To be consistent, I propose we add the equivalent functionality but rename it. The name `Strict` is unhelpful since there are multiple dimensions that the encoding could be stricter on.

I propose adding the following methods to both `base32` and `base64`:
```go
// RejectNonZeroPadding creates a new encoding identical to enc except
// that decoding requires trailing padding bits to be zero,
// as described in RFC 4648 section 3.5.
func (enc Encoding) RejectNonZeroPadding(enable bool) *Encoding 
```
and we deprecate the existing `base64.Encoding.Strict` method.
Repository: pytorch
Issue: torch.searchsorted error message and documentation is unclear
Labels: module: docs,triaged,module: sorting and selection

### 🐛 Describe the bug

## Case 1
```python
x = torch.randn(2, 3)
y = torch.randn([])
torch.searchsorted(x, y)
# RuntimeError: torch.searchsorted(): input value can be a scalar only when boundaries tensor dimension is 1, but we got boundaries tensor dim(2)
# and input value's dim(0) numel(1)
```
the args to searchsorted are `searchsorted(sorted_sequence, values)` according to the [documentation](https://pytorch.org/docs/stable/generated/torch.searchsorted.html#torch.searchsorted); "boundaries" and "inputs" is ambiguous and we should be consistent

## Case 2

```python
x = torch.randn(2, 3)
y = torch.randn(1)
torch.searchsorted(x, y)
# RuntimeError: torch.searchsorted(): boundaries tensor should be 1 dimension or the first N-1 dimensions of boundaries tensor and input value te
# nsor must match, but we got boundaries tensor [2, 3] and input value tensor [1]
```

What is N? The documentation is a little unclear on this, but it looks like boundaries and inputs must have the same number of dimensions (or the inputs must have rank 0)

## Problem 3

https://pytorch.org/docs/stable/generated/torch.searchsorted.html#torch.searchsorted

From the docs, it is not clear how the input tensors "broadcast". This logic is captured in the chart with rules, but it would be nice to have some english that says that there are actually 2 cases for torch.searchsorted:
- boundaries is 1D, input is anything
- boundaries is ND, input is ND (with both Ns being the same and we require the shapes to be the same except in the last dimension)

We should enumerate the cases and describe what happens in each.


### Versions

1.12, main

cc @svekars @holly1238
Repository: go
Issue: proposal: encoding/baseXX: add Encoding.RejectLineFeeds
Labels: Proposal

Currently, `base32` and `base64` ignore carriage returns and linefeeds by default.

This behavior goes against RFC 4648, sections 3.3 which state:
> Implementations MUST reject the encoded data if it
> contains characters outside the base alphabet when interpreting base-encoded data,
> unless the specification referring to this document explicitly states otherwise.
> Such specifications may instead state, as MIME does, that
> characters outside the base encoding alphabet should
> simply be ignored when interpreting data ("be liberal in what you accept").
> Note that this means that any adjacent carriage return/line feed (CRLF) characters 
> constitute "non-alphabet characters" and are ignored.

Rejection of "characters outside the base encoding alphabet" (including carriage returns and line feeds) should be the default,
unless specified otherwise by some higher-level specification (e.g., MIME).
The decision to allow `\r` or `\n` should not have been made by the `base32` and `base64` packages,
but rather by the users of it.

Today, `base32` and `base64` already ignore `\r` and `\n` by default and we can't change that,
but we should expose control over this behavior:
```go
// RejectLineFeedscreates a new encoding identical to enc except that
// rejects the presence of carriage returns and line feeds as
// described in RFC 4648, sections 3.1 and 3.3.
func (enc Encoding) RejectLineFeeds() *Encoding
```
Repository: godot
Issue: Overlapping lines and text in AnimationPlayer editor Call Method track
Labels: bug,topic:editor,usability,topic:animation

### Godot version

v4.0.alpha.custom_build [a6258fd79]

### System information

Windows 10

### Issue description

In the AnimationPlayer Call Method track, text can overlap and lines are drawn between keys that have the same function. Text should be clipped if it overlaps another key, and lines should not be drawn between the keys because they overlap the text.

![image](https://user-images.githubusercontent.com/67974470/178797504-e0732fb4-dc7c-4f1e-8477-8b799338c835.png)

In 3.5 the text overlapping issue exists but lines are not drawn between keys.

![image](https://user-images.githubusercontent.com/67974470/178799692-1c722013-49c1-42de-a2e9-5cf42926d621.png)

### Steps to reproduce

* Create a node
* Create an AnimationPlayer
* Open the Animation bottom tab
* Press "Add Track", select "Call Method Track", and select a node
* Insert multiple keys on the track using the same method
* Move the keys close enough that the text is overlapping

### Minimal reproduction project

_No response_
Repository: pytorch
Issue: Add a check to detect mutation of the inputs during backward
Labels: module: autograd,module: molly-guard,triaged,actionable

Modifying the grad_input during the backward pass is unexpected to the user and can produce silently incorrect gradients. However, currently you're allowed to do something like this:
```
import torch

class Func(torch.autograd.Function):
    @staticmethod
    def forward(ctx, x):
        return x

    @staticmethod
    def vjp(ctx, x):
        x += 1
        return x

a = torch.rand(2, 4, requires_grad=True)

out = Func.apply(a)
grad_out = torch.ones_like(out)
grad_a, = torch.autograd.grad(out, (a,), grad_outputs=grad_out)

print(grad_out) 
```

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: go
Issue: x/website: visualization tools in gc-guide have left text cut off with firefox
Labels: NeedsInvestigation

### What is the URL of the page with the issue?

https://tip.golang.org/doc/gc-guide


### What is your user agent?

Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0


### Screenshot

![2022-07-13-115103_1321x1085_scrot](https://user-images.githubusercontent.com/722663/178809830-5dad0a6c-d614-4879-b88c-d72b98bdf234.png)


### What did you do?

Visited and started reading the gc-guide. 

### What did you expect to see?

The full interactive graphs.

### What did you see instead?

The interactive visualization tools didn't fully show the Y axis labels. They were cut off on the left. The screenshot says it best.
Repository: vscode
Issue: [json] Show key value pairs of JSON Array in `Outline` view
Labels: feature-request,json

<!-- ⚠️⚠️ 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. -->
When viewing a JSON object, the `Outline` view only displays an array's index rather than the key value pair.

Instead of seeing: 
[] enum
   0
   1
   2

I want to see the key value pairs of the array contents. This is especially helpful when reviewing JSON Schema derived documents. 

![image](https://user-images.githubusercontent.com/32110157/178817131-4245c40d-29d6-4746-8c1d-23a359233f30.png)
Repository: godot
Issue: LineEdit mouse selection is offset if it uses a DynamicFont whose `extra_spacing_char` is not equal to 0.
Labels: bug,topic:gui

### Godot version

3.4.4.stable

### System information

Windows 10, GTX 1070, GLES3

### Issue description

If a LineEdit uses a DynamicFont whose `extra_spacing_char` is not equal to 0, mouse selection will be at an offset. A greater value will place the caret ahead of the mouse cursor, while a lesser value will position the caret behind it. Selection is less accurate the further you are from the beginning of the LineEdit. See below:


https://user-images.githubusercontent.com/60264149/178820806-1f265dff-5501-414a-8cf9-8539e04f0f02.mp4


I further tested both the RichTextLabel & TextEdit and neither of them have this issue. It's only the LineEdit.

### Steps to reproduce

- Create a LineEdit.
- Give it a DynamicFont and set `extra_spacing_char` to a value like 2 or -1.
- Run the scene and type anything into the LineEdit, preferably something long.
- Click and/or highlight text near the end of the LineEdit. Notice how caret placement relative to the mouse is incorrect.

### Minimal reproduction project

[LineEditMouseSelectionBug.zip](https://github.com/godotengine/godot/files/9105510/LineEditMouseSelectionBug.zip)
Repository: flutter
Issue: [flutter_tools] Consider build configuration dependent .plist files in migrations
Labels: c: new feature,platform-ios,tool,t: xcode,c: proposal,P3,team-ios,triaged-ios

## Use case
While upgrading to Flutter 3.0 i noticed that `CADisableMinimumFrameDurationOnPhone` was automatically added to my Info.plist (as per https://github.com/flutter/flutter/issues/99880 this was automatically migrated). Since i needed to be able to test locally i need to have different .plist files depending on the build configuration (as described here: https://docs.flutter.dev/development/add-to-app/ios/project-setup#local-network-privacy-permissions). It would be really nice if the migrations would also consider other .plist files than the default Info.plist.

## Proposal
I am not sure how doable/feasible this is, but it probably needs to be added/changed in https://github.com/flutter/flutter/blob/3f1f0a81704f30246f56710d79f4cb2470da13ec/packages/flutter_tools/lib/src/xcode_project.dart
and then used inside the migrations.
Repository: flutter
Issue: Missing default context menu buttons on each platform
Labels: a: text input,framework,f: material design,a: fidelity,P2,team-design,triaged-design

By default, Flutter's text selection toolbar shows cut, copy, paste, and select all.  However, on native platforms, other buttons appear by default.

| Platform | Screenshot | Missing | Related Work |
| --- | --- | --- | --- |
| Android | <img width="220" src="https://user-images.githubusercontent.com/389558/178827258-e92e5d3c-a386-4a32-8312-ebaf8e96c6c0.png" /> <img width="220" src="https://user-images.githubusercontent.com/389558/178827259-299e765b-e58c-4233-9bd4-367400058abe.png" /> | Translate, Share, Web Search | Share: https://github.com/flutter/flutter/issues/138728<br>Custom buttons: https://github.com/flutter/flutter/issues/139361 |
| iOS | <img width="420" src="https://user-images.githubusercontent.com/389558/178826990-bf8fcf35-db27-4952-8c48-fc7feab18cef.jpg" /> | Select, Replace, [Translate](https://github.com/flutter/flutter/issues/150392), [unit conversion](https://github.com/flutter/flutter/issues/111672) | Look up: https://github.com/flutter/flutter/pull/130532, https://github.com/flutter/engine/pull/43308. Search web: https://github.com/flutter/engine/pull/43324, https://github.com/flutter/flutter/pull/131898, Share: https://github.com/flutter/engine/pull/44554 |
| Linux | <img width="220" src="https://user-images.githubusercontent.com/389558/178825861-089f1e6b-882b-41a3-881a-0d7dad5d9c06.png" /> | Undo, Redo, Delete, Insert Emoji, Change Case | |
| Mac | <img width="220" alt="Screen Shot 2022-08-08 at 4 00 28 PM" src="https://user-images.githubusercontent.com/389558/183528809-3cac992a-2127-4dff-be17-88e35b7e73f5.png"> | Look Up "asdf", Translate "asdf", Search With Google, Share | |
| Windows | <img width="220" src="https://user-images.githubusercontent.com/389558/178828609-43b571b8-6168-4f43-949c-ebdfa2ae4ad1.png" /> | Undo, Delete, Right to left Reading order, Show Unicode control characters, Insert Unicode control character, Open IME, Reconversion, Search with Bing | |

### Open questions
How about buttons inserted by the system, such as the Anki Card button in my Android screenshot added by the AnkiDroid app? (**edit:** -> https://github.com/flutter/flutter/issues/107603)

### Related
https://github.com/flutter/flutter/issues/82907
Repository: pytorch
Issue: [FSDP] `test_mp_embedding_reduce()` fails with `transformer_auto_wrap_policy()`
Labels: triaged,module: fsdp

`test_mp_embedding_reduce()` fails if we wrap the `TransformerWithSharedParams` with the typical `transformer_auto_wrap_policy()` with `transformer_layer_cls={TransformerEncoderLayer, TransformerDecoderLayer}`.

For now, we only wrap with a single top-level `FullyShardedDataParallel`, but we should investigate whether this failure is due to how the unit test is written or due to a gap in the mixed precision implementation.

cc @zhaojuanmao @mrshenli @rohan-varma @ezyang
Repository: flutter
Issue: Avoid caching DisplayList objects that depend on the surface behind them
Labels: engine,P2,team-engine,triaged-engine

If a DisplayList contains a root level (i.e. not protected by a saveLayer) rendering operation that has a blend mode that depends on the surface/pixels behind it, then that DisplayList should not be cached.

Currently we cache all DisplayList (originally SkPicture, i.e. ui.Picture) objects without any regard to content. This has led to bugs in the past such as https://github.com/flutter/flutter/issues/69615

With a flag like this, we could avoid caching the DisplayList and avoid unintended changes to the way it renders as a result.
Repository: pytorch
Issue: torch.stft does not normalize non-rectangular windows correctly
Labels: triaged,module: complex,module: fft

## Issue description

When normalizing within torch.stft, the function divides by the $\sqrt{framelength}$ or otherwise $\sqrt{nfft}$. This would make sense for a rectangular window, or when the window is `None`. 

When window is not None, or it is not a rectangular window however, it would make sense to normalize with regards to the values within the window, as can be seen in the link below, you normalize with the L2 norm of the window 
https://ccrma.stanford.edu/~jos/sasp/Normalized_STFT_Basis.html

This is especially applicable when using normalizing for audio spectrograms, where the default window is a hann_window. 

I believe that normalization should happen with ```output /= window.pow(2.0).sum().sqrt()``` If window is None like default, then it should fall back to its current normalization. 

## System Info

- PyTorch or Caffe2: PyTorch
- How you installed PyTorch (conda, pip, source): conda
- Build command you used (if compiling from source):
- OS: macOS 12.3.1 (arm64)
- PyTorch version: 1.13.0.dev20220601
- Python version: 3.9.12
- CUDA/cuDNN version: N/A
- GPU models and configuration: N/A
- GCC version (if compiling from source): N/A
- CMake version: N/A
- Versions of any other relevant libraries: N/A


cc @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved @peterbell10
Repository: go
Issue: net/textproto: swallows errors returned by underlying reader
Labels: help wanted,NeedsFix

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.18.3 linux/amd64

</pre>

### Does this issue reproduce with the latest release?

Yes.

### What did you do?

See example: https://go.dev/play/p/Bn8H6p4QUf6

### What did you expect to see?

I expect that bufio package react on underlying reader errors and stop the reading.

### What did you see instead?

I see that bufio skips an error multiple times, and the example code causes OOM error becuase reader is rewinded every time:

here are cases when an error is not tracked:
https://cs.opensource.google/go/go/+/refs/tags/go1.18.4:src/net/textproto/reader.go;l=148;drc=27794c4d4a18c61d8c158d253421d72b5a6a8673
https://cs.opensource.google/go/go/+/refs/tags/go1.18.4:src/net/textproto/reader.go;l=496;drc=27794c4d4a18c61d8c158d253421d72b5a6a8673
https://cs.opensource.google/go/go/+/refs/tags/go1.18.4:src/net/textproto/reader.go;l=566;drc=27794c4d4a18c61d8c158d253421d72b5a6a8673
https://cs.opensource.google/go/go/+/refs/tags/go1.18.4:src/net/textproto/reader.go;l=571;drc=27794c4d4a18c61d8c158d253421d72b5a6a8673

the error, returned by autoRewind is just ignored and set to nil:
https://cs.opensource.google/go/go/+/refs/tags/go1.18.4:src/bufio/bufio.go;l=156;drc=27794c4d4a18c61d8c158d253421d72b5a6a8673
https://cs.opensource.google/go/go/+/refs/tags/go1.18.4:src/bufio/bufio.go;l=124;drc=27794c4d4a18c61d8c158d253421d72b5a6a8673

I know that it's something that I have to expect with autoRewind, but this behavior caused an unpleasant surprise.

see also:
* https://github.com/golang/go/issues/53854
* https://github.com/golang/go/issues/53855
Repository: rust
Issue: Recursive PartialEq implementation not detected
Labels: A-diagnostics,T-compiler

Given the following code:  https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=ed9fb2f62239c9485d43d48e3e0d419b

```rust
struct Foo(u32);

impl std::cmp::PartialEq for Foo {
    fn eq(&self, rhs: &Self) -> bool {
        self == rhs
    }
}
```

The current output is:

```
```
(no warnings)

<!-- The following is not always necessary. -->
Ideally the output should look like:

```
warning: function cannot return without recursing
 --> src/lib.rs:4:5
  |
4 |     fn eq(&self, rhs: &Self) -> bool {
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
5 |         self == rhs
  |         ----------- recursive call site
  |
  = note: `#[warn(unconditional_recursion)]` on by default
  = help: a `loop` may express intention better if this is on purpose
```

Note how we *do* warn about this if you do `self.eq(rhs)`. So I guess it's a matter of treating `==` as `.eq` for the purposes of recursion checking? Not sure.

Happens on nightly/beta/stable.
Repository: flutter
Issue: Flutter should warn you if you use an image with more bpp than needed
Labels: tool,framework,perf: memory,P2,team-framework,triaged-framework

This ends up impacting memory. For example, if you have an image that is greyscale, you don't need 32bpp, but your image may be encoded at 32bpp. This will end up using much more memory than needed.

A safe way to do this would be to look only at asset images and check their pixel values to determine whether you truly need the bpp the image uses.

A even better way would also cover network images at runtime, particularly for customers who can request their backend to encode the image at a particular bpp.

If we had this, we could either report at build time or report at runtime similar to how we have https://api.flutter.dev/flutter/painting/debugInvertOversizedImages.html
Repository: flutter
Issue: [Impeller] Expose ability to create asynchronous rendered images
Labels: engine,c: rendering,P3,team-engine,triaged-engine

Right now when we cache images we create the surface, we render into it, and then we block waiting for a snapshot of it. There is no parallelism in any of that and the overhead of all of that is much greater than the original rendering due to serializing everything and blocking on the eventual output of the GPU.

Skia has SkImage::MakePromiseImage that allows asynchronous creation of the image that is targeted at asynchronous rendering between threads, but the mechanism I'm envisioning would allow asynchronous creation and rendering within one rendering thread which would allow GPU parallelization similar to what is being planned for multiple render passes.

I'm envisioning something along the lines of:

// During raster cache population:
- ID = Create asynchronous GPU texture
- Stage render operations into asynchronous GPU texture ID
// RasterCache is done, but that work may not be completed yet
// The work will be scheduled for execution on the GPU, though

... later ...

// During layer tree painting when we need to render from the raster cache
- Check/block on the finalization of the work scheduled for GPU texture ID
- drawImage(ID)

The GPU work can be done any time between the first part and the second part, but no snapshot need be done or waited for. The ID is expected to survive the frame, though, so this can't be a virtual tiled temp texture, but the idea is that the work is done in parallel for the various cached items and during the initial phase of rendering up until the point that we need to render from the cache for each item.
Repository: flutter
Issue: [flutter_tools] ArgumentError during Hot restart
Labels: c: crash,tool,P2,c: fatal crash,team-tool,triaged-tool

On `beta/3.1.0-9.0.pre`

with command `flutter run -d chrome`

```
ArgumentError: Invalid argument(s): Uri org-dartlang-app:/web_entrypoint.dart must have scheme 'file:'.
at WindowsStyle.pathFromUri(windows.dart:86)
at Context.fromUri(context.dart:1000)
at FileSystem.getPath(file_system.dart:158)
at LocalFileSystem.file(local_file_system.dart:26)
at ErrorHandlingFileSystem.file(error_handling_io.dart:123)
at ProjectFileInvalidator.findInvalidated(run_hot.dart:1464)
at ResidentWebRunner._updateDevFS(resident_web_runner.dart:481)
at ResidentWebRunner.restart(resident_web_runner.dart:359)
at <asynchronous gap>(async)
at TerminalHandler._commonTerminalInputHandler(resident_runner.dart:1688)
at <asynchronous gap>(async)
at TerminalHandler.processTerminalInput(resident_runner.dart:1741)
at <asynchronous gap>(async)
```
Repository: flutter
Issue: Web default background and text color doesn't match mobile Flutter
Labels: platform-web,c: rendering,P2,c: parity,team-web,triaged-web

The default background color in Flutter is supposed to be black, and the default foreground color is supposed to be white.
Repository: flutter
Issue: Flutter should respect custom system-wide text selection toolbar buttons
Labels: a: text input,framework,f: material design,a: fidelity,P2,team-design,triaged-design

On some platforms, it's possible to write an app that adds a custom button to the system-wide text selection toolbar.  For example, here the Android app AnkiDroid has added the "Anki Card" button to my text selection toolbar, and it appears in any app, such as the Google app here.

<img width="300" src="https://user-images.githubusercontent.com/389558/178827259-299e765b-e58c-4233-9bd4-367400058abe.png" />

Flutter should respect these added buttons, so that in any Flutter app, the buttons that the user has added to their device show up in the default text selection toolbar just like in any native app.

### Scope
This issue does not include allowing Flutter apps to add system-wide buttons.  It's about the reverse problem.

### Platforms

| Platform | Behavior | Related Work |
| --- | --- | --- |
| Android | Apps can add custom system-wide buttons ([relevant article](https://dev.to/bigaru/providing-custom-text-selection-actions-in-android-1akc)). Is there a way for Flutter to read what these buttons are and trigger them? | https://github.com/flutter/flutter/issues/139361 |
| iOS | ? | |
| Mac | ? | |
| Linux | ? | |
| Windows | ? | |