sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Add types for window.performance.getEntriesByType
Labels: Bug,Help Wanted,Domain: lib.d.ts

<!-- 🚨 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

getEntriesByType
PerformanceMark
PerformanceMeasure
PerformanceResourceTiming

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion

Add types for the [`getEntriesByType` API](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType)

I found [this old issue (Jul 5, 2018)](https://github.com/microsoft/TypeScript/issues/25461) and saw that experimental API's are not included in `lib.dom.d.ts`. The following API's don't appear to have `experimental` warnings on them on the MDN docs. Hopefully this means these are no longer experimental and types can be added now?

https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMark
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMeasure
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming

<!-- A summary of what you'd like to see added or changed -->

## Use Cases

Getting specific strongly typed information for the entries when accessed via this API.

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

## Examples

```ts
// resources would be of type PerformanceResourceTiming[]
const resources = window.navigation.getEntriesByType("resource");

// resources would be of type PerformanceMeasure[]
const measures = window.navigation.getEntriesByType("measure");

// marks would be of type PerformanceMark[]
const marks = window.navigation.getEntriesByType("mark");

// paints would still be of type PerformanceEntryList
const paints = window.navigation.getEntriesByType("paint");
```

<!-- Show how this would be used and what the behavior would be -->

## Checklist

My suggestion meets these guidelines (not sure about the first one):

* [ ] 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: godot
Issue: Disabling Script Editor removes the attach scripts option from contextual menu when right clicking nodes
Labels: bug,topic:editor,confirmed

**Godot version:**
3.2 alpha 1

**OS/device including version:**
windows 10

**Issue description:**
If you disable the Script Editor from the settings menu it completely disables the ability attaching scripts from the contextual menu.

**Steps to reproduce:**
1. Disable script editor from editor profiles
2. Right click on a node
3. Watch 'attach script' be missing from the contextual menu.
Repository: pytorch
Issue: [feature request] Reduction (torch.add / torch.logaddexp / torch.max / torch.min / torch.mean) of several tensors without extra copies/allocations / memory accesses } TensorList inputs support
Labels: triaged,function request

If I understand correctly `sum(tensor_list)` will allocate and keep O(N) intermediate tensors (same with a for loop) where N is number of tensors, which can be quite large in the case of big DenseNet. I propose to maybe generalize `torch.add` to support more than two tensors as input.

Currently one can do: `functools.reduce(lambda acc, x: acc.add_(x), tensor_list, torch.zeros_like(tensor_list[0]))`, so it's not super-urging, but a more idiomatic, TorchScript-able way may be nice
Repository: tensorflow
Issue: how to assign value to a EagerTensor slice? ----'tensorflow.python.framework.ops.EagerTensor' object does not support item assignment
Labels: stat:awaiting tensorflower,type:feature,comp:ops,TF 2.11

as in numpy or pytorch ,we can do someting like this, but how to do it with tf2.0.
the following code will raise exception as :

`'tensorflow.python.framework.ops.EagerTensor' object does not support item assignment`
prediction[:,:,0]=tf.math.sigmoid(prediction[:,:,0])
Repository: vscode
Issue: Scrollbar in editor is off
Labels: bug,editor-scrollbar

Steps to Reproduce:

1. use web (fullscreen)
2. have problems panel open with problems (e.g. strict init issues)
3. open a file with problem
4. click on the error in the scrollbar to navigate to

=> the position seems off, it does not reveal in center

Click here:
![image](https://user-images.githubusercontent.com/900690/66378901-bf0a0200-e9b4-11e9-98c7-9396c06a0c6c.png)

Error not shown:
![image](https://user-images.githubusercontent.com/900690/66378917-c3ceb600-e9b4-11e9-9168-e9363280db48.png)
Repository: rust
Issue: custom_test_frameworks doesn't work with plain functions
Labels: A-libtest,C-bug,requires-nightly,F-custom_test_frameworks

The following code:
```rust
#![feature(custom_test_frameworks)]
#![test_runner(my_test_runner)]

fn my_test_runner(tests: &[&fn() -> ()]) {
    for test in tests {
        test();
    }
}

#[test_case]
fn test_1() {}

#[test_case]
fn test_2() {}
```
results in
```
11 | fn test_1() {}
   | ^^^^^^^^^^^^^^ expected fn pointer, found fn item
   |
   = note: expected type `&fn()`
              found type `&fn() {test_1}`
```
The workaround mentioned in https://stackoverflow.com/questions/27895946/expected-fn-item-found-a-different-fn-item-when-working-with-function-pointer doesn't work, as these functions are passed in by the compiler, so we cannot do the coercion.

Other variants that don't work:
```rust
fn my_test_runner(tests: &[fn() -> ()]) {
```
```rust
fn my_test_runner<F: Fn() -> ()>(tests: &[F]) {
```
```rust
fn my_test_runner<F: Fn() -> ()>(tests: &[&F]) {
```
Repository: TypeScript
Issue: API: expose getOptionalType and getNonOptionalType
Labels: Suggestion,In Discussion,API

## Suggestion

As API user I need to distinguish the `optionalType` and the real `undefined` type when handling optional chaining.
`getOptionalType` and `getNonOptionalType` are already present on `TypeChecker`, but not exposed in the public API.

/cc @rbuckton
Repository: TypeScript
Issue: Narrowing doesn't recognize string constant as truthy
Labels: Bug

<!-- 🚨 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 `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.7-beta

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** cfa narrowing string truthy

**Code**

```ts
declare var a: { b: number } | null

!a || a.b > 3; // works
!a && true || a.b > 3 && true; // works
!a && "a was not defined" || a.b > 3 && "a.b was too big"; // error "Object is possibly null"
```

**Expected behavior:**

The narrowings all work

**Actual behavior:**

The third narrowing does not work and produces an error

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
[Playground](https://www.typescriptlang.org/play/?ts=3.7-Beta&ssl=1&ssc=1&pln=6&pc=1#code/CYUwxgNghgTiAEA3W8oC54G94CMMDsBXAWxxBngF94AfeIiCAKCYEIpa6oA6HeAPngBmANzwA9OPgB3APYwA1gGc2HAGRr4AFxiEENLrwHD4G7bpBjJM+ctWnNAIg7SoS+rK3xQAMwCW+CDAjpyoRoJCDvDORq7uWrKyuH4A5o5WUuQw8tEA8jgAVuBefu4ADrJKSn44EACe9ISMjkxAA)

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
I suspect this is a duplicate, as most CFA narrowing bugs are.  But I searched as best I could and didn't find any other bugs that matched what was going on here.  It seems like typescript doesn't understand that a non-empty string-literal is true in this situation?
Repository: rust
Issue: Confusing MaybeUninit documentation
Labels: C-enhancement,T-libs-api,A-docs

The [as_ptr](https://doc.rust-lang.org/std/mem/union.MaybeUninit.html#method.as_ptr]) method on a `MaybeUninit<T>` perhaps could use some better wording, or at least an example.

The docs say: "Writing to memory that this pointer (non-transitively) points to is undefined behavior (except inside an UnsafeCell<T>)."

Its unclear whether that means `&MaybeUninit<UnsafeCell<T>> -> *const UnsafeCell<T> -> *mut T` is okey, or that `&UnsafeCell<MaybeUninit<T>> -> *mut MaybeUninit<T> -> *mut T` is okey, if the resulting mutable pointer is written to.

Perhaps adding a little example of which of the two is okey, (or perhaps both) would help.
Repository: rust
Issue: feature request: test binaries should support repeating runs
Labels: T-compiler,T-dev-tools,C-feature-request,A-libtest

The ability to repeat tests in-process is useful when attempting to reproduce flaky test failures. Go's testing package has the `-count` flag (https://golang.org/cmd/go/#hdr-Testing_flags), googletest has `--gtest_repeat` (https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#repeating-the-tests), but rust doesn't seem to have anything.

In a limited test, I ran a test binary 100 times with a filter that excluded all test cases, and that took over 15 seconds. It'd be nice to avoid that overhead.

cc @tmandry
Repository: go
Issue: cmd/link/internal/ld: TestRuntimeTypeAttrInternal flaky on Windows
Labels: OS-Windows,NeedsInvestigation,compiler/runtime

```
#!watchflakes
post <- pkg == "cmd/link/internal/ld" && `This version of %1 is not compatible`
```

Seen on the `windows-amd64-2016` builder in https://storage.googleapis.com/go-build-log/4a655811/windows-amd64-2016_5d978c1a.log:

```
--- FAIL: TestRuntimeTypeAttrInternal (0.73s)
    dwarf_test.go:973: could not run test program: fork/exec C:\Users\gopher\AppData\Local\Temp\1\TestRuntimeType696325427\out.exe: This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
FAIL
FAIL	cmd/link/internal/ld	3.767s
```

CC @cherrymui @jeremyfaller
Repository: terminal
Issue: Enhance shell autocompletion with a cool new user interface and shell completion protocol
Labels: Issue-Feature,Area-Interop,Area-UserInterface,Area-Extensibility,Product-Terminal,InclusionBacklog,InclusionBacklog-Windows TerminalWin32,A11yMAS,Disability-All

Hello! Thank you for the new interesting project!

I just want to let you know about [🚀 Upterm](https://github.com/railsware/upterm) — really great proof of concept but it stopped because maintainer was gone. This terminal looks like 21st century terminal. Very sad that it isn't supported.

![image](https://user-images.githubusercontent.com/1708680/66430268-6709e480-ea22-11e9-8fc0-93abaa7210fb.png)

![up30485947-aeaa5398-9a37-11e7-927c-769304744844](https://user-images.githubusercontent.com/1708680/66430295-75f09700-ea22-11e9-8da3-0ce56e483bb4.gif)

![up29716319-95f9a8d8-89b3-11e7-8515-fcb236eb4454](https://user-images.githubusercontent.com/1708680/66430307-79841e00-ea22-11e9-956b-2c053d0ac814.gif)

![image](https://user-images.githubusercontent.com/1708680/66430384-aafce980-ea22-11e9-9350-addd649b3035.png)

![image](https://user-images.githubusercontent.com/1708680/66430393-b2bc8e00-ea22-11e9-97cd-2ae1765d7037.png)
Repository: flutter
Issue: XcodeProjectInterpreter violates our "no timeouts" rule
Labels: c: regression,team,tool,P2,c: flake,team-tool,triaged-tool

If these processes are idempotent, then I suggest that we change this to not kill the first process, but to show a message after a few seconds saying "This seems to be taking longer than usual" and then start a second process in parallel, to see if it returns faster, and if it does, kill the first one. If the second takes more than a minute, kill it then try a third one, etc, leaving still the first one running, in case it's just being super slow.
Repository: terminal
Issue: Now that FontInfo supports >32 characters, make the property sheet and settings support it too
Labels: Product-Conhost,Area-Settings,Issue-Task,Priority-3

branch reference: 49691f891aeabf02dba506d4c5080c49eac3aaba
followup to #602

To give conhost support for font names greater than 32 characters in length, we need to:

* Fix the registry deserializer to not blat data directly into memory
   * Consideration: Make the registry value setter a lambda/function pointer, and bind the `Settings` members into the lambda. Very cool, lets us get rid of the split between `s_GetRegDword` and `s_GetRegString`.
* Figure out what to do with the `GetCurrentConsoleFontEx` API when font names are long
* Propagate the `wstring` and `wstring_view` changes up through `TrueTypeFontList` (modernizing it along the way) and propsheet
* Figure out how to get GDI to comply (`LOGFONTW` is capped at 32 characters as well)
Repository: rust
Issue: Tracking issue for `#![feature(entry_insert)]`
Labels: A-collections,T-libs-api,B-unstable,C-tracking-issue,disposition-merge,finished-final-comment-period,Libs-Tracked

This is a tracking issue for the `Entry::insert_entry` method on HashMap and BTreeMap introduced in https://github.com/rust-lang/rust/pull/60142#issuecomment-487416553.

- [x] Implementation for HashMap: #64656
	- [x] ~~Stabilised in 1.59: #90345~~ Re-stabilised in 1.83: #130290
	  - ~~De-stabilized in #94105~~
  ```rust
   impl<'a, K, V> Entry<'a, K, V> {
      pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> {…}
  }
  ```
- [x] Implementation for BTreeMap: #133042 
    - [ ] Stabilization
Repository: flutter
Issue: Update the Flutter template plugin to use the new embedding and refactor MethodCallHandler to a separate class
Labels: platform-android,tool,P3,a: plugins,team-android,triaged-android

As part of the migration to the new plugin embedding, we are refactoring many of the plugins into separate `FlutterPlugin` and `MethodCallHandler` classes.

Once we're ready to start pushing all plugin developers to the new embedding, we should update the template plugin to do so as well. Having the template plugin use two classes will ensure a consistent layout for all plugins regardless of complexity or size, and make it easier to write unit tests of the MethodCallHandler portion.

/cc @amirh
Repository: flutter
Issue: Test with Voiceover on on a real iOS device
Labels: a: tests,platform-ios,a: accessibility,P2,team-ios,triaged-ios

We should be doing some integration testing on iOS with voiceover on, to make sure that certain things get selected or tha twe don't crash etc. when certain gestures/etc. are used. For example, it would enable a better regression test for https://github.com/flutter/engine/pull/12990.

AFAICT, this will require a dedicated device for it in the devicelab.  We can't do it on a simulator, and I don't know that there's any way to turn on voiceover in a test.  We could have a dedicated iOS device with voiceover enabled, and run some tests that way.

/cc @digiter @godofredoc @jonahwilliams @goderbauer @keyonghan
Repository: pytorch
Issue: Support Anomaly detection for distributed autograd.
Labels: module: autograd,triaged,module: rpc

The local autograd engine has a very useful anomaly detection mode which provides detailed traces of why the backward pass might've failed: https://pytorch.org/docs/stable/autograd.html#anomaly-detection. We should figure out what anomaly detection would look like for distributed autograd.

cc @ezyang @SsnL @albanD @zou3519 @gqchen @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @aazzolini @xush6528
Repository: godot
Issue: VCS does not push changes?
Labels: enhancement,topic:editor

**Godot version:**
3.2 alpha

**OS/device including version:**
windows 10

**Issue description:**
i have to manually push changes done and commited in godot's new VCS system
Is this supposed to be this way or am i missing the push / pull button ?


![er1](https://user-images.githubusercontent.com/13393087/66440606-e358f380-ea33-11e9-8c98-3a7c873b82ad.PNG)
Repository: TypeScript
Issue: [Array.prototype.reduce] TS infers accumulator type as any[]
Labels: Suggestion,In Discussion

**TypeScript Version:**  3.7-Beta, "noImplicitAny" compiler mode

**Search Terms:**
Array.prototype.reduce, reduce type inference, reduce implicit any

**Code**

```ts
const result = [1].reduce((acc, item) => {
    acc.push(item)
    return acc
}, [])

result[0].toLowerCase()
```

**Expected behavior:**
1) `result` implicitly has type `any[]` -> compiler error ("noImplicitAny")
or
2) `result` has type `unknown[]` -> compiler error

**Actual behavior:**
`result` has type `any[]`, no errors

**Playground Link:** http://www.typescriptlang.org/play/?strictNullChecks=false&strictPropertyInitialization=false&ts=3.7-Beta&ssl=6&ssc=24&pln=1&pc=1#code/MYewdgzgLgBATgUwgVwDawLwwNoEYC6AdIgCbLAIAUlAhsMADQwCWUCAtgJQwYB8MAbwBQMUTDrBCAB2QQAFpVYdOIsYijI4YcfSEBfJtnwqhiFOmwAGIlBAAZEAHcEcAMI0IVTkA

**Related Issues:** https://github.com/microsoft/TypeScript/issues/25454, https://github.com/microsoft/TypeScript/issues/29604

P.S. It seems reasonable to align behavior with other empty array cases, e.g.:

```ts
let x = {
    array: [] // Object literal's property 'array' implicitly has an 'any[]' type
}

let x = []
x[0].toLowerCase() // Variable 'x' implicitly has type 'any[]' in some locations where its type cannot be determined
```
Repository: flutter
Issue: DefaultCupertinoLocalizations.delegate should fallback to English, always.
Labels: c: crash,framework,a: internationalization,f: cupertino,c: proposal,P2,team-design,triaged-design

DefaultCupertinoLocalizations.delegate is only English, which is Ok. But then, for other languages it should always fallback to English. 

It should never throw, because there will always be untranslated languages. So you will always need to have a fallback.

```
  The following NoSuchMethodError was thrown building LayoutBuilder:
  The getter 'myLabel' was called on null.
  Receiver: null
  Tried calling: myLabel
  User-created ancestor of the error-causing widget was:
    CupertinoAlertDialog file:///C:/Users/.../dialog_padrao.dart:38:15
  When the exception was thrown, this was the stack:
  #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
  #1      CupertinoAlertDialog.build.<anonymous closure> (package:flutter/src/cupertino/dialog.dart:245:40)
  #2      _LayoutBuilderElement._layout.<anonymous closure> (package:flutter/src/widgets/layout_builder.dart)
  #3      BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2328:19)
  #4      _LayoutBuilderElement._layout (package:flutter/src/widgets/layout_builder.dart:95:11)

```
Repository: pytorch
Issue: RuntimeError: cuDNN error: CUDNN_STATUS_MAPPING_ERROR
Labels: module: cudnn,module: cuda,triaged

I am using pytorch 1.2.0 via CUDA 10 on ubuntu 16.04 and titan XP GPU.

When my batch size is 20 i get the mentioned error:
```

  File "/home/alireza/anaconda3/lib/python3.6/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)

  File "/home/alireza/anaconda3/lib/python3.6/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag

RuntimeError: cuDNN error: CUDNN_STATUS_MAPPING_ERROR
```
interestingly, if I use:
```torch.backends.cudnn.enabled = False```

the error will disappears and the code run okay, BUT it will be 4 times slower...

also if i dont have 
```torch.backends.cudnn.enabled = False```
in my code i notice that if i reduce the batch size to 10 the code will run.

Can you please help what is going on?

i also read [this report](https://github.com/pytorch/pytorch/issues/13219), but it was not useful.
Repository: TypeScript
Issue: Strict Reflect.apply Reflect.construct and Function.prototype.apply/call/bind
Labels: Suggestion,Awaiting More Feedback

## Search Terms

[Reflect.apply](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/apply)
[Reflect.construct](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/construct)
[Function.prototype.apply](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)
[Function.prototype.call](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call)
[Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)

## Suggestion

These functions should not return `any`.

Related:
https://github.com/microsoft/TypeScript/issues/212
https://github.com/microsoft/TypeScript/pull/27028

## Use Cases

```ts
function getString() {
  return 'string'
}

class ClassA {}

Reflect.apply(getString, null, []) // expected string but got any
Reflect.construct(ClassA, []) // expected ClassA but got any
Function.prototype.apply.call(getString, undefined) // expected string but got any
Function.prototype.call.call(getString, undefined) // expected string but got any
Function.prototype.bind.call(getString, undefined)() // expected string but got any
```

## Examples

Reflect:
```ts
// old
function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;

// new
function apply<T>(target: (...args: any) => T, thisArgument: any, argumentsList: ArrayLike<any>): T;

// old
function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;

// new
function construct<T>(target: new (...args: any) => T, argumentsList: ArrayLike<any>, newTarget?: any): T;
```

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
👆 Add a new compiler option
* [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).