sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Document how to set --dart-define from an add-to-app module when embedding with CocoaPods
Labels: platform-ios,engine,dependency: dart,d: api docs,a: existing-apps,P3,team-ios,triaged-ios

## Question
I'm integrating my Flutter module into my iOS project following the [Option-A](https://flutter.dev/docs/development/add-to-app/ios/project-setup#option-a---embed-with-cocoapods-and-the-flutter-sdk).

But I can not figure out **how to use `--dart-define` mentioned in [error-reporting](https://flutter.dev/docs/cookbook/maintenance/error-reporting) to define compile-time constants with the cocoapods**.

Do I still need something like `flutter build --dart-define=MY_FOO=BAR`? 

If yes, when and where should I execute the above command?

Do I miss any docs about this? Or just the [Option-A](https://flutter.dev/docs/development/add-to-app/ios/project-setup#option-a---embed-with-cocoapods-and-the-flutter-sdk) does not support `--dart-define`, I have to follow others options?

Maybe github issues not a place for **HOW TO** question, however I have post this on [stackoverflow](https://stackoverflow.com/questions/68630838/how-to-use-dart-define-when-my-flutter-module-embedded-in-ios-with-cocoapods), no answers yet.

## Log
```
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.1 20G80 darwin-x64, locale en-CN)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.59.0)
[✓] Connected device (2 available)

! Doctor found issues in 2 categories.
```
Repository: rust
Issue: Optimization of iteration over enums
Labels: C-enhancement,A-lints,A-iterators,A-mir-opt,C-optimization

Almost all implementations of `Iterator::next` for enum types will at some point branch based on the variant of the current value. When that variant does not change during iteration, it is beneficial to optimize usages of `next` to avoid repeatedly branching.

Consider [this example](https://rust.godbolt.org/z/rbsrb6ocr). The right snipped is equal to the left snipped except for the added fold implementation. Without that extra fold implementation, the resulting code is quite inefficient in comparison to the `goal` function.

For a human being, this situation is quite easy to reason about. Would it be possible to include an optimization for this situation?
Repository: pytorch
Issue: Sign in slogdet is set to requires_grad = False even when using complex numbers. 
Labels: triaged,module: complex,module: linear algebra,complex_autograd

## 🐛 Bug

The grad in the sign part of torch.linalg.slogdet is disabled even when the matrix elements are complex numbers. 
This is not a problem when using real numbers. 
However, in the case of complex numbers, it is a problem because we cannot differentiate the angle direction in the complex plane.


## To Reproduce

Steps to reproduce the behavior:

```
import torch

N = 5
x = torch.nn.Parameter(torch.randn(N,N) + 1j*torch.randn(N,N)) 
sign, logabsdet = torch.linalg.slogdet(x)
print(sign, logabsdet, sign.requires_grad, logabsdet.requires_grad)
>>>tensor(-0.5640-0.8257j), tensor(2.4592, grad_fn=<LinalgSlogdetBackward>), False, True
```

## Expected behavior

Both sign and logabsdet will be differentiable.


## Environment
- I run the code on the Colaboratory

PyTorch version: 1.9.0+cu102
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.12.0
Libc version: glibc-2.26

Python version: 3.7.11 (default, Jul  3 2021, 18:01:19)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
Is CUDA available: False
CUDA runtime version: 11.0.221
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.4
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.4
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.4
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.4
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.4
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.4
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.4
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.5
[pip3] torch==1.9.0+cu102
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.10.0
[pip3] torchvision==0.10.0+cu102
[conda] Could not collect


## Additional context

It seems to be related to this PR.  
https://github.com/pytorch/pytorch/pull/16337


cc @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved @jianyuh @pearu @heitorschueroff @walterddr @IvanYashchuk @xwang233
Repository: pytorch
Issue: [documentation] torch.distributed.elastic: illustrate how to write load_checkpoint and save_checkpoint in Train Script 
Labels: module: docs,triaged,module: elastic,oncall: r2p

https://pytorch.org/docs/master/elastic/train_script.html

If users want to run elastic jobs, he/she needs to write some logic to load and save checkpoints. And maybe `State` like this https://github.com/pytorch/elastic/blob/master/examples/imagenet/main.py#L196 should be defined.

It is not clear in the documentation, it will be better to document it.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23 @brianjo @mruberry
Repository: node
Issue: `request-ci` fails without error when CI is locked down
Labels: build,meta

See https://github.com/nodejs/node/pull/39725#event-5138829691

The `request-ci` label was removed but the `request-ci-failed` label was not added.

I don't know what the Jenkins API responds in this case, but it doesn't seem like we handle it.

Workflow run: https://github.com/nodejs/node/runs/3296324085?check_suite_focus=true
Repository: flutter
Issue: Hide packages inside my flutter app in LicensePage
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design

## Use case

I'm using the build in LicensePage class to show all my dependencies licenses. But it also shows the sub packages inside of my app. Is there a way to hide them in the list?

I tried to set `publish_to: none` in each pubspec.yml file from the packages .. but it doesn't work.

The LicenseRegistry has a addLicense method. But there is no removeLicense or something else.

## Proposal

use the `publish_to: none` property in the pubspec to hide the packages
Repository: flutter
Issue: Emoji will effect the transition animation when push a new screen.
Labels: platform-ios,framework,f: cupertino,f: routes,has reproducible steps,found in release: 2.2,found in release: 2.5,team-design,triaged-design

**Target Platform:iOS
**Target OS version/browser:14.4
**Devices:iPhone x
**Flutter version:2.2.2

## Logs
none

## Describe

When push a screen which contains emoji, the transition animation will not work at very first time.  but if you push that screen repeatedly, it works. look this [example video](https://xbzblog-1252810292.cos.ap-guangzhou.myqcloud.com/flutter_emoji_transition.MP4)

## Screen Code

```dart
class TestPage extends StatefulWidget {
    bool showEmoji;
    TestPage({Key? key,this.showEmoji=false}) : super(key: key);

    @override
    _ProfilePageState createState() => _ProfilePageState();
}

class _ProfilePageState extends State<TestPage> {
    @override
    Widget build(BuildContext context) {
        return CupertinoPageScaffold(
            navigationBar: CupertinoNavigationBar(
                middle:Text("emoji test page"),
                backgroundColor: CupertinoColors.white,
            ),
            child: Container(
                child: 
                widget.showEmoji?
                Text("😍 This page has emoji,push screen transition animation not OK 👿")
                :
                Text("This page has only text,push screen transition animation OK"),
            ),
        );
    }
}
```

```dart
 Navigator.push(context, CupertinoPageRoute(builder: (builder){
     return TestPage(showEmoji:true);//switch true or false to test transition animation
  }));
```
Repository: TypeScript
Issue: Promise typings doesn't respect subclasses
Labels: Suggestion,Awaiting More Feedback

For promise subclasses all well-known Promise methods return instance of subclass. Code below is legal and promise subclasses behaviour cleanly documented https://tc39.es/ecma262/#sec-promise-constructor

However I'm not sure that this is easy fixable without HKT

## Sample Code
![image](https://user-images.githubusercontent.com/897643/129179099-83c8b6cd-36f9-43f2-abaa-59286e0ee1b5.png)

https://www.typescriptlang.org/play?ts=4.4.0-beta#code/MYGwhgzhAECyCeAFATgewLYEsIFMA8AKgHzQ4AeALjgHYAmMKG2+x0A3gFDTfQAOArgCMQmYNGDIcYKrQCCFaAF5o1HAHdoAEWk4AFAEoA3BwC+HDsFTUICsgC44SNFlx4AjCWUJGLnADpJCFQQADc9NyMLKxtoeAdvZ2Y8ACZPaDI-CgALGl0DJRI2bLQNZJNIqOtg-xBUAHNdDIkpGXkAGli-Zp05CiMgA
Repository: pytorch
Issue: torch.jit.trace does not work if there is an autograd in the function
Labels: oncall: jit

## 🐛 Bug

I am struggling to make `torch.jit.trace` work if the function contains `torch.autograd.grad`.

## To Reproduce

Here's the simplest example to reproduce the bug:

```python
import torch

def function(inp: torch.Tensor) -> torch.Tensor:
    out = inp ** 2
    dout_dinp, = torch.autograd.grad(out, inp, grad_outputs=torch.ones_like(out))
    return dout_dinp

inp = torch.randn((4, 3), requires_grad=True)
fcn = torch.jit.trace(function, (inp,))
```

Here's the traceback of error:
```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mfkasim/anaconda3/envs/torchdev/lib/python3.8/site-packages/torch/jit/_trace.py", line 780, in trace
    traced = torch._C._create_function_from_trace(
  File "<stdin>", line 3, in function
  File "/home/mfkasim/anaconda3/envs/torchdev/lib/python3.8/site-packages/torch/autograd/__init__.py", line 226, in grad
    return Variable._execution_engine.run_backward(
RuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient
```

## Expected behavior

`torch.jit.trace` should work as expected.

## Environment

 - PyTorch Version (e.g., 1.0): 1.9.0
 - OS (e.g., Linux): Ubuntu 20.04 (WSL)
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source):
 - Python version: 3.8.5
 - CUDA/cuDNN version: N/A
 - GPU models and configuration: N/A
 - Any other relevant information: N/A

## Additional context

I found another problem with autograd in `torch.jit.trace` here: https://github.com/pytorch/pytorch/issues/11967
However, it seems like the error message is different (with much older pytorch version), so I'm not sure if it comes from the same bug.


cc @gmagogsfm
Repository: tensorflow
Issue: unable to create tf.variables inside a function that is decorated with @tf.function
Labels: stat:awaiting tensorflower,type:bug,TF 2.5,comp:tf.function

tf 2.5


```
@tf.function
def weight_fn():
    w = tf.Variable(tf.truncated_normal())
```

I have a function like above that would be called about **50 times**, each time it should generate a new variable and return. But according to the [rule](https://tensorflow.google.cn/guide/function#creating_tfvariables) and the hint below,

```
    ValueError: A tf.Variable created inside your tf.function has been garbage-collected. Your code needs to keep Python references to variables created inside `tf.function`s.
    
    A common way to raise this error is to create and return a variable only referenced inside your function:
    
    @tf.function
    def f():
      v = tf.Variable(1.0)
      return v
    
    v = f()  # Crashes with this error message!
    
    The reason this crashes is that @tf.function annotated function returns a **`tf.Tensor`** with the **value** of the variable when the function is called rather than the variable instance itself. As such there is no code holding a reference to the `v` created inside the function and Python garbage collects it.
    
    The simplest way to fix this issue is to create variables outside the function and capture them:
    
    v = tf.Variable(1.0)
    
    @tf.function
    def f():
      return v
    
    f()  # <tf.Tensor: numpy=1.>
    v.assign_add(1.)
    f()  # <tf.Tensor: numpy=2.>

```

I should define the weight variable outside the tf.function, which means I should manually define over 50 weight variables, each line with a weight variable.

```
w1 = tf.Variable(tf.truncated_normal())
w2 = tf.Variable(tf.truncated_normal())
w3 = tf.Variable(tf.truncated_normal())
......
w50 = tf.Variable(tf.truncated_normal())

```

Undoubtedly, this kind of behavior is really stupid, any solutions to this kind of unreasonable rule?
Repository: material-ui
Issue: [Pickers] How to change pen, clock, calendar icons?
Labels: new feature,component: pickers

<!-- Provide a general summary of the issue in the Title above -->

I have tried to change icons that are rendered in pickers, for example `MuiCalendarPicker` has `component` prop that allows for custom icons. But from code search and some digging I have found out that it is impossible to change other icons.

```tsx
type Component = ComponentsOverrides<'MuiCalendarPicker'>;

const defaultProps: Component['defaultProps'] = {
  components: {
    LeftArrowIcon: ArrowLeftThin,
    RightArrowIcon: ArrowRightThin,
    SwitchViewIcon: ArrowDown,
  },
};
```

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯

Currently we can only change `LeftArrowIcon`, `RightArrowIcon`, `SwitchViewIcon`. But we cannot change `TimeIcon`, `DateRangeIcon`, `CalendarIcon`, `PenIcon`. Also, documentation isn't truly clear on how to change behavior and styles via the `Theme`.
Another component which doesn't seems like it can be modified via the Theme is `PickersToolbar`. 

## Expected Behavior 🤔

Better documented theme overrides and better extensibility of pickers. 

## Steps to Reproduce 🕹

https://codesandbox.io/s/clever-cache-bgj6r?file=/src/Demo.tsx

Steps:

1. Install dependencies
2. Try to override pen or other icons

## Context 🔦

Currently I am trying to override icons of the pickers and style it to our company design. It is quite hard to understand how everything works, even from source code. 

## Your Environment 🌎

<!--
  Run `npx @material-ui/envinfo` and post the results.
  If you encounter issues with TypeScript please include the used tsconfig.
-->
<details>
  <summary>`npx @material-ui/envinfo`</summary>
  
```  
  System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
    Memory: 16.65 GB / 31.92 GB
  Binaries:
    Node: 16.5.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 7.6.3 - C:\Program Files\nodejs\npm.CMD
  Managers:
    pip3: 21.1.3 - C:\Python39\Scripts\pip3.EXE
  Utilities:
    Git: 2.31.1.
  Virtualization:
    Docker: 20.10.5 - C:\Program Files\Docker\Docker\resources\bin\docker.EXE
  IDEs:
    VSCode: 1.59.0 - C:\Users\silha\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
    Visual Studio: 16.10.31402.337 (Visual Studio Community 2019)
  Languages:
    Python: 3.9.6
    Python3: 3.9.6
  Browsers:
    Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.67)
    Internet Explorer: 11.0.19041.906
  Monorepos:
    Yarn Workspaces: 1.22.10
    Lerna: 4.0.0
```
</details>
Repository: terminal
Issue: “ⓒ" U+24D2 fallback rendering in conhost / GDI
Labels: Product-Conhost,Help Wanted,Area-Rendering,Issue-Bug,Priority-3

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

OpenConsole built from the latest source or taken from the latest Terminal Preview, e.g. 1.10.2107.12003

### Other Software

_No response_

### Steps to reproduce

1. Create the following file:

```cmd
@echo off
chcp 65001

echo ⓒ
echo ⁺ⓒ
```
2. Save as `test.cmd` in UTF-8 encoding (or download [test.cmd.txt](https://github.com/microsoft/terminal/files/6975762/test.cmd.txt) and rename).
3. Build and run the latest OpenConsole.
4. Set the font to Consolas.
3. Run `test.cmd`.





### Expected Behavior

![image](https://user-images.githubusercontent.com/11453922/129204828-93645e11-58f7-4454-9494-49eccf257807.png)


### Actual Behavior

![image](https://user-images.githubusercontent.com/11453922/129204861-88385aa1-9ced-454e-9bcc-3e60bbf91367.png)


### Details


It looks like the GDI renderer is having issues with the font fallback for the `ⓒ - Circled Latin Small Letter C: U+24D2` character.
Usually it doesn't work at all and the replacement character is rendered instead.
However, as the example above demonstrates, sometimes it magically works in the presence of other Unicode characters, e.g. `⁺ - Superscript Plus Sign: U+207A`.

It works as expected in WT and OpenConsole with the DirectX renderer.
It also works as expected in other GDI apps with font fallback, e.g. notepad.exe.

Also, it looks like the fallback glyph isn't clipped properly and can overlap with the next one:

![image](https://user-images.githubusercontent.com/11453922/129210610-1afc8e18-e9c4-4132-9a31-9aaeab736c88.png)
Repository: godot
Issue: directory.copy is 2x slower in windows
Labels: bug,platform:windows,topic:core,topic:porting,needs testing,performance

### Godot version

3.3.2 stable

### System information

windows 10, ubuntu 16.04

### Issue description

`directory.copy` is very slow in windows, much slower than native windows copy, and 2x slower than `directory.copy` in linux


<img width="1129" alt="diff_copy_100m" src="https://user-images.githubusercontent.com/403616/129211257-a74048ac-ccf9-4ef4-a239-412b6b0a4ccc.png">

### Steps to reproduce

```gdscript
extends Node2D

func _ready():
  var dir = Directory.new()
  var t1 = OS.get_system_time_msecs()
  dir.copy("res://dummy.file", "res://dummy.file.copy")
  printt("Time", OS.get_system_time_msecs() - t1)
```




### Minimal reproduction project

[CopySlowIssue.zip](https://github.com/godotengine/godot/files/6976048/CopySlowIssue.zip)

Pls notice there is a 100MB dummy.file inside
Repository: godot
Issue: Shader on MeshInstance2D has no effect
Labels: enhancement,topic:rendering,topic:shaders,topic:2d

### Godot version

3.3.2.stable.arch_linux

### System information

Arch Linux, GLES3, Ryzen 7 PRO 4750U integrated graphics, AMDGPU driver

### Issue description


When creating a MeshInstance2D and adding a QuadMesh with a ShaderMaterial (directly assigned to the mesh), the shader has no effect. This happens for both vertex and fragment shaders.

I'm aware that adding shaders to the `material` property of the MeshInstance2D itself will work, but I'm not sure if this is the correct approach when using MultiMeshInstances (which exhibit the same behavior). 

If this is intended, a note in the docs would be awesome.

### Steps to reproduce

1. Create a MeshInstance2D.
2. Create and assign a QuadMesh.
3. Create and assign a ShaderMaterial to the QuadMesh.
4. Create a new shader and assign it to the ShaderMaterial:

```
shader_type canvas_item;

void vertex() {
	VERTEX.y *= sin(TIME);
}

void fragment() {
	COLOR = vec4(0.0, 0.0, 0.0, 1.0);
}
```

### Minimal reproduction project

Very small example repo: https://github.com/raffomania/godot-2dmesh-shader-bug
Repository: tensorflow
Issue: Feature request: real and imag attributes for Tensors.
Labels: stat:awaiting tensorflower,type:feature,comp:ops

**System information**
- TensorFlow version (you are using): 2.5.0
- Are you willing to contribute it (Yes/No): Yes, although I may need some help to point me where this code should be.

**Describe the feature and the current behavior/state.**
I would like to have a `real` and `imag` property for Tensors in Tensorflow. These would simply call  to `tf.math.real` and `tf.math.imag` internally. This will make writing code with tensorflow more flexible and will bring more compatibility with numpy and python's `complex` type, which do have these attributes. For instance, I would like to do something like:
```python
out = operation(input)  # Function that returns an output type depending on the input type
return out.real if isherm else out  # Different output depending on a variable (isherm) which I keep track of by other more means.
```

**Will this change the current api? How?**
Yes. It will add the `real` and `complex` attributes to Tensors/Variables. It will be backwards compatible as it only adds something new. 

**Who will benefit with this feature?**
Anyone working with complex numbers as will bring easy and intuitive access to the real and imaginary parts of a complex tensor. I think this is specially useful for the experimental numpy behaviour.

**Any Other info.**
I am working with complex numbers using TensorFlow. In particular,  I am developing a python package, [qutip-tensorflow](https://github.com/qutip/qutip-tensorflow), that allows backing [QuTiP's Qobj](https://github.com/qutip/qutip) with Tensorflow's Tensors. The goal is to make QuTiP benefit from some of the very useful features in TensorFlow such as operating with a GPU or auto-differentiation. The feature suggested here will help with the development of qutip-tensorflow.
Repository: vscode
Issue: [Issue reporter] Style issues
Labels: bug,issue-reporter

* First dropdown on hover shows cursor as `pointer`
* Second dropdown on hover shows cursor as `default`

---

*  Focused dropdown/textarea/link style is missing (some color themes have focus border, some don't)

---

*  Changing active color theme doesn't affect issue reporter window

---

*  Button `Create on GitHub` doesn't use `button.border` for border.

---

* Textarea resize button has a visual glitch:

<img src="https://user-images.githubusercontent.com/9638156/129248144-d8440a32-19ef-45df-9bfc-2683f37a7bd7.png" width="200">
Repository: vscode
Issue: Suggest details: Should scrolling inside the popup prevent its closing?
Labels: ux,suggest,under-discussion

An issue was fixed for the editor hover #112373 (basically scrolling to the end of the hover no longer closes the hover window).

Would it make sense to apply the same fix for the suggest details popup?

Also, parameter hints.