sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Enum used as object key is not exported in declaration
Labels: Bug,Domain: Declaration Emit

**TypeScript Version:**  3.8.0-dev.20191125 (@next), but was present in 3.4 already

**Search Terms:** 
- typescript ts4023
- Exported variable has or is using name from external module but cannot be named
- typescript enum declaration


**Code**

Selectors.ts
```ts
import {State} from './Store';
export const pageUiSelector = (state: State) => state.ui;
```

Store.ts
```ts
export enum Pages {
  dashboard = 'dashboard',
}
export interface State {
  ui: {
    [Pages.dashboard]: {
      selectedRow: number | null;
    };
  };
}
```

tsconfig.json
```json
{
  "compilerOptions": {
    "baseUrl": ".",
    "declaration": true,
    "module": "commonjs",
    "rootDir": ".",
    "strict": true,
    "target": "es2017"
  }
}
```

**Expected behavior:**
No error.

**Actual behavior:**
This error is thrown:
> Selectors.ts:2:14 - error TS4023: Exported variable 'pageUiSelector' has or is using name 'Pages' from external module "xxx/Store" but cannot be named.

**Details:**
This error only occurs when exporting the given selector and when using `--declaration`. The probable cause is that the enum values used as object key is not properly detected and added to the exported files.

If the enum is not used as object key, but as object value, the error does not occur.
If the content of Store.ts is moved to Selectors.ts, the error does not occur.

This code works as expected in the ts-loader via webpack, however `tsc` and PhpStorm report this as error.
Repository: flutter
Issue:  Navigation gestures should ignore Stylus and Apple Pencil
Labels: c: new feature,framework,f: cupertino,f: routes,f: gestures,c: proposal,P3,team-design,triaged-design

In iOS it is standard for the UI to ignore Apple Pencil input in navigation gestures, like swiping back, or in some cases (drawable canvases) scrolling.

I assume this would be potentially dependent on #38135
Repository: pytorch
Issue: There is no support for `weight_decay`/`momentum` in SGD for sparse tensors.
Labels: module: sparse,triaged,enhancement

## 🚀 Feature
I don't see why there is no support for `weight_decay` and `momentum` in SGD. There is a PR on this feature (#1305), but it has been never merged with no explanation. It looks like really easy patch to be implemented. Or maybe there is no possible way to provide the exact same semantics with sparse tensors because of all the constraints on `coalesced` sparse tensors for some ops?

Why not defining it in the separate class like in `SparseAdam`?

cc @vincentqb
Repository: rust
Issue: Coercion from non-capturing closure to fn ptr fails when return type is `!`
Labels: A-closures,T-compiler,C-bug,A-coercions

Usually, non-capturing closures can be coerced to `fn` ptrs. But somehow that seems to fail when the return type is `!`:
```rust
fn magic<R, F: FnOnce() -> R>(f: F) -> F { f }

fn main() {
    let f1 = magic(|| {}) as fn() -> (); // works fine
    let f2 = magic(|| loop {}) as fn() -> !; // errors
}
```
The error is
```
error[E0605]: non-primitive cast: `[closure@src/main.rs:5:21: 5:31]` as `fn() -> !`
 --> src/main.rs:5:14
  |
5 |     let f2 = magic(|| loop {}) as fn() -> !;
  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
```
This fails even on nightly, where `!` should be stable as a type.

Curiously, this works:
```rust
let f2: fn() -> ! = || loop {};
```

Cc @Centril
Repository: pytorch
Issue: last updated timestamp
Labels: module: docs,triaged,enhancement

## 📚 Documentation

<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->
Is it possible to provide a timestamp to when a tutorial was last updated in the docs, this could also be applied to modules in docs, like
```
nn.Flatten
last updated - time
```
Repository: pytorch
Issue: affine_grid CUDA / cuDNN support for Half removed in 1.3.x
Labels: module: cudnn,module: cuda,triaged

## 🐛 Bug

PR https://github.com/pytorch/pytorch/pull/24929 refactored the `affine_grid` code to remove all cuDNN dispatch. This had the side effect of dropping support for `Half` / `float16` in the CUDA / cuDNN case. The cuDNN code supported Half, but the native torch implementation does not. Users may see:

```
RuntimeError: "linspace_cuda" not implemented for 'Half'
```

Because `linspace_cuda` does not include dispatch support for `Half` / `float16` (https://github.com/pytorch/pytorch/blob/v1.3.1/aten/src/ATen/native/cuda/RangeFactories.cu#L55)

The old cuDNN routine is still exposed (as `torch.cudnn_affine_grid_generator()`), so can be used directly with Half, but Half support is not available via the `affine_grid()` routine.

## To Reproduce

```
import torch
import torch.nn.functional as F

theta = torch.randn(32, 2, 3, device='cuda', dtype=torch.float16)
size = (32, 8, 32, 32)

output = torch.cudnn_affine_grid_generator(theta, *size)  # works
output = F.affine_grid(theta, size)                       # fails
```

```
$ python foo
...
  File "foo", line 8, in <module>
    output = F.affine_grid(theta, size)                       # fails
  File "/.../python3.6/site-packages/torch/nn/functional.py", line 2785, in affine_grid
    return torch.affine_grid_generator(theta, size, align_corners)
RuntimeError: "linspace_cuda" not implemented for 'Half'
```

## Expected behavior

Would be nice to re-instate support for Half in the CUDA flavor of `affine_grid()`.

## Environment

 - PyTorch Version (e.g., 1.0): 1.3.1
 - OS (e.g., Linux): Linux
 - How you installed PyTorch (`conda`, `pip`, source): local-built conda package
 - Build command you used (if compiling from source): ...
 - Python version: Python 3.6.9 :: Anaconda, Inc.
 - CUDA/cuDNN version: 10.1.243 / 7.6.3
 - GPU models and configuration: NVIDIA Tesla V100 / 16GB
 - Any other relevant information:

cc @ngimel
Repository: PowerToys
Issue: USB bootable creation
Labels: Idea-New PowerToy

# Summary of the new feature/enhancement
<!-- A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable). -->
add two new abilities to Windows to allow users to easily create bootable USB media

# Proposed technical implementation details (optional)
<!-- A clear and concise description of what you want to happen. -->
1) context menu on .iso image files to "create USB media"
2) context menu on USB media to "Write image to drive"

Both options would open the same program window, with 1) above pre-populating the selection field with the iso image; 2) above requiring manual selection of the image to write to the drive. 

Options could include "make bootable", "(u)EFI or BIOS", "MBR or GPT" (if the drive is applicable) and possibly a "Create DOS bootable" to bring back this functionality - this is often needed for server admins (and even PC enthusiasts) to create BIOS & Firmware update media, and would be very helpful. This would use MS-DOS 6.22, or users could specify any other DOS which they have legally obtained.  Additionally, a "Create Linux bootable" would also be useful, and could even tie-in with WSL, and could be used to create an Ubuntu LTS network install media (which would download and write Ubuntu's mini.iso image to the disc in a one-click operation)  For that matter, adding in the ability to download/write Hyper-V Server 2016/19 could be useful as well.
Repository: godot
Issue: AudioStreamMicrophone is broken on iOS hardware
Labels: bug,platform:ios,topic:porting,confirmed,topic:audio

**Godot version:**
v3.1.1.stable.official

**OS/device including version:**
iOS 13.1

**Issue description:**
The audio input (Microphone) on iOS hardware does not work. It works on the simulator.

There are three separate issues causing this:
  1. no microphone permission string in info.plist in XCode export by default (already reported in issue #30307)
  2. the incorrect AVAudioSession.AudioSessionCategory is set at startup in app_delegate.mm. It works when changed to AVAudioSessionCategoryPlayAndRecord, ie:
```[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil]; ```
Maybe this should be configurable from the Godot export settings, or inferred from the sound bus usage?

3. a "-50" error from AudioUnitRender in audio_driver_coreaudio.cpp whenever microphone input is enabled. This is because bufferList.mBuffers[0].mDataByteSize is too small, since there is a mismatch between the capture buffer format and the audio device.

**Steps to reproduce:**
 1. Download minimal reproduction project below
 2. Disable mute on the bus panel in Godot to ensure audio input and output occurs simultaneously.
 3. Export to iOS build
 4. Install .ipa on iOS hardware, and the app will fail to start or record.
 5. Open XCode and install on simulator - observe that audio recording works properly.

**Minimal reproduction project:**
This project will trigger it on iOS hardware (but works fine on the simulator). You may need to unmute audio on the "Record" bus, so that audio is input and output simultaneously:
https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record
Repository: material-ui
Issue: [Autocomplete] Automatic tokenization with delimiter
Labels: new feature,waiting for 👍,component: autocomplete

I am currently working with the freesolo Autocomplete and my particular use case requires tags to be created when commas or spaces follow the input text. Autocomplete currently creates tags on the Enter event, but I don't think there is anything built into Autocomplete yet that supports tag creation on any other event. I'm wondering if I'm missing anything, or if I'm not, how could I approach this problem?

Currently, I'm attempting to use the `onInputChange` attribute in Autocomplete to capture the string coming in. I check that string for commas and spaces, and on a successful find of one of those characters I manually fire off the Enter event using some native JS code. This works in some cases, but not in all cases and accounting for all cases is becoming tedious. This approach seems like it's prone to a lot of issues, and I'm not convinced it's the best way to go about implementing tag creation on different events. Looking for some thoughts. Thanks
Repository: rust
Issue: Rustdoc unexpectedly de-aliases type aliases in some situations
Labels: T-rustdoc,C-bug

Here's a relatively minimal example that demonstrates the problem:
```rust
pub type Color1 = (u8, u8, u8, u8);

pub struct Color2 {
    r: u8,
    g: u8,
    b: u8,
    a: u8,
}

impl Color2 {
    pub fn new_with_alpha(r: u8, g: u8, b: u8, a: u8) -> Self {
        Self { r, g, b, a }
    }
}

impl From<Color2> for Color1 {
    fn from(c: Color2) -> Self {
        (c.r, c.g, c.b, c.a)
    }
}

impl From<Color1> for Color2 {
    fn from((r, g, b, a): Color1) -> Self {
        Self::new_with_alpha(r, g, b, a)
    }
}
```

If you run `cargo doc` on this, you'll get this:

![image](https://user-images.githubusercontent.com/767490/69566236-f198aa00-0fb6-11ea-8c5d-126e680c780d.png)

As you can see, it says `From<(u8, u8, u8, u8)> for Color2`, despite saying `Color1` everywhere else, including on the `fn from(...)` in the `From` implementation. I expected to get `Color1` in the `From<...>` too.
Repository: godot
Issue: Remote mode problem with dock "Inspector"
Labels: bug,topic:editor,confirmed,usability

**Godot version:**
3.2 beta 1 mono - v3.5.beta1.official [b9b23d222]

**OS/device including version:**
Win10 home 64

**Issue description:**
The "Inspector" dock shows nothing (although there is a node selected) when the game is run with the "Remote" mode enabled by default.
![1](https://user-images.githubusercontent.com/19652075/69569192-6a026980-0fbd-11ea-9ece-53ae904a818b.png)

**Steps to reproduce:**
Run the project (deselect all nodes before executing) and observe the "Inspector" dock, you will see that nothing appears even if there is a node selected, then the information of that selected node should be displayed in the "Inspector" dock.

In this GIF you can see that the information of the "stalfos" node does not appear in the "Inspector" dock (despite the fact that the node is selected) and for it to appear I have to select another node and select the "Stalfos" node again .
![GIF](https://user-images.githubusercontent.com/19652075/69569160-59ea8a00-0fbd-11ea-996e-856c1ff12f91.gif)

**Minimal reproduction project:**
[testRemote.zip](https://github.com/godotengine/godot/files/3888199/testRemote.zip)
Repository: pytorch
Issue: nn.functional should maintain API parity with nn where possible
Labels: module: nn,triaged,enhancement

## 🚀 Feature
`nn.functional` should provide a functional alternative to every stateful component in `nn` that supports it.

Some, like `Tanh() -> tanh` were deprecated in `nn.functional` because they're now the same as those in `torch`.

## Motivation

People usually import modules and submodules that are used often under short intuitive names.

One such name I've often encountered is `nn.functional as F`, in the same vein as importing `nn`.

The current plan to move some math functions permanently away from `nn.functional` somewhat awkwardly splits the API.

1. Every operation that has a `Module` has its name in `nn` (to my knowledge).
2. Almost every operation `Module`(s) in `nn` that can be exposed cleanly in a functional manner has a name in `nn.functional`. But some don't.

## Pitch

Move all 'mathy' functions with class counterparts from `torch` to `nn.functional` and expose aliases to the basic/fundamental ones in `torch`.

Here we get into ugly territory; I don't know how exactly I'd argue for some methods currently under `torch`, but `tanh`, `sigmoid` and co definitely belong in `functional`.

## Alternatives

Flip the implementation/re-exporting tale with the impls in `torch` and the re-exports in `nn.functional`.

## Additional context

E.g.
https://github.com/pytorch/pytorch/issues/6245 : Deprecate torch.nn.functional.tanh?
Repository: pytorch
Issue: More detailed information about TensorType in error messages
Labels: triaged,enhancement

## 🚀 Feature
More detailed information about TensorType, including TensorType specifiers as shape, strides, req_grad etc. in error messages

## Motivation
Reported issue https://discuss.pytorch.org/t/incomprehensible-behaviour/61710 
Error message is misleading:
```
terminate called after throwing an instance of 'c10::Error'
  what():  forward() Expected a value of type 'Dict[str, Tensor]' for argument 'features' but instead found type 'Dict[str, Tensor]'.
Position: 1
Declaration: forward(__torch__.WrapRPN self, Dict(str, Tensor) features) -> (int) (checkArg at ../aten/src/ATen/core/function_schema_inl.h:194)
```
## Pitch
Steps to reproduce original issue:

```
class WrapRPN(nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, features):
        # type: (Dict[str, Tensor]) -> int
        return 0
```

```
#include <torch/script.h>

int main() {
  torch::jit::script::Module module = torch::jit::load("dict_str_tensor.pt");

  torch::Tensor tensor = torch::rand({2, 3});
  at::IValue ivalue{tensor};
  c10::impl::GenericDict dict{c10::StringType::get(),ivalue.type()};
  dict.insert("key", ivalue);
  module.forward({dict});
}
```
ValueType of `c10::impl::GenericDict` is from the first specified element as `ivalue.type()`
It fails on type check in` function_schema_inl.h` !value.type()->isSubtypeOf(argument.type())
as `DictType::isSubtypeOf` requires equal KeyType and ValueType, while `TensorType`s are different.

In argument's `TensorType` there is no device, sizes, strides, requires_grad... while size and requires grad is set in value's `TensorType`.
The error message is a bit misleading.
## Alternatives
## Additional context
Repository: pytorch
Issue: [jit] Module references aren't preserved
Labels: oncall: jit,triaged

Results in eager vs script are different

```python
class Layer(nn.Module):
    def __init__(self):
        super().__init__()
        self.data = torch.empty(0, dtype=torch.float)
        
    def forward(self, x):
        self.data = x
        
class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.layers = nn.ModuleList([Layer()])
        self.registry = nn.ModuleDict({'layer0': self.layers[0]})
        
    def forward(self, x):
        for layer in self.layers:
            layer(x)
        output = {}
        for name, layer in self.registry.items():
            output[name] = layer.data
        return output
    
model = Model()
script = torch.jit.script(model)
with torch.no_grad():
    data = torch.randn(1, dtype=torch.float)
    print(model(data))
    print(script(data))
```

cc @suo
Repository: rust
Issue: std::fs::copy failed with OS error 1 on Linux when copying over CIFS from local FS
Labels: O-linux,T-libs-api,C-bug

I am using the following versions:
- mount.cifs version: 6.9
- `uname -r`: 5.3.0-23-generic
- Ubuntu 19.10
- Rust `nightly-2019-11-17-x86_64-unknown-linux-gnu`

I was unable to perform a file copy with `std::fs::copy` when copying to a Windows shared folder mounted on Linux with the following options:

`rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777`

I got OS error 1, which shouldn't happen since everyone has full permissions to the mounted NAS.

Interestingly, I was able to copy the files using `cp -r` without issue. I worked around this by writing something close to the following (all same except for error handling that I stripped out):

```rust
        for file in WalkDir::new(&source)
            .into_iter()
            .map(|file| file.unwrap())
            .filter(|file| file.file_type().is_file())
        {
            let outpath = dest_dir_name.join(file.file_name());
            std::io::copy(&mut File::open(&file.path()), &mut File::create(&outpath).unwrap()).unwrap();
        }
```

It seemed strange to me that I get a permission denied despite that if I manually write the code to create and write the files using walkdir then it works completely file. I believe this is a bug in the code of std::fs::copy since the expected behavior is that it should work like `cp` (which just copies it as expected).

I still have access to this setup, so I can test things if need be. Let me know if I can give more information to track down the bug.
Repository: vscode
Issue: Git - Git should be able to automatically track new files
Labels: feature-request,git

<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
I can make changes to a file in VS Code and Git will track those changes (even though they are not immediately staged, I can stage them easily when committing by using `git commit -a`). Same thing goes for files that I delete. However, new files that I create are a different story; Git does not track them and thus they are not staged when I use `git commit -a`. I have used IDEs before that give the option to automatically run `git add` on a file when I create it. I would like to have the same option in VS Code.
Repository: flutter
Issue: Canvas painting shifted when canvas is composited under a mouse tracker
Labels: engine,platform-web,c: rendering,P2,team-web,triaged-web

## Steps to Reproduce

1. Checkout this exact commit: https://github.com/yjbanov/algrafx/blob/891c4419cf1a74c4ae978d4e9f7696526a0a1512
2. Uncomment this one line: https://github.com/yjbanov/algrafx/blob/891c4419cf1a74c4ae978d4e9f7696526a0a1512/lib/graph.dart#L220
3. Observe broken mouse behavior.

It seems the mouse positions are reported correctly, and it's more likely that the canvas is placed in a wrong location (or contents inside the canvas are).

## Logs

```
[✓] Flutter (Channel master, v1.10.15-pre.697, on Linux, locale en_US.UTF-8)
    • Flutter version 1.10.15-pre.697 at /usr/local/google/home/yjbanov/code/flutter/flutter
    • Framework revision 7726910a5b (2 hours ago), 2019-11-25 16:47:51 -0500
    • Engine revision c89ac6347b
    • Dart version 2.7.0
```
Repository: flutter
Issue: Remove the need for /#/ redirection
Labels: framework,f: routes,platform-web,customer: webeap,P2,team-web,triaged-web

The redirection from `/` to `/#/` is an extra unnecessary hop that adds to application start-up time. Can we remove it?

/cc @mdebbar
Repository: rust
Issue: Account for HRTB on unsatisfied trait bound suggestions
Labels: C-enhancement,A-diagnostics,P-low,T-compiler,A-suggestion-diagnostics,D-invalid-suggestion,A-higher-ranked

When encountering a [higher-ranked-trait-bound error](https://github.com/rust-lang/rust/blob/master/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.rs) where the compiler [would suggest adding a new `where` bound](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=179075a2fbee8d6fcb0e1208a72a1cb3) that is the same as an _existing_ bound, the suggestion should be to _replace_ the existing one with the hrtb version:

[before](https://github.com/rust-lang/rust/pull/66567):

```
error[E0277]: the trait bound `for<'tcx> F: Foo<'tcx>` is not satisfied
  --> $DIR/hrtb-higher-ranker-supertraits.rs:18:26
   |
LL |     where F : Foo<'x>
   |                      - help: consider further restricting type parameter `F`: `, F: for<'tcx> Foo<'tcx>`
...
LL |     want_foo_for_any_tcx(f);
   |                          ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F`
...
LL | fn want_foo_for_any_tcx<F>(f: &F)
   |    --------------------
LL |     where F : for<'tcx> Foo<'tcx>
   |               ------------------- required by this bound in `want_foo_for_any_tcx`
```

after:

```
error[E0277]: the trait bound `for<'tcx> F: Foo<'tcx>` is not satisfied
  --> $DIR/hrtb-higher-ranker-supertraits.rs:18:26
   |
LL |     where F : Foo<'x>
   |           ----------- help: consider restricting type parameter `F` with HRTB: `F: for<'tcx> Foo<'tcx>`
...
LL |     want_foo_for_any_tcx(f);
   |                          ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F`
...
LL | fn want_foo_for_any_tcx<F>(f: &F)
   |    --------------------
LL |     where F : for<'tcx> Foo<'tcx>
   |               ------------------- required by this bound in `want_foo_for_any_tcx`
```
Repository: terminal
Issue: colortool.exe shrinks window size by one column  - every time it is called
Labels: Product-Colortool,Help Wanted,Area-Server,Issue-Bug

Hi

I am running colortool.exe in cmd.exe (Microsoft Windows [Version 6.3.9600] Win 8.1 64bit OS) and every time I run it the Window Size reduces by one column (the rows and the Sceen Buffer Size stay the same).

Is this an "off by one" error?

It is important to me as I would like to call colortool from Textadept-curses.exe; once at load and once at quit.

Please accept apologies if this is a known bug.

Kind Regards Gavin