sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: NextJS wrongly parses absolute URL when concatenating with .env variable - Unexpected resources are added after top-level domain/server port
Labels: bug

### Provide environment information

```bash
// MacOS Ventura 13.2

> next info
    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.3.0: Thu Jan  5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.13.0
      npm: 8.19.3
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.2.3
      eslint-config-next: 13.2.3
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

### Link to the code that reproduces this issue

company private, sorry =/

### To Reproduce

1. Create an env variable like
`BASE_FETCH_URL=http://localhost:3000`

2. Create a form with action pointing to this URL + some resources (I was doing it in a subfolder of app folder E.g.: `./app/apply/review/page.tsx`)
```
<form action=`${process.env.BASE_FETCH_URL}/another/resource`)
```
or a call for the fetch
```
await fetch(`${process.env.BASE_FETCH_URL}/another/resource`)
```

### Describe the Bug

`fetch` when parsing the received URL are adding unexpected resources, making the request to fail with HTTP 404

```
// .env.local
BASE_FETCH_URL=http://localhost:3000
```

by using like this:
`process.env.BASE_FETCH_URL + '/api/apply/get-session-user'`

results in the following URL:
`http://localhost:3000/api/apply/get-session-user`

This URL are getting well concatenated (also using template literals). You can confirm it by checking the console.log present into the Screenshot below
But into the browser, it's getting requested with "extra" resources right after the top-level domain (or the server port in my case)
**Request URL:** `http://localhost:3000/apply/undefined/api/apply/get-session-user`
Look at the first resource `/apply/undefined`. This resource shouldn't be present since it wasn't part of the original URL

Detail... It works by hard-coding the URL and eventually works with the relative resource path

Summarizing:
- It works: `await fetch('http://localhost:3000/api/apply/get-session-user')`

- It works: `await fetch('http://localhost:3000' + '/api/apply/get-session-user')`

- It works sometimes: `await fetch('/api/apply/get-session-user')`

- It doesn't works: `await fetch(process.env.BASE_FETCH_URL + '/api/apply/get-session-user')`


![image](https://user-images.githubusercontent.com/4274900/224125483-342818ee-22ce-498b-83b9-c72226b4862d.png)


### Expected Behavior

Browser to call exactly the URL being constructed (that can be viewed in console.log) without to add any other resources or modification

### Which browser are you using? (if relevant)

Microsoft Edge - v110.0.1587.57 (Official build) (arm64)

### How are you deploying your application? (if relevant)

Not yet
Repository: flutter
Issue: Creation of `ValueListenersMixin<T>`
Labels: framework,a: animation,c: proposal,P3,team-framework,triaged-framework

## Use case

I'm wrapping my custom `AnimationController` to have some specific methods that I would like to exist in some cases (that's why I'm not using extensions). 

I was meaning to create methods to listen to (complete/dismissed) changes. Similar to `addStatusListener` but with a `bool` value.

## Proposal

<details>

<summary>The <code>AnimationLocalStatusListenersMixin</code> class is (currently, at least) this code:</summary>

```dart
mixin AnimationLocalStatusListenersMixin {
  final ObserverList<AnimationStatusListener> _statusListeners = ObserverList<AnimationStatusListener>();

  @protected
  void didRegisterListener();

  @protected
  void didUnregisterListener();

  void addStatusListener(AnimationStatusListener listener) {
    didRegisterListener();
    _statusListeners.add(listener);
  }

  void removeStatusListener(AnimationStatusListener listener) {
    final bool removed = _statusListeners.remove(listener);
    if (removed) {
      didUnregisterListener();
    }
  }

  @protected
  void clearStatusListeners() {
    _statusListeners.clear();
  }

  @protected
  @pragma('vm:notify-debugger-on-exception')
  void notifyStatusListeners(AnimationStatus status) {
    // A lot of code that is not the point
  }
}
```

</details> 

My suggestion is that there could be a similar mixin or class where the callbacks could be defined with a generic type.
Repository: TypeScript
Issue: Add `asserts` example in Handbook
Labels: Docs,Rescheduled

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

asserts, narrowing, property

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
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

<!-- A summary of what you'd like to see added or changed -->

Add `asserts` examples in the handbook to be properly indexed in the Search box. If there is not any specific reason for the absence of this feature in the examples I could make a PR

## 📃 Motivating Example

<!--
  If you were announcing this feature in a blog post, what's a short explanation that shows
  a developer why this feature improves the language?
-->

Currently `asserts` exists only in release notes of [`3.7`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions) and cannot find examples in handbook. 


## 💻 Use Cases

<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->

Have `asserts` indexed in search box and exist in handbook, so we know that this functionality exists, without finding randomly through google searches.
Repository: next.js
Issue: Allow assetPrefix setting to /_next/data/ (IMPORTANT)
Labels: bug

### Verify canary release

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

### Provide environment information

```bash
This is not a environment specific issue
```


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

_No response_

### Link to the code that reproduces this issue

NA

### To Reproduce

This should be the data file path

https://stgwww.moneycontrol.com/cb/_next/data/bg_7V-5NU2IrDF-Lylv7P/CreditBureau/faq.json

since /cb prefix is not applied its travelling to server 1

https://stgwww.moneycontrol.com/_next/data/bg_7V-5NU2IrDF-Lylv7P/CreditBureau/faq.json

### Describe the Bug

We have 3 NextJS apps running under 1 domain and it is controlled by a load balancer. Since nextJS files path starts with _next we have used 3 different asset prefix in order send the request to correct server.

eg:
 /a/_next goes to server 1
/b/_next goes to server 2

Now the problem is  NEXT JS doesnt allows /_next/data/ to be prefixed. because of which  server3 /data file request is going to server 1 since server 1 is the main server.

How can I fix this, is there any way? How can I add prefix to /_next/data/ 

### Expected Behavior

 /_next/data/ should have its own prefix and point to correct server

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

chrome

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

jenkins
Repository: godot
Issue: DampedSpringJoint2D doesn't respect max length/distance
Labels: bug,topic:physics,topic:2d

### Godot version

v4.0.stable.official [92bee43ad]

### System information

Ubuntu, Godot Forward+

### Issue description

**Issue:**
- The documentation about [DampedSpringJoint2D](https://docs.godotengine.org/en/stable/classes/class_dampedspringjoint2d.html#class-dampedspringjoint2d-property-length) states that `length` is "The spring joint's maximum length. The two attached bodies cannot stretch it past this value.".
- This doesn't seem to be true, as also [this old Reddit post](https://www.reddit.com/r/godot/comments/afe8ix/dynamically_instancing_joints/) indicates (which states it's the initial distance or length, not the max length).

**Test setup:**
- Two rigid bodies are exactly 100px apart
- The spring is connected to both bodies and the max length is set to 100px
- When they fall down due to gravity, the "mountain" shoves them apart much further than the specified distance
- Expected behaviour: The bodies stay close to the top of the mountain due to the spring's max length

![image](https://user-images.githubusercontent.com/7897006/224340964-dfe43994-605d-45a0-986b-666bf8fddba4.png)

![image](https://user-images.githubusercontent.com/7897006/224340157-dce4b247-c9a1-48f5-bacf-dafd36750bf9.png)

**Conclusion:**
Maybe this is just a mistake in the documentation or it really is a bug.
If it's a documentation issue it would be great to have max length as a feature.

### Steps to reproduce

1. Create two RigidBody2D
2. Create DampedSpringJoint2D connected to the bodies
3. Set a max and rest length
4. Create situation where the bodies move away from each other (it helps upping the weight of the bodies)
5. See distance becoming greater than max distance

### Minimal reproduction project

[Bug-SpringJoint.zip](https://github.com/godotengine/godot/files/10942925/Bug-SpringJoint.zip)
Repository: next.js
Issue: with firebase hosting doesn't works with "Nextra" or if theres theme.config.tsx present
Labels: examples

### Verify canary release

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

### Provide environment information

```bash
Operating System:        
      Platform: win32        
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 18.10.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.2.4
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
```


### Which example does this report relate to?

https://github.com/vercel/next.js/blob/canary/examples/with-firebase-hosting/README.md

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

_No response_

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

Firebase Hosting

### Describe the Bug

I have [this](https://github.com/Prottoy2938/vercel-deployment-issue-calcsurf) repository which I'm trying to deploy to Firebase hosting using this [example ](https://github.com/vercel/next.js/blob/canary/examples/with-firebase-hosting/README.md)

But its failing, and in the process, I'm getting errors like `useMemo` isn't defined etc. 

The application works fine when being deployed to Vercel.

Any help?

### Expected Behavior

Should be able to deploy to firebase

### To Reproduce

Trying deploying this repository to Firebase Hosting: https://github.com/Prottoy2938/vercel-deployment-issue-calcsurf
Repository: godot
Issue: CSG Polygon that follows a Path3D disappear after scene reloads
Labels: bug,topic:core,topic:editor,confirmed,topic:3d

### Godot version

v4.0.stable.official.92bee43ad [92bee43ad]

### System information

popos 22.04 lts, Vulkan, AMD Radeon rx 6700 xt

### Issue description

when reloading my scene the CSG polygon that follow a path disappears.

### Steps to reproduce

1. Add a csg polygon node with the "use collision" flag turned off.
2. Add a path3d and create any path.
3. add a camera3d and look at the path.
4. set mode to path for the csg polygon and set the path node to the path3d.
5. create a script that reloads the scene on a keystroke.

if "use collision" is turned on for the csg polygon it appears fine after a reload.


### Minimal reproduction project

[csg_polygon_path3d_dissapear_after_scene_reload.zip](https://github.com/godotengine/godot/files/10943121/csg_polygon_path3d_dissapear_after_scene_reload.zip)
Repository: next.js
Issue: On-Demand Revalidation broken for Dynamic Segments
Labels: bug

### 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: arm64
      Version: Darwin Kernel Version 21.6.0: Mon Dec 19 20:46:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_ARM64_T8101
    Binaries:
      Node: 16.17.0
      npm: 8.15.0
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.2.5-canary.0
      eslint-config-next: 13.2.4
      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

https://github.com/dev-justin/on-demand-reval

### To Reproduce

Create a dynamic segment page
Create an API route to revalidate said dynamic segment/page
Error will always occur upon revalidating 

### Describe the Bug

On-Demand Revalidation stopped working since update **^13.1.7-canary.27** (last working version) for dynamic pages/segments.

### Expected Behavior

When calling an api route to revalidate a dynamic segment/page it should not throw an error but successfully revalidate the targeted pages.

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

Vercel
Repository: godot
Issue: Resizing subwindows / popups does not work correctly
Labels: bug,platform:linuxbsd,topic:porting

### Godot version

v4.0.stable.official [92bee43ad]

### System information

Fedora 37 KDE, Wayland, RX 6600

### Issue description

Resizing editor subwindows/popups does not work as expected. This bug does not happen when resizing the main window.

https://user-images.githubusercontent.com/85757201/224349979-f852f617-1990-4b20-9b35-39aad12860cb.mp4



### Steps to reproduce

1. Open Godot Engine
2. Click on "New project", "Import", "Scan", or "About" (works with other popups as well)
3. Try resizing the popup window

### Minimal reproduction project

N/A
Repository: rust
Issue:  -C  relocation-model=pie -C link-arg=--no-dynamic-linker still generates position dependant code for trait objects
Labels: A-codegen,T-compiler,C-bug

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
#![no_std]

pub trait Foo {
    fn do_thing(&self) -> u32;
}
pub struct A {}

impl Foo for A {
    fn do_thing(&self) -> u32 {
       0
    }
}

#[inline(never)]
pub fn tst(arg : &dyn Foo) -> u32 {
    arg.do_thing()
}

pub fn with_a(an_a : &A) -> u32 {
    tst(an_a)
}

```
A compiler explorer link for convenience:

https://godbolt.org/z/d5bzqWrMW

I expected to see this happen: `tst` should use a position relative sequence to load the function pointer from the table.

Instead, this happened:

```
jmp     qword ptr [rsi + 24]
```

Which requires the entry to be an absolute address.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

Tried on 1.67 and nightly. Also tried for RISCV64 which had the same problem. 

The compiler flags I passed:

```
-C opt-level=2 -C  relocation-model=pie -C link-arg=--no-dynamic-linker
```

`-C link-arg=--no-dynamic-linker` does not actually change anything.

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
<backtrace>
```

</p>
</details>
Repository: PowerToys
Issue: The help document has an incorrect explanation.
Labels: Area-Localization,Issue-Docs,Needs-Triage

### Provide a description of requested docs changes

![微信截图_20230310232030](https://user-images.githubusercontent.com/37585258/224354804-b873222d-e011-4bd0-8344-a2cc7dc00c49.png)
The regular expression help document has an error. The explanation on the right side of the red box should be swapped up and down to be correct.
Repository: vscode
Issue: `Allow extension to open URI` dialog crops the URI
Labels: under-discussion

- on vscode.dev open a remote repository
- from the remote menu select `Continue Working in Remote Repository on VS Code Desktop`
- VS Code (on Linux) opens with the following dialog
![image](https://user-images.githubusercontent.com/6461412/224358833-5db432f0-502a-44f2-8dc5-27f0b4cb6ad3.png)

The URI is cropped...
Repository: pytorch
Issue: MPS Backend Doc, model = YourFavoriteNet() not defined
Labels: module: docs,triaged,actionable,module: mps

### 📚 The doc issue

I have used MacBook MPS documentation and when I run the code, it gives an error: YourFavoriteNet() is undefined. 

Reference:[(https://pytorch.org/docs/stable/notes/mps.html)]

### Suggest a potential alternative/fix

Fixing the document code and potentially adding YourFavoriteNet() function or class.

cc @svekars @carljparker @kulinseth @albanD @malfet @DenisVieriu97 @razarmehr @abhudev
Repository: TypeScript
Issue: Display signature help or completions for tuples with labels
Labels: Suggestion,Help Wanted,Experience Enhancement

# Suggestion

## 🔍 Search Terms

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
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

<!-- A summary of what you'd like to see added or changed -->

## 📃 Motivating Example

```ts
declare const coords: [x: number, y: number]

const [/**/] = coords
```

The problem: having no idea what a name to type as you don't know what the type of it.

I'm using it with my plugin and it looks very simple (and useful IMO):

<img src="https://user-images.githubusercontent.com/46503702/224357896-033d2b34-be93-4c2c-88de-73460a7a8917.png" width="380">

<img src="https://user-images.githubusercontent.com/46503702/224357905-cb27bee5-5d88-4d08-9130-8cf715692d01.png" width="400">


Of course, you can hover of the variable to fiture it out, but what about the following example:

```ts
const a: {
    coords: [x: number, y: number] | string | { x: number; y: number }/* | even more types */
} = {
    coords: [/**/], // the type with x, y tuples can be even truncated, so you can only guess names of labels
}
```

I understand that labeled tuples introduced in ts4.0 were designed primarily for parameters usage, but I've seen them used for shorter static data declarations as well.

However, if you think that usage signature help is redundant and incorrect, what about having completions for tuple labels at least? There is already completions when acessing such symbols via dot property access. For example for first example it would be keyword completion with label `x` and `[0]: number` detail.


## 💻 Use Cases

<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->
Repository: vscode
Issue: Variables within a configuration snippet defined in package.json file are not being allowed
Labels: bug,debug

Type: <b>Bug</b>

I want to add a configuration snippet (configurationSnippets) while contributing a debugger for a VS Code extension. However, I am unable to include a variable defined as ${command:debugger.getPaths} within the configuration snippet. A simple example showing the problem is as follows:

                "configurationSnippets": [
                    {
                        "label": "Tester Debug Snippet (Launch)",
                        "description": "Test config",
                        "body": {
                            "name": "Test Debug (Launch)",
                            "type": "cppdbg",
                            "request": "launch",
                            "program": "${command:debugger.getPaths}",
                        }
                    }
                ]

When using this config snippet, it leads to the following value of program:

"program": "debugger.debugger.getPaths", where I would expect this to be instead "program": "${command:debugger.getPaths}".

I have tried a number of escaping strategies like "\\${command:debugger.getPaths}", "\\$\\{command:debugger.getPaths\\}", "$${command:debugger.getPaths}", "$$\\{command:debugger.getPaths\\}". However, none of it achieves the expected result.
 

VS Code version: Code 1.76.0 (92da9481c0904c6adfe372c12da3b7748d74bdcb, 2023-03-01T10:22:44.506Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No
Remote OS version: Linux x64 6.1.12-200.fc37.x86_64
Remote OS version: Linux x64 6.1.12-200.fc37.x86_64


<!-- generated by issue reporter -->