sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: terminal
Issue: Support runtime variables in the custom user title
Labels: Issue-Feature,Help Wanted,Area-UserInterface,Product-Terminal

The user should be able to embed certain terminal-specific variables in their custom title, that will be updated at runtime.

Something like:
```json
{
    "title":"{numberOfPanes} - Powershell"
}
```

Would then include the number of panes in the tab title text we display, like so: 
> 5 - Powershell

* [ ] What syntax do we chose for these custom variables?
* [ ] What variables should we include?
  - We should probably avoid any that'd be better served by a shell setting the title
  - #2396 We should be able to conditionally put "Administrator" in the title
  - #13241 - similarly, with the shield emoji
* [ ] Do we need to register change event handlers for each variable that they've put in the title? How do we handle that?
* [ ] Should we enable conditional elements in the string? e.g. `"{isAdmin?\"Admin\":\"\"} - {title}"` to get "Admin - cmd.exe"
  - Another example - `"{name} [{numberOfPanes<10?numberOfPanes : \"9+\"}]"` for "Powershell [2]" or "Powershell [9+]"
  - Another example - how would we get "Powershell" for 1 pane, but then "Powershell [+1]" for 2 panes? How would we encode the entire `[+{numberOfPanes}]` bit should be conditional on there being _more than one pane_? Could we combine this with the above case, and have nested conditionals?
    - Does all of this basically mean embedding an entire scripting language into the tabTitle?
* [ ] Request: "Tab title" text resolves environment variables #10144 
* [ ] #9929, #13506
 
This is _obviously_ related to #608, but this is certainly out of scope for v1.0. #608 is just setting a _simple_ title string to override the terminal's, this is setting a _dynamic_ title.
Repository: rust
Issue: Const generics: Generic array transmutes do not work
Labels: T-lang,T-compiler,A-const-generics,A-array

This trivial transmute should work:

```
#![feature(const_generics)]

fn silly_default<const N: usize>(arr: [u8; N]) -> [u8; N] {
    unsafe { core::mem::transmute::<_, _>(arr) }
}
```

Unfortunately, it [refuses to build](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=3a0ea23947501351fa5cc46714ff8c20) with the following error:

```
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
 --> src/lib.rs:4:14
  |
4 |     unsafe { core::mem::transmute::<_, _>(arr) }
  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `[u8; _]` does not have a fixed size
```

This means that the [array initialization example](https://doc.rust-lang.org/nightly/core/mem/union.MaybeUninit.html#initializing-an-array-element-by-element) from the `core::mem::MaybeUninit` documentation currently cannot be generalized to arrays of arbitrary size, as transmutes from `[MaybeUnit<T>; N]` to `[T; N]` won't compile.

A horribly error-prone workaround for generic array transmute is:

```
// Using &mut as an assertion of unique "ownership"
let ptr = &mut arr as *mut _ as *mut [T; N];
let res = unsafe { ptr.read() };
core::mem::forget(arr);
res
```
Repository: flutter
Issue: Please document ordering guarantees of platform channels
Labels: engine,d: api docs,customer: dream (g3),P2,team-engine,triaged-engine

We (in g3) rely on the fact that MethodChannel calls will be dispatched to the Dart handler in the same order as they were made on the Java side.

* Is this a correct assumption?
* Could this be documented in the comment in https://github.com/flutter/engine/blob/master/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java?
Repository: rust
Issue: Forgone caching in cycles caused much overflow in trait solving
Labels: A-trait-system,metabug,P-medium,T-compiler

We believe PR #60444 injected a number of regressions of the form "overflow evaluating requirement [...]".

(PR #60444 also injected a compile-time performance regression; that arguably distinct issue is tracked in issue #60846.)

This issue is meant to collect the cases where there was some sort of "overflow evaluating requirement" that was injected by PR #60444. (It is possible that many (or even all) such cases are resolved by follow-up PR #61754. I'll be beta-nominating that PR on its own so that we can evaluate that question in the compiler-team meeting.)

Update: adding list of cases to investigate:

 * [x] #61472 -- resolved by PR #61754 
 * [ ] rust-analyzer (see [comment below](https://github.com/rust-lang/rust/issues/61960#issuecomment-503636781))
 * [ ] #62059 
* [ ]  #62430
Repository: angular
Issue: Suggestion: Create an API on FormControl to focus the input 
Labels: feature,area: forms,feature: under consideration

# 🚀 feature request

### Relevant Package
This feature request is for @angular/forms


### Description
The FormControl class does not have a FOCUS method.


### Describe the solution you'd like
Create an API on FormControl that would easily allow the input to be focused without having to resort to bringing in Renderer or ElementRef.


### Describe alternatives you've considered
https://github.com/angular/angular/issues/12463
https://github.com/angular/angular/issues/13158

The best response for the Angular team is as follows:
>We’re trying to keep our forms modules light and fast, and so it’s important to balance additions to the API with keeping the bundle size manageable.

I fail to see how a focus method would increase bundle size in any significant way. Bits maybe. The trade off by not doing this is that everyone project implement their own focus thus increasing bundle size for nearly every project anyway since focus on an input is practically universal need for modern UI design.

The comment history on both issues show a need. There are several good arguments for this feature and since both issues where closed long ago I am submitting the feature request _again_ to make another community generated push for it.
Repository: storybook
Issue: @storybook-addon-options: per-story hiding panel, hides it for every story.
Labels: question / support,addon: options,ui,has workaround

### Bug or support request summary
HI, 

What we are trying to do, is to hide the knobs/actions panel per story. For example, on our welcomes page, we don't need it. So we used the options-addon to hide it for this "component".
And it works, BUT it also hides the panel for the rest of the stories.

What we want is to be able to hide the panel for one story and let it re-appear once we switch stories.
We know we can add the options again to the existing story, making it so that it shows up again, but I think that shouldn't be the only solution, no?

### Steps to reproduce
- Install the @storybook/addon-options
- add the { options: { showPanel: false } } to a story of your choice
- launch storybook and see if the panel is gone.
- Now, switch stories.
Result: the panel is hidden for every story.
Expected result: the panel should be hidden on 1 story, and shown for the others.

### Please specify which version of Storybook and optionally any affected addons that you're running

    "@storybook/addon-actions": "^5.1.8",
    "@storybook/addon-info": "^5.1.8",
    "@storybook/addon-knobs": "^5.1.8",
    "@storybook/addon-links": "^5.1.8",
    "@storybook/addon-options": "^5.1.8",
    "@storybook/addon-storyshots": "^5.1.8",
    "@storybook/addons": "^5.1.8",
    "@storybook/react": "^5.1.8",
    "babel-plugin-require-context-hook": "^1.0.0",
    "identity-obj-proxy": "^3.0.0",
    "node-sass": "^4.12.0",
    "prop-types": "^15.7.2",
    "react-chromatic": "^0.8.4",
    "react-content-loader": "^4.2.1",
    "react-number-format": "^4.0.7",
    "react-popover": "^0.5.10",
    "sass-loader": "^7.1.0",
    "styled-components": "^4.2.0"
 

### Affected platforms 

- Versie 75.0.3770.100 (Officiële build) (64-bits)

### Screenshots / Screencast / Code Snippets (Optional)

This is the code used to create the story that hides the panel. And it works. But hides the panel for the rest of the stories also.
```js
import React, { Fragment } from 'react';
import { storiesOf } from '@storybook/react';

const Welcome = () => {
  return (
    <Fragment>
      <h1>Welcome</h1>
     </Fragment>
  );
};

storiesOf('Welcome', module).add('Getting started', () => <Welcome />, { options: { showPanel: false } });

```
End bug report support request - delete the rest below
Repository: flutter
Issue: [Discussion] inheritFromWidgetOfExactType should not add a dependency if called outside of build/didChangeDependencies
Labels: framework,c: proposal,P3,team-framework,triaged-framework

Consider the following `Foo` widget:

```dart
class Foo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return RaisedButton(
      onPressed: () {
        MyInherited.of(context).doSomething();
      }
    );
  }
}
```

In that code snippet, for most implementations of `MyInherited.of`, pressing the RaisedButton will make `Foo` depend on `MyInherited`.

Which means after the button is clicked once, updating `MyInherited` will force `Foo` to rebuild, for no reason.

___

It is technically possible to prevent that from happening, using `ancestorInheritedElementForWidgetOfExactType` instead of `inheritFromWidgetOfExactType`.

But the fact that `inheritFromWidgetOfExactType` add the dependency when used outside of `build`/`didChangeDependencies` is probably more of a bug than the desired behavior.

____


There are multiple solutions:

- do a breaking change on `inheritFromWidgetOfExactType`, to not add a dependency when used outside of `build`/`didChangeDependencies`.

- Add a new method on `BuildContext`/`Element` that wraps `inheritFromWidgetOfExactType` and `ancestorInheritedElementForWidgetOfExactType` into something that switch between them depending on if used inside `build`/`didChangeDependencies` or not.

I can't think of a legitimate use-case where we'd want the current behavior. So although breaking, the first solution would probably a minimal impact.

Adding a new method on `BuildContext` for the `.of` pattern, although non-breaking, will likely have a much more significant impact.
Because that would implicitly require nearly all existing `.of` methods to be updated to use the new life-cycle.


cc @Hixie
Repository: tensorflow
Issue: Many context switches / Many threads even if threading is limited
Labels: stat:awaiting tensorflower,type:bug,comp:runtime,TF 2.5,2.6.0

**System information**
- Have I written custom code: No (https://github.com/tensorflow/docs/blob/master/site/en/r2/tutorials/quickstart/beginner.ipynb)
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux OpenSuse Leap 15.0
- TensorFlow installed from (source or binary): pip package tensorflow==2.0.0-beta1
- TensorFlow version (use command below): v2.0.0-beta0-16-g1d91213
- Python version: 3.7.3 
- GPU model and memory: CPU only

**Describe the current behavior**
If you limit the number of threads with tf.set_inter_op_parallelism_threads(NUM_THREADS) and tf.set_intra_op_parallelism_threads(NUM_THREADS) tensorflow creates a threadpool with more threads than NUM_THREADS and runs maximal NUM_THREADS causing high amount of context switches, which is delaying execution.

**Describe the expected behavior**
Create maximal NUM_THREADS and limit context switches.

**Code to reproduce the issue**
```python
from __future__ import absolute_import, division, print_function, unicode_literals
!pip install -q tensorflow==2.0.0-beta1
import tensorflow as tf
NUM_THREADS=2
tf.config.threading.set_inter_op_parallelism_threads(NUM_THREADS)
tf.config.threading.set_intra_op_parallelism_threads(NUM_THREADS)
mnist = tf.keras.datasets.mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0
model = tf.keras.models.Sequential([
  tf.keras.layers.Flatten(input_shape=(28, 28)),
  tf.keras.layers.Dense(128, activation='relu'),
  tf.keras.layers.Dropout(0.2),
  tf.keras.layers.Dense(10, activation='softmax')
])
model.compile(optimizer='adam',
              loss='sparse_categorical_crossentropy',
              metrics=['accuracy'])
model.fit(x_train, y_train, epochs=100)
```
Repository: svelte
Issue: Docs: Add an example of modifying complex store data
Labels: popular,documentation

People seems to be asking at regular intervals about how to update complex data in a store and, while it is relatively straight forward, we could add an example somewhere. Maybe in the tutorial.
Repository: flutter
Issue: Uncaught error handler is not threadsafe in Fuchsia embedder
Labels: c: crash,customer: fuchsia,engine,P2,team-engine,triaged-engine

In the `flutter_runner` embedder for Fuchsia, we landed mitigation to reduce the likelihood of a crash in the uncaught error handler when an uncaught exception is thrown immediately at/during shutdown. Related patch is https://fuchsia-review.googlesource.com/c/topaz/+/292831.

The error handling as originally landed was unsafe. Specifically, in the case where the unhandled error handler was triggered during shutdown, there was a race condition which could cause a crash in the following scenario:
1. `Runner::OnApplicationTerminate()` is triggered, which posts a task to the application's platform thread will free the `Application` instance and terminate the platform thread.
2. Before that task is serviced, the unhandled error handler is called (by `hooks.dart` -> `window.cc` -> `ui_dart_state.cc`) on the UI thread.
3. The kill task is serviced and the `Application` dtor and `Thread::Quit()` are called, terminating the platform thread.
4. The unhandled error handler attempts to post a task to the platform thread, whose thread was killed in step 3. This triggers a crash.

Fixing this requires a mechanism for the message loop to know that the associated thread has been terminated out from under it.

This patch adds mitigation for this scenario, but remains non-threadsafe/racy. We pass the unhandled error handler a weak pointer to the `Application` and check it before posting a task to the platform thread. This has two issues:
1. `WeakPtr` isn't threadsafe (nor is it intended to be), and assumes that all operations occur on a single thread. We're checking its value (which is mutated on the platform thread) on the UI thread without synchronization.
2. Even with a guarantee that the `WeakPtr` state were synchronized, there's a window between when we check the weak pointer and when we post to the platform thread in which application shutdown and thread destruction may occur.

This unsafe mitigation was landed in order to unblock a high priority bug ([FL-256](https://fuchsia.atlassian.net/browse/FL-256)) on a short schedule, and a proper refactoring is required to make this properly threadsafe.

/cc @cbracken @chinmaygarde
Repository: terminal
Issue: If we fail to open the settings file, display a message if it existed
Labels: Area-UserInterface,Product-Terminal,Issue-Task

A follow up from #1325. 

In #1325's case, the file _did_ exist, but we failed to open it. In this case, we should display some sort of error dialog to the user, instead of blowing away the user settings with the defaults.
Repository: flutter
Issue: Make --observatory-port work for Add to app
Labels: platform-android,tool,a: debugging,c: proposal,P3,team-android,triaged-android

Today, you can specify command line arguments in an iOS project that get passed through to the Engine and used, e.g. you can tell it to use a specific host port like so:

![image](https://user-images.githubusercontent.com/8620741/59789494-da74c400-9282-11e9-884d-cc7f67525ac5.png)

This isn't possible on Android though, but should be fixable by doing something like the following:

Framework (tooling):

1. Update packages/flutter_tools/lib/src/android/android_device.dart to pass another `--ei` flag with the port number through when starting the application
2. Possibly simplify the logic when this flag is set so that the port forwarding just uses the expected ports rather than trying to figure out the port.

Engine (Android embedding):

1. Update shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java and shell/platform/android/io/flutter/embedding/FlutterActivityDelegate.java to be aware of this extra intent information, and pass it through as a shell argument.  Bonus points if we can just merge the functionality of these classes.

/cc @xster @matthew-carroll @blasten @jason-simmons
Repository: TypeScript
Issue: Support --incremental with --module AMD
Labels: Suggestion,Awaiting More Feedback

## Search Terms

- module
- incremental
- AMD

## Suggestion

Support using the `--incremental` flag when outputting AMD modules.

## Use Cases

Projects that use the AMD module format should be able to get the performance benefits that come with `--incremental`. Currently testing locally it appears that using `--incremental` makes a large difference for compilation speed when outputting to ES6 modules but didn't make any difference for AMD.

## Examples

<!-- Show how this would be used and what the behavior would be -->

## Checklist

My suggestion meets these guidelines:

* [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, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: terminal
Issue: Support "Key Chords" in keybindings
Labels: Issue-Feature,Help Wanted,Area-Settings,Product-Terminal

Currently, we only support pressing a single key+modifiers to activate a keybinding action. 

However, many text editors support "key chords" where the chord is a combination of multiple keys pressed in sequence. For example, in Visual Studio, the default keybinding for "Comment Code" is  the chord `[ctrl+c, ctrl+k]`. 

We've already prepared for serializing these chords in the array of keybindings, but we don't support more than one key at a time. We'd have somehow check if a key is the start of a chord, and only dispatch the action when all keys for the chord have been pressed. 

Lots of questions:
* [ ] What happens if an action is bound to `[ctrl+c, ctrl+k]` and another is bound to `[ctrl+c]`?
* [ ] If the first key of a chord is pressed, but the second key _isn't_ bound to an action, should we write both keys to the input?
* [ ] If the first key of a chord is pressed, but then nothing is pressed for a long time, should we time out?
* [ ] What's the best way of finding the right keybinding for a chord? 
  - Iterating over all of them when a key is pressed, until the chord is dispatched seems awful (but trivial to do). 
  - Maybe we could build a tree of keychords, or a list of trees?
  - My CS542 senses are tingling and suggesting that this might be the case to use a state machine.
    - Is a state machine really different than a tree in this case?
Repository: flutter
Issue: Replacing TabController mid-animation throws exception
Labels: c: regression,framework,f: material design,f: scrolling,has reproducible steps,a: null-safety,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design

When trying to dynamically update the number of tabs with a new TabController, an exception is thrown because the animation library attempts to reach an AnimationController that is no longer available.

## Steps to Reproduce

Here's a [gist](https://gist.github.com/shihaohong/b5723a5902c6549cddbf6f1908255b83) with reproducible sample.

1. Get the TabBarView or TabBar mid-animation
2. Add/Remove tab while mid-animation

![tab_controller_regression](https://user-images.githubusercontent.com/27032613/59802913-dbb3ea00-929e-11e9-88d0-d4793e2cd3e9.gif)

## Logs
```
I/flutter ( 4483): #12     ScrollPositionWithSingleContext.setPixels 
package:flutter/…/widgets/scroll_position_with_single_context.dart:83
I/flutter ( 4483): #13     BallisticScrollActivity.applyMoveTo 
package:flutter/…/widgets/scroll_activity.dart:547
I/flutter ( 4483): #14     BallisticScrollActivity._tick 
package:flutter/…/widgets/scroll_activity.dart:534
I/flutter ( 4483): #15     _AnimationController&Animation&AnimationEagerListenerMixin&AnimationLocalListenersMixin.notifyListeners 
package:flutter/…/animation/listener_helpers.dart:124
I/flutter ( 4483): #16     AnimationController._tick 
package:flutter/…/animation/animation_controller.dart:765
I/flutter ( 4483): #17     Ticker._tick 
package:flutter/…/scheduler/ticker.dart:228
I/flutter ( 4483): #18     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback 
package:flutter/…/scheduler/binding.dart:1016
I/flutter ( 4483): #19     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame.<anonymous closure> 
package:flutter/…/scheduler/binding.dart:934
I/flutter ( 4483): #20     __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach  (dart:collection-patch/compact_hash.dart:367:8)
I/flutter ( 4483): #21     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame 
package:flutter/…/scheduler/binding.dart:932
I/flutter ( 4483): #22     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleBeginFrame 
package:flutter/…/scheduler/binding.dart:866
I/flutter ( 4483): #26     _invoke1  (dart:ui/hooks.dart:250:10)
I/flutter ( 4483): #27     _beginFrame  (dart:ui/hooks.dart:177:3)
I/flutter ( 4483): (elided 3 frames from package dart:async)
I/flutter ( 4483):
I/flutter ( 4483): The AnimationController notifying listeners was:
I/flutter ( 4483):   AnimationController#a39b9(▶ 343.604; for BallisticScrollActivity)
I/flutter ( 4483): ════════════════════════════════════════════════════════════════════════════════════════════════════
```
Repository: flutter
Issue: [iOS 13] New Text Editing Gestures
Labels: a: text input,platform-ios,framework,a: fidelity,f: cupertino,customer: crowd,P2,team-framework,triaged-framework

Several new gestures were announced at WWDC related to editing text:

| Gesture                                                           | Confirmed on iOS (not just iPadOS)?   |
| -------------------------------------------|------| 
| 3 finger pinch to copy                                   |  ✅    |
| Double 3 finger pinch to cut                        |         |
| 3 finger drop to paste                                   |         |
| 3 finger swipe left to undo                           |   ✅  |
| 3 finger swipe right to redo                         |  ✅   |
| 3 finger tap for shortcut menu                     |         |
| 3 finger double tap to select sentence       |  ❌   |
| 4 finger double tap to select paragraph     |  ❌   |
| Shake to undo                                                | ✅   |