sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Namespaces get stripped in object literals
Labels: Bug,Rescheduled

# Bug Report
This is the minimal code needed to reproduce this weird behavior.
Basically, namepsaces get stripped in declaration files under certain circumstances.
e.g: `Foo.A` becomes just `A`.

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?esModuleInterop=false&experimentalDecorators=false&emitDecoratorMetadata=false&target=8&jsx=0&module=1#code/PQKgBAUG1gLgFgUzAE0QYwDYEMBO3YBLAewDsBnMPZAc0VMX1kRTHWN1w1kwE8xCpKDATIAbo34AzQrnKwwmYtlYAKAO6JZrAA45eNXMQCupVgCNE8bGJLHcASgB0w6LF47k5YgFtECQRo4YjAfbABrZEIFLiUVCBBgCAh2CgUAMWJiACE8MABeMABvVzAkTCVVKSyAQQAuMEziJxqHYoBfCE6INCxqMBolc2xMYtLSbD9yHWx0ZCaxmCW2HHJKGo7SpdT5MFzcBvdPYilGrP2AblLO7sQADx0OBSL2i6A)

### 💻 Code

```ts
const FooBar = {
    hello(fooA: Foo.A) {}
}

declare global {
    namespace Foo {
        class A {}
        const Bar: typeof FooBar;
    }
}

export {};
```

### 🙁 Actual behavior

```ts
declare const FooBar: {
    hello(fooA: A): void; // <-- namespace is stripped
};
declare global {
    namespace Foo {
        class A {
        }
        const Bar: typeof FooBar;
    }
}
export {};
```

### 🙂 Expected behavior

```ts
declare const FooBar: {
    hello(fooA: Foo.A): void;
};
declare global {
    namespace Foo {
        class A {
        }
        const Bar: typeof FooBar;
    }
}
export {};
```


Some "workarounds" (what makes the code compile correctly) are:
- put `export` on the object literal: 
```ts
export const FooBar = {
    hello(fooA: Foo.A) {}
}
```
- use `namespace` / `module` instead of an object literal:
```ts
namespace FooBar {
    export function hello(fooA: Foo.A) {}
}
```
- use `class` instead of an object literal:
```ts
class FooBar {
    static hello(fooA: Foo.A) {}
}
```
- put the object literal after `declare global`:
```ts
declare global {
    namespace Foo {
        class A {}
        const Bar: typeof FooBar;
    }
}

const FooBar = {
    hello(fooA: Foo.A) {}
}

export {};
```

Also this doesn't work:
```ts
const FooBar = {
    hello(fooA: Foo.A) {}
}

export declare namespace Foo {
    class A {}
    const Bar: typeof FooBar;
}
```
Repository: pytorch
Issue: pytorch1.9.0 can not use torch.jit.load() to load model which save in pytorch1.3
Labels: oncall: jit

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:
use torch.jit.save() a pt model in pytorch1.3 (cuda10.1)
use torch.jit.load() the model(cuda11.1).

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

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 Version (e.g., 1.0):
 - OS (e.g., Linux):
 - How you installed PyTorch (`conda`, `pip`, source):
 - Build command you used (if compiling from source):
 - Python version:
 - CUDA/cuDNN version:
 - GPU models and configuration:
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->
Repository: pytorch
Issue: Either support torch.mean on BoolTensors or fix the error message
Labels: module: error checking,triaged,module: boolean tensor,module: reductions

```
(Pdb) torch.tensor(True).mean()
*** RuntimeError: Can only calculate the mean of floating types. Got Long instead.
(Pdb) torch.tensor([True, False]).mean()
*** RuntimeError: Can only calculate the mean of floating types. Got Long instead.
```

I guess this is because torch.mean first upcasts inputs to torch.int64 and then fails. But this is quite confusing + uses outdated dtype names (I propose error messages should use `torch.int64` ).

For int64 mean is also not supported:
```
(Pdb) torch.tensor([1, 2]).mean()
*** RuntimeError: Can only calculate the mean of floating types. Got Long instead.
```

It would also make sense if torch.mean was supported by torch.int64 (hopefully without copy allocation of float cast, but maybe for now this is not possible) without an explicit cast

This is also quite wasteful to copy-allocate torch.bool to torch.int64 to perform these basic operations :( Related: https://github.com/pytorch/pytorch/issues/55366

cc @heitorschueroff @brianjo @mruberry
Repository: vscode
Issue: Support `highContrast` attribute on `DecorationRenderOptions`
Labels: feature-request,api,editor-api

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
The `DecorationRenderOptions` object has `dark` and `light` attributes to allow overriding options for dark and light themes, respectively.  However, it does not have a `highContrast` attribute for overriding options for high contrast themes.  It would be nice to have such an attribute to enable such customization
Repository: node
Issue: TextDecoder does not error incorrectly for legacy byte sequences
Labels: good first issue,encoding

### Version

v16.9.1

### Platform

Microsoft Windows NT 10.0.19043.0 x64

### Subsystem

encoding

### What steps will reproduce the bug?

Enter the following in the REPL:

```js
new TextDecoder("Big5").decode(new Uint8Array([0x83, 0x5C])).charCodeAt(0).toString(16)
```

as well as

```js
new TextDecoder("Big5").decode(new Uint8Array([0x83, 0x5C])).charCodeAt(1).toString(16)
```

### How often does it reproduce? Is there a required condition?

Every time

### What is the expected behavior?

fffd for the first, and 5c for the second (as in Firefox and Chrome, and per the WHATWG Encoding Standard)

### What do you see instead?

f00e and NaN

### Additional information

I suspect this has to do with you using ICU as-is, instead of properly patching it to match the Encoding Standard. There are probably more bugs like this.

@inexorabletash may be able to point to where in the Chromium source tree we keep our ICU encoding patches.
Repository: godot
Issue: Display an error message when opening a project exported to HTML5 without a web server
Labels: enhancement,platform:web,topic:porting,usability

### Godot version

3.3.2 stable

### System information

Windows 11

### Issue description

When exporting the game for web and running, I get:
Error: Could not load game data at path '.'. Is the .pck file missing?

![bug](https://user-images.githubusercontent.com/90238881/133020276-1c7cf0e0-50a9-40d7-a13d-9f99480eb275.png)


### Steps to reproduce

install latest emsdk, scons, and git godot master, custom.py: no 3d, optomize size, ...

Command build:
scons platform=javascript tools=no threads_enabled=yes target=release

### Minimal reproduction project

_No response_
Repository: neovim
Issue: Freeze in recursive mapping (:tmap, not :tnoremap)
Labels: enhancement,bug-vim,mappings

### Neovim version (nvim -v)

NVIM v0.5.0 Build type: Release LuaJIT 2.0.5

### Vim (not Nvim) behaves the same?

no

### Operating system/version

Arch Linux: up to date: 13-09-21

### Terminal name/version

suckless st

### $TERM environment variable

st-256color

### Installation

pacman official repositories

### How to reproduce the issue

* Add following keymap

```
 {'t', '<c-n>', [[<c-\><c-n>]], {}},
```

* Open neovim terminal
* Execute the key combination in terminal insert mode

### More information:
* There is only one map by `<c-n>` is registered
```
:tmap <c-n>
t  <C-N>         <C-\><C-N>
```

* Just executing ` <C-\><C-N>` will result in same behavior, how ever, If I remap the same action to any other key combination if works fine.

* Just using <c-n> on the terminal will show the next command in the history.

* I see the memory issue in Alacritty terminal as well.


https://user-images.githubusercontent.com/18459807/133034264-c94a4a0c-9362-4445-88a5-7ce6a3a15f75.mp4

 



### Expected behavior

The mode should be switched to normal mode

### Actual behavior

Neovim freezes and will not react to any key presses after. The CPU and memory usage will increase until no memory left and freezes the OS.
Repository: ant-design
Issue: Add block option to Space to display it as flex instead of inline-flex
Labels: 💡 Feature Request,Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
inline-* options add extra space on the bottom and not always useful at all. 
Adding custom class for this standard behavior looks overkill.
I'd add this prop to all layout containers.

### What does the proposed API look like?
<Space block/>
This should replace `display:inline-flex` of the container to the `display:flex`


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: [docs] [feature request] Tutorial on implementing correctly distributed dataset evaluators
Labels: oncall: distributed

E.g. walkthrough of https://github.com/pytorch/vision/blob/master/references/detection/coco_eval.py or https://github.com/facebookresearch/meshrcnn/blob/main/meshrcnn/evaluation/pix3d_evaluation.py, https://github.com/pytorch/vision/blob/59c673/references/detection/utils.py#L29 highlighting the use of gather / all_gather / is_main_process / all_reduce / barrier etc.

Maybe examples of evaluation classes collecting a list, a dictionary, a tensor (to be `torch.cat`'ed)

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @cbalioglu @gcramer23
Repository: opencv
Issue: the speed of converting data from UMat to Mat is much slower than Mat to Umat
Labels: bug,category: core,category: ocl,confirmed

<!--
If you have a question rather than reporting a bug please go to https://forum.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).

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 => 4.2
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
-->

- OpenCV => :grey_question:
- Operating System / Platform => :grey_question:
- Compiler => :grey_question:

##### Detailed description

<!-- your description -->

##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->

##### Issue submission checklist

 - [ ] I report the issue, it's not a question
   <!--
   OpenCV team works with forum.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [ ] I checked the problem with documentation, FAQ, open issues,
       forum.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://forum.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [ ] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [ ] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archive to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->
Repository: react-native
Issue: Animated.FlatList prop contentContainerStyle doesn't handle animated values
Labels: Needs: Triage :mag:,Never gets stale

## Description

As I noted in the heading, the `Animated.FlatList` component does not accept animated values for the `contentContainerStyle` property. It only seems to work for `style`.
This is not the behaviour one would expect from an animated component and should be changed.

## React Native version:

```
System:
    OS: macOS 11.5.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 196.01 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.6 - /usr/local/opt/node@14/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 6.14.15 - /usr/local/opt/node@14/bin/npm
    Watchman: 2021.09.06.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 28, 29, 30, 31
      Build Tools: 29.0.2, 30.0.2, 31.0.0
      System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: Arctic Fox 2020.3.1 Arctic Fox 2020.3.1
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.65.1 => 0.65.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
```

## Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.

1. Add `Animated.FlatList` with some sample data to your app
2. Try to pass an animated value to `contentContainerStyle`

## Expected Results

I would expect this to work with one of the animated components, but instead the screen freezes.

## Snack, code example, screenshot, or link to a repository:

[https://snack.expo.dev/@reichhartd/animated_flatlist-example](https://snack.expo.dev/@reichhartd/animated_flatlist-example)
Repository: material-ui
Issue: Suppress the material UI Select component out of range error
Labels: new feature,component: select

<!-- Provide a general summary of the feature in the Title above -->

<!--
  Thank you very much for contributing to MUI by creating an issue! ❤️
  To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->

- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Summary 💡
When creating a `Select` field that is managed and the values are not yet loaded, the following error pops up:

```
Material-UI: You have provided an out-of-range value `NL` for the select component.
Consider providing a value that matches one of the available options or ''.
The available values are "".
```

This error is hard to get rid of and should be able to be suppressed?

While the error could be prevented by not showing the `Select` component while anything is still loading. This kind of beats the idea of modern web pages, to show data as soon as possible.


For example, a user page can show the current selected country, while still loading the list of countries.



<!-- Describe how it should work. -->
The error should be suppressible/ignorable as not to clutter the log with long error message.

## Examples 🌈

```
export const ChangeCountryView = function ChangeCountryView(props:)  {
    const {user}  = props
    
    const [mainList, setMainList] = React.useState<string[]>([]);
    React.useEffect(() => {
        someLoader.loadCountryListFromServer().then((loadedList) => {
            setMainList(loadedList);
        });
    }, []);
    return <Select value={user.country}>{
        Array.from(mainList, (v) => {
            return <MenuItem key={v} value={v}>{v}</MenuItem>
        });
    }</Select>
}
```
<!--
  Provide a link to the Material Design guidelines, other implementations,
  or screenshots of the expected behavior.
-->

## Motivation 🔦
To enable progressive loaded pages this would really help, while actually improving the tools to bug fix actual bugs.
<!--
  What are you trying to accomplish? How has the lack of this feature affected you?
  Providing context helps us come up with a solution that is most useful in the real world.
-->
Repository: rust
Issue: You can instantiate a dyn Trait that doesn't implement Trait
Labels: C-bug,T-types,A-trait-objects

[I tried this code:](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=96212284062f0a38070c9ac9b2629343)

```rust
pub trait Marker<'a> {}

pub trait Trait where for<'a> &'a Self: Marker<'a> {
    fn usable(&self) {}
}

impl<'a> Marker<'a> for &'a () {}
impl Trait for () {}

pub fn f() {
    // `(): Trait`
    let u = ();
    u.usable();

    // `dyn Trait` exists and `()` can coerce to it...
    let _t: &dyn Trait = &();
    // But `dyn Trait: !Trait`
    // _t.usable();
    // error[E0277]: the trait bound `for<'a> &'a T: Marker<'a>` is not satisfied
}
```

I expected to see this happen: The unsized coercion is denied (but see discussion below).

Instead, this happened: The unsized coercion happened and we end up with a `dyn Trait` which does not implement `Trait`.

### Meta
This works on [any stable version of Rust](https://rust.godbolt.org/z/vsW5nv9es).

### Notes

The failure to meet the trait bound is caught when you actually try to _use_ the `dyn Trait`, at least trivially.  I haven't found a way to weaponize this, but I haven't put any effort into doing so either.

`dyn Trait` implements `Trait` if you `impl<'a> Marker<'a> for &'a (dyn Trait + 'static) {}` in the example.  However, the non-super-trait bound need not be a marker trait (it can have non-defaulted methods).

Related: [Implied Bounds](https://rust-lang.github.io/rfcs/2089-implied-bounds.html), #20671 

### Discussion

I'm filing this as a bug because the assertion that `dyn Trait: Trait` always holds has been expressed as a belief by Rust team members, e.g.
* [This comment by Niko](https://github.com/rust-lang/rust/issues/42235#issuecomment-305835485)
* [This section of RFC 2027](https://github.com/withoutboats/rfcs/blob/object-safe-for-dispatch/text/2027-object_safe_for_dispatch.md#detailed-design)

There are some possibilities in line with this assertion:
* Unsized coercion checks the bounds and is denied in this case
* Bounds that aren't super-traits make a trait object unsafe generally
* Bounds that aren't super-traits don't apply to `dyn Trait`

However, another possibility is to generalize RFC 2027 and just accept the current behavior:
* `dyn Trait` is always a valid type, as per RFC 2027
* Unsized coercion is still dependent on all methods being either object safe or not applicable (`where Self: Sized`)
  * Though this could be relaxed too (if you're not object safe, `dyn Trait` just doesn't implement `Trait`)
* If unsized coercion is possible, you can instantiate a `dyn Trait`, even if it doesn't implement `Trait`
* Naturally, you can't use the `Trait` methods if it doesn't implement `Trait`

I'm sure there are a lot of subtleties and backwards-compatibility concerns in any of the possible approaches.
Repository: godot
Issue: If mirroring handle angles or lengths is enabled in the Path2D editor, one of the handles shouldn't be recreated when moved if it was removed before
Labels: discussion,topic:editor,usability,topic:2d

### Godot version

3.3.3 stable mono

### System information

w10 64

### Issue description

When a point is removed and the opposite is moved, a new point is created again.
A new point should not be created when I deleted the old one.
Everything happens with the tool selected in the capture.

![Captura3](https://user-images.githubusercontent.com/19652075/133073327-00dd6383-21bb-4e7e-b555-94a0c7e00857.PNG)

![gif gif](https://user-images.githubusercontent.com/19652075/133073026-7b0eed5d-f3f1-41c7-92c4-c628286e9e67.gif)


### Steps to reproduce

See the gif please

### Minimal reproduction project

...