sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Poor error message with type alias and external crate
Labels: C-enhancement,A-diagnostics,T-compiler

The following code: https://play.rust-lang.org/?gist=3a06bcc680135c042135ca45984379f7&version=stable

```rust
extern crate num;

use num::One;
use num::rational::BigRational;

fn main() {
    BigRational::pow(&BigRational::one(), 23);
}
```

Gives the following error:
```
error[E0599]: no function or associated item named `pow` found for type `num::rational::Ratio<num::BigInt>` in the current scope
 --> src/main.rs:7:5
  |
7 |     BigRational::pow(BigRational::one(), 23);
  |     ^^^^^^^^^^^^^^^^
  |
  = note: the method `pow` exists but the following trait bounds were not satisfied:
          `num::BigInt : num::PrimInt`
```

This is poor for several reasons:

 * The error message talks about `num::rational::Ratio<num::BigInt>` when the code uses `BigRational` - to a new user it isn't clear that this is a type alias
 * It says the function does not exist, but then also says it exists and isn't applicable. In addition to being more confusing than useful (debatably), there's nothing the end user can do about it:
     - They can't change the type parameter to satisfy the bound (since it's a type alias in an external crate)
     - They can't modify the implementation to use a different bound (again, because it's in the external crate)
Repository: godot
Issue: Area2D does not report input events if it is not in a collision layer
Labels: bug,topic:physics,topic:input

**Operating system or device, Godot version, GPU Model and driver (if graphics related):**
Windows 7 - 64bits
Godot 2.2

**Issue description:**
Area2D does not report input events if it is not in a collision layer.
I think the collision layers have nothing to do with the detection of input events so it should always detect them (when it is pickable, obviously).

**Link to minimal example project:**
[Area2D Input Bug.zip](https://github.com/godotengine/godot/files/1290967/Area2D.Input.Bug.zip) (Run with _Visible Collision Shapes_)
Repository: kubernetes
Issue: Smarter openapi generator
Labels: sig/api-machinery,kind/feature,lifecycle/frozen

Our openapi generator works like the following at the moment.
```
openapi-gen \
--input-dirs "target,dep1,dep2" \
--output-package "somewhere"
```
the generated openapi `.go` file will contain all types from target, dep1 and dep2. It will include some types not referenced in target. This will increase the weight of a user apiserver if the openapi spec contains a lot of unnecessary stuff.

A smarter openapi generator should be
```
openapi-gen \
--target-dirs "target" \
--dep-dirs "dep1,dep2" \
--output-package "somewhere"
```
The generated spec should be contains all the types from `target` and the types in `dep1,dep2` that have been referenced in `target`. In this way, the generated openapi `.go` file. will only contain necessary types.

/kind feature
/sig api-machinery

After discussing with @mbohlool, we see 2 approaches that both do 2 passes of the types definition. @mbohlool suggests the first approach.

- Build a dependency tree in the first pass and generate the openapi spec in the second pass.

- Build the openapi spec for all in the first pass and delete the unnecessary spec in the second pass.
Repository: rust
Issue: 🔬 Tracking issue for RFC 2089: Extended Implied bounds
Labels: B-RFC-approved,T-lang,T-compiler,C-tracking-issue,S-tracking-impl-incomplete,T-types

This is a tracking issue for the RFC "Implied bounds" (rust-lang/rfcs#2089).

**Steps:**

- [ ] Implement the RFC (cc @rust-lang/compiler -- can anyone write up mentoring instructions?)
- [ ] Adjust documentation ([see instructions on forge][doc-guide])
- [ ] Stabilization PR ([see instructions on forge][stabilization-guide])

[stabilization-guide]: https://forge.rust-lang.org/stabilization-guide.html
[doc-guide]: https://forge.rust-lang.org/stabilization-guide.html#updating-documentation

**Unresolved questions:**

* Should we try to limit the range of implied bounds to be crate-local (or module-local, etc)?
* @nikomatsakis pointed [here][niko] that implied bounds can interact badly with current inference rules.

[niko]: https://internals.rust-lang.org/t/lang-team-minutes-implied-bounds/4905
Repository: pytorch
Issue: Feature Request: Support grad of grad in fused RNNs
Labels: module: double backwards,feature,module: autograd,module: nn,triaged

Right now they're legacy functions and don't support double backprop

cc @ezyang @SsnL @albanD @zou3519 @gqchen @mruberry
Repository: rust
Issue: region errors: suggest new signature
Labels: C-enhancement,A-diagnostics,T-compiler,WG-diagnostics,A-suggestion-diagnostics,D-papercut

In some cases, we can suggest a new signature where the user introduces a new named lifetime. This is a bit tricky to figure out how to format the suggestion. It would get mildly easier with https://github.com/rust-lang/rfcs/pull/2115. 

```
struct Ref<'a> { x: &'a u32 }

fn foo<T>(mut x: Vec<Ref<T>>, data: u32, y: Ref<T>)  {
    x.push(y);
}
```

The old code used to produce a modified form of the HIR to format the suggestion. I'd prefer not to do that. I was thinking we could probably do something simpler where we just emit the "new parts" of the signature, maybe like this?

```
hint: consider changing the signature as shown:
  | fn foo<'a, ...>(mut x: Vec<Ref<'a, T>>, ..., y: Ref<'a, T>)
```

Idea would be to do something like this:

- Find name for a fresh lifetime that is not in scope (e.g., `'``a`)
- Emit `fn`
- Emit name of function (`foo`)
- If the function has generic parameters already:
  - Emit  `<`, fresh lifetime, `…`, `>`
- Else:
  - Emit `<`, fresh lifetime, `>`
- Emit `(`
- Emit `…` if needed
- Emit parameter name 1 and type (with fresh lifetime substituted)
- Emit `…` if needed
- Emit parameter name 2 and type (with fresh lifetime substituted)
- Emit `…` if needed
- Emit `)`

Not sure if this is a good plan. Might be best to wait until the https://github.com/rust-lang/rfcs/pull/2115 is settled, since that would permit us to make a suggestion where we just add a fresh named lifetime, and we don't have to add `<'a>` or anything.
Repository: pytorch
Issue: Have ppc64le docker images? 
Labels: triaged,module: POWER

I don't find pytorch docker image for ppc64le version. Besides, I tried to build a docker image based on official dockerfile (base image is from a cudnn-ppc64le image) but failed with conda (for ppc64le) doesn't support `mkl` and `magma-cuda80` for ppc64le as below:

```shell
Step 6/12 : RUN conda install --name pytorch-py35 -c soumith magma-cuda80 mkl
 ---> Running in 1b2e81bb2911
Fetching package metadata ...........
PackageNotFoundError: Package missing in current linux-ppc64le channels:
  - magma-cuda80

The command '/bin/sh -c conda install --name pytorch-py35 -c soumith magma-cuda80 mkl' returned a non-zero code: 1
```

Thus, I wanna ask have ppc64le image or a installation tutorial for ppc64le.
Repository: angular
Issue: "Cannot find control with unspecified name attribute" plz add the name of the control
Labels: feature,freq2: medium,area: forms,feature: under consideration

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre>

## Current behavior

concerning error "Cannot find control with unspecified name attribute"

can someone add the actual name angular is looking for ?
that would be awesome especialy when you have like 20 inputs in a form
and try to find which one is actually missing in the template

thanks
Repository: TypeScript
Issue: Add base class in lib.scripthost.d.ts for Automation objects
Labels: Suggestion,In Discussion,Domain: lib.d.ts

**TypeScript Version:**  2.5.0 / nightly (2.6.0-dev.20170902)

**Code**

```ts
// in lib.scripthost.d.ts
class AutomationObject<T> {
  private constructor();
  private typekey: AutomationObject<T>;
}

// in activex-excel.d.ts
declare namespace Excel {
    class Application extends AutomationObject<Application> {
        Workbooks: any;
    }
}

interface ActiveXObject {
    new(progid: 'Excel.Application'): Excel.Application;
}
    
// usage
let x: Excel.Application = new ActiveXObject('Excel.Application');
```
This currently wouldn't compile, because of the `private constructor` in the base class; but pending resolution of #18283, it would be possible.

This would prevent assigning structurally matching objects to the inheriting types:
```typescript
// Compiler error
x = {
    Workbooks: [];
};
```
and also prevent using `new` to create a new instance of the inheriting type:
```typescript
// Compiler error
x = new Excel.Application();
```
---
I've [opened an issue](https://github.com/Microsoft/TypeScript/issues/17526) to define similar behavior for `VarDate` and `SafeArray<T>` in `lib.scripthost.d.ts`. If `AutomationObject<T>` is defined, then it could be used in `lib.scripthost.d.ts` as a base class for these types as well:
```typescript
declare class VarDate extends AutomationObject<VarDate> { }
declare class SafeArray<T> extends AutomationObject<SafeArray<T>> { }
```
Repository: TypeScript
Issue: proposal:symbol enum
Labels: Suggestion,Awaiting More Feedback

I want symbol enum.

syntax example:
```ts
symbol enum Example{
  X,Y,Z
}
```
↓
```js
var Example;
(function (Example) {
    Example[Example["X"] = new Symbol("X")] = "X";
    Example[Example["Y"] = new Symbol("Y")] = "Y";
    Example[Example["Z"] = new Symbol("Z")] = "Z";
})(Example || (Example = {}));

```
Repository: kubernetes
Issue: Re-run initContainers in a Deployment when containers exit on error
Labels: sig/node,kind/feature,needs-triage

**Is this a BUG REPORT or FEATURE REQUEST?**:

/kind feature


**What happened**: Container in a Deployment exits on error, container is restarted without first re-running the initContainer. 

**What you expected to happen**: Container in a Deployment exits on error, initContainer is re-run before restarting the container.

**How to reproduce it (as minimally and precisely as possible)**: 

Sample spec:
```
kind: "Deployment"
apiVersion: "extensions/v1beta1"
metadata:
  name: "test"
  labels:
    name: "test"
spec:
  replicas: 1
  selector:
    matchLabels:
      name: "test"
  template:
    metadata:
      name: "test"
      labels:
        name: "test"
    spec:
      initContainers:
        - name: sleep
          image: debian:stretch
          imagePullPolicy: IfNotPresent
          command:
            - sleep
            - 1s
      containers:
        - name: test
          image: debian:stretch
          imagePullPolicy: IfNotPresent
          command:
            - /bin/sh
            - exit 1

```

**Anything else we need to know?**:

**Environment**:
- Kubernetes version (use `kubectl version`): 
```
Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+$Format:%h$", GitCommit:"db809c0eb7d33fac8f54d8735211f2f3a8fc4214", GitTreeState:"clean", BuildDate:"2017-09-11T19:46:47Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+$Format:%h$", GitCommit:"db809c0eb7d33fac8f54d8735211f2f3a8fc4214", GitTreeState:"clean", BuildDate:"2017-09-11T19:46:47Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
```
- OS (e.g. from /etc/os-release): 
```Debian GNU/Linux 9 (stretch)```
- Kernel (e.g. `uname -a`): 
```Linux aleinung 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux```

Implementation Context:

I have an initContainer that waits for a service running in `Kubernetes` to detect its existence via pod annotations, and send it an HTTP request, upon which it writes this value to disk. The main container then reads this value upon startup and "unwraps" it via another service, upon which it stores the unwrapped value in memory. 

The value that is written to disk by the initContainer is a one-time read value, in that once it is used the value is then expired. The problem is that if the main container ever restarts due to fatal error, it loses that unwrapped value and upon startup tries to unwrap the expired value again, leading to an infinite crashing loop until I manually delete the pod, upon which a new pod is created, the initContainer runs, and all is again well. 

I desire a feature that restarts the entire pod upon container error so that this workflow can function properly.
Repository: TypeScript
Issue: Dangerous "name" (and potentially others) global 
Labels: Suggestion,Help Wanted,Committed,Domain: lib.d.ts,Good First Issue

<!-- BUGS: Please use this template. -->
<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

**TypeScript Version:**  2.6.0-dev.20170913

**Code**

```ts
if (name === "asdf") {
  console.log("asdf")
}
```

`https://www.typescriptlang.org/play/#src=if (name %3D%3D%3D "asdf") {%0D%0A console.log('hello')%0D%0A}`

**Expected behavior:**

Error out

**Actual behavior:**

More than once, I had a "local" variable called `name`, outside a block scope, and it didn't warn me that it's not defined (or used before declaration). even though, in my code, `event.name` is a string, the global `name` variable is of type `never`. it's defined in `lib.dom.d.ts`, along with other "juicy" global names that will provide some confusion, like `length`, `external`, `event`, `closed`

![image](https://user-images.githubusercontent.com/461084/30372857-ad591f3a-9855-11e7-915b-7dee3baaec8f.png)

![image](https://user-images.githubusercontent.com/461084/30372908-d7acb40e-9855-11e7-99c8-b31c78e45d5f.png)

one 'fix' (that would be a breaking change) would to make `lib.dom-globals.d.ts` (the propertiers that are usually accessible through `window` variable) and make it an opt-in in `tsconfig.json compilerOptions.lib` array
Repository: angular
Issue: Matrix array param is not retrievable by ParamMap#getAll function.
Labels: type: bug/fix,freq3: high,area: router,state: confirmed,router: URL parsing/generation,P3

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre>

## Current behavior
<!-- Describe how the issue manifests. -->
If an URL is built with matrix parameters which contain array value, it is not retrievable as an elements of  array by the ParamMap.getAll function. It provides an array with only one single value in which the original values are concatenated instead of multiple elements.

For example:
- Given a navigation like this: this.router.navigate(['example', { foo: ['bar', 'baz'] } ]);
- The URL will be something like this: /example;foo=bar,baz
- Then I want to get back the foo values through the ActivatedRoute: this.activatedRoute.snapshot.paramMap.getAll('foo')
- I get this: ['bar,baz'] instead of ['bar', 'baz']

## Expected behavior
<!-- Describe what the desired behavior would be. -->
- getAll function should provide an elements of array (['foo', 'bar']) instead of an array with single element (['foo,bar']).

## Minimal reproduction of the problem with instructions
<!--
For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
-->

## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->


## Environment

<pre><code>
Angular version: 4.3.1
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  <!-- run `node --version` -->
- Platform: Windows <!-- Mac, Linux, Windows -->

Others:
<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->
</code></pre>
Repository: go
Issue: cmd/internal/obj/x86: improve asm error messages
Labels: NeedsInvestigation

Some assembler error messages are misleading and miss context info.
99% of errors programmer get is `invalid instruction` which does not help that much.

Go (or plan9) asm has its peculiar points that make initial experience, coupled with such error messages,
very unpleasant. 

There are multiple aspects of error messages that can be improved, but for the very start,
some obviously horrible things can be changed.

I present some cases where error message could be more precise/informative.
If applicable, `clang` asm error message for the same case is provided. 

This is a proposal to start a discussion regarding this topic.
Maybe someone will point important pitfalls, or provide more cases
that worth a fix. 

Scope of this one restricted to **x86** assembler backend.

```asm
TEXT main·asmErrors(SB),$0
        // 1
        // Case: immediate operand overflow.
        // Note: base16->base10 constant conversion in error message
        //       is annoying too, but it is separate issue.
        //
        // Have: "invalid instruction: ADDQ $-2415919103, AX"
        // Want: "ADDQ(imm32,r): constant -2415919103 overflows imm32"
        ADDQ $-0x8FFFFFFF, AX
        // 2
        // Case: invalid operand types combination.
        //
        // Have: "invalid instruction: MOVL (R8), (R9)"
        // Want: "MOVL with (mem,mem) operands combination does not exist"
        //
        // Clang:
        // > invalid operand for instruction
        // >   movl (%R8), (%R9)
        // >               ^~~~~
        MOVL (R8), (R9)
        // 3
        // Case: negative immediate for unsigned operand.
        //
        // Have: "invalid instruction: PSHUFL: $-10, X0, X1"
        // Want: "PSHUFL(uint8,xmm,xmm): invalid negative immediate value -10"
        PSHUFL $-10, X0, X1
        // 4
        // Case: using "SP" register as "index" in SIB addressing.
        // Note: same goes for XMM and other non-suitable for index registers.
        //
        // Have: "invalid instruction: MOVL (AX)(SP*2), AX"
        // Want: "SP register can't be used as index in SIB addressing"
        MOVL (AX)(SP*2), AX
        // 5
        // Case: SIB without explicit "scale".
        // See:  #13282.
        //
        // Have[1]: "invalid instruction: MOVL foo<>(SB)(AX), AX"
        // Have[2]: "asmidx: bad address 0/2064/2064"
        // Want:    "SIB addressing without explicit scale is forbidden"
        MOVL foo<>(SB)(AX), AX // [1]
        MOVL (AX)(AX), AX      // [2]

        RET
```
Repository: rust
Issue: 128-bit integer division with remainder is not combined to a single operation
Labels: A-LLVM,I-slow,C-enhancement,T-compiler

Rustc fails to combine `div()` and `mod()` operations with ` u128` to a single division with remainder on x64. The following code compiles down to separate calls to [`__udivti3()`](https://github.com/rust-lang-nursery/compiler-builtins/blob/23f14d3f05f2717497ac18d86d49be1e3f03ae68/src/int/udiv.rs#L245-L249) and [`__umodti3()`](https://github.com/rust-lang-nursery/compiler-builtins/blob/23f14d3f05f2717497ac18d86d49be1e3f03ae68/src/int/udiv.rs#L251-L257) when we would prefer a single call to [`__udivmodti4()`](https://github.com/rust-lang-nursery/compiler-builtins/blob/23f14d3f05f2717497ac18d86d49be1e3f03ae68/src/int/udiv.rs#L264-L271).

```rust
#![feature(i128_type, i128, test)]
extern crate test;

#[inline(never)]
fn divmod_u128(a: u128, b: u128) -> (u128, u128) {
    (a / b, a % b)
}

fn main() {
    println!("{:?}", divmod_u128(std::u128::MAX, test::black_box(1000)));
}
```

Related to #39078.
Relevant in the [Display implementation for i128 and u128](https://github.com/rust-lang/rust/blob/4312ed765a5f3354f3214fb3b214bff64ae8ccbf/src/libcore/fmt/num.rs#L220-L221).
Repository: go
Issue: runtime/secret: add new package
Labels: Proposal,Proposal-Accepted,NeedsInvestigation

Final API is here: https://github.com/golang/go/issues/21865#issuecomment-925145234

---

Forward secrecy is usually only a thing if it's possible to ensure keys aren't actually in memory anymore. Other security properties, too, often require the secure erasure of keys from memory.

The typical way of doing this is through a function such as `explicit_bzero`, `memzero_explicit`, or the various other functions that C library writers provide that ensure an optimization-free routine for zeroing buffers.

For the most part, the same is possible in Go application code. However, it is not easily possible to do so with crypto API interfaces that internally manage a key buffer, such as the AEAD interface. 

In the Go implementation of WireGuard, @rot256 has been forced to resort to unholy hacks such as:

```go
type safeAEAD struct {
	mutex sync.RWMutex
	aead  cipher.AEAD
}

func (con *safeAEAD) clear() {
	con.mutex.Lock()
	if con.aead != nil {
		val := reflect.ValueOf(con.aead)
		elm := val.Elem()
		typ := elm.Type()
		elm.Set(reflect.Zero(typ))
		con.aead = nil
	}
	con.mutex.Unlock()
}

func (con *safeAEAD) setKey(key *[chacha20poly1305.KeySize]byte) {
	con.aead, _ = chacha20poly1305.New(key[:])
}
```

Having to resort to this kind of reflection is a bit unsettling and something we'd much rather not do.

So, this issue is to request and track the addition of a consistent "Clear()" interface for parts of the Go crypto API that store keys in internal buffers.

------------------

Furthermore, even if real clearing is deemed to be an abject failure due to Go's GC, and one must instead mmap/mlock or use a library such as [memguard](https://github.com/awnumar/memguard), the AEAD interface still is inadequate, because it appears that SetKey winds up allocating its own buffer internally. So again, big problem.

cc: @agl
Repository: pytorch
Issue: DataLoader gets stuck after model initialization
Labels: module: dataloader,triaged

Everytime I set num_workers > 0 the following code will freeze and never print anything. If I set num_workers=0 it will work though

```
dataloader = DataLoader(transformed_dataset, batch_size=2, shuffle=True, num_workers=2)
model.cuda()
for i, batch in enumerate(dataloader):
 print(i)
```

If I put model.cuda() behind the loop, everything will run fine like

```
dataloader = DataLoader(transformed_dataset, batch_size=2, shuffle=True, num_workers=2)

for i, batch in enumerate(dataloader):
 print(i)
model.cuda()
```

Does anyone have a solution for that problem?

cc @SsnL