sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: doc: document idiomatic way to ensure that type satisfies a generic constraint 
Labels: Documentation,NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
// This playground uses a development build of Go:
// devel go1.18-16d6a5233a Tue Jan 25 00:39:08 2022 +0000
</pre>


### What did you do?

https://gotipplay.golang.org/p/RX-7wE7yCzp

```golang
package main

// traditional golang interface
type I interface {
	Fn() int
}

// generic interface
type TI[T any] interface {
	Fn() T
}

// generic constraint
type CI[T any] interface {
	~struct {
		Thing int
	}
	Fn() T
}

//
// Implementation
//

type Concrete struct {
	Thing int
}

func (c Concrete) Fn() int {
	return c.Thing
}

// ok
var _ I = Concrete{}

// ok
var _ TI[int] = Concrete{}

// error: interface contains type constraints
var _ CI[int] = Concrete{}

// this doesn't seem very idiomatic
func SatisfiesCI[C CI[int]](c C) {}

func init() {
	SatisfiesCI(Concrete{})
}
```


### Description

The current FAQ [describes the idiomatic way to ensure your type satisfies an interface](https://go.dev/doc/faq#implements_interface). I find I use this idiom a lot to make sure I don't accidentally break concrete implementations of things that are only used by a few consumers of a library, but not necessarily in the library itself (... or maybe I'm too lazy to write a test for it :shipit:). 

As I was migrating a project to see what it would look like under generics, I made some of the interfaces generic and that worked fine. Unfortunately, this sort of check doesn't work with constraints, and there doesn't seem to be a good way to ensure that your type satisfies the constraint other than creating a function to do so.

I get why you can't assign to a constraint interface -- you can't create variables that "are a constraint".

It would be good for someone more experienced with generics to decide on an idiomatic way to do this sort of 'constraint assertion', and make sure it ends up in the FAQ. It's possible there isn't a non-clunky way right now, and that this issue would need to be deferred until more experience is had with generics.

It's also possible I missed an earlier issue/discussion that asked for this, in which case I apologize (but I did look!).
Repository: flutter
Issue: TextInputConnection updateConfig does not update action button
Labels: a: text input,framework,has reproducible steps,P2,found in release: 2.8,found in release: 2.10,team-framework,triaged-framework

Software keyboards have an "action button". It often shows a message like "Done", "Search", or shows a newline icon. This button can be configured as needed by an app. Flutter provides an API to configure this button when the keyboard first opens, as well as an API to change the button after the keyboard is already open.

Flutter's API to change the button after the keyboard has opened doesn't work.

Here's a Flutter snippet that provides an initial keyboard configuration and shows the keyboard:

```dart
_inputConnection = TextInput.attach(
  this, // or whatever you have that implements TextInputClient
  TextInputConfiguration(
    enableDeltaModel: true,
    inputAction: TextInputAction.newline,
    // possibly other configurations
  ),
);

_inputConnection!
  ..show()
  ..setEditingState(/* pass in some initial editing value */);
```

Once the keyboard is visible, an app should be able to change the action button using the following code, but the button doesn't change:

```dart
_inputConnection.updateConfig(
  TextInputConfiguration(
    enableDeltaModel: true,
    inputAction: TextInputAction.done,
    // possibly other configurations
  ),
);
```

Expected result: When the 2nd snippet executes, the keyboard changes its action button from a newline icon to a "Done" button.

Actual result: When the 2nd snippet executes, the action button doesn't change.

I've reproduced this issue on:

 * iOS simulator (iOS 15.0)
 * iPhone 7 (iOS 13.6.1)
 * Android emulator (Android 10 - AKA API 29)
 * Pixel 4a (Android 12)

Flutter version:
```
Flutter 2.8.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision cf44000065 (7 weeks ago) • 2021-12-08 14:06:50 -0800
Engine • revision 40a99c5951
Tools • Dart 2.15.0

```
Repository: angular
Issue: HTML special characters do not render correctly when using string interpolation together with && operator.  
Labels: area: compiler,P3

### Which @angular/* package(s) are the source of the bug?

Don't known / other

### Is this a regression?

Yes

### Description

To reproduce add the following to your template:

`<div>{{ true && false ? "foo" : "&nbsp;" }}</div>`

**Expected behavior:** nothing visually renders to the page.
 
**Actual behavior:** the string `"&nbsp;"` renders to the page.

**Furthermore:** this unexpected behavior was not present in Angular 12.

Additionally, the following behaves as expected in Angular 13:

`<div>{{ true &amp;&amp; false ? "foo" : "&nbsp;" }}</div>`

If this is not a bug, but rather an undocumented issue that ampersands need to be escaped when using string interpolation in Angular 13 the docs should be updated to reflect that.

### Please provide a link to a minimal reproduction of the bug

_No response_

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 13.1.4
Node: 14.16.1
Package Manager: npm 6.14.12
OS: linux x64

Angular: 13.1.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1301.4
@angular-devkit/build-angular   13.1.4
@angular-devkit/core            13.1.4
@angular-devkit/schematics      13.1.4
@angular/cli                    13.1.4
@schematics/angular             13.1.4
rxjs                            6.6.7
typescript                      4.5.5
```


### Anything else?

_No response_
Repository: go
Issue: cmd/compile: adjustment needed for conversion rules for pointer conversions (?)
Labels: NeedsDecision,generics

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?
go1.18-16d6a5233a Tue Jan 25 00:39:08 2022 +0000.  Using gotipplay.golang.org.

### Does this issue reproduce with the latest release?
No.


### What operating system and processor architecture are you using (`go env`)?
I am using gotipplay.golang.org.

### What did you do?

```
func Sum[Slice ~[]int](aslice Slice) int {
    p := (*[]int)(&aslice) // compile error: cannot convert &slice (value of type *Slice) to type *[]int
    result := 0
    for _, y := range *p {
        result += y
    }
    return result
}
```

### What did you expect to see?

I expect p to be a `*[]int`

### What did you see instead?

A compile error. cannot convert &slice (value of type *Slice) to type *[]int.
Repository: ant-design
Issue: Enable Horizontal Scroll for `TreeSelect`
Labels: 💡 Feature Request,Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate: #33848 (auto-closed due to issue format error); #33575

### What problem does this feature solve?

Currently the content becomes invisible for `TreeSelect` of limited width but large nested tree.

<img width="528" alt="image" src="https://user-images.githubusercontent.com/31494475/148316259-42f3e1cc-9df8-41d2-9408-4b2c1b07d319.png">

### What does the proposed API look like?

Enable horizontal scroll for `TreeSelect` by default. It should be compatible with infinite scroll which mainly optimizes vertical loading.


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: yt-dlp
Issue: highlight+print default format (autoselection) to console when using -F or -Fv or -f-
Labels: enhancement

### Checklist

- [X] I'm reporting a feature request
- [X] I've verified that I'm running yt-dlp version **2022.01.21**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

## current behaviour
When downloading a video, the selected formats are printed to the console, e.g.:
`[info] dJdaI3pCowU: Downloading 2 format(s): 248+251`

But when `-F` is used, this information is omitted / not displayed.

## proposals
When using `-F` or `-Fv` or `-f-`

1. asterisk the autoselected/default formats (i.e. the formats which **would** be downloaded with the current settings)
2. also print to console the autoselected/default formats 
something like:
`[info] dJdaI3pCowU: Downloading 2 format(s): 248+251`
or
`[info] dJdaI3pCowU: current settings would download 2 format(s): 248+251`


## mock screenshot
![Img](https://i.imgur.com/UD06LDe.png)

## rationale
It's helpful to use `-F` to see what formats are available and what formats among them will be autoselected for download after `-F` is dropped.

## dupes

* #4610
Repository: react-native
Issue: [Android] TestID assigned to TextInput control not working
Labels: Component: TextInput,Platform: Android,Needs: Triage :mag:,Accessibility Team - Evaluated

### Description

Adding TestID on Android platform to TextInput does not show up in Appium Inspector or Appium tests.

"react": "^16.12.0",
"react-native": "^0.64.3",

Appium Doctor v.1.15.3

### Version

16.12.0

### Output of `npx react-native info`

System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 36.09 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 16.2.0 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 7.13.0 - /usr/local/bin/npm
    Watchman: 2021.11.08.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 30
      Build Tools: 28.0.3, 29.0.3, 32.0.0
      System Images: android-30 | ARM 64 v8a, android-30 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7935034
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: Not Found
    react-native: ^0.64.3 => 0.64.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found


### Steps to reproduce

1. Add Test ID to TextInput component
2.  **Open app on Android Emulator**
3. Open Appium inspector to inspect this component / Write Appium test to inspect this component

Expected: testID value should be present in ID attribute of the component.
Result : testID value is not present in ID attribute

```
import { TextInput } from 'react-native';

<TextInput
      testID={item.testID}
      editable={!disabled}
      maxLength={maxLength}
      accessibilityLabel={ariaLabel}
      onChangeText={onChangeText}
      selectionColor={colorMapping.blue}
      style={[composedStyle.textbox, isiOS && !innerLabel ? {} : innerLabelBorderStyle]}
      underlineColorAndroid='transparent'
      onFocus={onFocus}
      onBlur={onBlur}
      value={value}
      accessibilityLabel={ariaLabel}
 />
```

### Snack, code example, screenshot, or link to a repository

_No response_
Repository: flutter
Issue: Text Baseline using `Text.rich` is Misaligned when used with WidgetSpan
Labels: framework,f: material design,a: typography,has reproducible steps,P2,found in release: 2.8,found in release: 2.9,team-design,triaged-design

## Steps to Reproduce

1. Create an app with a `Text.rich` widget and a `TextSpan` widget
2. Give the span one child `TextSpan` with an arbitrary font size significantly larger than the default font size
3. Give the text span a `WidgetSpan` child containing a `Text` widget with an arbitrary string and the same large font size
4. Run the app
5. Open the flutter inspector and enable "Show Baselines"

**Expected results:**
Both strings laid out on the same baseline as `Text.rich` and even with each other

**Actual results:**
The string is misaligned with it's parent `Text.rich`'s baseline.

Note in preemptive response to "Why use a `WidgetSpan` instead of just an `InlineSpan` directly?":
I need to put an arbitrary box decoration behind a word that's inline with a bunch of other text. This was left out of the reproduction for brevity.

**Flutter version 2.8.1, stable branch**

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(home: BaselineTest()));
}

class BaselineTest extends StatelessWidget {
  const BaselineTest({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text.rich(
          TextSpan(
            children: [
              TextSpan(text: 'foo', style: TextStyle(fontSize: 30)),
              WidgetSpan(
                child: Text('bar', style: TextStyle(fontSize: 30)),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
```

![Screenshot_1643175582](https://user-images.githubusercontent.com/10675231/151110503-94282f0d-c814-4492-a2ca-296dd7b9aa5f.png)
The above sample code. Note that the baseline for `bar` is significantly above the `foo` text.
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/pytorch
Labels: triaged,module: infra
Repository: flutter
Issue: [Windows] tablet mode can't hide soft keyboard when unfocus
Labels: a: text input,framework,a: tablet,platform-windows,a: desktop,P3,team-windows,triaged-windows

**1. run sample in windows tablet mode**
flutter create --sample=widgets.FocusNode.unfocus.1 mysample

**2. focus on a textfield, then open the soft keyboard**

**3. click unfocus**
 
the soft keyboard should auto hide, but not.
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/labeler-github-action 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/pytorch-ci-dockerfiles 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/pytorch-integration-testing 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/ossci-job-dsl 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/add-annotations-github-action 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/rfcs 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/pytorch_sphinx_theme 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/csprng 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/java-demo 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/extension-script 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/workshops 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/cppdocs 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/nestedtensor 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/extension-ffi 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/accimage 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/ios-demo-app 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/tvm 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/elastic 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/translate 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/android-demo-app 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/extension-cpp 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/hub 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/tnt 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/QNNPACK 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/xla 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/serve 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/glow 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/captum 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/ELF 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/ignite 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: pytorch
Issue: Migrate master to main: https://github.com/pytorch/tutorials 
Labels: triaged,module: infra

Please look at the parent issue for instructions.(https://github.com/pytorch/pytorch/issues/62540)
Repository: flutter
Issue: Support returning a native call stack asynchronously through plugins
Labels: platform-android,platform-ios,engine,customer: google,P3,customer: huggsy (g3),a: plugins,team-engine,triaged-engine

I didn't find an existing bug for this.

Internal issue b/215360895. 

Currently, Flutter has the ability to return native stack traces through a plugin synchronously. For an Android plugin implementation, it even does so if an exemption is thrown synchronously while inside the MethodCallHandler#onMethodCall. 

However, if the Java method call handler goes async and later returns an error through the Result object, there's no way to pass the native stack trace back through. This should be a supported use case.

Let asynchronous errors detected in the plugin implementation have feature parity (in terms of returning a stack) as synchronously detected errors.
Repository: flutter
Issue: [NavigationRail] Add mainAxisAlignment property
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

NavigationRail is built for big screens, so when we use one, we may want to space it evenly, so it looks better.
<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

Add a mainAxisAlignment parameter to NavigationRail's constructor, and pass it to [the underlying column.](https://github.com/flutter/flutter/blob/94d9b02debb9a83b5df559edb5736ff83663ea31/packages/flutter/lib/src/material/navigation_rail.dart#L418)
<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching something showing what you are imagining:
      * images
      * videos
      * code samples

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->