sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Contrived type-outlives code does not compile
Labels: A-lifetimes,T-compiler,C-bug

The following code (based on https://github.com/rust-lang/rust/pull/67911#issuecomment-576029184):

```rust
fn g<'a, T: 'a>(t: &T) -> &'a i32 {
    &0
}

fn f<'a, 'b, T: 'a + 'b>(x: T) -> (&'a i32, &'b i32) { // compare with returning (&'a i32, &'a i32) 
    let y = g(&x);
    (y, y)
}
```

produces the following error message as of `rustc 1.46.0-nightly (ff5b446d2 2020-06-23)`:

```
error[E0310]: the parameter type `T` may not live long enough
 --> src/lib.rs:6:13
  |
5 | fn f<'a, 'b, T: 'a + 'b>(x: T) -> (&'a i32, &'b i32) { // compare with returning (&'a i32, &'a i32) 
  |              -- help: consider adding an explicit lifetime bound...: `T: 'static +`
6 |     let y = g(&x);
  |             ^
  |
note: ...so that the type `T` will meet its required lifetime bounds
 --> src/lib.rs:6:13
  |
6 |     let y = g(&x);
  |             ^
```

with `-Z borrowck=mir`:

```
error[E0309]: the parameter type `T` may not live long enough
 --> contrived.rs:6:13
  |
6 |     let y = g(&x);
  |             ^^^^^
  |
  = help: consider adding an explicit lifetime bound `T: 'a`...
```

However, this should actually be able to compile. If we infer `y` to the equivalent of `&('a + 'b) i32`, then

`(&('a + 'b) i32, &('a + 'b) i32) <: (&'a i32, &'b i32)`

We have that `T: 'a` and `T: 'b` from the generic parameter `T: 'a + 'b`, so we should be able to determine that `T` lives long enough.

However, the current `TypeTest` code (if I understand it correctly) attempts to prove that a type lives long enough by applying each of the lifetime bounds individually (e.g. splitting `T: 'a + 'b` into `T: 'a` and `T: 'b`). However, neither `T: 'a` nor `T: 'a` alone is sufficient to prove that `T: 'a + 'b`, so this check fails.

I suspect that this will never actually matter in practice, so the additional complexity needed to make this code compile might not be worth it. However, I didn't see an open issue for this, so I opened this issue for future reference.
Repository: PowerToys
Issue: xrandr for Windows
Labels: Idea-New PowerToy

xrandr is a command line tool to manage your monitors (which is present in Ubuntu). The usual thing I do with xrandr is to shrink my entire screen to create more desktop space.

I have already read why it is impossible to implement this on Windows. Shrinking the monitor will cause pixels not to render properly, by saying that, this feature request will be substantially closed.

I'm looking at the brighter side. Who knows, maybe at a certain degree of scaling, ClearType, anti-aliasing or other tweaks may fix those issues. (I have done this with Ubuntu, and my screen configuration is still manageable).
Repository: rust
Issue: Inefficient code generated for state machine
Labels: I-slow,C-enhancement,A-codegen,T-compiler

<!--
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.
-->

While trying to implement a parser using a state machine, I found that it isn't optimised very well. I've made a comparison on godbolt: https://godbolt.org/z/NJ9HM5

I'd expect the `match` statement to be replaced with jumps since the state should be statically known at the end of each branch

(Side note: I'd hope that the `Normal` loop got auto-vectorized in the `fast` version since it's performing the same check over and over)
Repository: electron
Issue: Support notification buttons on Linux through libnotify
Labels: enhancement :sparkles:

<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### 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 a feature request that matches the one I want to file, without success.

### Problem Description

The current [Notifications](https://www.electronjs.org/docs/api/notification#new-notificationoptions-experimental) API only supports [NotificationAction](https://www.electronjs.org/docs/api/structures/notification-action) objects on macOS.

https://github.com/electron/electron/pull/11647 seems to be the MR which implemented that functionality for macOS only.

### Proposed Solution
<!-- Describe the solution you'd like in a clear and concise manner -->

Linux systems running with `libnotify` also support adding buttons to notifications.

[Example user API with Python's notify2](https://notify2.readthedocs.io/en/latest/#notify2.Notification.add_action)
[Source code: Loop listening on DBus for user interaction with the buttons](https://bitbucket.org/takluyver/pynotify2/src/3ddc2d22632a35bd4c12ebb5684539ce02fecd6c/notify2.py#lines-109)

Linux support could make use of the same, already established **NotificationAction** API as macOS, with only the implementation under the hood being different.

### Alternatives Considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

None

### Additional Information

- https://github.com/electron/electron/issues/1399 is currently closed and doesn't address Linux support directly, so that's why I've decide to create a new issue
Repository: deno
Issue: Allow wildcards in --allow-net allow lists.
Labels: cli,suggestion

It will be good to allow wildcards in the `--allow-net` allow lists.

For example, this code throws errors:
```deno
//Import the server module
await fetch('https://facebook.com')
```
`deno run --allow-net=facebook.com server.js`

Because **https://facebook.com** redirects to **https://www.facebook.com**

This should be possible to run it;
`deno run --allow-net=*.facebook.com server.js`

Port based wildcards might also be good. For example
**https only**
`deno run --allow-net=https://* server.js`
or
`deno run --allow-net=*/**:443 server.js`
Repository: rust
Issue: xabort incorrect argument
Labels: O-x86_64,T-libs-api,C-bug

### I tried this code:

[godbolt link](https://rust.godbolt.org/z/BS2vYu), you need to pass platform features.

```rust
#![no_std]
#![feature(stdsimd)]
use core::arch::x86_64::{_xabort, _xtest};

pub fn abort(x: i8) {
    unsafe {
        if _xtest() {
            _xabort(x);
        }
    }
}
```

### I expected to see this happen: 

Either a clean compile, or a type error that `u8` was expected instead of `i8`.

### Instead, this happened: 

The current code states that `_xabort` takes a `u32` as an argument. This appears to be incorrect.

As the [`xabort`](https://www.felixcloutier.com/x86/xabort) instruction can only encode an 8bit argument. 

The `xbegin` instruction will only encode the abort flag within bits `24:31` of `eax`. Meaning that you can't recieve an error code larger than 8bits.

### Meta

`rustc --version --verbose`:
```
rustc 1.46.0-nightly (7750c3d46 2020-06-26)
binary: rustc
commit-hash: 7750c3d46bc19784adb1ee6e37a5ec7e4cd7e772
commit-date: 2020-06-26
host: x86_64-unknown-linux-gnu
release: 1.46.0nightly
LLVM version: 10.0
```
Repository: godot
Issue: GDScript: nearest_po2 has wonky behaviour for non-positive inputs
Labels: discussion,topic:core

**Godot version:**
ff0583770a8152cd63265e26e2529a170c179f68


**OS/device including version:**
Linux

**Issue description:**
The builtin function `nearest_po2` returns `0` rather than `1` for inputs less than 1
see also #39898 which clarifies this behaviour

it seems to be implemented here and used in a lot of places so maybe it would need some sort of wrapper-function if the behaviour of the GDScript one was to be changed?
https://github.com/godotengine/godot/blob/master/core/typedefs.h#L123-L137
Repository: TypeScript
Issue: wrong comment in emit js
Labels: Needs Investigation

<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.7.x-dev.201xxxxx

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

https://github.com/bluelovers/ws-regexp/blob/master/packages/regexp-support/index.ts
```ts
/**
	 * all flag support without name and pattern test
	 */
	flagsAll: testFlagsAll(RegExp, true),

	/**
	 * pattern support
	 */
	pattern: Object.keys(PatternSupport).reduce(function (a, key)
	{
		a[key] = testPattern(key);
		return a;
	}, {} as typeof PatternSupport),
```

**Expected behavior:**

**Actual behavior:**

![image](https://user-images.githubusercontent.com/167966/85937886-657aa680-b93a-11ea-861b-3b77f95744f4.png)


**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: flutter
Issue: Setting CupertinoDatePicker minuteInterval: throws an exception. Flutter
Labels: framework,f: date/time picker,f: cupertino,has reproducible steps,P2,found in release: 3.3,found in release: 3.6,workaround available,team-design,triaged-design

I'm having trouble setting `CupertinoDatePicker`'s `minuteInterval:` property to 30.
It should be an integer factor of 60, so 30 should be fine. But I'm only able to set it to 1 or 2, any other value throws this exception:
```
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown building BlocBuilder<BookingBloc, BookingState>(dirty, state: _BlocBuilderBaseState<BookingBloc, BookingState>#c437f):
initial minute is not divisible by minute interval
'package:flutter/src/cupertino/date_picker.dart':
Failed assertion: line 269 pos 7: 'this.initialDateTime.minute % minuteInterval == 0'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was: 
  BlocBuilder<BookingBloc, BookingState> file:///Volumes/archivi%20recuperati/Flutter%20apps%20/fixit_cloud_biking/lib/Screens/select_shop_booking_screen.dart:67:14
When the exception was thrown, this was the stack: 
#2      new CupertinoDatePicker (package:flutter/src/cupertino/date_picker.dart:269:7)
#3      _SelectShopBookingScreenState.build.<anonymous closure> (package:fixit_cloud_biking/Screens/select_shop_booking_screen.dart:132:36)
#4      BlocBuilder.build (package:flutter_bloc/src/bloc_builder.dart:90:50)
#5      _BlocBuilderBaseState.build (package:flutter_bloc/src/bloc_builder.dart:162:48)
#6      StatefulElement.build (package:flutter/src/widgets/framework.dart:4334:27)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
```

Is there something else to be set to set it right?

This is how I set it up.

Many thanks in advance.
 
```
Expanded(
                          flex: 2,
                          child: Container(
                            padding: EdgeInsets.all(20),
                            color: Colors.transparent,
                            child: CupertinoDatePicker(
                                backgroundColor: Colors.transparent,
                                use24hFormat: true,
                                mode: CupertinoDatePickerMode.dateAndTime,
                                minuteInterval: 30,
                                onDateTimeChanged: (DateTime selected) {
                                  print('selected is $selected');
                                }),
                          ),
                        ),
```
Repository: flutter
Issue: Image does not fully cover card
Labels: framework,engine,a: images,c: rendering,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-engine,triaged-engine

In the following example the red card background can be seen:
<img width="800" alt="Screenshot 2020-06-28 at 11 03 30" src="https://user-images.githubusercontent.com/814785/85943294-7245cd00-b92f-11ea-8585-1a78f978fa24.png">

```dart
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: ImageGrid(),
    );
  }
}

class ImageGrid extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GridView.builder(
      gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
        crossAxisCount: (MediaQuery.of(context).size.width / 180).floor(),
        childAspectRatio: 2.4,
      ),
      itemCount: 1000,
      itemBuilder: (BuildContext context, int index) {
        return ImageCard('https://picsum.photos/seed/$index/300/200');
      },
    );
  }
}

class ImageCard extends StatelessWidget {
  const ImageCard(this.url);

  final String url;

  @override
  Widget build(BuildContext context) {
    return Card(
      color: Colors.red,
      child: Image.network(url, fit: BoxFit.cover),
    );
  }
}
```

```
[✓] Flutter (Channel master, 1.20.0-3.0.pre.78, on Mac OS X 10.15.5 19F101, locale en-CH)
    • Flutter version 1.20.0-3.0.pre.78 at /Users/ben/flutter
    • Framework revision 2962912d68 (25 hours ago), 2020-06-27 00:59:50 -0700
    • Engine revision fc0e27210c
    • Dart version 2.9.0 (build 2.9.0-19.0.dev 63cf56d925)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/ben/Library/Android/sdk
    • Platform android-29, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.8.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 47.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.41.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.7.1

[✓] Connected device (3 available)
    • macOS desktop • macos      • darwin-x64     • Mac OS X 10.15.5 19F101
    • Web Server    • web-server • web-javascript • Flutter Tools
    • Chrome        • chrome     • web-javascript • Google Chrome 83.0.4103.116

• No issues found!
```
Repository: rust
Issue: MIR sanity check improvements
Labels: T-compiler,A-MIR

This issue collect various proposals for improvements to the MIR sanity check so that they do not get lost:

* Function calls and `DropAndReplace` could test that given and expected type match (https://github.com/rust-lang/rust/pull/72796#discussion_r446527001)
* `SetDiscriminant` could have some invariants checked (https://github.com/rust-lang/rust/pull/72796#discussion_r446624972)
Repository: pytorch
Issue: [JIT] Tracing BCE loss throws error when using weight
Labels: oncall: jit,triaged

## 🐛 Bug

When tracing BCELoss with the optional weight parameter  (see https://pytorch.org/docs/master/generated/torch.nn.BCELoss.html) it throws:

```Traceback (most recent call last):
  File "repro.py", line 13, in <module>
    c = torch.jit.trace(model, [input, target])
  File "/usr/local/lib/python3.7/site-packages/torch/jit/__init__.py", line 875, in trace
    check_tolerance, _force_outplace, _module_class)
  File "/usr/local/lib/python3.7/site-packages/torch/jit/__init__.py", line 1027, in trace_module
    module._c._create_method_from_trace(method_name, func, example_inputs, var_lookup_fn, _force_outplace)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 548, in __call__
    result = self._slow_forward(*input, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 534, in _slow_forward
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 517, in forward
    return F.binary_cross_entropy(input, target, weight=self.weight, reduction=self.reduction)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/functional.py", line 2375, in binary_cross_entropy
    new_size = _infer_size(target.size(), weight.size())
RuntimeError: expected int at position 0, but got: Tensor
```

## To Reproduce

```
import torch

weight = torch.randn(3)
model = torch.nn.BCELoss(weight=weight)

input = torch.empty(3).uniform_()
target = torch.empty(3).random_(2)

# Fine.
normal = model(input, target)
print(normal)

# Errors.
c = torch.jit.trace(model, [input, target])
c(input, target)
```

## Expected behavior

A weight parameter on the class should just work. If there is some reason it isn't supported a clearer error message should be thrown.

## Environment

```
PyTorch version: 1.5.0
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 10.14.6
GCC version: Could not collect
CMake version: version 3.16.3

Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip3] efficientnet-pytorch==0.6.3
[pip3] numpy==1.18.1
[pip3] torch==1.5.0
[pip3] torchtext==0.6.0
[pip3] torchvision==0.6.0
[conda] Could not collect
```


cc @suo @gmagogsfm
Repository: flutter
Issue: Exception: Gradle task assembleDebug failed with exit code -1
Labels: c: crash,platform-android,tool,t: gradle,P2,team-android,triaged-android

whenever I try to run my flutter project they show,

Exception: Gradle task assembleDebug failed with exit code -1

I have tried all possible ways to solve this error.I have solved all issues related to issues..but still I can not overcome from this error.
I have even reinstalled  my androidstudio and flutter..

Please help me to solve this exception urgently..
Thankyou
![Flutter](https://user-images.githubusercontent.com/54797305/85945359-e34eaa00-b95a-11ea-9d1d-dc70a3b31c07.JPG)
Repository: TypeScript
Issue: Make tsc --init generate default target to ES6 or higher
Labels: Suggestion,In Discussion

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms

tsc --init default target ES5 ES6

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion

When running `tsc --init`, let the tsconfig has `es6` or higher target.

<!-- A summary of what you'd like to see added or changed -->

## Use Cases

It's not common to _have_ to use es5 nowadays

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

## 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: neovim
Issue: Displaying colored escape characters in command mode
Labels: enhancement

## Displaying colored escape characters in command mode

The terminals have been supporting colored characters for some time now and are used by many programs, but vi, vim and neovim do not print these characters correctly in their command mode.

Example : `:!echo -e " \033[0;31m RED"`.
output is: `^[[0;31m RED`.

Example in terminal: `echo -e " \033[0;31m RED`.
output is: `RED` in red color.


it would be amazing if the neovim supports colorful characters like most terminal emulators,I myself thought about making this modification but I don't have the knowledge to do it.
Repository: youtube-dl
Issue: sexlikereal.com site support
Labels: site-support-request,nsfw

## Checklist

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2020.06.16.1**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

- Single video: https://www.sexlikereal.com/scenes/wet-college-student-7208


## Description

Currently defaults to the generic downloader where a very low res trailer is downloaded.

Account need for full vids, but trailers are open to all.
Repository: go
Issue: x/image/tiff: Missing raw stream read/write
Labels: NeedsInvestigation,FeatureRequest

If I understand well the TIFF library only offers encode/decode but not raw read/write methods.

As TIFF is an image container that can support multiple encodings, IMO, it could be very useful to have direct read/write access to the encoded data stream. In this way for example a jpeg encoded image can be encapsulated in a TIFF container without decoding/encoding. The same is valid for CCITT or JBIG2 encodings. 

This can also be very useful to extract images from PDF file and save them to TIFF without encoding/decoding. Or to make the inverse : import TIFF images to PDF files.