sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: bug(core): EventEmitter#subscribe() should be properly typed
Labels: breaking changes,area: core,core: inputs / outputs,cross-cutting: types,P3

<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅

Oh hi there! 😄 

To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.

🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->


# 🚀 feature request

### Relevant Package
<!-- Can you pin-point one or more @angular/* packages the are relevant for this feature request? -->
<!-- ✍️edit: --> This feature request is for @angular/core

### Description
Currently, subscribing to an `EventEmitter` (via `EventEmitter#subscribe()`) stripes the EventEmitter's type information and [converts it to `any`](https://github.com/angular/angular/blob/7.2.7/packages/core/src/event_emitter.ts#L102). This is undesirable, as already pointed out in #6934.

That issue was closed with a nondescript explanation that ~ "you shouldn't use the EventEmitter's `subscribe()` method". However, `EventEmitter#subscribe()` is not marked as internal API.

The suggestion that someone should create a duplicate property, using an rxjs subject, *solely for the purpose of improved typing*, is unsatisfactory.

This is a request to do whatever needs to be done to allow subscribing to `EventEmitter` directly while preserving type information.

### Describe the solution you'd like
The type information, which is already present on `EventEmitter`, should be retained.

### Describe alternatives you've considered

Currently, the suggested workaround seems to be to create a duplicate property and update both the `@Output()` property and the duplicate `Subject` property whenever the associated data changes.

e.g.

```
class MyComponent {
  @Input() name: string;
  
  @Output()
  nameChange = new EventEmitter<string>();
  nameChange2 = new Subject<string>();

  @Input() weather: {prediction: string};
  
  @Output()
  weatherChange = new EventEmitter<{prediction: string}>();
  weatherChange2 = new Subject<{prediction: string}>();

  private updateName(name: string) {
    this.name = name;
    this.nameChange.emit(name);
    this.nameChange2.next(name);
  }

  private weatherName(value: {prediction: string}) {
    this.weather = value;
    this.weatherChange.emit(value)
    this.weatherChange2.next(value)
  }
}
``
Repository: go
Issue: x/net/dns/dnsserver: new package
Labels: Proposal,Proposal-Accepted

x/net/dns/dnsmessage contains a DNS library (proposal #16218). A DNS server based on it would be very useful. In addition to the more traditional uses for a DNS server, having one in x/net would improve the story around using net.Resolver.Dial to do custom DNS.
Repository: every-programmer-should-know
Issue: What about History?
Labels: Needs some ❤️,good first issue

Histories make men wise.
Repository: go
Issue: internal/trace: TestMMUTrace and TestParseCanned failed on darwin/arm64
Labels: Testing,NeedsInvestigation

Noticed on the darwin/arm64 builder:

```
--- FAIL: TestMMUTrace (0.00s)
    gc_test.go:89: failed to parse trace: failed to read header: read 0, err EOF
--- FAIL: TestParseCanned (0.00s)
    parser_test.go:51: failed to parse good trace http_1_10_good: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace http_1_11_good: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace http_1_5_good: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace http_1_7_good: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace stress_1_10_good: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace stress_1_11_good: failed to read header: read 0, err EOF
    parser_test.go:55: unordered trace is not detected stress_1_5_unordered: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace stress_1_7_good: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace stress_start_stop_1_10_good: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace stress_start_stop_1_11_good: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace stress_start_stop_1_5_good: failed to read header: read 0, err EOF
    parser_test.go:51: failed to parse good trace stress_start_stop_1_9_good: failed to read header: read 0, err EOF
FAIL
FAIL	internal/trace	95.356s
```
Repository: flutter
Issue: AnimatedBuilder and ValueListenableBuilder should honor TickerMode
Labels: framework,a: animation,c: performance,P2,team-framework,triaged-framework

and when they rebuild after having unsubscribed for a while, they should compare the current value to the old one and decide whether to use the old value if they're the same or rebuild if it's changed.
Repository: godot
Issue: Can't reduce height of output window in IDE
Labels: enhancement,topic:editor,usability

**Godot version:**
3.1 beta 8

**Issue description:**
I always wonder why minimal height of Output window is so large? 
I tried to make it smaller, but size is locked. 
Is it possible to make this locked minimal height smaller (at least twice)?

![2019-02-28_113651](https://user-images.githubusercontent.com/1552169/53553144-ffb3ba00-3b4d-11e9-851b-34baf53b46b1.png)
Repository: create-react-app
Issue: production build: change name
Labels: tag: underlying tools,tag: internal

### Is this a bug report?
No. Just a question

### Question
Is het possible to change the production build .js name?

`npm run build `
is now generating a file with a name like : 

> runtime~main.fdfcfda2.js
(using react-scripts 2.1.5)

The issue I am having is that when I deploy to an SAP server it is failing because the special character  '~` in the file is not allowed.

I think it is more a SAP problem but maybe it is simple to change the generated name (without ejecting ofcourse)

btw: is it important to have this special character in the name?
Repository: TypeScript
Issue: Autocomple import parent dir wrong when rootDirs is defined
Labels: Suggestion,Experience Enhancement

**TypeScript Version:**  3.3.3333

If you configure in the tsconfig.json a rootDirs section like 

```json
{
    "compilerOptions": {
        "baseUrl": "src",
        "rootDirs": [
            "src",
            "src_gen"
        ]
    }
}
```

When you try autocomplete an import from the parent folder (..) in a subfolder the subjections are wrong, on linux (where I tested) it add all the valid completitions as well the content of the system root (/) foolder.

**Example**

File `src/example/example.tsx`
```ts
import { exampleImport } from '../[autocomplete here]'
```

Try to autocomplete after `../` the displayed options are wrong, it add a lot of extra invalid options.

**Note:** It only happens when you are listing the ../ autocomplete options, if you already selected a subfolder inside ../  (e.g. ../shared/) it works properly.

Maybe related to: https://github.com/Microsoft/TypeScript/issues/28550 and https://github.com/Microsoft/TypeScript/issues/30148
Repository: TypeScript
Issue: Autocomple import ignore rootDirs
Labels: Suggestion,Experience Enhancement

**TypeScript Version:**  3.3.3333

If you configure in the tsconfig.json a rootDirs section like 

```json
{
    "compilerOptions": {
        "baseUrl": "src",
        "rootDirs": [
            "src",
            "src_gen"
        ]
    }
}
```

When you try autocomplete an import the subjections ignore what is available in the rootDirs, only show the options available in the same folder of the editing file.

**Example**

File `src/example/example.tsx`
```ts
import { exampleImport } from './[autocomplete here]'
import { exampleImport2 } from '../[autocomplete here]'
```

Try to autocomplete after `./`, `../`, or any subfolder, the displayed options are only the options available in the src folder, but not the options available in the src_gen folder. 

**Note:** No matter the folder's order in the rootDirs sections, the result is the same. The value of the baseUrl option is not important for reproduce this behaviour.

Maybe related to: https://github.com/Microsoft/TypeScript/issues/28550 and https://github.com/Microsoft/TypeScript/issues/30147
Repository: go
Issue: cmd/compile: clean up recent fix for ginsop2 on ppc64x
Labels: NeedsFix,compiler/runtime

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel +72d24a7 Thu Feb 28 15:25:42 2019 +0000 linux/ppc64le
</pre>

### Does this issue reproduce with the latest release?
yes


### What operating system and processor architecture are you using (`go env`)?

$ go env
linux/ppc64le

Follow up for the fix  for #30283:
- add one or more testcases for buildmodes that set the shared flag (position independent code)
- clean up the function name ginsnop2 and/or its use
Repository: go
Issue: cmd/go, x/tools/go/packages: how to instrument cgo code?
Labels: NeedsInvestigation

go-fuzz instruments source code, writes it out to a temp dir, and then calls go/build to compile it.

go/packages appears to support this: it generates CompiledGoFiles, which have been preprocessed by cgo. However, if you instrument those files and write them back out, "go build" doesn't work.

The first issue, easily fixed, is that they don't have a ".go" suffix.

The second issue is that cmd/go complains when it finds C/C++ files and/or cgo directives in a directory with only precompiled cgo code, because the precompiled cgo code doesn't contain `import "C"`. Sample error message: `//go:cgo_ldflag "/usr/local/Cellar/re2/20190101/lib/libre2.a" only allowed in cgo-generated code`.

If you add a dummy file containing just `import "C"` to work around that issue, then cmd/go runs cgo on that, which generates duplicate definitions within the package. Sample error message: `_Cgo_ptr redeclared in this block`.

As an inferior fallback, I tried to instrument the pre-cgo code instead. However, the AST and type information that go/packages generates is for the CompiledGoFiles, not the GoFiles, so that'd mean typechecking everything by hand, which means losing a bunch of the value provided by go/packages.

For now, I'm just leaving cgo code completely uninstrumented. Unfortunately, this requires adding semi-fragile hacks to find cgo code (whether the file is missing a ".go" suffix) and then reaching through the abstraction layers and copying it verbatim.

I'm not sure how best to fix this. One option would be to have a way to tell cmd/go that all cgo preprocessing has been done. I don't see an obvious fix within go/packages, but it'd be ideal to find one, since that doesn't require waiting six months to be usable.

cc @matloob @ianthehat @bcmills @alandonovan @dvyukov
Repository: TypeScript
Issue: Inaccurate error or buggy behavior for JSDoc @typedef tags
Labels: Bug,Domain: JSDoc,Domain: JavaScript

```js
// @ts-check

/**
 * @typedef Foo
 * @member foo {() => string}
 */
```

```
JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.ts(8021)
```

We need to figure out what this message should actually be or make it work.

P.S. I can never figure out how to declare a typedef on the first try.
Repository: TypeScript
Issue: JSDoc @implements tag/clause not checked
Labels: Bug,Domain: JSDoc,Domain: JavaScript

```js
// @ts-check

/**
 * @typedef Foo
 * @property foo {() => string}
 */

/**
 * @implements {Foo}
 */
class C1 {
    foo = () => {
        return 10;
    }
}

/**
 * @implements {Foo}
 */
class C2 {
    foo() {
        return 10;
    }
}
```

**Expected**: At least an error on C1
**Actual**: Neither of these error
Repository: rust
Issue: It'd be useful to delay E0412 after type checking to improve suggestions
Labels: A-diagnostics,A-resolve,T-compiler,A-async-await,A-suggestion-diagnostics,D-papercut

With the following code:

```
async fn foo(i: usize, uri: Uri) -> Result<Duration, Error> {
    let client = Client::new();
    let now = Instant::now();
    match await!(client.get(uri).timeout(Duration::from_secs(20))) {
        Ok(_) => {
            Ok(Instant::now() - now)
        }
        Err(err) => Err(err),
    }
}
```

the diagnostic rightly complains about not knowing what `Error` is

```
error[E0412]: cannot find type `Error` in this scope
  --> src/main.rs:11:54
   |
11 | async fn foo(i: usize, uri: Uri) -> Result<Duration, Error> {
   |                                                      ^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
   |
5  | use core::fmt::Error;
   |
5  | use futures::core_reexport::fmt::Error;
   |
5  | use futures::io::Error;
   |
5  | use futures::rand_reexport::Error;
   |
and 10 other candidates
```

but it could use the information gathered later to limit the suggestions. If we change `Error` in the return type to `()`, the output is

```
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == std::result::Result<std::time::Duration, ()>`
  --> src/main.rs:11:37
   |
11 | async fn foo(i: usize, uri: Uri) -> Result<Duration, ()> {
   |                                     ^^^^^^^^^^^^^^^^^^^^ expected struct `tokio_timer::timeout::Error`, found ()
   |
   = note: expected type `std::result::Result<_, tokio_timer::timeout::Error<hyper::error::Error>>`
              found type `std::result::Result<_, ()>`
   = note: the return type of a function must have a statically known size
```
Repository: TypeScript
Issue: Smart indentation is wrong following more than one line after JSDoc comments
Labels: Bug,Help Wanted,Effort: Moderate,Domain: Formatter,Domain: JSDoc

```ts
/**
 * @typedef Id {string}
 */
```

- Press enter TWICE at the end of the comment.
- After the first newline, you get the correct indentation (0 spaces).
- After the second newine, you get garbage indentation (1 space).
Repository: TypeScript
Issue: Merged object exports of globalThis broken
Labels: Bug,Domain: JavaScript

From bluebird user test

```js
// @Filename: release/util.js
var ret = {
  isNode: isNode,
  isClass: isClass, // etc
}
ret.isRecentNode = ret.isNode && (function() { ... })();
// @Filename: release/async.js
const util = require('./util')
util.isNode // error
util.isRecentNode // ok
// @Filename: util.js
var globalObject = this;
var ret = {
  x: 1,
  global: globalObject,
}
ret.extra = 2;
module.exports = ret;
// @Filename: user.js
var util = require('./util')
util.global // ok
util.x // ok 
util.extra // ok?
```

**Expected behavior:**
all util.* ok

**Actual behavior:**
error on global and x


Due to toplevel `this` now having a type in the globalThis PR.
Note that this is a dist file from bluebird, where the intent is to provide a consistent global object as well as a consistent module.exports. But we get confused early on by `module.exports` references and incorrectly assume that the file is intended to be a module, and that toplevel `this` refers to the module, not `globalThis`.
Repository: TypeScript
Issue: is not under 'rootDir' 'src/'. even with exclude
Labels: Suggestion,Help Wanted,Experience Enhancement

<!-- 🚨 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.
-->

`exclude` compiler option is not working at all! I'm specifying `exclude` to the folder `gen` (and even `./gen`) and still receiving the error below.

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.3.3333

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
```

**Expected behavior:**
No errors.

**Actual behavior:**
```
error TS6059: File '.../ts-lang/gen/grammar/MyLangLexer.ts' is not under 'rootDir' 'src/'. 'rootDir' is expected to contain all source files.
```

**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: [Text feature] Underline Skip Descenders
Labels: framework,engine,a: typography,P2,team-engine,triaged-engine

It would be really great (read, somewhat necessary) to be able to: 
- adjust the underline thickness
- toggle skipping descenders

I saw some issues around exposing Skia text metrics but I'm not sure if these were specifically covered off. 

Either way, I'd really love to see them.
Repository: godot
Issue: Document why Basis axis vectors are exposed transposed
Labels: discussion,topic:core,documentation

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if non-official. -->
3.1 beta 9

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Windows 10

**Issue description:**
<!-- What happened, and what was expected. -->
print spatial.transform.basis is wrong

![image](https://user-images.githubusercontent.com/8284805/53624606-6eb70e80-3c33-11e9-9f79-9bbe924786e0.png)

![image](https://user-images.githubusercontent.com/8284805/53624995-85119a00-3c34-11e9-85a5-d684f8a806be.png)


I tested some case and this happen when spartial angle between 0 and 180 degree. it is ok at angle 180 degree or 0 degree

![image](https://user-images.githubusercontent.com/8284805/53625088-c4d88180-3c34-11e9-9ba3-e33459b2d57d.png)


**Steps to reproduce:**


**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
[test transform.zip](https://github.com/godotengine/godot/files/2918563/test.transform.zip)
Repository: rust
Issue: Usage of boolean negation operator sometimes breaks closure type inference
Labels: A-inference

The closure implements a trait, which is accepted in a function. Depending on its body the closure type inference sometimes works and sometimes fails forcing user to annotate argument type ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=852633722647b74e5b5ed18261db0b72)):
```rust
use std::ops::Not;

fn main() {
    bar(|x| x);             // ok
    bar(|x| Not::not(x));   // ok
    bar(|x: bool| x.not()); // needs type annotation
    bar(|x: bool| !x);      // needs type annotation
    bar(|x| !&x);           // ok
    bar(|x: bool| !*&x);    // needs type annotation
}

trait Foo<T> {
    type Output;
}

impl<F: Fn(T) -> O, T, O> Foo<T> for F {
    type Output = O;
}

fn bar(_: impl Foo<bool, Output = bool>) {}
```
I'm not 100% sure that it's a bug, but the inconsistency is alarming.
Repository: pytorch
Issue: The documentation to Module._version isn't visible.
Labels: module: docs,module: nn,module: serialization,triaged

## 📚 Documentation
The docs for [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) does not list  `_version` nor to the `_load_from_state_dict`. It should be listed to describe how to make a module backward compatible with its former weights.
Here are the docstrings I think should be included:
https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/module.py#L50-L60
https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/module.py#L649-L681

cc @brianjo @mruberry @albanD @jbschlosser @walterddr
Repository: pytorch
Issue: Document whether it is possible to train TorchScript modules
Labels: oncall: jit,module: docs,module: cpp,triaged

## 📚 Documentation

I am interested in the following workflow, but my impression is that this use case is not supported (yet?):

1. Prototype a model in **Python**
2. Export model to **C++** via TorchScript (`torch.jit.trace`)
3. Train model in **C++**

Based on the documentation, it is unclear whether this workflow is supported or not. The very first sentence of https://pytorch.org/docs/master/jit.html states

> TorchScript is a way to create serializable and **optimizable models** from PyTorch code

However, it is ambiguous if "**optimizable**" refers to training or the jit compilation process here. 

It seems that `torch::jit::script::Module` is treated as a special case which does not share commonality / a base class with `torch::nn::Module`. Is there also a way to access the parameters of a `torch::jit::script::Module` in order to use it for training? At first I thought "**optimizable models**" was referring to this but I am unsure now.

This issue is related to the post: https://discuss.pytorch.org/t/can-scriptmodule-be-used-for-training/35932


cc @suo @yf225
Repository: flutter
Issue: How to set Date Picker to display in Buddhist year
Labels: framework,f: material design,a: internationalization,d: api docs,P2,team-design,triaged-design

I want to develop an application that has the date picker.
But I can't find to config the format of year to Buddhist year.

Please help T_T