sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: CupertinoNavigationBar should support custom box decoration
Labels: c: new feature,framework,f: cupertino,P2,team-design,triaged-design

Hi. I am trying to make a `CupertinoSliverNavigationBar` with a gradient background, but currently `CupertinoNavigationBar` or `CupertinoSliverNavigationBar` only support `backgroundColor` property, and don't allow to specify an **image or a gradient as a background**.

I am not sure if it's intended, but I can' figure out any other way rather than injecting an absolutely positioned underlay with a gradient, and it seems totally wrong.

What I expect is an additional property on `CupertinoSliverNavigationBar`, which would allow either specifying a custom background layer or the gradient itself.

This seems to be doable in native code, so I think that flutter can support this too.

Anyway, I would like to get any feedback on this just to know if I'm missing something.

Thanks!
Repository: TypeScript
Issue: instanceof AbstractClass.constructor should narrow to typeof AbstracClass
Labels: Suggestion,In Discussion

> Please try to reproduce the issue with `typescript@next`. It may have already been fixed.

**TypeScript Version:**  3.3.0-dev.20181208

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** static instanceof constructor

**Code**

```ts
type Meta = {foo: string};
abstract class Abstract {
  static meta: Meta;
  public abstract toString(): string;
}

const getMeta = (fromModule: any): Meta | undefined => {
  return fromModule instanceof Abstract.constructor
    ? fromModule.meta : undefined;
};
```

**Expected behavior:**
Narrow the type of `fromModule` to `typeof Abstract`, so that static fields can be accessed.
(In Typescript versions <= 3.1.6 the above code didn't raise an error, my guess is that the type was not narrowed at all)
 
**Actual behavior:**
The narrowed type of `fromModule` is `{}`:
```
Error:(10, 18) TS2339: Property 'meta' does not exist on type '{}'.
```

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
https://www.typescriptlang.org/play/index.html#src=%0D%0Atype%20Meta%20%3D%20%7Bfoo%3A%20string%7D%3B%0D%0Aabstract%20class%20Abstract%20%7B%0D%0A%20%20static%20meta%3A%20Meta%3B%0D%0A%20%20public%20abstract%20toString()%3A%20string%3B%0D%0A%7D%0D%0A%0D%0Aconst%20getMeta%20%3D%20(fromModule%3A%20any)%3A%20Meta%20%7C%20undefined%20%3D%3E%20%7B%0D%0A%20%20return%20fromModule%20instanceof%20Abstract.constructor%0D%0A%20%20%20%20%3F%20fromModule.meta%20%3A%20undefined%3B%0D%0A%7D%3B%0D%0A

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
    I found the following potentially related issues but they didn't seem to be an exact match or to old (because this problem only exists since 3.2.1):
    - #27276
    - #23274
    - #16035

**Workaround**
Creating a type guard is of course doable for a single abstract class. 
```
const extendsAbstract = (FromModule: unknown): FromModule is typeof Abstract =>
  FromModule && FromModule instanceof Abstract.constructor;
```
(Or maybe it could even be written in a generic way?)
Repository: flutter
Issue: Network traffic hook issues
Labels: c: new feature,framework,engine,P2,team-engine,triaged-engine

well,I would like to find a method which could transfer and redirect another app's stream or create a tunnel which could be used in system proxy.

However, I didn't find some similar wheels in dart nor  in flutter. 

So, I wonder if flutter is just for UI or even powerful , basic and sensitive operations for app?
Repository: godot
Issue: Editor reloads and parses unrelated files on save
Labels: enhancement,topic:editor

**Godot version:**
11d7738


**OS/device including version:**
4.19.4-arch1-1-ARCH


**Issue description:**
I noticed that, when saving a scene, Godot is parsing GDScript files that are completely unrelated to the scene.
I could notice that because that script contains an error and it showed up in the terminal.
The script was not one of the open scripts in the script editor, does not declare any class name and is completely unrelated to the scene i was saving.
The questions is: why is Godot parsing files at save time?
My concern is that, if the project grows very big, the save time will grow until it becomes noticeable.
For me it was around 1 second, with a project that has around 6k files.
Repository: vscode
Issue: [folding] Preview folded content on hover
Labels: feature-request,editor-folding

Found no existing issues

It would be cool to preview folded content without actual unfolding it, using peek

For example, how it's done in WebStorm:

<details><summary>small gif</summary><img src="https://user-images.githubusercontent.com/599439/49730695-38986d00-fc8a-11e8-88b7-c07fffb9b45b.gif" /></details>

video: https://streamable.com/i8z3u

I think it should be in core. Or a plugin which distributes with vscode. What do you think?

refs for code:

css: https://github.com/Microsoft/vscode/blob/cb66c137e0279693a8fcea3ed481d1d2db7512c7/src/vs/editor/contrib/folding/folding.css

ts: https://github.com/Microsoft/vscode/blob/4e4e6f9b44dd9e6a53d1f08565c52b8ea9f61a5e/src/vs/editor/contrib/folding/foldingDecorations.ts
Repository: flutter
Issue: Google Maps Official Plugin Flutter API and Callbacks: zoom level change, center map change, etc
Labels: c: new feature,p: maps,package,team-ecosystem,P2,triaged-ecosystem

<!-- Thank you for using Flutter!

     Please check out our documentation first:
      * https://flutter.io/
      * https://docs.flutter.io/

     If you can't find the answer there, please consider asking a question on
     the Stack Overflow Web site:
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     Please don't file a GitHub issue for support requests. GitHub issues are
     for tracking defects in the product. If you file a bug asking for help, we
     will consider this a request for a documentation update.

-->

How can i get:
1. Current zoom level change (new value) when users tilt with two fingers zoom?
2. Center map change when users tilt/scroll to move map? (lat,lng)

thank you
Repository: rust
Issue: Uninhabited types in recursive types with "infinite" size
Labels: A-type-system,T-compiler,T-types

This enum is in theory finitely sized, though it's being detected as infinitely sized.

```rust
#![feature(never_type)]
enum Enum<T> {
    A,
    B(Enum<!>, T)
}

```

([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f547579d4ba703c02943c2eda6bd598a))

```
error[E0072]: recursive type `Enum` has infinite size
 --> src/lib.rs:2:1
  |
2 | enum Enum<T> {
  | ^^^^^^^^^^^^ recursive type has infinite size
3 |     A,
4 |     B(Enum<!>, T)
  |       ------- recursive without indirection
  |
  = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Enum` representable
```
Repository: TypeScript
Issue: HOC returned component props can not differ from HOC generic props
Labels: Bug,Domain: JSX/TSX

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.3.0-dev.20181208

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
- HOC
- react
- higher order component

**Code**

```tsx
import * as React from 'react';

export interface HOCProps {
  foo: number;
}

/** Remove props, that have been prefilled by the HOC */
type WithoutPrefilled<T extends HOCProps> = Pick<T, Exclude<keyof T, 'foo'>>;

function withFoo<P extends HOCProps>(WrappedComponent: React.ComponentType<P>) {
  return class SomeHOC extends React.Component<WithoutPrefilled<P>> {
    public render(): JSX.Element {
      return <WrappedComponent {...this.props} foo={0} />;
    }
  };
}
```

**Expected behavior:**
No error, like with every version below 3.2.0.

**Actual behavior:**
Throws an error highlighting the WrappedComponent in the render method.
```
[ts]
Type 'Readonly<{ children?: ReactNode; }> & Readonly<Pick<P, Exclude<keyof P, "foo">>> & { foo: number; }' is not assignable to type 'IntrinsicAttributes & P & { children?: ReactNode; }'.
  Type 'Readonly<{ children?: ReactNode; }> & Readonly<Pick<P, Exclude<keyof P, "foo">>> & { foo: number; }' is not assignable to type 'P'. [2322]
```

**Additional Information**

This is pretty much the same sample example used in https://github.com/Microsoft/TypeScript/issues/28720, but with the difference, that the props of the returned component differ from the generic.

Basically the HOC prefills the `foo` property for the `WrappedComponent`. Since the spreaded props are overriden by `foo`, I don’t want `foo` to be a valid property for the HOC. This does not seem to be possible anymore.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
https://github.com/Microsoft/TypeScript/issues/28720
Repository: TypeScript
Issue: Allow tsserver to log to stderr instead of logfile
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 read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
tsserver log stderr

## Suggestion

It would be great if tsserver could log everything to STDERR instead of/in addition to the logfile.

## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->
When running tsserver remotely (not on the same computer, but on a server/in a container) it is currently difficult to forward logs to the client. Currently I am running tail on the logfile, but that takes up a file watcher or CPU for polling and has a delay.


## Examples

N/A

## 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: rust
Issue: How to read `argc` and `argv` without allocating and modify them
Labels: T-libs-api,C-feature-request,A-process

I need to read `argc` and `argv`, ideally without allocating any memory, and I want to modify them on initialization such that subsequent accesses to them only see the modified version (in particular, libraries querying these via `std::env::args()` and similar APIs). 

Why? Some runtimes require argument handling to work "just like in C". For example, `mpirun ...options... my_program foo bar` allows the user to pass explicit `options` about how the run-time should behave, and `mpirun` itself does insert extra options depending on the environment / hardware / config files / etc. The `my_program` binary is required to call `MPI_Init(&argc, &argv)` at the beginning of `main` to initialize the MPI runtime, and `MPI_Init` will interpret and strip all implicit and explicit options that `mpirun` might pass about the mpi run-time configuration, such that, after `MPI_Init` succeeds, `foo` and `bar` are the first and second CLI argument for `my_program` (instead of some higher value due to the `mpirun` options).

So the TL;DR is that MPI init needs raw mutable access to `argc` and `argv`. Ideally, if I use a third party library later that access these via `std::env::args()`, it will only see the already post-processed arguments.
Repository: pytorch
Issue: as_tensor does not use the device of the default tensor type
Labels: module: docs,module: cuda,triaged

## 🐛 Bug

According to the [doc](https://pytorch.org/docs/stable/torch.html?highlight=torch%20as_tensor#torch.as_tensor) for `torch.as_tensor`, the input should be copied to a cuda device if the default tensor type is a cuda tensor. 

> Default: if None, uses the current device for the default tensor type (see torch.set_default_tensor_type()). device will be the CPU for CPU tensor types and the current CUDA device for CUDA tensor types.

It does copy to cuda device if the input is a numpy array, but not if the input is a cpu tensor. 

## To Reproduce

Steps to reproduce the behavior:

```
In [1]: import torch

In [2]: import numpy as np

In [3]: torch.set_default_tensor_type(torch.cuda.FloatTensor)

In [4]: torch.as_tensor(np.random.randn(4)).device
Out[4]: device(type='cuda', index=0)

In [5]: torch.as_tensor(torch.randn(4, device='cpu')).device
Out[5]: device(type='cpu')
```

## Expected behavior

The device should be the 'cuda' device in both cases.

## Environment

PyTorch version: 1.0.0
Is debug build: No
CUDA used to build PyTorch: 9.0.176

OS: Ubuntu 18.04.1 LTS
GCC version: (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
CMake version: version 3.10.2

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration:
GPU 0: GeForce GTX 1070
GPU 1: GeForce GTX 1080

Nvidia driver version: 390.77
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] Could not collect
[conda] blas                      1.0                         mkl
[conda] mkl                       2018.0.3                      1
[conda] mkl_fft                   1.0.6            py37h7dd41cf_0
[conda] mkl_random                1.0.1            py37h4414c95_1
[conda] pytorch                   1.0.0           py3.7_cuda9.0.176_cudnn7.4.1_1    pytorch
[conda] torchvision               0.2.1                      py_2    pytorch



cc @ngimel @jlin27 @mruberry
Repository: pytorch
Issue: [Caffe2] How to link Caffe2 in cmake file for C++ compilation?
Labels: caffe2


I tried-->find_package(Caffe2 REQUIRED)

Here is the error


By not providing "FindCaffe2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Caffe2", but
  CMake did not find one.

  Could not find a package configuration file provided by "Caffe2" with any
  of the following names:

    Caffe2Config.cmake
    caffe2-config.cmake

  Add the installation prefix of "Caffe2" to CMAKE_PREFIX_PATH or set
  "Caffe2_DIR" to a directory containing one of the above files.  If "Caffe2"
  provides a separate development package or SDK, be sure it has been
  installed.
Repository: pytorch
Issue: [Caffe2] Caffe2Config.cmake
Labels: caffe2

After installation
This is from Caffe2Config.cmake
Caffe2Config file is located in build folder and utils.cmake is located in cmake folder. I was not able to find public folder.  

include("${CMAKE_CURRENT_LIST_DIR}/public/utils.cmake")
Repository: create-react-app
Issue: Option to exit dev server on build errors?
Labels: issue: proposal

We currently run our integration test suite (via [Cypress](https://www.cypress.io/)) against the dev server (`react-scripts start`). [start-server-and-test](https://github.com/bahmutov/start-server-and-test) is very handy for starting the server, waiting for it to listen on a port, and then shut down the server after tests are run.

However, if there's an error that prevents the app from building (ex: a missing dependency), it has to get all the way through the integration test suite, running every test and failing them due to the build error thrown by Webpack. These builds would fail much faster if the dev server actually immediately quit with exit code 1 if there was a build error.

Would it be reasonable to have this behavior if `CI=true`? I'll happily write the PR, just want to check on my approach before I sink any time into it.
Repository: electron
Issue: Support more control of `Menu.popUp` placement
Labels: enhancement :sparkles:

This is a duplicate of #15096, but I'm opening a new issue since the original was incorrectly closed and then ignored.

---

> **Is your feature request related to a problem? Please describe.**
> I'd like to be able to display a popup menu either above or below a button depending on the location on screen. Example: [wulkano/kap#579](https://github.com/wulkano/kap/pull/579)
> 
> There are problems with this approach that I can't figure out how to solve without some changes to electron.
> 
> **Describe the solution you'd like**
> This could be handled better at the application level if either:
> 
> * Menu popup direction was configurable
>   
>   * could enforce opening upwards or downwards on our own based on positioning
> * Menu size was available
>   
>   * could manually position the popup to show above the element if we knew the height of the menu
> 
> **Describe alternatives you've considered**
> Perhaps another option would be for `Menu.popUp` to return the direction (`up` or `down`) that the menu is displaying.
> 
> **Additional context**
> Example UI:
> ![image](https://user-images.githubusercontent.com/2533/46838959-78b59f00-cd70-11e8-86f6-4231879a3352.png)
Repository: opencv
Issue: UMat (GPU) functions in multithreading environment
Labels: incomplete

I detected strange behavior of many JavaCPP OpenCV functions, working with UMat, in our multithreading system. When I use functions with UMat arguments (i.e. GPU) from different threads, our system sometimes fails: the results are incorrect! In my last example, I used very simple call "opencv_core.max(m, m, result)" (I expect that result will be identical to m), where all matrices are UMat, and m is generated by conversion of some Mat to UMat. Sometimes - not always, but often enough - the result of max call differs from the correct result, in particular, sometimes it is just zero matrix. It seems that one thread doesn't "see" the data, prepared in other CPU core, though in my last test all conversion Mat ->UMat - max... -> UMat result -> Mat are performed inside a single thread (but then they are passed to another one).

I found this problem in JavaCPP environment, but they say that it is not a problem of JavaCPP, it is a problem of OpenCV: https://github.com/bytedeco/javacpp-presets/issues/658 Java is multi-thread-oriented platform, it creates threads frequently - for user interface, for GC, for servlets and other server API, etc. It is very inconvenient to guarantee that all functions are executed in the single thread.

So, can you clarify - do I understand right, that multi-threading is _absolutely forbidden_ while using UMat functions? And I _must_ use all functions with UMat arguments _only_ from some unique single thread for all my application (OS process)? If yes, is some progress in this area planned?
Repository: TypeScript
Issue: JSX.ElementChildrenAttribute values are never considered excess properties in JSX
Labels: Bug,Domain: JSX/TSX

<!-- 🚨 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.2.1

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** JSX children excess

**Code**

```ts
import React from 'react'

function Test(_: { foo: boolean }) { return null }
const x = <Test foo>foo</Test>
```

**Expected behavior:**
The `foo` string (JSXText) should be considered an excess property

**Actual behavior:**
`children` (`JSX.ElementChildrenAttribute`'s key) are always allowed as excess properties when there is at least some overlap.

If `Test`'s props were `{}` there is an excess property warning, but not when they are written as they are in this example.

**Related Issues:** I found this while working on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/30775, where fixing bugs related to `ReactNode`'s types forced me to remove the implicit `children` prop added by the component types (they break render prop `children`).

It wasn't always possible to find through the test suite where components that needed to declare they accept `children` were missing that declaration, because almost always they'd pass strict test even when `children` was an excess, undeclared property.
Repository: neovim
Issue: Lua: show VimL (eval) backtrace
Labels: enhancement,api,lua

* nvim --version: NVIM v0.3.2-707-g082e14557, LuaJIT 2.0.5

Test.vim
```viml
function! g:RunTest()
    throw "foo"
endfunction
```

Case 1
- Open Test.vim
- `:source %`
- `:call g:RunTest()`
- Observe error information
```
Error detected while processing function RunTest:
line    1:
E605: Exception not caught: foo
```

Case 2
- Open Test.vim
- `:source %`
- `lua vim.api.nvim_eval('g:RunTest()')`
- Observe error information is missing any information on stack trace:
```
E5105: Error while calling lua chunk: [string "<VimL compiled string>"]:1: foo
```

This can make it hard to debug issues that occur when executing vimscript from lua
Repository: vue-element-admin
Issue: 封装的tinymce组件要写vue-test-utils的时候报“Cannot read property 'init' of undefined”该如何修改呢
Labels: 4.0

新入手vue-test-utils，想测试封装在component/tinymce/index的vue代码：
但是却直接报错说window.tinymce是undefined
有点疑惑有大神能解答吗？
```
import Tinymce from '@/components/Tinymce/index'
import { mount, createLocalVue, shallowMount  } from '@vue/test-utils'
import Element from 'element-ui'

const localVue = createLocalVue()
localVue.use(Element)

describe('Tinymce', () => {
  const wrapper = shallowMount(Tinymce, {
    localVue,
    attachToDocument: true
  })

  it('emit functions run correct by order', () => {
    expect(wrapper.emittedByOrder().map(e => e.name)).toEqual(['input', 'backImgAndId'])
  })
})
```