sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: [proposal] FadeInImage.assetNetwork must provide a onImageLoaded callback
Labels: c: new feature,framework,a: images,c: proposal,P3,team-framework,triaged-framework

I need some callbacks in FadeInImage.assetNetwork, mainly to undestand when the image has finished loading. There's some work in progress on that?
Repository: vscode
Issue: Microsoft Auth Provider should support overriding client id and tenant id
Labels: feature-request,api-proposal,microsoft-authentication

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

The Microsoft Auth Provider uses a specific AAD application with client id hardcoded here:
https://github.com/microsoft/vscode/blob/582ea371c2bf785d88458dab95828387ad94a63d/extensions/microsoft-authentication/src/AADHelper.ts#L25-L26

However, this application only has access to a handful of scopes, and to add _allowed_ scopes to this client id is a manual process (which for an external extension author means opening an issue here and then having one of us add that scope to the _allowed_ scopes for the application)

As an extension author, I should easily be able to create my own AAD application (in the Azure Portal for example) and use that client id instead of the one vscode uses so that I can have control over the scopes I care about and, if this exists, I can get telemetry when my client id is used.

Since we have abstracted auth providers, I think it's fitting to be able to pass additional auth provider specific options down to an auth provider. For example, the Microsoft auth provider would take a client id and tenant that would replace the hard coded string above.

Proposal:

```ts
        /**
	 * Options to be used when getting an [AuthenticationSession](#AuthenticationSession) from an [AuthenticationProvider](#AuthenticationProvider).
	 */
	export interface AuthenticationGetSessionOptions {
		/**
		 * Whether login should be performed if there is no matching session.
		 *
		 * If true, a modal dialog will be shown asking the user to sign in. If false, a numbered badge will be shown
		 * on the accounts activity bar icon. An entry for the extension will be added under the menu to sign in. This
		 * allows quietly prompting the user to sign in.
		 *
		 * Defaults to false.
		 */
		createIfNone?: boolean;

		/**
		 * Whether the existing user session preference should be cleared.
		 *
		 * For authentication providers that support being signed into multiple accounts at once, the user will be
		 * prompted to select an account to use when [getSession](#authentication.getSession) is called. This preference
		 * is remembered until [getSession](#authentication.getSession) is called with this flag.
		 *
		 * Defaults to false.
		 */
		clearSessionPreference?: boolean;

		/*************/
		/***  NEW  ***/
		/*************/
                /**
                 * Provider specific options for getting this session (i.e. client id, tenant)
                 */
		providerOptions?: { [key: string]: any; }
	}
```

The Auth Provider would then need to be responsible for deciding if it already has created a session with these options or if it needs to create a new session based on these options.
Repository: transformers
Issue: [trainer] new in pytorch: `torch.optim._multi_tensor` faster optimizers 
Labels: Performance,WIP

Back in September pytorch introduced `torch.optim._multi_tensor` https://github.com/pytorch/pytorch/pull/43507 which should be much more efficient for situations with lots of small feature tensors (`transformers`) and thus should show an appreciable speed up in training. If someone is interested in the progress of this project here is the stack to track: https://github.com/pytorch/pytorch/pull/48223

This feature is currently an alpha stage, so users can try to use it by simply replacing `torch.optim` with `torch.optim._multi_tensor` in HF Trainer or their own trainer.

Eventually it'll replace `torch.optim` so there is nothing that we need to do otherwise.

@blefaudeux who alerted me to this improvement suggested it should have good speed ups for the DDP/Sharded DDP training.

If resources allow it'd be good to run some benchmarks. Please feel free to beat me to it.

Thanks to @blefaudeux for the heads up, and @izdeby for working on this enhancement and clarifying where things are at. 

heads up to: @sgugger, @patrickvonplaten - nothing else that needs to be done.
Repository: go
Issue: runtime/trace, cmd/trace: provide a per-M view
Labels: NeedsInvestigation,FeatureRequest,Debugging,compiler/runtime

The Go execution tracer currently provides a per-P view (default, via `/trace`) or a per-G view (via `/goroutines`).

When investigating issues with the scheduler I've frequently found myself wanting a per-M view, as that is the level that the scheduler truly operates on. This makes it easier to see when Ps switch between Ms, when Ms stop, etc.

For #43997, I found the need compelling enough that I built a one-off CL for it in http://golang.org/cl/286972. That CL adds an argument to (almost) every trace type, so I don't think it is acceptable as a general solution, but it would be nice to have a more complete version we could include for real.

cc @mknyszek @aclements @hyangah
Repository: go
Issue: x/pkgsite: include needed init methods in playable examples
Labels: NeedsFix,pkgsite,pkgsite/dochtml

An example may depend on an init function. When creating a playable example (standalone program) from an example, we currently do not include init functions, so such examples won't run correctly.

Example: https://pkg.go.dev/gonum.org/v1/gonum/graph/community#example-Profile-Multiplex

Challenges: 
- We only want to include the init function if it affects the example, so we have to walk its body to check.
- A relevant init function can be in any file in the test package, and we only examine one file at a time at present.
Repository: TypeScript
Issue: Prefer type correct import for add missing import for quick fixes
Labels: Suggestion,Awaiting More Feedback

# Bug Report

From https://github.com/microsoft/vscode/issues/115370

### 🔎 Search Terms

- Quick fix
- auto import


### 🕗 Version & Regression Information

**Tested version**: 4.2.0-dev.20210201

### ⏯ Playground Link

N/A


### 💻 Code
For the project:

```ts
// a1.ts
export const abc = 123
```

```ts
// a2.ts
export const abc = '123'
```

```ts
// index.ts
function foo(x: string) { }

foo(abc); // trigger quick fix here
```

1. Trigger the quick fix on `abc` in `foo(abc)`

### 🙁 Actual behavior

The import quick fixes are returned in file order:

<img width="534" alt="Screen Shot 2021-02-02 at 12 45 53 PM" src="https://user-images.githubusercontent.com/12821956/106660281-a1bb5880-6554-11eb-9e64-20f1c343aefb.png">

Accepting the first suggestion results in invalid code:

<img width="868" alt="Screen Shot 2021-02-02 at 12 46 42 PM" src="https://user-images.githubusercontent.com/12821956/106660334-b5ff5580-6554-11eb-8e4b-cdca3b18fb1b.png">


### 🙂 Expected behavior

In this case, we should sort the import for `a2` before `a1` since it has the correct type
Repository: electron
Issue: Default drag-and-drop cursor is the copy cursor
Labels: platform/macOS,platform/linux,component/drag-and-drop,status/confirmed,11-x-y

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  11.2.1
* **Operating System:**
  macOS Catalina 10.15.6
* **Last Known Working Electron version:**
  none

### Expected Behavior
<!-- A clear and concise description of what you expected to happen. -->
I expect that dragging a file over an electron app should not turn on the copy cursor by default.
### Actual Behavior
<!-- A clear and concise description of what actually happened. -->
When you drag a file over an electron app, the cursor gets the [copy cursor](https://support.apple.com/en-gb/guide/mac-help/mh35695/11.0/mac/11.0) icon while it is over the app window. The copy cursor is supposed to "indicate that dragging the item will create a copy of it at a new location." This is confusing, especially for an app which does have certain components that accept drag-and-drop and others that don't. You can prevent the copy cursor by adding an `onDragOver` handler to all non-drag-and-drop components, but that doesn't cover the edges of the `<body>` that are outside any component.

### To Reproduce
1. Create and launch the hello world app from the electron quick start guide.
2. Drag a file across the app window.

### Screenshots
Pressing command+shift+3 to take a screenshot makes the copy cursor icon disappear.

### Additional Information
This does happen in Chrome, but it makes sense there because Chrome will open a file that you drag-and-drop onto it. If this behavior is inherited from Chrome, it should get overridden, because it doesn't make sense for most parts of most apps.
Repository: create-react-app
Issue: Errors on type assertion, "extends" generics, and components with generics.
Labels: needs triage

Working on a new project at work, but I can't run the app like everybody else can. I get a lot of TS errors that they don't get.

We're all operating on WSL. Any idea what could be up? -- Or should I take this to the TS repo instead?

```json
        "react-scripts": "^4.0.1",
        "typescript": "4.1.3"
```

![image](https://user-images.githubusercontent.com/19484365/106652637-5c4e5980-655b-11eb-9457-9d0f345978df.png)

![image](https://user-images.githubusercontent.com/19484365/106652662-64a69480-655b-11eb-90ef-ec89f2f8555e.png)

![image](https://user-images.githubusercontent.com/19484365/106652681-6b350c00-655b-11eb-8c1c-e43af4e1425b.png)

![image](https://user-images.githubusercontent.com/19484365/106652695-7425dd80-655b-11eb-8c2b-234efa81b2aa.png)
Repository: rust
Issue: `rustc --target wasm32-unknown-unknown -Zinstrument-coverage` fails with "can't find crate for `profiler_builtins`"
Labels: C-bug,A-code-coverage

I'm trying to [add support for code coverage to wasm-bindgen tests](https://github.com/rustwasm/wasm-bindgen/issues/2276) with the new `-Zinstrument-coverage` flag, and hitting an error that I only partly understand.

I'm building this with https://github.com/anp/moxie/commit/20920cab2bc3a90b15f4fa396434a43058f0111a, if it would be helpful I can make a smaller repro. Here's the command I'm running and the output I'm seeing (repeated error messages snipped):

```
❯ env RUSTFLAGS=-Zinstrument-coverage cargo +nightly build --target wasm32-unknown-unknown --package moxie-dom
   Compiling cfg-if v1.0.0
   Compiling once_cell v1.5.2
   Compiling futures-sink v0.3.8
   Compiling futures-core v0.3.8
   Compiling scopeguard v1.1.0
   Compiling pin-utils v0.1.0
   Compiling slab v0.4.2
   Compiling futures-io v0.3.8
error[E0463]: can't find crate for `profiler_builtins`
  |
  = note: the compiler may have been built without the profiler runtime

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
...
error: could not compile `futures-sink`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
...
```

I've also tried using the `wasm32-wasi` target, but that also appears to be missing `profiler_builtins`. Does anyone have guidance on what code needs to be extended to support the instrument-coverage flag for wasm targets?

### Meta

`rustc --version --verbose`:
```
❯ rustc +nightly --version --verbose
rustc 1.51.0-nightly (04caa632d 2021-01-30)
binary: rustc
commit-hash: 04caa632dd10c2bf64b69524c7f9c4c30a436877
commit-date: 2021-01-30
host: aarch64-apple-darwin
release: 1.51.0-nightly
LLVM version: 11.0.1
```
Repository: rust
Issue: Emit warning when using `as` to directly cast function items to any integral type other than usize
Labels: A-lints,T-lang

Imagine you have a `u32`. You want to check if it's larger than the maximum value of a `u16`. Of course, you know that the API will give you a `u16`, so you will need to cast it to a `u32`.

You write a unit test. 100 million should be above the range of a `u16`, you think.
```rust
let x = 100_000_000;
let y = u16::max as u32;
println!("{}", x > y);
```
Output:
```
false
```
You begin to doubt your computer science education. In a fugue, you abandon all worldly possessions. You move to the woods. You raise chickens now; sometimes, though, you wonder if they're truly the ones raising you. It is a simpler life.

---

`u16::max` is the UFCS'd form of the default'd `max` method on the prelude'd `Ord` trait. To a first approximation, there is no reason to ever directly cast a function item to anything other than a `usize`. The compiler should emit a warning when attempting to cast a function item to `u8`, `u16`, `u32`, `u64`, `u128`, `i8`, `i16`, `i32`, `i64`, `i128`, and `isize`. This would not apply to transitive casts; `foo as usize as i8` would not warn.

(If I had realized this existed, I would have renamed `u16::MAX` [back when I had the chance](https://github.com/rust-lang/rfcs/pull/2700).)
Repository: vscode
Issue: Design exploration for improving experience for new users
Labels: ux,under-discussion

## Overview

This design exploration aims to improve the overall experience for new users while also providing value for existing users. Going through feedback from new and existing users we've heard that:

- Activity bar icons can sometimes be hard to understand if not familiar with them
- Some features (like the command palette and terminal) are hard to discover
- Desire to control overall density

We also wanted to take the opportunity to explore updating the overall aesthetics like:

- Create uniform sizing/padding (using multiples of 4)
- Update default color system
- Alternate placement of account/settings

## Demo

Below is an example of this exploration. Here's a few ideas that we tried:

- Adding labels to the activity bar
- Moving account/settings to the top right
- Introducing an omni search to include commands, files, tasks, etc. (also combining text search into this)
- Introducing a "density" toggle (similar to email clients)
- Introducing a Terminal toggle in the status bar
- Introducing GUI features for Git
- Condensed color system into ~10 colors


![design mockup](https://user-images.githubusercontent.com/35271042/106676782-5c0a8a00-656c-11eb-96d8-439204827c21.png)


https://user-images.githubusercontent.com/35271042/106675880-c02c4e80-656a-11eb-8f5f-ead5e96300ba.mp4


## Feedback

Here's the feedback I've received on this concept from our team. I'll break down the concepts into individual issue for those we are interested in pursuing more. Note: since this concept touches several ideas at once, it would be good to break down some changes (like density changes and showing more/less UI should be separate).

### Pros
- Friendlier activity bar labels for new users
- Omni search helps discoverability of command palette/search
- Moving settings/accounts in title bar helps separate views from menus
- Consistent spacing makes for a uniform UI
- Easy toggle for changing density

### Cons
- Omni search
  - Can be hard to distinguish
  - Could be too advanced for new users
  - Takes up title bar space (will need to look into OS guidelines)
  - Need to evaluate relationship between Quick Open + Command Palette
  - Can take up dragging real estate for title bar
- Could be costly to maintain two designs w/ density mode
- Some prefer settings/accounts in activity bar

Happy to hear any additional feedback others have on this concept.
Repository: flutter
Issue: [proposal] extra video_player options for native player
Labels: c: new feature,platform-android,p: video_player,package,c: proposal,P3,team-android,triaged-android

From the ExoPlayer troubleshooting guide, 

"ExoPlayer will appear to be stuck in the buffering state when asked to play an MPEG-TS file that lacks AUDs or IDR keyframes. If you need to play such files, you can do so using FLAG_DETECT_ACCESS_UNITS and FLAG_ALLOW_NON_IDR_KEYFRAMES respectively."

Is there anyway I can set these FLAGS on video_player ?

Thanks
Repository: PowerToys
Issue: Middle-click title bar to move windows between zones
Labels: Idea-Enhancement,FancyZones-Dragging&UI,Product-FancyZones

DisplayFusion provides a very useful functionality where you can move windows between zones simply by middle clicking the Titlebar. This will move a window across to the next zone. I believe this is a good feature for rapidly moving windows between different zones.
Repository: pytorch
Issue: [RPC] rref.get_type() should have default return type of future
Labels: oncall: distributed,module: rpc

## 🚀 Feature
https://github.com/pytorch/pytorch/pull/50977 is adding an option to make `rref.get_type()` not block. Per @mrshenli 's comments on that PR, it would be better if the `getRRefType` and _rref_typeof_on_owner return a future by default, so this function always returns a future. Then we can chain additional logic as a callback.

Open question: If we make this API public, should it by only return a future, or should we have an option to also block and return an actual type (as is the current behavior?)


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @jjlilley @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu
Repository: rust
Issue: Wrapper variable considered live after all of its constituents are consumed 
Labels: A-lifetimes,T-compiler,C-bug

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
use either::Either;
struct A;
struct B;
struct AW<'a>(&'a mut A);
impl<'a> Drop for AW<'a> {
    fn drop(&mut self) {

    }
}
fn cap(_: &mut A) -> Either::<AW<'_>, B> {
    unimplemented!()
}
pub fn main() {
    let mut a = A;
    let b = cap(&mut a);
    match b {
        Either::Left(a) => {
            drop(a);
        },
        Either::Right(y) => {
            a = A; // <- doesn't compile
        }
    }; // No way is the compiler going to drop b at this point in either case
}

```

In this piece of code, the compiler keeps `b` alive for the entire duration of match, preventing me from assigning to `a` in the `Right` arm. The explanation it gives is that it needs to run drop on `b` at the end of the match.

```
error[E0506]: cannot assign to `a` because it is borrowed
  --> src/main.rs:22:13
   |
15 |     let b = cap(&mut a);
   |                 ------ borrow of `a` occurs here
...
22 |             a = A;
   |             ^^^^^ assignment to borrowed `a` occurs here
...
26 | }
   | - borrow might be used here, when `b` is dropped and runs the destructor for type `Either<AW<'_>, B>`
```

However, that's not the case at all. `b` is partially moved in both arms, its `drop` cannot be called at the end of match.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.50.0-nightly (f76ecd066 2020-12-15)
binary: rustc
commit-hash: f76ecd0668fcdb289456cdc72a39ad15467cc454
commit-date: 2020-12-15
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly

```
Repository: pytorch
Issue: `fractional_max_pool{2, 3}d` inconsistent between CUDA and CPU
Labels: triaged,module: pooling

2D Variant
```python
import torch
x = torch.randn(2, 7, 7, requires_grad=True, device='cpu')
samples = x.new(2, 2).uniform_()
torch.nn.functional.fractional_max_pool2d(x, (2, 2), output_size=(3, 3), _random_samples=samples)
tensor([[[ 0.7063,  0.2786,  0.8529],
         [ 0.7309,  0.8398,  1.5179],
         [ 0.5881,  1.4823,  0.6529]],

        [[-0.1289,  1.4571,  0.5930],
         [ 0.6710,  0.3553,  0.9126],
         [ 0.6864,  0.3350,  0.6807]]], grad_fn=<FractionalMaxPool2DBackward>)
torch.nn.functional.fractional_max_pool2d(x.cuda(), (2, 2), output_size=(3, 3), _random_samples=samples.cuda())
RuntimeError: TensorAccessor expected 3 dims but tensor has 2
```

3D Variant
```python
import torch
x = torch.randn(2, 7, 7, 7, requires_grad=True, device='cpu')
samples = x.new(2, 2).uniform_()
torch.nn.functional.fractional_max_pool3d(x, (2, 2, 2), output_size=(3, 3, 3), _random_samples=samples).shape
torch.Size([2, 3, 3, 3])
torch.nn.functional.fractional_max_pool3d(x.cuda(), (2, 2, 2), output_size=(3, 3, 3), _random_samples=samples.cuda()).shape
RuntimeError: TensorAccessor expected 3 dims but tensor has 2
```

cc @heitorschueroff
Repository: pytorch
Issue: [docs] FractionalMaxPool2d : _random_samples arg is present in signature but undocumented.
Labels: module: docs,module: nn,triaged,module: pooling

## 📚 Documentation

`_random_samples` arg is present in signature but undocumented. Not sure if it is private argument based on the name, but since it is part of the public API, I think it should have some detail about what it does.

https://pytorch.org/docs/master/generated/torch.nn.FractionalMaxPool2d.html?highlight=fractionalmax

![Screenshot from 2021-02-03 12-42-52](https://user-images.githubusercontent.com/19503980/106711506-a0a22e00-661d-11eb-93d7-3dd47ee24eb9.png)


cc @jlin27 @mruberry @albanD @jbschlosser @heitorschueroff
Repository: react-native
Issue: iOS TextInput Component with nested text
Labels: Needs: Triage :mag:,Never gets stale

I have reported before ([link](https://github.com/facebook/react-native/issues/28335)) but no response and issue has been closed.

Description:

Hi there! I have just found a bug on iOS multiple TextInput with using nested text display, which not able to have the correct style in some special cases. (Android works fine with the same code.)
As I need to have different style for different text in the same the text input box, nested text is applied instead of changing the style in TextInput

React Native version: 0.61

## Steps To Reproduce
1. Start editing
2. Type Chinese / Emoji **FIRST**
3. type other wordings

## Results
Start with Chinese wordings: style will be update after typing english / number
Start with Emoji: style won't be update

## Expected Results
wordings will be having the style set, but still in default style

## Code example:
```
<TextInput
   onChangeText={text => {
              this.setState({
                text
              })
            }}
>
   <Text style={{ color: 'red' }}>{this.state.text}</Text>
</TextInput>
```

## Screenshot:
Normal case
![image](https://user-images.githubusercontent.com/57885825/76875998-420c7e00-68ac-11ea-9107-ce0f628562ee.png)

Error case in which start with Chinese
![image](https://user-images.githubusercontent.com/57885825/76876048-55b7e480-68ac-11ea-9d68-3918f558fee5.png)

Resume after typing english / number
![image](https://user-images.githubusercontent.com/57885825/76876062-5a7c9880-68ac-11ea-8056-ba471450bdb4.png)

Error case in which start with Emoji
![image](https://user-images.githubusercontent.com/57885825/76876077-5ea8b600-68ac-11ea-8716-7c05cc5752e2.png)

I have a quick study and find that `- (void)setAttributedText:(NSAttributedString *)attributedText` from `/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m` is not called in the following case.

Thanks for your time and hope to hear feedbacks from your team!