sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: `GDScript` resources are not unloaded due to an extra reference
Labels: bug,topic:core,topic:gdscript

### Godot version

v4.0.3.stable.official [5222a99f5], master

### System information

Kubuntu 23.04

### Issue description

It looks like we have an extra reference to the script somewhere, which prevents it from being freed at the right time. 

See also [the comment](https://github.com/godotengine/godot/pull/77129#discussion_r1205894765).

CC @adamscott

### Steps to reproduce

```gdscript
const RES_PATH = "res://a.gd"
#const RES_PATH = "res://icon.svg"

var i := 0
var wr: WeakRef

func _ready() -> void:
    print("has_cached = ", ResourceLoader.has_cached(RES_PATH))

func _on_timer_timeout() -> void:
    print("===")
    if i % 2:
        print("has_cached = ", ResourceLoader.has_cached(RES_PATH))
        print("wr = ", wr.get_ref())
    else:
        var res = load(RES_PATH)
        wr = weakref(res)
        print("has_cached = ", ResourceLoader.has_cached(RES_PATH))
        print("ref count = ", res.get_reference_count())
        print("wr = ", wr.get_ref())
    i += 1
```

```
has_cached = false
===
has_cached = true
ref count = 2
wr = <GDScript#-9223372010413882237>
===
has_cached = true
wr = <GDScript#-9223372010413882237>
===
has_cached = true
ref count = 2
wr = <GDScript#-9223372010413882237>
===
has_cached = true
wr = <GDScript#-9223372010413882237>
```

```
has_cached = false
===
has_cached = true
ref count = 1
wr = <CompressedTexture2D#-9223372010380327805>
===
has_cached = false
wr = <null>
===
has_cached = true
ref count = 1
wr = <CompressedTexture2D#-9223372010162223997>
===
has_cached = false
wr = <null>
```

### Minimal reproduction project

[bug-script-ref-count.zip](https://github.com/godotengine/godot/files/11575495/bug-script-ref-count.zip)
Repository: deno
Issue: Allow setting headers on Response to Websocket request
Labels: web,suggestion

Standard spec is to allow server to set headers in response to a websocket request. This is different than issue https://github.com/denoland/deno/issues/7632 which is to allow client to set headers which is more debatable if that should be allowed.
Repository: go
Issue: cmd/go: import paths can contain the `.test` suffix, breaking the toolchain
Labels: help wanted,NeedsInvestigation,GoCommand

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel go1.21-231f290e51 Sat Apr 8 05:25:04 2023 +0000 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes


### What did you do?
Given
```
-- foo/foo.go --
package foo

import _ "example.com/foo.test"
-- foo/foo_test.go --
package foo
-- foo.test/bar.go --
package bar
-- go.mod --
module example.com

go 1.21
```
run `go test ./foo`

### What did you expect to see?
One of
- no error
- an explanation for the error
- an explicit error forbidding using `foo.test` as an import path


### What did you see instead?
```
/home/dominikh/prj/go/pkg/tool/linux_amd64/link: fingerprint mismatch: example.com/foo.test has 36b962da8ceb542c, import from example.com/foo expecting aa419b4c2ff8e5ed
```
Repository: flutter
Issue: [url_launcher] Standardize failure handling
Labels: p: url_launcher,package,team-ecosystem,has reproducible steps,P3,p: requires breaking change,found in release: 3.10,found in release: 3.11,triaged-ecosystem

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. use code sample provided

### Expected results

we get error in catchError clause but not as "false" value

### Actual results

we get "false" instead of error despite we have log of error in logs(see logs)

### Code sample

<details><summary>Code sample</summary>

```dart
 launchUrlString(
     'viber://pa?chatURI="enter_any_chat_uri"',
      mode: LaunchMode.externalApplication,
    ).catchError(
      (obj) {
        // on android we go here and that's a correct behavior
      },
    ).then((opened) {
      // on ios we go here with opened false. we are unable to differ case when url can't be handled because there is no app
      // and case when we forbid to open it in dialog(shown when trying to open another app first time)
    }
```

</details>


### Screenshots or Video

_No response_

### Logs

<details><summary>Logs</summary>

in console we have only this log: Failed to open URL viber://pa?chatURI="enter_any_chat_uri"


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.10.0, on macOS 12.5.1 21G83 darwin-arm64, locale en-UA)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.76.1)```

</details>
Repository: godot
Issue: if AudioStreamPlayer2D is instanced from thread, sometimes doesn't connect to AudioServer
Labels: bug,topic:audio,topic:2d

### Godot version

3.5.2

### System information

windows 10, intel core i7 mobile, gles2, nvidia quadro m1000m

### Issue description

AudioStreamPlayer2D is a part of  scene (area2D, collisionShape2D, AnimatedSprite) which is instanced from thread. From time to time it does not connect itself to AudioServer from there, which causes spamming error at queue_free():

     ERROR: Disconnecting nonexistent signal 'bus_layout_changed', slot: 714117:_bus_layout_changed.
    at: _disconnect (core/object.cpp:1544) - Condition "!s->slot_map.has(target)" is true.

simple attempt to fix it by connecting it from ready() doesn't work

    var _c0: int = AudioServer.connect("bus_layout_changed", $AudioStreamPlayer2D, "_bus_layout_changed") ;

### Steps to reproduce


    func make_star()-> void:
	    stars: Array = [];
	    if (thread.is_alive() == false):
			thread = Thread.new();
			omd_idx = SWARM;
			var _st: int = thread.start(self, "instance_star", stars); 
	    return;

instancing is called only by thread and is wrapped by mutex:
   
    func instance_star( stars: Array)-> Array:

	    for i in range(0, 200):
		mutex.lock();
		var star_inst: Area2D = star.instance();
		mutex.unlock();
		stars.push_back(star_inst);
		continue;

    return stars;

then is returned to main thread:

    func _process(_delta:float)-> void: 
	    if (omd_idx != -1 and thread.is_active() == true and thread.is_alive() == false):
		swarm = thread.wait_to_finish();

		for i in range(0, swarm.size()):	 
			call_deferred("add_child", swarm[i]);
			continue;
		call_deferred("clear_swarm");
		omd_idx = -1;

	    return;


### Minimal reproduction project

"N/A"
Repository: stable-diffusion-webui
Issue: [Bug]: upscale composition incorrect after inpainting
Labels: bug-report

Hires. fix, resize: from 576x768 to 720x960 (Upscale by 1.25), Latent, Denoising: 0.5
![inpaint-resize](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/2184982/94d5156e-04b4-4790-b47b-ca4d270c1cc7)

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

when using upscale after inpainting, the original unscaled masked portion of the image is also left in the image


### Steps to reproduce the problem

1. Go to inpaint
2. draw a mask
3. select "inpaint not masked" 
4. generate image

=> observe masked portion is left in image


### What should have happened?

image should be upscaled from final full inpainted image, and the original masked portion removed

### Commit where the problem happens

89f9faa63388756314e8a1d96cf86bf5e0663045

### What platforms do you use to access the UI ?

Windows

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
--opt-sdp-no-mem-attention --api
```


### List of extensions

sd-dynamic-prompts

### Console logs

nothing important:
```Shell
Total progress: 100%|████████████████████████████████████████████████████| 20/20 [00:17<00:00,  1.50it/s]
```


### Additional information
Repository: angular
Issue: Standalone migration does not find any files because it uses tsconfig.spec.json
Labels: area: migrations,P3,bug,cross-cutting: standalone

### Command

generate

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

The standalone migration generator is using the tsconfig.spec.json and therefor does not find any files to migrate.

### Minimal Reproduction

1 Create a new project with the Angular cli
2 add a new component and module and import it in app.module

3 Run the command `ng g @angular/core:standalone`
Choose the type of migration: (Use arrow keys)
> Convert all components, directives and pipes to standalone
Which path in your project should be migrated? (./) ./

Result
 � Automated migration step has finished! �
    IMPORTANT! Please verify manually that your application builds and behaves as expected.
    See https://angular.io/guide/standalone-migration for more information.
UPDATE src/app/shouldremove/whatever/whatever.component.spec.ts (628 bytes)

The migration script only checks the files in the tsconfig.spec.json

When I change (ofc not the way to do it)
` "include": [
    "src/**/*.spec.ts",
    "src/**/*.d.ts"
  ]`


to 
` "include": [
    "src/**/*.ts",
    "src/**/*.d.ts"
  ]`

it works correctly. The generator is using the wrong tsconfig file

### Exception or Error

_No response_

### Your Environment

```text
Angular CLI: 16.0.3
Node: 18.16.0
Package Manager: npm 9.5.1
OS: win32 x64

Angular: 16.0.3
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1600.3
@angular-devkit/build-angular   16.0.3
@angular-devkit/core            16.0.3
@angular-devkit/schematics      16.0.3
@schematics/angular             16.0.3
rxjs                            7.8.1
typescript                      5.0.4
```


### Anything else relevant?

_No response_
Repository: next.js
Issue: [NEXT-1255] transpilePackages does not support hooks in pnpm linked modules
Labels: linear: next

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 22.4.0: Mon Mar  6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64
    Binaries:
      Node: 20.2.0
      npm: 9.6.6
      Yarn: N/A
      pnpm: 8.4.0
    Relevant packages:
      next: 13.4.4
      eslint-config-next: 13.4.4
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

### Link to the code that reproduces this issue or a replay of the bug

N/A

### To Reproduce

1. Create a simple Next.js starter app
2. Use `pnpm link --global` inside of a third party module
3. Publish that module and install it to your app
4. Install it and use `pnpm link module_name` to link it to your project
5. Add it to transpilePackages inside of your next.config.js
6. Create a simple route inside of your pages directory that imports a provider from the external module
7. Inside that provider, use a hook like a useState or useEffect
8. The error will throw up: `TypeError: Cannot read properties of null (reading 'useState')`

This entire process works in appDir OR with @martpie 's deprecated package.

### Describe the Bug

**This issue only affects the pages directory, not the app directory.**

Ever since @martpie 's next transpile modules package was deprecated, we moved to the new built-in solution. The main project is `pnpm link`-ed to a bunch of external ESM modules that we use to share packages between projects.

When linked, the transpiler does not process hooks correctly.

`TypeError: Cannot read properties of null (reading 'useState')` - this error throws up regardless of the hook being used (useState, useRef, useEffect, etc.)

However, if you do NOT pnpm link the modules, it works. Previously we used the `{ resolveSymlinks: false }` option in @martpie 's package, but this doesn't seem to be available or relevant to the built-in solution.

Therefore, the only way we can use the transpilePackages feature is with appDir. But since we do have some routes that need to stay in pages dir, we're a bit stuck.

### Expected Behavior

It should allow hooks to fire as usual.

### Which browser are you using? (if relevant)

Any

### How are you deploying your application? (if relevant)

Localhost

<sub>[NEXT-1255](https://linear.app/vercel/issue/NEXT-1255/transpilepackages-does-not-support-hooks-in-pnpm-linked-modules)</sub>
Repository: rust
Issue: Flatten bool arguments under `-Zflatten-format-args=yes`
Labels: I-slow,T-libs,A-fmt

cc #78356

The following code can be optimized:

```rust
// pub is avoiding DCE on godbolt, please ignore it
pub fn main() {
    println!("Hello World {}", false);
}
```

as if written as:

```rust
pub fn main() {
    println!("Hello World false");
}
```

compiler version: `rustc 1.71.0-nightly (a2b1646c5 2023-05-25)`

@rustbot label: +I-slow
Repository: electron
Issue: 'backgroundMaterial' is not work in frameless window
Labels: bug :beetle:,component/BrowserWindow,has-repro-repo,24-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

24.4.0

### What operating system are you using?

Windows

### Operating System Version

Windows 11 22H2

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

The feature of `backgroundMaterial` could work on frameless window, or it can work when the `titleBarStyle` is `hidden`.

### Actual Behavior

The feature of `backgroundMaterial` is not work when set `frame: false` or `titleBarStyle: hidden`.

### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: next.js
Issue: Link is not working properly, showind element.setCapture depreciated.
Labels: bug,Navigation

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Link is not working properly, showind element.setCapture depreciated.
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Routing (next/router, next/navigation, next/link)

### Link to the code that reproduces this issue or a replay of the bug

On clicking on link element , nothing happens and console giving error of element.setCapture depreciated.

### To Reproduce

On clicking on link element , nothing happens and console giving error of element.setCapture depreciated.

### Describe the Bug

On clicking on link element , nothing happens and console giving error of element.setCapture depreciated.

### Expected Behavior

Should go to that page.

### Which browser are you using? (if relevant)

On clicking on link element , nothing happens and console giving error of element.setCapture depreciated.

### How are you deploying your application? (if relevant)

On clicking on link element , nothing happens and console giving error of element.setCapture depreciated.
Repository: opencv
Issue: Request fitCircle() method
Labels: feature

### Describe the feature and motivation

fitCircle() would do a least squares fit of the data to a circle rather than an ellipse.

One way would be to create a variation of fitEllipse() with equal major and minor axes (radii).

Another option would be to implement the work at https://stackoverflow.com/questions/76320936/i-want-to-recognize-the-circle-of-this-speckled-laser-image

### Additional context

_No response_
Repository: TypeScript
Issue: Add option to include files in type checking, but not compiling
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

`rootDir` `exclude`

## ✅ Viability Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

I would love to have an option to include files for type checking, but not compiling.

One solution would be to add an option (`checkOutsideRootDir`?) to support type checking files outside the `rootDir`. An alternative way could be to provide separate glob patterns for type checking and compiling.

## 📃 Motivating Example

Let’s say you are testing you project with Vitest. You probably have a file structure that looks something like this:

```
├── package.json
├── src
│   └── index.ts
├── tests
│   └── index.test.ts
├── tsconfig.json
└── vitest.config.ts
```

Previously you needed two TypeScript configuration files, one for type checking everything, and one for compiling your source code. With this new option enabled, TypeScript will **type check all** TypeScript files, but it will **only compile the files from the `rootDir`** directory.

```jsonc
{
  "compilerOptions": {
    "checkOutsideRootDir": true,
    "rootDir": "src",
    "outDir": "dist"
  }
}
```

## 💻 Use Cases

Currently I feel like there is no proper way to configure TypeScript for both type checking and compiling. Some special configuration is needed to compile source code, and type check tests / config files, but exclude those from the build.

Often repos end up with `tsconfig.json` and something along the way of `tsconfig.build.json`, `tsconfig-prod.json`, `dev.tsconfig.json`, or something along those lines. It’s not consistent across the ecosystem. This file then uses a mix of `extends` / `include` / `exclude` to create complex configurations. Alternatively people just exclude certain files, not being aware they are being excluded from type checking as well. Or they use an alternative tool for building.

Regardless of what people come up with, it often leads to awkward configurations.
Repository: next.js
Issue: [NEXT-1241] server actions do not contain auth information needed by application
Labels: bug,linear: next

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000
    Binaries:
      Node: 16.19.0
      npm: 8.19.3
      Yarn: 3.2.4
      pnpm: 7.24.3
    Relevant packages:
      next: 13.4.1
      eslint-config-next: 13.0.6
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

_No response_

### Link to the code that reproduces this issue or a replay of the bug

TBD

### To Reproduce

when making the server action call it fails our authentication requirements as it is missing a csrf token

https://github.com/vercel/next.js/blob/62af2007ce78fdbff33013a8145efbcacbf6b8e2/packages/next/src/client/components/router-reducer/reducers/server-action-reducer.ts#L35-L54

### Describe the Bug

when making the server action call it fails our authentication requirements as it is missing a csrf token

### Expected Behavior

allow server actions to be configurable before sending them

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_

<sub>[NEXT-1241](https://linear.app/vercel/issue/NEXT-1241/server-actions-do-not-contain-auth-information-needed-by-application)</sub>
Repository: vscode
Issue: Markdown: Paste image from clipboard - image filename
Labels: feature-request,markdown

Type: <b>Feature Request</b>

OS Name: Microsoft Windows 10 Enterprise
VSCode 1.78.2
Extensions: WSL, Git Graph, Markdown Preview Mermaid Support

Scenario:
Paste image from clipboard in markdown, and use current-date-time or GUID as image file name.

Steps:
1. Edit settings.json to enable markdown paste.
```json
"editor.experimental.pasteActions.enabled": true,
    "markdown.experimental.copyFiles.destination": {
        "**/*": "${documentDirName}/images/"
    }
```
2. Copy image in clipboard (ctrl-c).
3. Paste clipboard image in markdown (ctrl-v).
4. This creates an image (image.png, image-1.png...) and links to it as shown below.

```text
![Alt text](images/image.png)
![Alt text](images/image-1.png)
```

Ask/How-to:
Instead of using the default image.png, image-1.png,... etc. I would like to specify filename for the pasted image in markdown using current-date-time, or GUID or other custom format. It'll be good to have an ability to pre-define such formats, and (optionally) the ability to override at runtime.

For example:
```text
![Alt text](images/2023-05-26-10:50:00.png)
![Alt text](images/2023-05-27-10:45:00.png)
![Alt text](images/53d5f90a-b1d5-4bc2-b9af-9e06895318fe.png)
![Alt text](images/31815814-1c8b-4684-b49c-4e3c9a4d6891.png)
```



VS Code version: Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:39:26.248Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: Yes
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2


<!-- generated by issue reporter -->
Repository: pytorch
Issue: Hooks not working in version 2.0.1+cu118
Labels: module: nn,triaged

### 🐛 Forward Hooks are not getting called

When writing forward hooks on a layer of a model, I realized they are not being called at all.

```python
# inside __init__ function
for name, module in self.model.named_modules():
    if attention_layer_name in name:
    print(f"Module hook registered for: {name}")
    module.register_forward_hook(lambda m, i, o: attentions.append(o))
```
Expected Behavior: When I forward an example through the model, the hooks should be called after specifically hooked layers are done forwarding the weights

I did try it on torch version 1.13.1, and it seems to work fine there.

### Versions

Versions of relevant libraries:
[pip3] numpy==1.24.3
[pip3] torch==2.0.1+cu118
[pip3] torchaudio==2.0.2+cu118
[pip3] torchvision==0.15.2+cu118
[pip3] triton==2.0.0
[conda] Could not collect

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki