sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Wrong infered type when an additional constrain added
Labels: A-trait-system,T-compiler,A-inference,C-bug

In the function `f` I have to specify `bool` explicitly while `f` differs from `g` in constrains only:

```rust
use rand::Rng;
use rand::distributions::{Distribution, Standard};

fn f<S, R>(rng: &mut R) -> bool
where
    R: Rng,
    Standard: Distribution<S>,
{
    rng.gen::<bool>()
}

fn g<R>(rng: &mut R) -> bool
where
    R: Rng
{
    rng.gen()
}
```

[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f3bfa6c5cea44b4239677476b7e03cf4)

Not sure if it's an actual bug but it looks like the type inference should work the same way in both cases.
Repository: rust
Issue: Misleading error message, privacy error reported as type error
Labels: A-diagnostics,A-visibility,T-compiler,C-bug

```rust
mod foo {
    pub struct Foo {
        private: i32,
    }
}

use foo::Foo;

fn main() {
    let mut foo = Foo { private: 0_usize };
}

```

([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=db546b8ab3361a008f7cd421658e15aa))

Errors:

```
   Compiling playground v0.0.1 (/playground)
error[E0308]: mismatched types
  --> src/main.rs:11:34
   |
11 |     let mut foo = Foo { private: 0_usize } ;
   |                                  ^^^^^^^ expected i32, found usize

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: Could not compile `playground`.

To learn more, run the command again with --verbose.
```

The error message here is incorrect. Whether the types match or not is irrelevant, because the field is private. The error should say something like this instead ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c2a74939542ed8ce8535b779a2688c1c)): 

```
 error[E0451]: field `private` of struct `foo::Foo` is private
  --> src/main.rs:10:25
   |
10 |     let mut foo = Foo { private: 0_i32 };
   |                         ^^^^^^^^^^^^^^ field `private` is private

error: aborting due to previous error
```
Repository: go
Issue: runtime: maybe allgs should shrink after peak load
Labels: NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.4 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Y

### What operating system and processor architecture are you using (`go env`)?

any

### What did you do?

When serving a peak load, the system creates a lot of goroutines, and after that the goroutine garbages cause more CPU consuming.

This can be reproduced by: 

```go
package main

import (
	"log"
	"net/http"
	_ "net/http/pprof"
	"time"
)

func sayhello(wr http.ResponseWriter, r *http.Request) {}

func main() {
	for i := 0; i < 1000000; i++ {
		go func() {
			time.Sleep(time.Second * 10)
		}()
	}
	http.HandleFunc("/", sayhello)
	err := http.ListenAndServe(":9090", nil)
	if err != nil {
		log.Fatal("ListenAndServe:", err)
	}
}
```

after 10 seconds, the inuse objects still remain the same.
![flame3](https://user-images.githubusercontent.com/384546/65388518-138b6b80-dd7f-11e9-9683-f9400a8e5f42.jpg)


### What did you expect to see?

The global goroutines shrink to a proper size.

### What did you see instead?

Many inuse objects created by malg
Repository: rust
Issue: Linker error because `-wL as-needed` conflicts with `-C link-dead-code`
Labels: A-linkage,T-compiler,C-bug,link-dead-code

When a project has the `[lib]` tag in the `Cargo.toml` the `-wL as-needed` flag is added to the projects linker flags. However, if a project uses `-C link-dead-code` the two flags conflict causing a linker error of `undefined reference` for any functions in the lib.

This was discovered because link-dead-code is used for code coverage in tarpaulin. I spent some time seeing if there was a way around it as a user but I didn't manage to solve it myself. Issue that lead me to this for reference: https://github.com/xd009642/tarpaulin/issues/126

Any solutions I could currently implement would be appreciated if this requires a PR I'm also happy to contribute (though may need some mentorship)
Repository: godot
Issue: Import plugin does not support extensions with multiple periods
Labels: bug,topic:plugin,topic:import

**Godot version:**
3.1

**OS/device including version:**
Windows

**Issue description:**
I am writing an import plugin for Yarn Spinner dialogue which uses a `.yarn.txt` extension. The import plugin must be registered to just `.txt` in order to work but then causes all sorts of issues where it imports other txt files in the filesystem.

It would be great if:
1. You could specify `.yarn.txt`
2. OR if you could tell the import plugin to skip a file if it's not the right format. So I would still register a .txt but then could just return an error that tells Godot to skip importing the file. Let me know if I should create a separate issue for this. It would also be useful for other import plugins (like Tiled importer) that handle `.json` but then end up causing a lot of headache when it tries to import other json files in the project.
Repository: godot
Issue: Arrays/Dictionaries allow modifying contents during iteration
Labels: bug,topic:gdscript,confirmed

**Godot version:**
2e065d8

**Issue description:**
While debugging my game, I bumped into this piece of code:
```gdscript
for id in shared_objects:
	if not is_instance_valid(shared_objects[id]):
		shared_objects.erase(id)
```
Godot doesn't see any problem here, even though doing this will totally break iteration and skip some elements. IMO modifying collection during iteration should raise an error, because it's never an intended behavior and yields unexpected results.
Repository: rust
Issue: No error for private type in public async fn
Labels: A-visibility,T-compiler,C-bug,A-async-await,AsyncAwait-Triaged

[Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=4cfeed4e56df13be164fe7e46608e39a)
```rust
mod foo {
    struct Bar;
    
    pub async fn bar() -> Bar {
        Bar
    }
}
```
This compiles just fine, despite the async fn returning a private type. There is a warning, but that's about it.
```
warning: private type `foo::Bar` in public interface (error E0446)
 --> src/lib.rs:4:5
  |
4 | /     pub async fn bar() -> Bar {
5 | |         Bar
6 | |     }
  | |_____^
  |
  = note: `#[warn(private_in_public)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
```
I don't think the warning was intended for async fn. This seems like it slipped through for async fn.
Repository: vue
Issue: Infinite loop in vue-template-compiler
Labels: bug,contribution welcome,has PR

### Version
2.6.10

### Reproduction link
[https://github.com/oguimbal/vuebug](https://github.com/oguimbal/vuebug)







### Steps to reproduce
```
git clone git@github.com:oguimbal/vuebug.git
npm i
npm start
```

Wait a couple of seconds, and your compilation process will be frozen.

If you attach a debugger to the node process, you will see the infinite loop in `generateCodeFrame()` method of vue-template-compiler:

![bug](https://raw.githubusercontent.com/oguimbal/vuebug/master/bug.png)

### What is expected?
I would expect the compiler not to freeze

### What is actually happening?
The compiler is freezing

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: rust
Issue: Type parameters of associated consts have unexpected lifetime constraints
Labels: A-lifetimes,A-borrow-checker,T-lang

This simple trait fails to compile:

```rust
pub trait Foo<T> {
    const FOO: &'static fn(T);
}
```

```
error[E0310]: the parameter type `T` may not live long enough
 --> src/lib.rs:3:5
  |
2 | pub trait Foo<T> {
  |               - help: consider adding an explicit lifetime bound `T: 'static`...
3 |     const FOO: &'static fn(T);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
note: ...so that the reference type `&'static fn(T)` does not outlive the data it points at
 --> src/lib.rs:3:5
  |
3 |     const FOO: &'static fn(T);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0310`.
```

However, `T`'s lifetime obviously has nothing to do with the lifetime of a pointer to a function that includes `T`.
Repository: TypeScript
Issue: Provide a `this` type for `get`/`set` methods in `Reflect.defineProperty` options
Labels: Suggestion,Experience Enhancement


**Code**
```ts
var A: {a?: number, b: number} = {b:2}
Reflect.defineProperty(A, 'a', {
  // set(this: any, value: any) { // to fix
  set(value: any) {
    console.log(this.b); // Property 'b' does not exist on type 'PropertyDescriptor'.
  },
  enumerable: true,
  configurable: true
});
A.a = 1;
// expect the context of setter is A
```

**Expected behavior:**

expect the context of the setter is A

**Actual behavior:**

Property 'b' does not exist on type 'PropertyDescriptor'.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

https://www.typescriptlang.org/play/index.html?strictPropertyInitialization=false&alwaysStrict=false&experimentalDecorators=true&emitDecoratorMetadata=true#code/LAKAbghgTgBAggLhgbwgfiQOwK4FsBGAplADQz5Z5FQC+MAvChQEw2gBKhAZgDaEDGAFwB0AE24BLTIQAKUAPYAHYoICeACjhkA5BG1lkoGDADOhQesg9shJBEyqAlCiPGY-eZhPy+wnvIBzdUEACwkTYXxHAG4YAHo4mDklFVUYbXxtGFF5QhMYTHlBGEIAD3Dizxg1ZXTk5Sg1ABE8-igJRUF5KG1hVxoSV0IcXGIIfD4kQSgbQZBjD0wuCQDsKHHJ6pnCUBoY0DhhCAYYAEZo0ASS0uUhapDCd09BMsquU3MX2HD4IA
Repository: godot
Issue: Disabled modules shouldn't call pkg-config if they are set to be non-builtin
Labels: bug,platform:linuxbsd,topic:buildsystem

**Godot version:** Git https://github.com/godotengine/godot/commit/72d87cfbce137b8012e86f678c27f0f19a9771cf

**OS/device including version:** Fedora 30

**Issue description:** Someone reported on IRC that non-builtin dependency checking is done even if the module that requires them is disabled. This causes a build failure if the dependency in question isn't installed on the system.

For instance, `builtin_libtheora=no` will always call pkg-config, even if `module_theora_enabled=no` is also passed to the SCons command line:

https://github.com/godotengine/godot/blob/72d87cfbce137b8012e86f678c27f0f19a9771cf/platform/x11/detect.py#L241-L247

**Steps to reproduce:** Build Godot with `scons platform=x11 builtin_libtheora=no module_theora_enabled=no`.
Repository: TypeScript
Issue: Documentation for --declaration and -d incorrect, missing --dry
Labels: Docs

When I read the [Compiler Options docs](https://www.typescriptlang.org/docs/handbook/compiler-options.html) (source permalink)[https://github.com/microsoft/TypeScript-Handbook/blame/ee314075d47dbab49a6b631cc45a38d6c555b324/pages/Compiler%20Options.md#L16], I see:

> Option | Type | Default | Description
> --- | --- | --- | ---
> `--declaration`<br/> `-d` | `boolean` | `false` | Generates corresponding `.d.ts` file.

When I try to specify `--declaration` as a compiler option on the command line, it gives an error. When I try to specify `-d` as a compiler option on the command line, it seems to activate an [undocumented `--dry` option](https://github.com/microsoft/TypeScript/blob/5d09688c1ef3eaf4e48fc570cc3e233e78222f9c/src/compiler/commandLineParser.ts#L920).

I think `tsc` needs to be fixed to follow the behavior specified in the documentation or the documentation needs to be updated to describe the `--dry` compiler option.

Furthermore, by reading the source, I can see that there seem to be config-only compiler options and CLI-only compiler options. The documentation probably needs to be updated to describe how those work/interact and describe when they are different. When a compiler option is config-only, it should never be documented as `--optionName` because a config-only option will never ever be typed as `--optionName`.

**TypeScript Version:**  3.7.0-dev.20190922

**Search Terms:**
* is:issue is:open declaration dry

**Code**

```
$ ./node_modules/.bin/tsc -b --declaration
```

```
$ ./node_modules/.bin/tsc -b -d
```

**Expected behavior:**

Build with `.d.ts` files emitted.

**Actual behavior:**

```
ohnobinki@gibby /tmp/.private/ohnobinki/typescript-next-play $ ./node_modules/.bin/tsc -b --declaration
error TS5072: Unknown build option '--declaration'.

```

```
ohnobinki@gibby /tmp/.private/ohnobinki/typescript-next-play $ ./node_modules/.bin/tsc -b -d
[00:31:11 GMT+0000 (UTC)] A non-dry build would build project '/tmp/.private/ohnobinki/typescript-next-play/tsconfig.json'

```

**Playground Link:** n/a

**Related Issues:**
Repository: opencv
Issue: OpenCV DNN throws exception with DeepLab MobileNet v2 frozen graph
Labels: category: dnn

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

Please:

* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.


This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => 4.1.1(python wrapper)
- Operating System / Platform => Ubuntu 18.04 LTS
- tensorflow => 1.14.0

##### Detailed description

<!-- your description -->
I fine-tuned the mobilenetv2 backbone version of deeplabv3, and export the frozen graph provided by [export_model.py](https://github.com/tensorflow/models/blob/master/research/deeplab/export_model.py) with no error.

I can use the frozen graph for inference in tensorflow, but throws an error when call `cv2.dnn.readNet('frozen_graph.pb', 'inference_graph.pbtxt')`:

>**error: OpenCV(4.1.1) /io/opencv/modules/dnn/src/tensorflow/tf_importer.cpp:663: error: (-215:Assertion failed) const_layers.insert(std::make_pair(name, li)).second in function 'addConstNodes'**



##### Steps to reproduce
 I can reproduce this error with the [deeplab official mobilenetv2 checkpoint](http://download.tensorflow.org/models/deeplabv3_mnv2_pascal_train_aug_2018_01_29.tar.gz)

1. Download the checkpoints and extract.
2. export using(in path/to/models/research/):
```
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
python deeplab/export_model.py \
  --logtostderr \
  --checkpoint_path=path/to/checkpoint/model.ckpt-30000 \
  --export_path=path/to/frozen_graph/frozen_inference_graph.pb \
  --model_variant="mobilenet_v2" \
  --num_classes=21 \
  --crop_size=513 \
  --crop_size=513 \
  --inference_scales=1.0 \
  --save_inference_graph=True
```
3. readNet() using generated '.pb' and '.pbtxt' file

I have read many related issues but does not solve my problem. 
I have also tested [xception_65](http://download.tensorflow.org/models/deeplabv3_pascal_train_aug_2018_01_04.tar.gz)  checkpoint, also throws a error. 
<!-- to add code example fence it with triple backticks and optional file extension

-->
Repository: youtube-dl
Issue: Hide cmd windows 10
Labels: question

When youtube_dl starts to convert video file via ffmpeg, it show cmd window.
Do anyone know how to hide this cmd window?

After googling. I read this https://trac.ffmpeg.org/wiki/DirectShow#Runningffmpeg.exewithoutopeningaconsolewindow
1. Tried to rename *.py to *.pyw
2. Make exe with pyinstaller with flag --noconsole

It still appears. I have no idea how disable console when ffmpeg start works.

I also found that 2 times this question was closed without any help.
Repository: angular
Issue: Animation doesn't work properly in nested component inside ng-content when both parent and child components use animations
Labels: type: bug/fix,area: animations,freq3: high,state: needs more investigation,P3

# 🐞 bug report

### Affected Package
@angular/animations

### Is this a regression?

No.
It worked differently in versions < 5.0.0, but there were other problems with this case.

### Description
A parent component has a ng-content which is located inside element with ngIf and animation.
parent: `<div *ngIf="parentVisible" @animation><ng-content></ng-content></div>`

Nested child component has additional ngIf with animation.
child: `<div *ngIf="childVisible" @animation>Child content</div>`

Usage: `<parent><child></child></parent>`

When parent component hides and shows back ng-content, the child's content inside ngIf element stays hidden.
This problem does not exist when animation is not used in parent or child component.

## 🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-bugqv5

## 🌍  Your Environment

**Angular Version:**
<pre><code>
8.2.7
</code></pre>

**Anything else relevant?**
Tested in Chrome 77.0.3865.90 (64-bit), Firefox 69.0.1 (64-bit)
Repository: opencv
Issue: gtk buildable error in open cv
Labels: priority: low,incomplete,needs investigation

i got these error when i run opencv

Starting /home/pi/build-QcOpenCv-Desktop-Debug/QcOpenCv...
qt5ct: using qt5ct plugin

(QcOpenCv:2806): GLib-GObject-WARNING **: cannot register existing type 'GtkWidget'

(QcOpenCv:2806): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(QcOpenCv:2806): GLib-GObject-WARNING **: cannot register existing type 'GtkBuildable'

(QcOpenCv:2806): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(QcOpenCv:2806): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(QcOpenCv:2806): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(QcOpenCv:2806): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed
Repository: go
Issue: encoding/json: json.Number accepts quoted values by default
Labels: NeedsDecision

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/viacheslav.poturaev/Library/Caches/go-build"
GOENV="/Users/viacheslav.poturaev/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY="github.com/hellofresh"
GONOSUMDB="github.com/hellofresh"
GOOS="darwin"
GOPATH="/Users/viacheslav.poturaev/go"
GOPRIVATE="github.com/hellofresh"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/h7/7qg3nbt91bb6mgk2xtqqpwc40000gp/T/go-build850653985=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
I've decoded a JSON value of `"123"` into `json.Number`.
https://play.golang.org/p/9Nwjn3rBFxI

### What did you expect to see?
I've expected to see an error.


### What did you see instead?
I've seen a successful result and an int64 value of `123` accessible with `.Int64()`.


I could not find any documentation that `json.Number` accepts quoted string values by default and was expecting the opposite (as per "being precise" motivation expressed in https://github.com/golang/go/issues/22463#issuecomment-340567609).

Not sure if this is a documentation or implementation issue.
Repository: youtube-dl
Issue: Change container of opus audio
Labels: request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2019.09.12.1. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x ] I'm reporting a feature request
- [ x] I've verified that I'm running youtube-dl version **2019.09.12.1**
- [x ] I've searched the bugtracker for similar feature requests including closed ones


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

Hi, with yt-dl i can download the audio from any video, which is great. The thing is, youtube stores opus audio in the webm container.

Is there any function to change the container within the yt-dl process? I tried:
`youtube-dl.exe -f "bestaudio[ext=webm]" --batch-file "youtube-dl.txt" --merge-output-format ogg -v`
but does nothing, it'll still give you the webm container file.
I believe it's not implemented or something, is there any known workaround?
thanks