sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Refactor tonic's handling of typed data
Labels: engine,P2,c: tech-debt,team-engine,triaged-engine

The code in //third_party/tonic/typed_data/typed_list.h is dangerous as written.

The underlying C API it wraps says that you cannot do anything that would cause an allocation to occur before releasing the data, but for users of e.g. a `Float32List` object, that's not at all clear. In fact, it's not always clear what other methods in the engine may go down some branch that will end up causing a Dart allocation to happen. It is also difficult because tonic wrapped C++ methods make the object look like something scoped to your method, and give no indication that you would ever need to release it early. I and other engine developers have made this mistake (see https://github.com/flutter/engine/pull/31745/ and related issues).

In general, the usage of typed data needs to follow an `Acquire - Copy - Release` pattern. Ideally, Tonic would just give the method the copied result (but we have to evaluate whether this can work for Skia/DL APIs that we pass the data into and end up doing copying behind the scenes).

For example, instead of a method taking a `const tonic::Float64List& matrix4` parameter, it would just take a `SkM44` parameter. Instead of taking a `const tonic::Uint8List& data`, it would take whatever structure that data gets copied into. 

The main goal here is to make it harder for contributors to make mistakes on this, particularly contributors who are not familiar with the underlying Dart API that is getting wrapped and assume this is a RAII object like any other.

/cc @flar for thoughts on whether/how this works with display list code.

/cc @zanderso @Chinmaygarde @jason-simmons
Repository: TypeScript
Issue: `await` completions should auto-add an `async` modifier to containing method
Labels: Suggestion,In Discussion,Domain: Completion Lists

Let's say you have a function like the following:

```ts
function foo() {
   /*$*/
}
```

If you type the word `await`, we should consider adding the `async` keyword to the beginning of the function declaration.

The motivation here was another snippet completion for object literal completions that @gabritto is working on (https://github.com/microsoft/TypeScript/issues/46590) where it's not clear whether you really want a method to be `async` or not. For example, you might not want to make a function `async` if it's just going to *return* a `Promise`.

```ts
interface Foo {
  doIt(): Promise<any>;
}

const obj: Foo = {
  doIt() {
    return fetch(...);
  }
}
```

Because there's not enough context, even with the `Promise` annotation, some on the team would prefer to be conservative and not complete this as `async`, instead relying on later editor functionality to make a function `async`.

Today, if a person does wants to add `await` to a function that doesn't have an `async` modifier, we provide a quick fix to do this.

```ts
interface Foo {
  doIt(): Promise<any>;
}

const obj: Foo = {
  doIt() {
//~~~~
//
// Did you mean to mark this function as 'async'?

    await fetch(...);
//  ~~~~~
//
//   'await' expressions are only allowed within async functions and at the top levels of modules.
//   Quick fix: Add async modifier to containing function.
  }
}
```

This quick fix is nice, but the idea of the suggestion in this issue here is to just do the same thing as the quick fix upon completion.

Now are there any reasons to not do this?

Mostly that the idea of being "conservative" in when we decide to make a method `async` is not being applied here. A person can accidentally make their functions `async`, and that might not be desirable either, especially if any callers are not `await`ing that function. Comparatively, there's relatively little harm in marking a `Promise`-returning function `async`.
Repository: pytorch
Issue: Improving error message RuntimeError: One of the differentiated Tensors appears to not have been used in the graph. Set allow_unused=True if this is the desired behavior.
Labels: module: autograd,triaged,better-engineering,actionable

### 🐛 Describe the bug

I get this error:
```
RuntimeError: One of the differentiated Tensors appears to not have been used in the graph. Set allow_unused=True if this is the desired behavior.
```

but it doesn't tell me the name of the tensors throwing that issue. Can be displayed in the error to make easier to debug?

### Versions

```
(meta_learning) brandomiranda~ ❯ python collect_env.py
Collecting environment information...
PyTorch version: 1.9.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.2.1 (x86_64)
GCC version: Could not collect
Clang version: 13.0.0 (clang-1300.0.29.30)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.7 (default, Sep 16 2021, 08:50:36)  [Clang 10.0.0 ] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.21.4
[pip3] torch==1.9.1
[pip3] torchaudio==0.9.1
[pip3] torchmeta==1.8.0
[pip3] torchtext==0.10.1
[pip3] torchvision==0.10.1
[conda] numpy                     1.21.4                   pypi_0    pypi
[conda] torch                     1.9.1                    pypi_0    pypi
[conda] torchaudio                0.9.1                    pypi_0    pypi
[conda] torchmeta                 1.8.0                    pypi_0    pypi
[conda] torchtext                 0.10.1                   pypi_0    pypi
[conda] torchvision               0.10.1                   pypi_0    pypi

```

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: flutter
Issue: TextField.textCapitalization updates are not respected
Labels: a: text input,framework,engine,f: material design,P2,team-design,triaged-design

When changing the value passed to [`TextField.textCapitalization`](https://api.flutter.dev/flutter/material/TextField/textCapitalization.html) at runtime, the software keyboard on iOS continues to use the **previous** text capitalization value.

https://user-images.githubusercontent.com/19204050/156460765-681879a8-8aa3-4d03-ad69-068b9f739ad7.MP4

## Steps to Reproduce

Run the following code:

```dart
import 'package:flutter/material.dart';

void main() {
  var noCap = false;
  runApp(MaterialApp(
    home: Scaffold(
      body: StatefulBuilder(
        builder: (context, setState) {
          final capitalization =
              noCap ? TextCapitalization.none : TextCapitalization.words;
          return Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              TextField(
                textCapitalization: capitalization,
                decoration: InputDecoration(
                  labelText: '$capitalization',
                ),
              ),
              ElevatedButton(
                child: const Text('Toggle capitalization'),
                onPressed: () {
                  setState(() {
                    noCap = !noCap;
                  });
                },
              ),
            ],
          );
        },
      ),
    ),
  ));
}

```

**Expected results:** after pressing the button, the keyboard should no longer capitalize the first letter of the word but it still does.

**Actual results:** you can see that when the capitalization is `TextCapitalization.none`, the words are still capitalized.

### Platforms

Special note: I only tested this on iOS. This not working on iOS is enough for me to open the issue. If someone wants to confirm that this is also broken on Android (or is **not**), that would be super helpful and we could elaborate on that in the issue description.
Repository: go
Issue: cmd/go: add better logging for go mod vendor
Labels: NeedsInvestigation,GoCommand,modules

Today when we run `go mod vendor`, we only get a single message printed to stderr per dependency that looks like `go: downloading golang.org/x/text v0.3.7`.

This does not tell us when the package finished downloading, which is especially important when trying to diagnose why `go mod vendor` is slow. (Since `go mod vendor` seems to download lots of stuff in parallel, we cannot just go by the next log line.)

It also does not tell us which particular proxy in the `GOPROXY` list was used, which is again important for troubleshooting.

Please add the aforementioned logs, perhaps via some `-verbose` flag or similar.
Repository: pytorch
Issue: How to get tolerance override in OpInfo-based test?
Labels: module: docs,triaged,module: testing

### 🐛 Describe the bug

The documentation appears to be wrong, it suggests to use self.rtol and self.precision:
https://github.com/pytorch/pytorch/blob/4168c87ed3ba044c9941447579487a2f37eb7973/torch/testing/_internal/common_device_type.py#L1000

self.tol doesn't seem to exist in my tests.
I did find a self.rel_tol, is that the right flag?

### Versions

main

cc @brianjo @mruberry
Repository: TypeScript
Issue: Support for declaring index signatures using JSDoc 
Labels: Suggestion,Needs Proposal

# Suggestion

## 🔍 Search Terms

TS in JS, JSDoc, index signatures, class

## ✅ Viability Checklist

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x]  This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

I've looked around for a while and I haven't found a means to declaring an index signature on an ES6 class using JSDoc.

Take this scenario:

```javascript
class Cats {
	/** @param {{ name: string, colour: string }[]} cats */
	constructor(cats) {
		for (let cat of cats) {
			this[cat.name] = cat.colour
		}
	}
}
```
`this[cat.name]` complains: 

*Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'Cats'.*

How do we solve this using JSDoc? I know this is a non-issue when employing different paradigms (e.g. `cats.reduce((cats, cat) => ({ ...cats, [cat.name]: new Cat(cat) }), {})`) but that's not always the way.

In TS, it is handled as so:

```js
class Cats {
  [name: string]: string
  constructor(cats: { name: string, colour: string }[]) {
    for (let cat of cats) {
      this[cat.name] = cat.colour
    }
  }
}
```

## 📃 Motivating Example

Looking for the equivalent of a catch-all class-wide type declaration:

```js
class Cats {
	/** @type {{ [name: string]: string }} */

	/** @param {{ name: string, colour: string }[]} cats */
	constructor(cats) {
		for (let cat of cats) {
			this[cat.name] = cat.colour
		}
	}
}
```

Is implementing this possible? Or, perhaps, Is this achievable by some existing method that I missed?
Repository: flutter
Issue: [in_app_purchase]: Proposal to consume all items.
Labels: c: new feature,p: in_app_purchase,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

Hello, as in the `flutter_in_app_purchase` package, I would like to consume everything I have to consume as soon as the app starts. The mentioned package has the `consumeAllItems()` function and this would help me specifically in my project, so if anyone can help me, thanks.

This is how it works in the package:
```
try {
      String msg = await FlutterInappPurchase.instance.consumeAllItems;
      print('consumeAllItems: $msg');
    } catch (err) {
      print('consumeAllItems error: $err');
    }
```

I used it before, but due to other problems in the package I migrated to `in_app_purchase` and this functionality helped me a lot.
Repository: TypeScript
Issue: Poor error recovery during incomplete property access followed by `if` statement on subsequent line
Labels: Suggestion,Help Wanted,Experience Enhancement


*TS Template added by @mjbvz*

**TypeScript Version**: 4.6.1

**Search Terms**
- suggest / suggestion
- complete / completion

---

Issue Type: <b>Bug</b>

``` typescript
class Test {
    public fn1() { return 1; }
    public fn2() {
        let a =  // input "this.f","fn3" function suggestion missing
        if (1) {
            let b = 1;
        }
    }
    public fn3() { return 3; }
}
```
![image](https://user-images.githubusercontent.com/30372220/154836415-e8249b67-c577-4ad8-add4-08c0e4314292.png)

The missing condition is to declare a variable and the following is an `if` or `switch` statement

VS Code version: Code 1.64.2 (f80445acd5a3dadef24aa209168452a3d97cc326, 2022-02-09T22:02:28.252Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD Ryzen 9 5900X 12-Core Processor             (24 x 3700)|
|GPU Status|2d_canvas: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>rasterization: enabled<br>skia_renderer: enabled_on<br>video_decode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|31.93GB (24.85GB free)|
|Process Argv|--crash-reporter-id ff5f4525-5d4b-4d0f-a080-4594f5ef9e4a|
|Screen Reader|no|
|VM|0%|

<!-- generated by issue reporter -->
Repository: pytorch
Issue: DropIT: Dropping Intermediate Tensors for Memory-Efficient DNN Training
Labels: feature,module: memory usage,triaged

### 🚀 The feature, motivation and pitch

We are working on training large transformer and DNN. Any approach for saving GPU memory is valuable. 
[https://arxiv.org/pdf/2202.13808v1.pdf]
DropIT seems to be fitting into pytorch tensor management area. 
Will be good to explore if we can offer this feature in pytorch training.

Cheers 
Dr.

### Alternatives

_No response_

### Additional context

_No response_
Repository: pytorch
Issue: Refactor/Cleanup Lazy Tensor Core
Labels: triaged,module: lazy

General tracking issue for refactor/cleanup wishlists.

Please contribute ideas/desires as a new issue or add to existing issues below!

- Codegen Infra: #72960
- LazyTensor, LTCTensorImpl, Data: #73711
- Shape Inference stuff: TODO open tracking issue
- 

- [ ] move kNullValue out of LazyIr.h, as it's bad form to use a static in a header
- [ ] Compile LazyIr as a cpp + h to avoid compile time bloat
- [ ] remove 'using operator>>' thing from LazyIr.h; file issue on pytorch core if this is still required

cc @JackCaoG @desertfire @Krovatkin @shunting314 @alanwaketan @ansley
Repository: pytorch
Issue: Refactor/Cleanup LazyTensor, LTCTensorImpl, Data
Labels: triaged,module: lazy

Harvesting feedback from @ezyang on this PR https://github.com/pytorch/pytorch/pull/73445

I think there are 2 directions I could go-

a more modest cleanup

* we kill the 'Data' class and its shared_ptr inside LazyTensor and fold its stuff into LazyTensor directly
* a bit more polish on the LazyTensor ptr in LTCTensorImpl: maybe make it a unique_ptr after all, maybe change the naming conventions

or more radical

* do we actually need a pointer inside LTCTensorImpl? We do want to allow indirection somewhere, but could we let XLA provide their own XLATensorImpl instead?
* I could use a brainstorm session on how TensorImpls work and what you're allowed to do with them

cc @JackCaoG  @ezyang
Repository: flutter
Issue: Make Dart Plugin Registrant idempotent
Labels: tool,P2,a: plugins,team-tool,triaged-tool

After https://github.com/flutter/engine/pull/31720 the Dart Plugin Registrant can be executed manually.  As long as it is only executed on background isolates it is idempotent.  If someone however accidentally executes it from the root isolate, the registrant would be executed twice and it would be an error.

If we move the guard that makes it idempotent from dart:ui into the generated code, we can make sure that executing it form the root isolate multiple times is not an error.
Repository: godot
Issue: Crash on Viewport destruction if get_viewport() was called in a reloadable GDNative DLL (Windows)
Labels: bug,platform:windows,topic:gdextension,crash

### Godot version

3.4.2.stable.official [45eaa2daf]

### System information

Windows 10

### Issue description

If I call get_viewport() from a GDNative class and the GDNative library resource indicates it is reloadable, the game crashes on exit during Viewport destruction. Specifically, with an access violation in NativeScriptLanguage::free_instance_binding_data.

I noticed that the native library is being closed/freed before this occurs, however if I indicate that the native library is not reloadable (via the "reloadable" property in the GDNativeLibrary resource or .gdnlib file) the problem no-longer occurs. 

I have been able to reproduce this with minimal changes to the "GDNative C++Example" project. Specifically, I have edited gdexample.gdnlib to set reloadable to true, and added and registered a _ready method that only calls get_viewport().

While I can work around this by making my DLL not reloadable, it's a significant workflow obstacle on Windows because I need to close the project every time I recompile my library.

### Steps to reproduce

Using the attached repro ZIP:
1. In the godot-cpp directory, build with: scons platform=windows bits=64 generate_bindings=yes
2. In the outer directory, build the native library with: scons platform=windows
3. Open demo/project.godot
4. Run the project
5. Close the window with the X button on the window.

### Minimal reproduction project

[repro.zip](https://github.com/godotengine/godot/files/8174453/repro.zip)
Repository: pytorch
Issue: Audit exception rewrapping to ensure stack traces are preserved
Labels: oncall: distributed,triaged,better-engineering,module: rpc

### 🐛 Describe the bug

I feel like half of the time I have remote errors in distributed, I lose the backtrace. Part of the problem is that code in distributed is rewrapping exceptions without preserving the original exception (which has the useful backtrace). Here is an example of a recent instance I fixed: https://github.com/pytorch/pytorch/pull/73720

We should audit all of the exception rethrowing code to make sure that it is properly preserving the exception chain so you get a full exception.

### Versions

master

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @jjlilley @mrzzd
Repository: pytorch
Issue: Why is distributed RPC using the default pickler?
Labels: oncall: distributed,triaged,module: rpc

### 🐛 Describe the bug

While @kurtamohler was working on https://github.com/pytorch/pytorch/pull/66970#issuecomment-1057634489 we noticed that although we had modified torch.save/load to be BC/FC compatible with the storage model, unpickling wasn't working in a distributed test (specifically  caffe2/torch/fb/distributed/model_parallel/tests:test_rpc_shared_memory - test_rpc_shared_memory). While reading the RPC code, it emerged that torch/distributed/rpc/internal.py is using the stock pickler/unpickler for sending UDFs over the wire and somehow... reimplementing the tensor format so that it is parseable from there.

This seems... weird to me? Like, why don't you just directly use the canonical implementation at torch.serialization?

### Versions

master

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @jjlilley @mrzzd
Repository: ant-design
Issue: 定制主题颜色 less 配置@primary-color-hover'#ff4092';  按钮hover的颜色不生效
Labels: 🐛 Bug,Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[https://github.com/Wendyxjw/antd-demo-test1.git](https://github.com/Wendyxjw/antd-demo-test1.git)

### Steps to reproduce
npm start 成功后 可以看到绿色按钮，但是我设置的"@primary-color-hover": '#ff4092'，没有生效

### What is expected?
希望primary-color-hover primary-color-active这些颜色配置可以生效；目前应该是根据primary-color去计算的

### What is actually happening?
primary-color-hover primary-color-active这些颜色配置不生效

| Environment | Info |
|---|---|
| antd | 4.18.9 |
| React | 16.8.6 |
| System | macos 12.1 |
| Browser | chrome 97.0.4692.71 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: ant-design
Issue: affix组件在nextjs环境下，切换路由会报错
Labels: Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[https://github.com/chenqiongqiong/nextjs-demo-test](https://github.com/chenqiongqiong/nextjs-demo-test)

### Steps to reproduce
yarn 安装依赖
yarn dev 运行next项目
打开http://localhost:3000/
打开控制台
往下滚动一部分页面
点击 “abc”链接
再返回上个页面
再次点击 “abc”链接
看到控制台报错

### What is expected?
控制台不报错

### What is actually happening?
控制台报错
 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

| Environment | Info |
|---|---|
| antd | 4.18.9 |
| React | 17.0.2 |
| System | mac |
| Browser | chrome 98 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: terminal
Issue: No padding in tab well to move the window
Labels: Issue-Bug,Product-Terminal,Priority-3,Area-Windowing

### Windows Terminal version

1.11.3471.0

### Windows build number

10.0.19044.0

### Other Software

_No response_

### Steps to reproduce

Edge's tab well has padding to move the window:

![image](https://user-images.githubusercontent.com/4003950/156519342-c6dde155-9c01-4ecc-8015-5adba648b841.png)

But Windows Terminal doesn't have that padding that allows me to move the window:

![image](https://user-images.githubusercontent.com/4003950/156519506-bd40a073-6715-4bd5-8034-fa76e46e8e49.png)

The only part allowing moving the window is here:

![image](https://user-images.githubusercontent.com/4003950/156519824-9f1bd9d6-81fe-4e94-9472-76daf19ce565.png)

This becomes annoying when the Windows Terminal window is moved beyond the right edge of the screen and that part is squeezed beyond the edge. Now you can't move the window:

![image](https://user-images.githubusercontent.com/4003950/156519739-e752a9ca-37c1-4851-a980-b57f1fdc0b50.png)



### Expected Behavior

Windows Terminal's tab well should have an area allowing moving the window.

### Actual Behavior

Windows Terminal's tab well doesn't have an area allowing moving the window.
Repository: godot
Issue: iOS export application version and short version ambiguous
Labels: enhancement,platform:ios,topic:editor,topic:export

### Godot version

3.3.2 stable

### System information

macOS 12.1, Mac Pro

### Issue description

When I try to export Godot project as iOS project, I set the version: 1.0 and short version: 1  in application category. When I open the iOS project in Xcode, it shows version is 1.0 and build is 1. I think this is ambiguous for me. Godot export application version connect to Xcode app version, Godot export application build connect to Xcode app build if you can change it to build for short version. That will make more sense to me.

### Steps to reproduce

When you try to export Godot project to iOS project, you try to set the version and short version with different number, then switch to Xcode to see how to app version and build looks like base on the version and short version you set on Godot. It will make you ambiguous.

### Minimal reproduction project

_No response_