sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: create-react-app
Issue: Allow importing SVG as inline SVG
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

<!--
  Provide a clear and concise description of what the problem is.
  For example, "I'm always frustrated when..."
-->

I'm converting a React app with custom config that hasn't been updated for a while to a CRA app.

We're using fabric: https://www.npmjs.com/package/fabric, which allows importing SVG's into a canvas. For that to work it needs an inline SVG which https://webpack.js.org/loaders/svg-inline-loader/ can provide. 

It would be awesome if like `import {ReactComponent as Svg} from …` the's a `import {inlineSvg as svg} from …`

### Describe the solution you'd like

It would be awesome if like `import {ReactComponent as Svg} from …` the's a `import {inlineSvg as svg} from …`

It's possible to use this loader; https://webpack.js.org/loaders/svg-inline-loader


(Describe your proposed solution here.)

### Describe alternatives you've considered

<!--
  Let us know about other solutions you've tried or researched.
-->

(Write your answer here.)

### Additional context

<!--
  Is there anything else you can add about the proposal?
  You might want to link to related issues here, if you haven't already.
-->

(Write your answer here.)
Repository: pytorch
Issue: [torch.jit.trace] torch.jit.trace fixed batch size CNN 
Labels: oncall: jit,triaged

I use python 3.6.10 and pytorch 1.5.0
Using torch.jit.trace on a function that feeds inputs to CNN produces a graph with a hard-coded batch size. This makes it impossible to use the traced function with inputs of different batch sizes.

cc @suo
Repository: pytorch
Issue: Python builtin function next() is currently not supported in Torchscript
Labels: oncall: jit,triaged

## 🐛 Bug

Python builtin function next() is currently not supported in Torchscript

## To Reproduce

Steps to reproduce the behavior:

```bash
import torch
from torch import nn

class Next(nn.Module):
    def __init__(self):
        super(Next, self).__init__()
    def forward(self, x):
        device = next(self.parameters()).device
        x = x.to(device)
        return x

model = Next()
model.cuda()

jitted_model = torch.jit.script(model)
```

```bash
Traceback (most recent call last):
  File "next.py", line 15, in <module>
    jitted_model = torch.jit.script(model)
  File "/opt/conda/lib/python3.6/site-packages/torch/jit/__init__.py", line 1267, in script
    return torch.jit._recursive.create_script_module(obj, torch.jit._recursive.infer_methods_to_compile)
  File "/opt/conda/lib/python3.6/site-packages/torch/jit/_recursive.py", line 299, in create_script_module
    return create_script_module_impl(nn_module, concrete_type, stubs_fn)
  File "/opt/conda/lib/python3.6/site-packages/torch/jit/_recursive.py", line 346, in create_script_module_impl
    create_methods_from_stubs(concrete_type, stubs)
  File "/opt/conda/lib/python3.6/site-packages/torch/jit/_recursive.py", line 273, in create_methods_from_stubs
    concrete_type._create_methods(defs, rcbs, defaults)
RuntimeError:
Python builtin <built-in function next> is currently not supported in Torchscript:
  File "next.py", line 8
    def forward(self, x):
        device = next(self.parameters()).device
                 ~~~~ <--- HERE
        x = x.to(device)
        return x
```

## Expected behavior

Successful conversion to TorchScript

## Environment

PYTORCH_VERSION=1.5.0a0+8f84ded


cc @suo
Repository: terminal
Issue: WT should start up fast: profile the startup path and trim anything that takes a while
Labels: Help Wanted,Area-Performance,Product-Terminal,Issue-Task

# Steps to reproduce

1. Click to launch Windows Terminal 

# Expected behavior

Windows Terminal should be ready instantaneously like windows console, or like Sublime Text. 
Windows Terminal can't be slower than windows console. 

While Windows Terminal is fast compared with other tools like Visual Studio, or iTunes, it is still not fast enough for a Terminal application. 

# Actual behavior

It takes too long to startup. It is not ready instantaneously. It's not as fast as windows console. 



<hr>

_maintainer note: hijacking OP for task list:_

* [x] Use exactly one `ColorPickerFlyout` for all tabs, and just redirect it to whatever tab activated it. 
* [x] Delayload the `ColorPickerFlyout`.
* [ ] Add a setting to disable ALL fragments / dynamic profiles. The app catalog search is expensive.
  - ~Maybe we can just skip loading dynamic profiles on initial launch, unless we discover that the defaultProfile is a dynamic one...~ Nah, cause what about for defterm launches that end up matching a dynamic profile.
Repository: pytorch
Issue: Scale parameter downcasted and rounded down in pytorch.distributions.Normal
Labels: module: distributions,triaged

## 🐛 Bug

Normal distribution's scale parameter is casted from float to int and rounded down. This is a bug or at least very unexpected, undocumented behavior. Documentation of the `pytorch.distributions.Normal` does not mention casting `loc` and `scale` to the same data type and  potentially causing rounding errors. 

## To Reproduce

Steps to reproduce the behavior:
1. Create a normal distribution with the following parameters: `loc` is `Tensor` with `dtype=int`, `scale` is `float`.
2. Values of the distribution parameters are casted to integers and `scale` parameter is rounded down. 

Example code 
```
import torch
import torch.distributions as td
td.Normal(torch.tensor(1), 0.5)
```

returns
```
Normal(loc: 1, scale: 0)
```

## Expected behavior
Normal distribution with the given values of parameters and the data types of the parameters casted to the float.

In the example `Normal(loc: 1.0, scale: 0.5)` is expected.

Another way to formulate this is that behavior for the following three alternatives should be same

```
(Normal(torch.tensor(1), torch.tensor(0.5)), 
Normal(torch.tensor(1), 0.5), 
Normal(1, torch.tensor(0.5))

(Normal(loc: 1, scale: 0.5),
 Normal(loc: 1, scale: 0),
 Normal(loc: 1.0, scale: 0.5))
```

## Environment

 - PyTorch Version (e.g., 1.0):  1.4.0
 - OS (e.g., Linux): Mac OSX 10.15.4
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Python version: 3.7
 - CUDA/cuDNN version: No CUDA

## Additional context
This can lead to difficult to track down bugs and probably affects also other probability distribution implementations in PyTorch.


cc @vincentqb @fritzo @neerajprad @alicanb @vishwakftw
Repository: flutter
Issue: Adding support for a third-party locale does not change text direction to RTL
Labels: c: new feature,framework,a: internationalization,d: api docs,would be a good package,c: proposal,P3,team-framework,triaged-framework

I'm developing a [package ](https://pub.dev/packages/kurdish_localization)to add support for Kurdish language which is RTL. I'm following [this guide ](https://flutter.dev/docs/development/accessibility-and-localization/internationalization#adding-support-for-a-new-language) which does not talk about changing directions. I added the following to support the direction but it does not help.

```dart

class _KuMaterialLocalizationsDelegate
    extends LocalizationsDelegate<WidgetsLocalizations> {
  const _KuMaterialLocalizationsDelegate();

  @override
  bool isSupported(Locale locale) => locale.languageCode == 'ku';

  @override
  Future<WidgetsLocalizations> load(Locale locale) async {
    const String localeName = "ku";
    await intl.initializeDateFormatting(localeName, null);
    return SynchronousFuture<WidgetsLocalizations>(
      KuWidgetLocalizations(),
    );
  }

  @override
  bool shouldReload(_KuMaterialLocalizationsDelegate old) => false;
}

class KuWidgetLocalizations extends WidgetsLocalizations {
  static const LocalizationsDelegate<WidgetsLocalizations> delegate =
      _KuMaterialLocalizationsDelegate();

  @override
  TextDirection get textDirection => TextDirection.rtl;
}

```
Repository: excalidraw
Issue: iPad + Pencil Support: UX Improvements
Labels: discussion

## Brief Intro

Excalidraw now supports drawing shapes, which is amazing! I thought of trying it out with my iPad + Pencil. I've noticed a couple of UX problems.

1. Discussion on UX of Selection/Exploration Modes on iPad

	### Current Behavior
	When using both fingers and a pencil to interact, it's very natural that the hand is used to move the canvas, and the pencil is used to draw things. Other note taking apps (native to iPad) solve this problem by having another cursor (hand cursor) if one wants to move the canvas with a pencil (as shown in the picture below, middle part, next to scissors). And another tool for selecting objects. This separation is key to iPad users.
	![image](https://user-images.githubusercontent.com/17767170/81951650-1ab50180-960e-11ea-9d10-3d5f9afc3c7c.png).
	
	I just realized that the pinching with two fingers does the same thing as I was expecting that it would do if I just used one finger to do it. I feel that my way the UX would be slightly better, but I'm open to hear your opinion on this.
	
	### Expected Behavior
	The hand gestures in my opinion should not be used for text selection, but for moving the canvas. Selection tool should be introduced for selecting things. Writing with a pencil should immediately trigger the shape-drawing mode.

2. Pencil shape-drawing switches to selection tool when pencil is lift up from the screen

	### Current Behavior
	When I try to write a word, as soon as the pencil stops touching the screen, Excalidraw immediately switches to the selection tool, and I need to click back on tool 7 (shape drawing) again. Basically I need to write everything without lifting the pencil from the screen. This is bad UX for both drawing and manual text writing.
	
	### Expected Behavior
	I'd be great if it could remain in the 7 mode (shape-drawing) as long as I tell it to switch to some other mode.
Repository: rust
Issue: Primitive vs struct antipattern?
Labels: A-borrow-checker,T-compiler,C-bug

This is coming from a stack overflow [question](https://stackoverflow.com/questions/61732690/why-is-it-allowed-to-have-both-immutable-and-mutable-borrows-of-a-vector-of-nume/61734260#61734260).

My answer didn't sit well with me. While it's true that the `add_assign` isn't called in the primitive case, the fact that it's called shouldn't cause a compilation failure because the Vec isn't being passed in.

The below fails to compile:

```rust
﻿﻿use std::ops::AddAssign;

#[derive(Clone, Copy, PartialEq, Debug, Default)]
struct MyNum(i32);

impl AddAssign for MyNum {
    fn add_assign(&mut self, rhs: MyNum) {
        *self = MyNum(self.0 + rhs.0)
    }
}

fn main() {
    let mut b = vec![MyNum(0), MyNum(1)];
    b[0] += b[1];
}
```
With this message:
```none
error[E0502]: cannot borrow `b` as immutable because it is also borrowed as mutable
  --> src/main.rs:14:13
   |
14 |     b[0] += b[1];
   |     --------^---
   |     |       |
   |     |       immutable borrow occurs here
   |     mutable borrow occurs here
   |     mutable borrow later used here
```

However this works:
```rust
fn main() {
    let mut b = vec![1, 2];
    b[0] += b[1];
}
```

Looking at the MIR, the only difference I can see is in the primitive case Index is called _before_ IndexMut whereas in the struct case that is reversed. I don't see why the struct needs to behave differently.

I expected to see this happen: the primitive case and the struct case should either both fail or both succeed. In my mind, they should both succeed as the dereference for `b[1]` can complete before `b[0]`.

If the mutable struct needs to exist first for some reason then the slice version should also fail, but this works:
```rust
use std::ops::AddAssign;

#[derive(Clone, Copy, PartialEq, Debug, Default)]
struct MyNum(i32);

impl AddAssign for MyNum {
    fn add_assign(&mut self, rhs: MyNum) {
        *self = MyNum(self.0 + rhs.0)
    }
}

fn main() {
    let mut b = vec![MyNum(0), MyNum(1)];
    let slice = b.as_mut_slice();
    slice[0] += slice[1];
}
```

### Meta
`rustc --version --verbose`:
```
rustc 1.45.0-nightly (75e1463c5 2020-05-13)
binary: rustc
commit-hash: 75e1463c52aaea25bd32ed53c73797357e561cce
commit-date: 2020-05-13
host: x86_64-apple-darwin
release: 1.45.0-nightly
LLVM version: 9.0
```
Repository: terminal
Issue: Support for `compact`, `default`, and `touch` friendly tab row sizes
Labels: Area-Settings,Product-Terminal,Issue-Task,Area-Theming

Make the tabs, caption buttons smaller at `compact`.
Make the tabs, caption buttons bigger at `touch`.

I can't recall which app I saw this in recently, but I thought it was a good idea. Firefox maybe? Definitely plays in to the work being outlined in #3327 / #5772.

Should this be it's own property, or a collection of other ones? 

```json
tabRow.height
tab.fontSize
tab.padding
```

All seem like properties the user would need to configure, but I'm not really sure now if all of them make sense atomically, or if a user would even want to tune them separately.
Repository: go
Issue: encoding/asn1: Marshal doesn't handle nil interface values correctly
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version go1.14.2 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/christoph/.cache/go-build"
GOENV="/home/christoph/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOOS="linux"
GOPATH="/home/christoph/.gopath"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build641307088=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
`asn1.Marshal` a struct containing a `nil` interface with `omitempty` tag.
https://play.golang.org/p/x-hrKEJH0Fe

### What did you expect to see?
No error and the corresponding field should be omitted from the output.
It works with nil slices (see example).


### What did you see instead?
Error: `asn1: cannot marshal nil value`
Repository: flutter
Issue: hot_mode_dev_cycle_linux__benchmark hotRestartMillisecondsToFrame trending upwards, now overwhelmingly red
Labels: tool,c: performance,perf: speed,team: benchmark,found in release: 1.19,P2,team-tool,triaged-tool

![Screen Shot 2020-05-14 at 9 31 44 AM](https://user-images.githubusercontent.com/1435716/81960392-bec68a80-95c5-11ea-9d2d-c43f348383d8.png)

Difficult to tell a culprit from this.
Repository: go
Issue: go/types: UsesCgo exposes mangled names
Labels: NeedsFix

When UsesCgo is enabled, cgo symbols appear in the package as their mangled names, e.g. `_CFunc_GoString`. This breaks autocomplete in gopls for `C` symbols. Also, it exposes things that are implementation details, like the `_cgo_` and `__cgofn` symbols.

We can try to fix this in gopls, but probably it'd be better in `go/types`. I'm not sure offhand how it'll work, given that each package needs its own version of "C". Maybe the package path could be rewritten to something specific?
Repository: flutter
Issue: smoke_catalina_start_up_ios timeToFirstFrameMicros and timeToFirstFrameRasterizedMicros benchmarks now consistently red...
Labels: c: regression,engine,c: performance,perf: speed,team: benchmark,found in release: 1.19,P3,team-engine,triaged-engine

Here's timeToFirstFrameMicros recently:

![Screen Shot 2020-05-14 at 9 35 24 AM](https://user-images.githubusercontent.com/1435716/81960767-4b714880-95c6-11ea-857e-9af5ec64bb40.png)

And here's 
timeToFirstFrameRasterizedMicros

![Screen Shot 2020-05-14 at 9 35 04 AM](https://user-images.githubusercontent.com/1435716/81960703-35fc1e80-95c6-11ea-888b-6c7c00ca584b.png)

Hard to tell a culprit.
Repository: flutter
Issue: Explain the memory metrics reported by tools like Instruments and ADB memstats
Labels: engine,c: performance,d: api docs,customer: money (g3),perf: memory,P3,team-engine,triaged-engine

ADB reports metrics such as:

Java Heap
Native Heap
Code
Stack
Graphics
Private Other
System

We should have explanation of each of these metrics in **Flutter context**.

We are exposing them in DevTools, people need to understand what "native heap" or "graphics" means w.r.t. Flutter.

This should include ways typical usage patterns affect each bucket, such as loading an asset, using shadows/ripples, loading plugins, etc.

For instance the double allocation in native heap + graphics memory while decoding PNGs is likely surprising to a lot of Flutter developers (https://github.com/flutter/flutter/issues/56483).
Repository: flutter
Issue: libflutter.so is not included in the "armeabi-v7a" folder when other "armeabi-v7a" libraries are included
Labels: c: crash,platform-android,tool,a: build,P2,team-android,triaged-android

libflutter.so is not included in the "armeabi-v7a" folder when other "armeabi-v7a" libraries are included.

## Steps to Reproduce

1. Run `flutter create -a java -i objc --androidx reprosteps`.

2. Build the app in debug and look inside the APK (for example using 7-zip).
Notice that libflutter.so is included in "lib\armeabi-v7a", "lib\x86", "lib\x86_64"

3. Put a .so library in the folder android\app\src\main\jniLibs\armeabi-v7a 

4. Build the app in debug mode and look inside the APK. 
Notice that libflutter.so is now gone from the folder "lib\armeabi-v7a"

## Flutter doctor

```console
[√] Flutter (Channel stable, v1.17.0, on Microsoft Windows [Version 10.0.17763.1158], locale de-DE)
    • Flutter version 1.17.0 at D:\src\flutter
    • Framework revision e6b34c2b5c (12 days ago), 2020-05-02 11:39:18 -0700
    • Engine revision 540786dd51
    • Dart version 2.8.1

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at D:\src\Android\sdk
    • Platform android-R, build-tools 29.0.3
    • ANDROID_HOME = D:\src\Android\sdk
    • Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[!] Android Studio (version 3.6)
    • Android Studio at D:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.45.0)
    • VS Code at C:\Users\sad1lo\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.10.1

[√] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is localhost,*.bosch.com,127.0.0.1
    • NO_PROXY contains 127.0.0.1
    • NO_PROXY contains localhost

[√] Connected device (1 available)
    • sdk gphone x86 64 arm64 • emulator-5554 • android-x64 • Android 10 (API 29) (emulator)
```
Repository: flutter
Issue: Create a top level navigationRail param in the Scaffold
Labels: framework,f: material design,c: proposal,team-design,triaged-design

Currently, the NavigationRail is recommended to be inserted inside of a Row in the Scaffold body. Part of the reason to do this is to leave it flexible for adding dividers.

The proposal is to make a top level widget param in the Scaffold, that can take in a NavigationRail. When a NavigationRail is provided through this param, the body would be recreated as a Row of the NavigationRail and the original body.
Repository: TypeScript
Issue: Add TS Server API for mapping TS file to output file
Labels: Suggestion,Committed

## Search Terms
- Debug / debugger
- compile
- tsserver


## Problem
VS Code would like to make it easy to debug the active TS file just by pressing F5. To implement this, we need a way to map from a TypeScript file to its JavaScript output. 

See  https://github.com/microsoft/vscode/issues/95544#issuecomment-628577083 for details

## Proposal
Add a new TS Server API that takes a typescript file and returns the  path to the output JavaScript file for it.
Repository: terminal
Issue: Triggers(Including Text Strings) and Actions (internal or external calls) 
Labels: Issue-Feature,Area-Extensibility,Product-Terminal

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

# Description of the new feature/enhancement

A Trigger system that will monitor several types o events, including text strings on the screen, that will be able to call several types of actions, like scripts, commands, or any resources possible of Windows Terminal.

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

# Proposed technical implementation details (optional)

"Nothing is created, everything is copied."
As you you may see, I'm a fan of iTerm2, my buddy for several years.
But I like this new Microsoft Style, so I'm trying to help.

The Suggestion her is a bit bold.
Provide an complementar Framework that will allow user execute almost any possible predefined action based on almost any event on the Windows Terminal.

A sub-system the will be monitoring events, and if it matches with some pre-activated event, it will trigger the action.

The triggers could be a simple match with a string on the text, or even something like an server-ended-session if it was an SSH/Telnet connection.

The actions could be the automatic highlight of the text, a long beep, open a new tab, or call an external app passing some parameters and receiving back some answer.

---

As I'm not a developer, and also not good with descriptions like these, I will bring the description of this Feature in iTerm2:
https://www.iterm2.com/documentation-one-page.html#documentation-triggers.html

<!-- 
A clear and concise description of what you want to happen.
-->