sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: 'Export as namespace' issue in generating ambient code of same namespace
Labels: Bug,Help Wanted

# Bug Report

When using "export as namespace" feature in a declaration file, the exported classes are working as intended in 'legacy' ambient-style TS code that is still using namespaces, but the emitted .JS code lacks of the namespace in the case of namespace merging.

### 🔎 Search Terms

`namespaces`, `modules`, `export as`

### 🕗 Version & Regression Information

Typescript 4.5.4

- It is replicable on 3.9.7 as well, so it doesn't seems a recent regression.

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/dev/bug-workbench/?target=1&module=2&ts=4.5.4#code/PTAEAEGcAsHsHcCiBbAlgFwFAgjBKN0BTAEwDFUAbIgLlGMnQDoArSTbMcAMyqIDsAhslqhBAB1RMSTdOyIAPcbABO6UCSIBjSoJVFQOwZEigAwrpMBGUAG8OAX0yLlasaaEjI4wVoP9IAG4OHB4+T1EGZjlOMAAefW4ifX4-UB90aABeACImYAkpGTkcgD5MLVgA9QVQLNB+IngGyCYLY0grAAoASmCI719-U3tQMcrq0Fr6xub2617ghyA)

### 💻 Code

```ts
// api.d.ts
export declare class Class1 { }
export as namespace ns;

// test.ts
/// <reference path="./api.d.ts">
const x = new ns.Class1();
// Merging namespaces
namespace ns {
   const x = new Class1();
}
```

### 🙁 Actual behavior

The code above compiles without errors. However, the emitted JS is not using the `ns` object, when augmenting the `ns` namespace:

```js
const x = new ns.Class1();  // <-- this is correct
var ns;
(function (ns) {
    const x = new Class1();   // <-- Class1 is undefined, ns.Class1 should be used instead
})(ns || (ns = {}));
```

### 🙂 Expected behavior

```js
const x = new ns.Class1();
var ns;
(function (ns) {
    const x = new ns.Class1();
})(ns || (ns = {}));
```

Thanks!
Repository: rust
Issue: [ER] Better error message for goto statements
Labels: A-diagnostics,T-compiler

Some Rust code is translated from C, so I think Rustc could recognize gotos and give a better error message:

```rust
fn main() {
    'FOO:
    goto 'FOO;
}
```

Currently rustc 1.59.0 (nightly 2021-12-21) gives:

```
error: expected `while`, `for`, `loop` or `{` after a label
 --> ...\test.rs:3:5
  |
3 |     goto 'FOO;
  |     ^^^^ expected `while`, `for`, `loop` or `{` after a label

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `'FOO`
 --> ...\test.rs:3:10
  |
3 |     goto 'FOO;
  |          ^^^^ expected one of 8 possible tokens
```

A better error message could explain that Rust doesn't have gotos, and that labeled breaks of outer loops (that's missing in C), returns and match{} could sometimes replace the goto well enough.
Repository: flutter
Issue: [flutter_image] Improvement of the retry strategy
Labels: c: new feature,a: images,package,c: proposal,team-ecosystem,P3,p: flutter_image,triaged-ecosystem

## Use case

I'm using NetworkImageWithRetry to retry certain errors when fetching an image from S3.

From [S3 documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/optimizing-performance-guidelines.html#optimizing-performance-guidelines-retry):

> Aggressive timeouts and retries help drive consistent latency. Given the large scale of Amazon S3, if the first request is slow, a retried request is likely to take a different path and quickly succeed.

From [flutter_image's code](https://github.com/flutter/packages/blob/master/packages/flutter_image/lib/network.dart#L441-L443):

      final bool isRetriableFailure = (failure.httpStatusCode != null &&
              transientHttpStatusCodePredicate(failure.httpStatusCode!)) ||
          failure.originalException is io.SocketException;

I'm getting the following exception from S3 and isRetriableFailure is set to false because HttpException is not io.SocketException.

> HttpException: Connection closed before full header was received, uri = https://...

## Proposal

Support configuration of isNonHttpStatusRetriablePredicate. If no isNonHttpStatusRetriablePredicate is configured, it should retry all failures with null http status code.

      final bool isRetriableFailure = (failure.httpStatusCode != null &&
              transientHttpStatusCodePredicate(failure.httpStatusCode!)) ||
          (failure.httpStatusCode == null && (isNonHttpStatusRetriablePredicate == null || isNonHttpStatusRetriablePredicate(failure)));


Thanks.

Best Regards.
Repository: godot
Issue: GDNative `GlobalConstants` has `is_reference` true in `release_debug` builds and false in `debug` builds.
Labels: bug,topic:gdextension

### Godot version

3.x (f2ddafd860cb252b039128fbff2c7eefaa2a8421)

### System information

Linux, Mageia 9 x86_64

### Issue description

I noticed that `target=release_debug` builds and `target=debug` builds of the editor seem to generate a slightly different `api.json` for GDNative with `--gdnative-generate-json-api`.

The current headers in https://github.com/godotengine/godot-headers/tree/3.4 have been generated with a `target=debug` build, but if I use e.g. the official [3.4.2-stable Linux editor build](https://downloads.tuxfamily.org/godotengine/3.4.2/Godot_v3.4.2-stable_x11.64.zip) (`target=release_debug`), it gives me a slightly different `api.json`:

```diff
diff --git a/api.json b/api.json
index c4a6137..cf6e478 100644
--- a/api.json
+++ b/api.json
@@ -6,7 +6,7 @@
                "singleton": true,
                "singleton_name": "GlobalConstants",
                "instanciable": false,
-               "is_reference": false,
+               "is_reference": true,
                "constants": {
                        "BUTTON_LEFT": 1,
                        "BUTTON_MASK_LEFT": 1,
```

I don't know what impact this would have but this inconsistency should be fixed, the JSON shouldn't changed based on the `target` build value.

This might well be a case of uninitialized boolean value that takes a different default value based on compiler options and host.

### Steps to reproduce

- Build Godot with `target=debug` and `target=release_debug` for Linux and GCC
- Compare the output of `godot --gdnative-generate-json-api api.json`

### Minimal reproduction project

_No response_
Repository: flutter
Issue: More detail help info in run_tests.py and related other scripts
Labels: engine,a: triage improvements,P3,team-engine,triaged-engine

As title and some PR:

* [x] An more help info in --type param https://github.com/flutter/engine/pull/30458
Repository: excalidraw
Issue: TextElement editor vertical positioning good until a threshold, then increasingly misaligned
Labels: bug,package:excalidraw

This probably has to do with offsetTop in some way. Until 2/3 of the screen editor vertical positioning is consistently OK, after that point the misalignment quickly increases.

https://user-images.githubusercontent.com/14358394/147099431-4c65361a-ac19-4346-95f3-81fc80a214d7.mp4
Repository: TypeScript
Issue: Autocomplete not working for `@type` without a variable
Labels: Suggestion,Experience Enhancement

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms
jsdoc autocomplete cast

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about `autocomplete`

### ⏯ 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?ts=4.3.5&filetype=js#code/GYVwdgxgLglg9mABAdwBYFMwH0ICd0CGsYA5lgVmOslgG4G4wEBGANugBQCUiA3gFCIhiAPQjEABVYEI6RAE84IXIggN0URBnyICYACaIADvgDOp1VFytEAakSmjM9IOFjhHxAB8vroe88hAB0RP1EAKnDEAAEoeSM5XgBfRHDQpP5+UEhYBBQMbDVTYjI9LHQADxhimFI6BiY2Th4BDwgEYsRK6pKANQZEAF4+JIBuMLD3KWcFJRU1fE1tOT1DE3RzS2s7BydZSfFAo+OPHwOTi6OQsPawTqKodH1+lWGRSJi4hJHU9KA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
When creating new variables, I start with the jsdoc type, and create the variable afterwards
```js
/** @type {number} */
const myVar = null;
```
But autocompleting the type doesn't work when there is no `const myVal` yet.

Similarly, when casting variables, I start with the jsdoc type, and the variable to be casted comes after that:
```js
const existingVar = {};
const castedVar = /** @type {number} */ (existingVar);
```

### 🙁 Actual behavior

It only autocompletes existing words.

### 🙂 Expected behavior

It autocompletes similarly to how it works when a variable exists.

Related: #46606 #47223
Repository: godot
Issue: Selecting deleted signal may crash the whole program
Labels: bug,topic:editor,needs testing,crash

### Godot version

3.4.2.stable.official[45eaa2daf]

### System information

Windows 11 Pro N 22000.376

### Issue description

TLDR: {
When trying to Move to Method in a node's signal methods on the right tab, while the connected method is removed from the script which it is connected to (or the whole script is removed), the whole engine crashes. Sometimes it is "just an out of bounds error" written onto the standard output.
![image](https://user-images.githubusercontent.com/22623259/147116002-81677690-bc3b-47a4-8958-6903a1f34507.png)
Image of errors, when trying to Move to Method while the signal is not in the unsaved .gd file (it is in the saved version of the file).

![image](https://user-images.githubusercontent.com/22623259/147116685-5c2d2081-548a-4649-a924-cebe046106c4.png)
The crashed program when trying to Move to Method and the engine cannot find the method line reference.
}

When trying to access the "connected" method from the right tab, the engine tries to find the method in the file or opened file instance.
When the file is not saved, but there is an instance in which the method is found, the engine tries to jump to that method's line, but fails, because the opened file instance is shorter than the instance of the file, the method was found, that is why we get an out of bounds error.

If the method is not found in any instances, the program straight up crashes. I think it got in an infinite loop, but just guessing.

### Steps to reproduce

Setup file is in the Godot Engine Docs: https://docs.godotengine.org/en/stable/getting_started/step_by_step/scripting.html

When trying to add the first signal onto the Panel's sayhello.gd script from the connetion creation dialog, then deleting the connected method's code, the tab on the right does not update, so the "connected" signal is still selectable.

Unfortunately, I do not know, how to exactly reproduce it, because I get some side-bugs on the way, like duplicated .gd file instances and etc., which is totally undefined behaviour, but cannot get the program crashing again.





### Minimal reproduction project

_No response_
Repository: PowerToys
Issue: [SG] - open on Monitor where Cursor is
Labels: Idea-Enhancement,Product-Shortcut Guide,Status-In progress

### Description of the new feature / enhancement

Shortcut guide should open on the display that the mouse pointer is currently on 

Additionally the numbered shortcut hotkeys for the taskbar buttons, would reflect the taskbar buttons open on that display


Presently the shortcut guide only opens on the primary display

### Scenario when this would be used?

Useful for anyone with more than one display

### Supporting information

_No response_
Repository: scrcpy
Issue: Copy Paste faciltates images
Labels: feature request

Currently copy paste only works with UTF text. Can this be extended to also include image MIME types. See: https://developer.android.com/reference/android/content/ClipData#:~:text=updateNote(text%2C%20title)%3B%0A%20%20%20%20%7D%0A%7D-,in%20many%20cases%20,-an%20application%20can
Repository: node
Issue: async_hooks: AsyncLocalStorage losing context
Labels: async_hooks,async_local_storage

### Version

node v17.3.0 / 16.13.0

### Platform

linux (likely all)

### Subsystem

async_hooks

### What steps will reproduce the bug?

Run

```js
'use strict'

const { AsyncLocalStorage } = require('async_hooks')
const { createServer } = require('http')

const storage = new AsyncLocalStorage()

let counter = 0
createServer((req, res) => {
  const id = counter++;
  console.log('In Middleware with id ' + id);
  storage.run({ id }, function () {
    req.resume()
    req.on('end', onEnd(res))
  });
}).listen(3000)

function onEnd (res) {
  return () => {
    const store = storage.getStore()
    console.log('store is', store)
    res.end(JSON.stringify(store))
  }
}
```

Then:

```sh
curl -d '{}' -H 'Content-Type: application/json' localhost:3000
```

You'd note that the store is empty.

### How often does it reproduce? Is there a required condition?

All of them. Unfortunately the documentation is quite misleading and it assumes the above would work / we do not document the edge cases.

The problem originates on the fact that receiving an HTTP body is part of the http request `AsyncRecource`. Calling `.resume()` on it does not imply we are attaching the new storage to that `AsyncResource`. However our documentation states:

> Runs a function synchronously within a context and returns its return value. The store is not accessible outside of the callback function. The store is accessible to any asynchronous operations created within the callback.

Unless somebody knows that calling `resume()` is not creating a new asynchronous operation, they will be expecting the context to be preserved.

As a further confirmation, the following code works:

```js
'use strict'

const { AsyncLocalStorage } = require('async_hooks')
const { createServer } = require('http')

const storage = new AsyncLocalStorage()

let counter = 0
createServer((req, res) => {
  const id = counter++;
  console.log('In Middleware with id ' + id);
  storage.enterWith({ id })
  req.resume()
  req.on('end', onEnd(res))
}).listen(3000)

function onEnd (res) {
  return () => {
    const store = storage.getStore()
    console.log('store is', store)
    res.end(JSON.stringify(store))
  }
}
```


### What is the expected behavior?

We might decide this is a bug that should be fixed or we might decide to stabilize `enterWith` and document this case.

The problem is that the current documentation is misleading folks into thinking `storage.run()` is the right API in all cases but it is not as things are.

### What do you see instead?

_No response_

### Additional information

_No response_
Repository: neovim
Issue: statusline support for floating windows
Labels: enhancement,floatwin

### Feature already in Vim?

No

### Feature description

Currently floating windows do not show a status line.

This feature request is for having some way to optionally configure floating windows to show a statusline (e.g., through the `config` map passed to `nvim_open_win` and `nvim_win_set_config`), which would work the same as the statusline (`global-local`) shown in ordinary non-floating windows.

My motivation for this feature request is from a plugin I wrote for showing menus, [vim-menu](https://github.com/dstein64/vim-menu). When using ordinary windows, existing floating windows can [interfere](https://github.com/dstein64/vim-menu/issues/1) with the functioning of the plugin. Switching to floating windows with high z-index could be a workaround, but would have the drawback that they don't show a statusline, which is currently utilized for showing plugin information.
Repository: node
Issue: Investigate flaky test - sequential/test-performance-eventloopdelay
Labels: flaky-test

### Test

sequential/test-performance-eventloopdelay

### Platform

linuxone

### Console output

```console
node:assert:399
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(histogram.min > 0)

    at Timeout.spinAWhile [as _onTimeout] (/home/iojs/build/workspace/node-test-commit-linuxone/test/sequential/test-performance-eventloopdelay.js:65:7)
    at listOnTimeout (node:internal/timers:568:17)
    at processTimers (node:internal/timers:510:7) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}

Node.js v18.0.0-pre
```


### Build links

https://ci.nodejs.org/job/node-test-commit-linuxone/30015/

### Additional information

_No response_
Repository: godot
Issue: File created on PC can't be opened with File class on Android
Labels: bug,platform:android,topic:porting,needs testing

### Godot version

3.4 stable

### System information

Windows 11, Nvidia Gefore 2080, GLES2 / OnePlus 7 Pro GM1913 - Android 11.0.3.1.GM21BA Oxygen

### Issue description

I make an Android App.
I try to read a .csv config file to init some content on my app.
The .csv file come from my PC and he is made with Visual Studio Code.
When I try to open it, the file.open don't work. When I try to display the file list in the Documents folder, it does not appear
But, when i create a file in code (file.open(path, File.WRITE), file.store_string("Hello"), file.close()), the file can be read, and he appear when i display file on document directory
It work when i launch the application on PC but don't work when debugging on mobile


### Steps to reproduce

On your phone, with a file manager application or with USB and a computer, go in your Document folder, create a file named "dropped_file.csv"
Launch the project on your phone with debugging on Godot.
It will print the content of the Document directory. The file "dropped_file.csv" should not be displayed, but the "code_created_file.csv" should be displayed

### Minimal reproduction project

[TestAndroid.zip](https://github.com/godotengine/godot/files/7764984/TestAndroid.zip)
Repository: vscode
Issue: Support no value for editorSuggestWidget.selectedIconForeground
Labels: feature-request,ux,suggest

<!-- ⚠️⚠️ 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. -->

Initially, the icon of suggested autocomplete items (editorSuggestWidget) has a color that depends on the type of the item.

Since recently, the selected item gets painted in white which disturbs me because, to me, white corresponds to snippets or random text.

I'm aware of the following option: `workbench.colorCustomizations -> editorSuggestWidget.selectedIconForeground`.

But this only allows forcing another color... what I want is to keep the default color whether selected or not.
(for example mauve for methods, blue for fields, ...)
What would be cool is to have null as a value or equivalent that would disable specific color for the icon of the selected item.

Also, I am pretty sure this problem occurred before, then went away, and came back only recently (last release maybe).

---

See [related question on stackoverflow](https://stackoverflow.com/questions/68321114/customizing-vscode-theme-how-to-keep-original-icon-color-for-the-focused-item-i)

The solution proposed in the accepted answer didn't work for me (when using vscode default dark theme).

And since I am using the Monokai color theme, it wouldn't help anyway.
I have the following colorCustomization in case it is related:
```json
"workbench.colorCustomizations": {
  "[Monokai]": {
        "editorCursor.foreground": "#0F0",
        "focusBorder": "#0F0",
        "editor.selectionHighlightBorder": "#D8B43C",
        "editor.rangeHighlightBackground": "#D8B43C55",
        "editor.findMatchBorder": "#D8B43C",
        "editorBracketMatch.background": "#D8B43C55",
        "editorBracketMatch.border": "#D8B43C",
        "editorIndentGuide.background": "#00000000",
        "editorIndentGuide.activeBackground": "#D8B43C",
        "activityBar.background": "#191919",
        "editor.background": "#191919",
        "editor.lineHighlightBackground": "#2d2d2d",
        "list.hoverBackground": "#323232",
        "list.activeSelectionBackground": "#424242",
        "list.inactiveSelectionBackground": "#2d2d2d",
        "sideBar.background": "#1b1b1b",
        "sideBarSectionHeader.background": "#232323",
        "editor.selectionHighlightBackground": "#0000",
        "selection.background": "#207a27"
    },
}
```
Repository: godot
Issue: resource_name and resource_path = empty strings
Labels: topic:core,needs testing

### Godot version

3.4.1 stable

### System information

w10 64

### Issue description

I am trying to identify who emits the events that occur when touching the screen, on buttons like "TouchScreenButton".
For this I use "resource_path" and "resource_name" in "_input" but they are empty strings, you cannot identify who is emitting the event because they are empty strings.

### Steps to reproduce

In "_input" check who issued the event using what I said before.

### Minimal reproduction project

_No response_
Repository: youtube-dl
Issue: Support play.gu.se
Labels: site-support-request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.12.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.12.17**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://play.gu.se/media/t/0_pbpucgrn


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

This is a media library hosted by this university: https://www.wikidata.org/wiki/Q371522