sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: output export ssg generation for dynamic even with generateStaticParams id value is comming as %5Bslug%5D so page is not generated in build
Labels: bug

### Link to the code that reproduces this issue

https://github.com/veract-dev/prahars.git

### To Reproduce

nextjs.config
```

/** @type {import('next').NextConfig} */
const nextConfig = {

    output: 'export',
    trailingSlash: true,

    images: {
        unoptimized: true,
    },


}

module.exports = nextConfig
```
blog/[slug]/page.tsx
```

export async function generateStaticParams() {
    const blogs = (await getAllBlogs()).data;
    if (blogs && blogs.length > 0) {
        let final = blogs.map((blog: BlogI) => ({
            slug: blog.id
        }))

        return final;
    } else {
        return [];

    }

export default async function Page({ params }: any) {
    let { slug } = params
    console.log("id before", slug)
    let data = (await getBlog(slug)).data;
    let blog = data as BlogI ?? null;

    return (
        <div>
            <div className="desktopBlogInnerPage">
                <div className="innerpage_title">{blog?.title}</div>

                <div className="image-container img"><Image src={blog.thumbnail} alt="Description of the image" width={1000} height={667} /></div>
                <div className="innerpage_content_padding">
                    {blog.content}
                </div>
            </div>

            <div className="mobileBlogInnerPage">
                <div className="innerpage_title">{blog.title}</div>
                <div className="image-container_mobile">
                    <div className="image-container img_mobile"><Image src={blog.thumbnail} alt="Description of the image" width={1000} height={667} /></div>
                </div>
                {/* <div style={{display: "flex", justifyContent:"center", backgroundSize:'contain', paddingTop:"40px"}}><div className="background_img"></div></div> */}
                <div className="innerpage_content_padding">
                    {blog.content}
                </div>
            </div>
        </div>
    )



}
```

### Current vs. Expected behavior

Current behavior in npm build files are not generated for id with value Expected behavior to build files and generate

### Provide environment information

```bash
Operating System:
  Platform: windows
  Arch: x64
  Version: 12
Binaries:
  Node: 20.9.0
  npm: 9.4.0
  pnpm: N/A
Relevant packages:
  next: 14.2.3
  eslint-config-next: N/A
  react: ^18
  react-dom: ^18
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

next build (local)

### Additional context

updated code is in master branch
Repository: godot
Issue: [Usability] Sprite2D node lack multi node edit support like MeshInstance3D 
Labels: enhancement,discussion,topic:editor,topic:2d

### Tested versions

Godot v4.3.dev (c4279fe3e)

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3619) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)

### Issue description

After https://github.com/godotengine/godot/issues/91592, I want to check whether Sprite2d Node has MultiNodeEdit support, but it doesn't support it. See image below: 

![image](https://github.com/godotengine/godot/assets/8315986/ba183995-18db-452e-b344-0aa0540a5eea)

![image](https://github.com/godotengine/godot/assets/8315986/2109c342-8a19-4f6f-8c89-036a0991949a)

IMHO actions like `convert to polygon2d` can benefit from this kind of batch processing.

Related code:
```
void Sprite2DEditorPlugin::edit(Object *p_object) {
	sprite_editor->edit(Object::cast_to<Sprite2D>(p_object));
}

bool Sprite2DEditorPlugin::handles(Object *p_object) const {
	return p_object->is_class("Sprite2D");
}
```

Partly related to https://github.com/godotengine/godot/issues/91637

### Steps to reproduce

* create a sprite2d node and note the menu
* create another sprite node, select them together and notice the menu is disappeared

### Minimal reproduction project (MRP)

N/A
Repository: flutter
Issue: Option to disable right click select on selectable text, but keep it selectable with left click
Labels: framework,c: proposal,a: mouse,P3,f: selection,team-framework,triaged-framework

### Use case

Consider the following widget:

```dart
class MyScreen extends StatelessWidget {
  const MyScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: GestureDetector(
          onSecondaryTap: () => print("I was tapped. ${DateTime.now()}"),
          child: Container(
            padding: const EdgeInsets.all(32),
            color: Colors.red,
            child: Container(
              color: Colors.blue,
              child: const SelectableText(
                "I am selectable",
                contextMenuBuilder: null,
              ),
            ),
          ),
        ),
      ),
    );
  }
}
```

The user can select the selectable text with left click, and a right click on the red container prints "I was tapped". However, a right click on the selectable text selects the clicked on word instead of printing "I was tapped".

https://github.com/flutter/flutter/assets/26022902/79311b05-115b-4605-85ec-22ba6a0029a8

Setting `enableInteractiveSelection` to `false` makes the text un-selectable, but also ignores the right click.  
Obviously, same behaviour when wrapping `SelectableText` in `AbsorbPointer` or `IgnorePointer`.

I also tried creating a custom `AbsorbRightClickPointer` widget, however as far as I can tell, it is not possible to get the pointer type in `RenderBox.hitTest`.

Without this it is not possible to implement for example a custom context menu, that opens both when right-clicking the red container and the text inside as it is done in Telegram Desktop:


https://github.com/flutter/flutter/assets/26022902/80245da4-b57f-4fc5-8386-7bc068bb10bf


### Proposal

Make it possible to disable or adjust the right click behaviour of selectable text.
Repository: next.js
Issue: Error: Invariant: attempted to hard navigate to the same URL
Labels: bug,Navigation

### Link to the code that reproduces this issue

https://github.com/igorwessel/next14-canary-hard-navigate-issue

### To Reproduce

1.	Run the build command in the project: npm run build
2. Start the server with npm run start (Production)
3. Access the localhost:3000, and stay on the route "/"
4. Repeat steps 1 and 2  to simulate a new deployment
5. With the previous page still open with the old deployment, click on "Current Page". This will trigger the error.

### Current vs. Expected behavior

I expected Next.js to perform a hard-refresh when it receives a 404 status code from the JSON of the dynamic route, similar to what happens when it navigates to another page. However, I observed that the error `Error: Invariant: attempted to hard navigate to the same URL` is thrown.

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 18.20.1
  npm: 10.5.0
  Yarn: 1.22.22
  pnpm: 8.15.7
Relevant Packages:
  next: 14.3.0-canary.51 // Latest available version is detected (14.3.0-canary.51).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: N/A
Next.js Config:
  output: standalone
```


### Which area(s) are affected? (Select all that apply)

Navigation

### Which stage(s) are affected? (Select all that apply)

Other (Deployed)

### Additional context

Occurs in  next@12.3.4 too

From our understanding of the previous issue, Next.js should perform a hard-refresh when it receives a 404 while trying to perform data-fetching on a dynamic page with some data-fetching method like getServerSideProps. Currently, this error occurs on the same page, but it does not happen if we go to another page.

If this is not a bug, how can we solve this problem/mitigate given that requests to `.next/data/{buildId}` are dynamic?


https://github.com/vercel/next.js/assets/54173994/9d3be36d-ee32-467a-a7a9-e8e01c50b9d7
Repository: godot
Issue: In Advanced Import Setting, create Collision Shape is not centered on object if origin is off center.
Labels: bug,topic:editor,topic:import,topic:3d

### Tested versions

4.3dev6

### System information

Godot v4.3.dev6 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.4626) - Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 Threads)

### Issue description

![explorer_iXYxUcO2Qp](https://github.com/godotengine/godot/assets/10520249/efad4e45-a5bc-4af6-983a-d9d6fb11d476)

The collision box is centered on the object's origin (which is at the bottom center), rather than the object's center.

Note: the origin of the asset is at the bottom center, for easy placement.


### Steps to reproduce

Import an asset with an origin that is offset from the center of the object.
Go to Import > Advanced > Check the Physics checkbox > add a box collision shape.

### Minimal reproduction project (MRP)

I can download the asset, but basically Kaykit Prototype Bits should work to replicable the issue.
Repository: next.js
Issue: Middleware Caches Uploaded Files In Memory
Labels: bug,Middleware,Performance

### Link to the code that reproduces this issue

https://github.com/KakkoiDev/try-memory-efficient-nextjs-upload-proxy

### To Reproduce

1. Open your system monitor to see how much RAM is available
2. Start project server
3. Upload a file
4. Use the alternative `NEXT_PUBLIC_UPLOAD_URL` path, to avoid using the middleware to validate the issue disappears

### Current vs. Expected behavior

**Current**

As the file uploads, the sent chunks are cached in memory and not released.

**Expected behavior**

As the data stream is sent to the server, the cached chunks are released from memory.

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  4 14:39:20 UTC 2
  Available memory (MB): 32012
  Available CPU cores: 6
Binaries:
  Node: 20.12.2
  npm: 10.5.0
  Yarn: 1.22.22
  pnpm: 9.1.0
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Middleware, Performance

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)

### Additional context

My whole team experiences the same issue on their own computers.
Repository: ant-design
Issue: Masonary Component Required
Labels: 💡 Feature Request,Inactive

### What problem does this feature solve?

I was looking for Masonry Component just like  Material UI (https://mui.com/material-ui/react-masonry/)  . Although It can be done with Flex and Grid but it will ease the coding if we have masonry just like Pinterest use and we have Material UI as an example for Masonry

### What does the proposed API look like?

Props 
1. children : The content of the component.
2. columns : Number of columns.
3. spacing:  Defines the space between children.
4. sequential:  Allows using sequential order rather than adding to shortest column

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: vscode
Issue: Support something like `references.preferredLocation` for definition links
Labels: feature-request,editor-symbols,references-viewlet

Type: <b>Bug</b>

There were issues in the past with this which are locked now:
https://github.com/microsoft/vscode/issues/111032
https://github.com/microsoft/vscode/issues/108726

The issue is essentially the same as above in the closed issues: I've tried changing `references.preferredLocation` to either `view` or `peek` but the setting doesn't seem to make any difference - when I'm Ctrl+clicking on e.g. a method that has references, it peeks them, instead of showing them in the sidebar (what Alt+Shift+F12 would do) 

VS Code version: Code 1.89.0 (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:09:22.859Z)
OS version: Windows_NT x64 10.0.19044
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD Ryzen 5 5600G with Radeon Graphics          (12 x 3893)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|31.87GB (23.88GB free)|
|Process Argv|--disable-extensions|
|Screen Reader|no|
|VM|0%|
</details>Extensions disabled
<!-- generated by issue reporter -->
Repository: transformers
Issue: Support for Multiple Datasets and Domain-Specific Loss Calculation in Trainer
Labels: trainer,Feature request

### Feature request

I am currently working on a project that involves sequence level distillation across multiple domains, requiring the handling of separate datasets for each domain within a single training loop. Specifically, the challenge involves integrating data from four distinct domains, computing loss individually per domain, and then aggregating these losses into a global loss measure that can guide the overall training process.

### Motivation

Ideally, the Trainer class would natively support the following features:

Multiple Dataset Handling: Ability to pass multiple datasets into the Trainer directly, with each dataset potentially representing a different domain.
Domain-Specific Loss Calculation: Support for defining and computing loss separately for each domain's dataset within the training loop and then integrating these losses into a global training objective.

### Your contribution

Currently, the Trainer class in the Transformers library supports passing a single dataset for training and evaluation. To handle multiple datasets or to calculate domain-specific losses, one must subclass the Trainer and override methods such as compute_loss, which complicates the implementation and integration of domain-specific training strategies.
Repository: pytorch
Issue: When using torch.onnx.export, the result of torch.scatter_add may be wrong for opset11
Labels: module: onnx,triaged

### 🐛 Describe the bug

```python
import torch
import torch.onnx

class ScatterReduceOp(torch.nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, data, indices, updates):
        return torch.scatter_add(data, 0, indices, updates)

model = ScatterReduceOp()

data = torch.randn(10, 4)
indices = torch.randint(0, 4, (10, 4))
updates = torch.randn(10, 4)

torch.onnx.export(model, (data, indices, updates), "scatter_add.onnx", opset_version=11)
```

### Versions

Collecting environment information...
PyTorch version: 2.2.2+rocm5.7
Is debug build: False
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: 5.7.31921-d1770ee1b

OS: CentOS Linux 7 (Core) (x86_64)
GCC version: (GCC) 5.4.0
Clang version: Could not collect
CMake version: version 3.23.4
Libc version: glibc-2.17

Python version: 3.8.19 (default, Mar 20 2024, 19:58:24)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-3.10.0-1160.el7.x86_64-x86_64-with-glibc2.17
Is CUDA available: False
CUDA runtime version: 11.1.74
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: 535.98
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
...
[conda] numpy-base                1.24.3           py38h060ed82_1  
[conda] pytorch-triton-rocm       2.2.0                    pypi_0    pypi
[conda] torch                     2.2.2+rocm5.7            pypi_0    pypi
[conda] torchvision               0.17.2+rocm5.7           pypi_0    pypi
Repository: deno
Issue: Support for custom conditional exports in npm specifier
Labels: suggestion,node compat

### What is the problem this feature would solve?
Deno currently does not provide a way to specify custom export conditions when importing npm packages. This makes it **impossible** to import non-default exports that are conditionally exported based on certain conditions, such as the "react-server" condition used by React Server Components.

See: 
https://nodejs.org/api/packages.html#conditional-exports
https://github.com/reactjs/rfcs/blob/main/text/0227-server-module-conventions.md

### What is the feature you are proposing to solve the problem?
Add support for a config flag in Deno, similar to the one supported by Node.js and Bun. This flag would allow specifying custom export conditions when importing npm packages.

For example, in Bun, thanks to this issue https://github.com/oven-sh/bun/issues/8990 you can do:
```
bun --conditions special-condition
```

Then, if you import an npm package, it will follow the conditions specified in the package's `exports` field.

Ideally, it would be great to set up this condition inside the `deno.json` config, so that it can be used by Deno Deploy as well. An other option would be to specify it directly in the npm specifier, so that no config file are needed ?

### What alternatives have you considered?
One workaround would be to directly import the specific file path, like:
```typescript
import "npm:/react@19.0.0-beta-b498834eab-20240506/cjs/react.react-server.development.js"
```

However, this doesn't work if the file is not explicitly exported in the package's `exports` field:
```
Uncaught TypeError: Failed resolving package subpath './cjs/react.react-server.development.js' for '/Users/Library/Caches/deno/npm/registry.npmjs.org/react/19.0.0-beta-b498834eab-20240506/package.json'
  Caused by:
    [ERR_PACKAGE_PATH_NOT_EXPORTED] Package subpath './cjs/react.react-server.development.js' is not defined by "exports" in '/Users/Library/Caches/deno/npm/registry.npmjs.org/react/19.0.0-beta-b498834eab-20240506/package.json' imported from '/Users/code/$deno$repl.ts'
```

I think this is intentional from the Deno team to not expose what's not exposed through the `exports` option. But then, Deno should provide a way to define the export conditions like Bun and Node does.
Repository: rust
Issue: Potential Compiler Optimization Issue with &Vec<Vec<T>> vs &[Vec<T>]?
Labels: A-LLVM,C-enhancement

#### rustc version: 1.78

See [Godbolt](https://gcc.godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:rust,selection:(endColumn:6,endLineNumber:9,positionColumn:6,positionLineNumber:9,selectionStartColumn:6,selectionStartLineNumber:9,startColumn:6,startLineNumber:9),source:'%0A%23%5Bno_mangle%5D%0Aunsafe+fn+per_pos_add_0(a:%26Vec%3CVec%3Cf64%3E%3E,b:%26mut+Vec%3CVec%3Cf64%3E%3E,size:usize)%7B%0A++++for+i+in+0..size%7B%0A++++++++for+j+in+0..size%7B%0A++++++++++++let+v%3Da.get_unchecked(i).get_unchecked(j)%3B%0A++++++++++++*b.get_unchecked_mut(i).get_unchecked_mut(j)%2B%3Dv%3B%0A++++++++%7D%0A++++%7D%0A%7D%0A%0A%23%5Bno_mangle%5D%0Aunsafe+fn+per_pos_add_1(a:%26%5BVec%3Cf64%3E%5D,b:%26mut+%5BVec%3Cf64%3E%5D,size:usize)%7B%0A++++for+i+in+0..size%7B%0A++++++++for+j+in+0..size%7B%0A++++++++++++let+v%3Da.get_unchecked(i).get_unchecked(j)%3B%0A++++++++++++*b.get_unchecked_mut(i).get_unchecked_mut(j)%2B%3Dv%3B%0A++++++++%7D%0A++++%7D%0A%7D%0A'),l:'5',n:'0',o:'Rust+source+%231',t:'0')),k:45.59356256309758,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:r1780,filters:(b:'0',binary:'1',binaryObject:'1',commentOnly:'0',debugCalls:'1',demangle:'0',directives:'0',execute:'1',intel:'0',libraryCode:'1',trim:'1',verboseDemangling:'0'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:rust,libs:!(),options:'-C+opt-level%3D2',overrides:!(),selection:(endColumn:41,endLineNumber:6,positionColumn:41,positionLineNumber:6,selectionStartColumn:41,selectionStartLineNumber:6,startColumn:41,startLineNumber:6),source:1),l:'5',n:'0',o:'+rustc+1.78.0+(Editor+%231)',t:'0')),header:(),k:54.406437436902436,l:'4',m:100,n:'0',o:'',s:0,t:'0')),l:'2',n:'0',o:'',t:'0')),version:4) .

In my understanding, the function that accepts ```&Vec<Vec>``` should have the same optimization as the function that accepts ```&[Vec]```, because ```&Vec<Vec>``` can be turned into ```&[Vec]``` by simply calling ```as_slice()``` or ```as_mut_slice()```.
However, I found that ```&Vec<Vec>``` may hinder further vectorization in the nested loop, as shown in the above link.

I am wondering whether this is a compiler bug or an intended action?
Repository: next.js
Issue: "Module not found: Can't resolve" when using App router but works without error for Pages Router
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://github.com/mmo80/nextjs-isolated

### To Reproduce

initiate a new next project with App Router with `npx create-next-app@latest`
and another in a separate folder with Pages Router with `npx create-next-app@latest`

then do `pnpm install` and then `pnpm install isolated-vm` on both projects.

In the `App Router` project add a new api route (/api)
route.ts
```
import { NextResponse } from 'next/server';
import { Isolate } from 'isolated-vm';
import type IsolatedVM from 'isolated-vm';

export async function POST() {
  const isolate: IsolatedVM.Isolate = new Isolate({ memoryLimit: 128 });
  return NextResponse.json({ message: `isolated-vm` });
}
```

and in the `Pages Router` project add a new api route (/api)
test.ts
```
import type { NextApiRequest, NextApiResponse } from 'next';
import { Isolate } from 'isolated-vm';
import type IsolatedVM from 'isolated-vm';

type Data = {
  message: string;
};

export default async function handler(req: NextApiRequest, res: NextApiResponse<Data>) {
  const isolate: IsolatedVM.Isolate = new Isolate({ memoryLimit: 128 });
  res.status(200).json({ message: 'John Doe' });
}
```

### Current vs. Expected behavior

On building the **`Pages Router`** project with `pnpm run build` all builds successful and the endpoint `/api/test` responds as expected. (when running `pnpm run dev`)

But when building the **`App Router`** project with `pnpm run build` i get the following error
```
  ▲ Next.js 14.2.3

   Creating an optimized production build ...
Failed to compile.

./node_modules/.pnpm/isolated-vm@4.7.2/node_modules/isolated-vm/isolated-vm.js
Module not found: Can't resolve './out/isolated_vm'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./src/app/api/route.ts


> Build failed because of webpack errors
 ELIFECYCLE  Command failed with exit code 1.
```

and the same error occurs when i call the api endpoint `/api`. (when running `pnpm run dev`)

is there a reason for this? is it as expected or is this a bug of some sorts?

### Provide environment information

```bash
Operating System:
Windows 11

Binaries:
pnpm: 9.1.0
node: v20.13.0

Relevant Packages:
next: 14.2.3
isolated-vm: 4.7.2
```


### Which area(s) are affected? (Select all that apply)

Runtime

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local)

### Additional context

_No response_