sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Refactors which in TS would generate a type annotation should generate jsdoc in JS
Labels: Suggestion,Committed

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.1.0-dev.201xxxxx

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
// In TS
function x(): 42 {
  return /*extract to inner function*/42;
}
// In JS
// @ts-check
/**
 * @returns {42}
 */
function x() {
    return /*extract to inner function*/42;
}
```

**Expected behavior:**
Under `ts-check`, a refactoring should apply appropriate jsdocs to allow js to typecheck after a refactoring if it typechecked before it.

**Actual behavior:**
![jsneedsdocs](https://user-images.githubusercontent.com/2932786/43857106-38965aa2-9aff-11e8-88c6-306f8f03aaa3.gif)


**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: angular
Issue: (feature): Ability to pass a default value with @Optional()
Labels: feature,area: core,core: di,feature: under consideration

## I'm submitting a...
<pre><code>
[x] Feature request
</code></pre>

## Current behavior
There is no way to change the value `null` passed to a constructor by DI if a dependency have not been resolved.


## Expected behavior
We should have the ability to pass arbitrary default values instead of `null` when needed. This should be similar to the TS behavior: when declaring an optional method parameter, we have the ability to declare a default value we'd like to get instead of `undefined` when a caller has not been provided the parameter:

`method(optionalParameter?: ParameterType = ParameterType.DefaultValue): void { }
`

## What is the motivation / use case for changing the behavior?
**Issue 1:**
The most obvious use case is that we can't technically have a constructor signature like this:

`constructor(@Optional() param1?: number) { }
`

because with the TS strict typing enabled we must declare all possible types `param1` could get:

`constructor(@Optional() param1?: number | null) { }
`

**Issue 2:**
Expanding this example further: due to the lack of this feature, we can't avoid using `null`s in our TS\JS as recommended by many reputable references or in case your team just prefers to do so.

In addition to declare `null` as a possible type, we must either use `param1 == null` (notice double equlity instead of the triple one) whenever we want to know whether `param1` has an actual value or coerce `null`s into `undefined`s immediately which comes with inability to declare a field as a constructor parameter:

```
private param1: number | undefined;

constructor(@Optional() param1?: number | null) {
    this.param1 = param1 !== null ? param1 : undefined;
}

```

instead of just awesome:

```
constructor(@Optional(undefined) private param1?: number) {
}

```

Both of those alternatives are a huge mess and a pain.

The proposal is to be able to have:
```
@Optional(undefined)
@Optional(3)
@Optional("qwery")
@Optional({ prop1: 5 })
@Optional(new SomeClass)
// etc.
```

Moreover for consistency, since TS provides missing optional parameters as `undefined`s, I'd also make a proposal for `@Optional` to also provide `undefined` by default instead of `null`. But since it's a breaking change, community feedback is required for this part of proposal.

And even more, the behavior of providing `null` instead of `undefined` is inconsistent with another aspect of Angular itself: `@Input` properties. When there is no `@Input` property binding specified in a template, the property would be `undefined` instead of `null`.

## Environment
<pre><code>
Angular version: 6.1.1
Repository: go
Issue: brand: presentation theme: speaker info not centered over horizontal lines
Labels: NeedsFix

I'm trying to use the Go presentation theme in a new presentation.

In the first slide (https://golang.org/s/presentation-theme#slide=id.g33148270ac_0_143), there is a text box for presenter information that overlays two horizontal lines.

That text box is not centered over the lines, which looks especially awkward if the text lines are close to the length of the horizontal lines:
![screenshot 2018-08-08 at 16 13 22](https://user-images.githubusercontent.com/5200974/43861858-18ba33c6-9b26-11e8-9172-c3596ebbbf17.png)

CC @cassandraoid @spf13
Repository: go
Issue: brand: presentation theme: “One column text” template slides are misnamed
Labels: NeedsFix

In the Go presentation theme, the template layout named “One column text 1 1” (https://golang.org/s/presentation-theme#slide=id.g33148270ac_0_387) contains two (asymmetric) columns of text, not one.
Repository: angular
Issue: Why reset styles after animating in Angular?
Labels: type: bug/fix,area: animations,freq1: low,P4

## 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 -->
[ ] Performance issue
[ ] Feature request
[x] 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
[ ] Other... Please describe:
</code></pre>

## Current behavior
<!-- Describe how the issue manifests. -->
The Input field appears and stretches during the animation time, and then the styles that were applied during the animation time are removed (the width and border of the input element become standard, not the ones I specified in the "style({})" object

## Expected behavior
<!-- Describe what the desired behavior would be. -->
The input box will appear and stretch to 608 pixels wide and will remain in this position until I click on the closing cross.

## 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://stackblitz.com or similar (you can use this template as a starting point: https://stackblitz.com/fork/angular-gitter).
-->
https://stackblitz.com/edit/angular-3ug5j7?file=app%2Fexample.component.ts

## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->
I animate the search bar using Angular animation and ngIf. After the input field appears, when its input animation ends, the applied styles are reset (the width becomes standard and the border disappears). Why is this happening and how to fix it?

## Environment

<pre><code>
Angular version: 6.0.0
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [x] Chrome (desktop) version 68.0.3440.84
- [ ] 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: v8.11.3  <!-- run `node --version` -->
- Platform:  Windows 10 64bit<!-- Mac, Linux, Windows -->

Others:
<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->
</code></pre>
Repository: rust
Issue: dead_code lint not running on code generated by crate-external macros
Labels: A-lints

We've hit a bit of a snag in https://github.com/rust-lang-nursery/lazy-static.rs/issues/110 where it looks like the `dead_code` lint for code generated by the `lazy_static` macro in external crates isn't being triggered and is causing one of our compilefail tests to start building instead of failing.

I'm just trying to track down what we changed here in the compiler to get some context about how we should approach the issue in `lazy_static`. We can probably live with warnings not being surfaced if there's some bigger picture around the change. I may also be totally off in the weeds on this.

**EDIT:** The change was somewhere between 12ed235ad and 6a1c0637c
Repository: godot
Issue: Profiler scale graph when stopped
Labels: enhancement,topic:editor,usability

**Godot version:**
3.1 9bd5315

**OS/device including version:**
Windows 10 Intel HD 4600


**Issue description:**
When graph panel in Profiler is small and Profiler is stopped, any attempt to change the size of this panel will result in the graph being scaled instead of its extension/increased details


**Steps to reproduce:**
1. Run Game
2. Run Profiler when graph panel is small(150px)
3. Stop profiling
4. Resize graph panel
![jfile](https://user-images.githubusercontent.com/41945903/70703285-0b80ff00-1cd0-11ea-9f43-69033f3dbfe4.gif)
Repository: flutter
Issue: Why does appbar of Scaffold and bottom of Appbar require a PreferredSizeWidget
Labels: c: new feature,framework,P2,team-framework,triaged-framework

There are some parts of the framework where I understand the reasons for needing to know widget sizes (e.g. #12319). I also understand that this is difficult to do if not impossible (see #16061). Nevertheless the API requires explicit sizing information in some cases. But there are lots of use cases for widgets like the bottom part of an `AppBar` or even the icon and label of a `Tab` widget, where the height is actually variable (In my case it is the `maxExtent` property of `SliverPersistentHeader`).

For example it might depend on the theme settings or on how much lines a `Text` widget has etc. Or a widget might even change or animate its size, which makes it even worse. So it's not possible to provide fixed sizing information.

Why is it not possible to do it as with a `Column` or `Row`, where the widgets are just given their minimum sizes and the parent fits itself around them?
Repository: pytorch
Issue: Sending CUDA tensor to process, and then back, does not work
Labels: module: bootcamp,module: multiprocessing,module: cuda,triaged

**Editorial note:** See https://github.com/pytorch/pytorch/issues/10375#issuecomment-412574947 for the real problem

## Issue description

I can not get the tensor from queue.

## Code example

```
import torch


def _process(queue):
    input_ = queue.get()
    print('get')
    queue.put(input_)
    print('put')


if __name__ == '__main__':
    torch.multiprocessing.set_start_method('spawn')
    input_ = torch.ones(1).cuda()
    queue = torch.multiprocessing.Queue()
    queue.put(input_)
    process = torch.multiprocessing.Process(target=_process, args=(queue,))
    process.start()
    process.join()
    result = queue.get()
    print('end')
    print(result)
```

I executed this code, and only get and put printed, no end. I use ctrl-c to interrupt it, I find it blocks in result = queue.get(). Any idea?

## System Info

Collecting environment information...
PyTorch version: 0.4.0a0+200fb22
Is debug build: No
CUDA used to build PyTorch: Could not collect

OS: Arch Linux
GCC version: (GCC) 8.1.1 20180531
CMake version: version 3.11.4

Python version: 2.7
Is CUDA available: No
CUDA runtime version: 9.2.148
GPU models and configuration: GPU 0: GeForce GTX 1080
Nvidia driver version: 396.45
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] numpy (1.14.3)
[pip] torch (0.4.1)
[pip] torchvision (0.2.1)
[conda] Could not collect

cc @ngimel
Repository: pytorch
Issue: [Docs] Update broadcasting documentation for scalars / n-dimensional empty tensors
Labels: todo,module: docs,triaged

`Each tensor has at least one dimension.` is out of date.
`Then, for each dimension size, the resulting dimension size is the max of the sizes of x and y along that dimension.`  -- this is wrong now that we have n-dimensional empty tensors (1 goes to 0).
I don't think the backwards compatibility section is relevant anymore.

cc @jlin27 @mruberry
Repository: go
Issue: runtime: transparent hugepages on linux/mipsle causes segfaults
Labels: NeedsInvestigation,compiler/runtime

Split out from #26179. This was observed on the builder through much of the Go 1.11 cycle, until transparent hugepages were disabled. We should investigate and find out whether this is a kernel bug, a Go bug, or what.

cc @aclements @vstefanovic @milanknezevic
Repository: rust
Issue: _mm_cmpXstrc() not coalesced with a subsequent _mm_cmpXstrm() or  _mm_cmpXstri()
Labels: A-LLVM,T-compiler

If an \_mm_cmpestrc() intrinsic is used to check whether a match was found, and then an \_mm_cmpestrm() intrinsic is used to obtain the mask __m128i, the assembly that is generated by rustc contains a (V)PCMPESTRI instruction and a (V)PCMPESTRM instruction. Ideally, the assembly would have only one (V)PCMPESTRM instruction.

The situation is the same for the following combinations:

 * \_mm_cmpestrc() followed by an \_mm_cmpestri() generates two (V)PCMPESTRI instructions
 * \_mm_cmpistrc() followed by an \_mm_cmpistrm() generates a (V)PCMPISTRI instruction and a (V)PCMPISTRM instruction
 * \_mm_cmpistrc() followed by an \_mm_cmpistri() generates two (V)PCMPISTRI instructions

Over at shepmaster/jetscii#24, I prepared a Rust test case and a functionally equivalent C++ test case: https://github.com/shepmaster/jetscii/pull/24#issuecomment-411861393

I found that GCC 8.2.0 is able to coalesce the (V)PCMPxSTRx instructions. However, LLVM 6.0.1 is not. This appears to be a known issue in LLVM: https://bugs.llvm.org/show_bug.cgi?id=37246

This issue particularly impacts efficient use of the "mask" variants (explicit and implicit length); the "index" variants can simply check whether the index is 16, which indicates no match.

I am posting this issue here so that people can more easily find this information, but I am not sure what stdsimd can do. Perhaps, though, one possibility is to provide "mask" variant combination intrinsics, say cmpestrm() and cmpistrm(), which return the CFlag *and* mask XMM register.
Repository: pytorch
Issue: [feature request] batch_first option in torch.utils.data
Labels: module: dataloader,triaged,enhancement

It would be nice to have a `batch_first` option for `torch.utils.data` classes such as DataLoader. At the moment, tensors are handled in batch first form, in opposition to default `batch_first` option in recurrent layers which is set to `False`.

cc @SsnL @VitalyFedyunin @ejguan
Repository: go
Issue: cmd/go: go list -e does not assign missing import errors to correct package
Labels: NeedsFix,GoCommand

See TODO in testdata/script/mod_lists_bad_import.txt.
Repository: pytorch
Issue: [feature request] Provide a way to redirect shared memory prefix "/torch_"
Labels: triaged,enhancement

If you have a question or would like help and support, please ask at our
[forums](https://discuss.pytorch.org/).

If you are submitting a feature request, please preface the title with [feature request].
If you are submitting a bug report, please fill in the following details.

## Issue description

Shared memory in pytorch always use ‘/torch_xxx' but there may be not enough space.
So I get error like:

```
RuntimeError: unable to write to file </torch_76_3625483894> at /pytorch/aten/src/TH/THAllocator.c:383
```

Related code: 

https://github.com/pytorch/pytorch/blob/4a6fbf03c62bcfbfdc60d955b48f5c44bfe42173/torch/csrc/generic/StorageSharing.cpp#L41

```
std::string handle = "/torch_";
```

Can u provide a way to config or redirect the location of shared memory using environment variable. If the environment variable is not set, "/torch_" is used as default.

## Code example

Please try to provide a minimal example to repro the bug.
Error messages and stack traces are also helpful.

## System Info
Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

- PyTorch or Caffe2: PyTorch
- How you installed PyTorch (conda, pip, source): pip
- Build command you used (if compiling from source):
- OS: CentOS 7
- PyTorch version: 0.4.1
- Python version: 2.7 & 3.6
- CUDA/cuDNN version: 
- GPU models and configuration:
- GCC version (if compiling from source):
- CMake version:
- Versions of any other relevant libraries:
Repository: angular
Issue: Make it easier to use Angular elements outside of an Angular app
Labels: feature,freq2: medium,area: elements,type: confusing,state: needs more investigation,P4,feature: insufficient votes,feature: votes required,canonical

<!--
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 -->
[ ] Performance issue
[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
[ ] Other... Please describe:
</code></pre>

## Current behavior
<!-- Describe how the issue manifests. -->
In documentation & samples demo projects create custom elements from existing Angular components. Packing of these elements includes main.JS. This will include the entire application with the element. How would one implement exporting of specific components inside an existing application?

## Expected behavior
<!-- Describe what the desired behavior would be. -->
Export specific components with any required infrastructure, not whole app.

## 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://stackblitz.com or similar (you can use this template as a starting point: https://stackblitz.com/fork/angular-gitter).
-->

## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->
Code reusability: being able to use existing specific components in other apps (for instance: in a minimal index.html to be loaded by Electron app, so it'll have same functionality as Angular app, with no code duplications)

## Environment

<pre><code>
Angular version: X.Y.Z
<!-- Check whether this is still an issue in the most recent Angular version -->
6

Browser:
- [ ] 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:  <!-- Mac, Linux, Windows -->

Others:
<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->
</code></pre>
Repository: rust
Issue: Indirect inference for closure arguments fails depending on the contents of the closure
Labels: C-enhancement,T-compiler,A-inference

Minimal example I could create:

```rust
trait Callback<Args> {
    fn call(&mut self, args: Args);
}

impl<F, Args> Callback<Args> for F where F: FnMut(Args) {
    fn call(&mut self, args: Args) {
        self(args)
    }
}

#[derive(Debug)]
struct Wrapper<T>(T);

#[derive(Debug)]
enum Foo {
    Bar,
    Baz,
    Baq
}

fn use_cb<C: Callback<Wrapper<Foo>>>(mut c: C) {
    c.call(Wrapper(Foo::Baz))
}

fn main() {
    // this one works
    use_cb(|variant| {
        println!("the variant is: {:?}", variant);
    });
    // this one fails to infer
    use_cb(|variant| {
        println!("the variant is: {:?}", variant.0);
    });
    // with these annotations it works
    use_cb(|variant: Wrapper<_>| {
        println!("the variant is: {:?}", variant.0);
    });
}
```

note that the sole difference between the first and second closure is that the first prints `variant` while the other tries to access its inner field.

It reproduces on both stable and nightly.
Repository: kubernetes
Issue: StatefulSet - can't rollback from a broken state
Labels: kind/bug,sig/scheduling,sig/apps,sig/architecture,lifecycle/frozen

/kind bug

**What happened**:

I updated a StatefulSet with a non-existent Docker image. As expected, a pod of the statefulset is destroyed and can't be recreated (ErrImagePull). However, when I change back the StatefulSet with an existing image, the StatefulSet doesn't try to remove the broken pod to replace it by a good one. It keeps trying to pull the non-existing image.
You have to delete the broken pod manually to unblock the situation.

[Related Stackoverflow question](https://stackoverflow.com/questions/48894414/kubernetes-statefulset-pod-startup-error-recovery)

**What you expected to happen**:

When rolling back the bad config, I expected the StatefulSet to remove the broken pod and replace it by a good one.

**How to reproduce it (as minimally and precisely as possible)**:

1. Deploy the following StatefulSet:
```
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: web
spec:
  selector:
    matchLabels:
      app: nginx # has to match .spec.template.metadata.labels
  serviceName: "nginx"
  replicas: 3 # by default is 1
  template:
    metadata:
      labels:
        app: nginx # has to match .spec.selector.matchLabels
    spec:
      terminationGracePeriodSeconds: 10
      containers:
      - name: nginx
        image: k8s.gcr.io/nginx-slim:0.8
        ports:
        - containerPort: 80
          name: web
        volumeMounts:
        - name: www
          mountPath: /usr/share/nginx/html
  volumeClaimTemplates:
  - metadata:
      name: www
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: "standard"
      resources:
        requests:
          storage: 10Gi
```

2. Once the 3 pods are running, update the StatefulSet spec and change the image to `k8s.gcr.io/nginx-slim:foobar`
3. Observe the new pod failing to pull the image.
4. Roll back the change.
5. Observe the broken pod not being deleted.

**Anything else we need to know?**:

* I observed this behaviour both on 1.8 and 1.10.
* This seems related to the discussion in #18568

**Environment**:
- Kubernetes version (use `kubectl version`):
```
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.7", GitCommit:"dd5e1a2978fd0b97d9b78e1564398aeea7e7fe92", GitTreeState:"clean", BuildDate:"2018-04-19T00:05:56Z", GoVersion:"go1.9
.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.5-gke.3", GitCommit:"6265b9797fc8680c8395abeab12c1e3bad14069a", GitTreeState:"clean", BuildDate:"2018-07-19T23:02:51Z", GoVersi
on:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}
```
- Cloud provider or hardware configuration: Google Kubernetes Engine
- OS (e.g. from /etc/os-release): COS

cc @joe-boyce