sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: manualClientBasePath works wrong with pages routing (multi zones issue)
Labels: bug,Pages Router

### Link to the code that reproduces this issue

https://github.com/sedlukha/with-zones-nextjs

### To Reproduce



1. open https://with-zones-nextjs-home.vercel.app/
2. go to news (subproject with pages routing)
3. go to post 


### Current vs. Expected behavior

**Expected behavior** 
news post should navigate to https://with-zones-nextjs-home.vercel.app/news/post/1 

**Current behavior** 
navigates to https://with-zones-nextjs-home.vercel.app/post/1 

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.1.0: Mon Oct  9 21:32:52 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T8122
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 18.20.0
  npm: 10.5.0
  Yarn: 1.22.22
  pnpm: 8.15.5
Relevant Packages:
  next: 14.2.5 // Latest available version is detected (14.2.5).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 4.9.5
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Pages Router

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed)

### Additional context

based on [with-zones](https://github.com/vercel/next.js/tree/canary/examples/with-zones) example

there are 3 app in the repo:
- **home** - app routing with rewrites - [link](https://with-zones-nextjs-home.vercel.app/)
- **blog** - app routing - [link](https://with-zones-nextjs-blog.vercel.app/)
- **news** - pages routing - [link](https://with-zones-nextjs-news.vercel.app/)

`manualClientBasePath` works correctly only for app routing, you can see it by navigating to blog app, but it also should work with pages routing


**relative problems:**
1 - navigation from news page to home page doesn't work
https://with-zones-nextjs-news.vercel.app/news 
2 - post page redwrites wrong url
https://with-zones-nextjs-news.vercel.app/news/post/1 --> https://with-zones-nextjs-news.vercel.app/post/1
Repository: electron
Issue: [Feature Request]: Please Add Korean Translation in Crowdin!
Labels: enhancement :sparkles:

### 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 feature request that matches the one I want to file, without success.

### Problem Description

Korea is a rapidly growing market in the IT and software development industry. Many developers in Korea utilize a wide range of programming languages and frameworks, including Electron, for cross-platform development. However, the absence of Korean language support in Electron limits accessibility for Korean developers, hindering their ability to fully utilize and contribute to the platform. This lack of localization poses a barrier to entry and reduces the potential adoption and community support from a significant user base in Korea.

### Proposed Solution

To address this issue, it is proposed to add Korean language support to Electron's documentation and interface via Crowdin, a popular translation and localization platform. This will involve translating existing documentation, UI elements, and other resources into Korean, making them accessible to Korean-speaking developers. This enhancement will facilitate easier understanding and use of Electron, ultimately leading to greater adoption and contribution from the Korean developer community.



### Alternatives Considered

One alternative considered was to rely on community-driven, unofficial translations. However, this approach may result in inconsistent quality and coverage, and it may not be integrated seamlessly into the main project, leading to fragmentation. Official support through a platform like Crowdin ensures consistency, accuracy, and comprehensive coverage.

### Additional Information

Supporting Korean translations aligns with Electron's mission to be accessible and inclusive to developers worldwide. Given Korea's significant contributions to the global tech industry, incorporating Korean language support can strengthen Electron's position and appeal in this key market. Additionally, this step can serve as a model for adding other languages in the future, further broadening Electron's global reach.
Repository: node
Issue: --env-file does not support inner quotes (does not behave like dotenv)
Labels: confirmed-bug,dotenv

### Version

v20.16.0

### Platform

```text
Darwin <redacted> 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 arm64
```


### Subsystem

_No response_

### What steps will reproduce the bug?

inspired by this comment: https://github.com/nodejs/node/pull/50814#issuecomment-1817949911

1. create an `.env` file:

   ```env
   INNER_QUOTES="1: foo'bar"baz`qux"
   INNER_QUOTES_WITH_NEWLINE="2: foo bar\ni am "on" newline, 'yo'"
   ```

2. test with dotenv:

   ```js
   // envtest-dotenv.js
   require("dotenv").config();
   console.log(process.env.INNER_QUOTES);
   console.log(process.env.INNER_QUOTES_WITH_NEWLINE);
   ```

   `$ node  envtest-dotenv.js`

3. test with `--env-file`

   ```js
   // envtest.js
   console.log(process.envconsole.log(process.env.INNER_QUOTES);
   console.log(process.env.INNER_QUOTES_WITH_NEWLINE);
   ```

   `$ node --env-file=.env envtest.js`

### How often does it reproduce? Is there a required condition?

always

### What is the expected behavior? Why is that the expected behavior?

outputs should be the same.

```console
// dotenv output:

1: foo'bar"baz`qux
2: foo bar
i am "on" newline, 'yo'
```

### What do you see instead?

output are different, node native terminates at the first occurrence of the double quote:

```console
// --env-file output
1: foo'bar
2: foo bar
i am
```

compare that to dotenv:

```console
1: foo'bar"baz`qux
2: foo bar
i am "on" newline, 'yo'
```

### Additional information

- this makes it impossible to have env-variables that contain all three quotes (", ' and `) and newlines.
- There is no alternative to inner quotes, because escaping quotes have been rejected https://github.com/nodejs/node/pull/50814
- It's very problematic in many cases since depending on the quotes you are using, you need to use different outer quotes
- i noticed that because i am writing some tooling that creates those .env files based on some other configuration. I just used double quotes as outer quotes and noticed that it fails when the string contains double quotes
- be aware that dotenv also has a bug, when your string contains an actual newline (not "\n") AND has inner quotes, it will cut the string off at the line break. It works if the string does not contain inner quotes. It also works if you instead use "\n" instead of an actual line break. The output will still be the same and will have a real line break in it (as long as you put outer quotes around the string. without quotes, the \n will be literally in the output as "\n")

And

- since the format is so problematic, maybe its time for a better format?
Repository: ui
Issue: [bug]: Charts Multiple Line ChartTooltip
Labels: bug

### Describe the bug

 Hi, I am trying to use multiple line charts but facing issue while showing single separate tooltip for per line. Even passing `shared ` props:
 
 
![image](https://github.com/user-attachments/assets/47ed7d0f-a3c8-457b-b66f-308f3898d618)


```    <ChartContainer
          config={chartConfig}
          className="relative h-[400px] w-full"
        >
          <LineChart
            accessibilityLayer
            data={chartData}
            margin={{
              right: 20,
              top: 20,
              left: 4,
            }}
          >
            <CartesianGrid stroke="var(--gray-20)" />
            <XAxis
              dataKey="month"
              tickLine={false}
              axisLine={false}
              tickMargin={8}
              tickFormatter={(value) => value.slice(0, 3)}
              className="text-caption-2 border border-cyan-900"
              stroke="var(--gray-60)"
            />

            <YAxis
              tickLine={false}
              axisLine={false}
              tickMargin={8}
              className="text-caption-2 border border-cyan-900"
              stroke="var(--gray-60)"
            />

            <Line
              dataKey="mdp"
              type="linear"
              stroke="var(--color-mdp)"
              strokeWidth={3}
            />
            <Line
              dataKey="dps"
              type="linear"
              stroke="var(--color-dps)"
              strokeWidth={3}
            />
            <Line
              dataKey="das"
              type="linear"
              stroke="var(--color-das)"
              strokeWidth={3}
            />
            <Line
              dataKey="sorter"
              type="linear"
              stroke="var(--color-sorter)"
              strokeWidth={3}
            />
            <Line
              dataKey="pltz"
              type="linear"
              stroke="var(--color-pltz)"
              strokeWidth={3}
            />
            <ChartTooltip
              cursor={false}
              shared={false}
              content={<ChartTooltipContent indicator="dot" hideLabel />}
            />
            <ChartLegend
              iconType="line"
              className="mt-8 p-0"
              content={
                <ChartLegendContent
                  isCircleIcon={false}
                  className="text-body-1"
                />
              }
            />
          </LineChart>
        </ChartContainer>```
        

### Affected component/components

Charts

### How to reproduce

**TASK**: show separate tooltip for per line

### Codesandbox/StackBlitz link

N/A

### Logs

_No response_

### System Info

```bash
not relevant
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: node
Issue: Provide information about sqlite version in node:sqlite
Labels: feature request,stale,sqlite

### What is the problem this feature will solve?

SQLite is constantly improving. Each version adds something new https://www.sqlite.org/chronology.html
Currently it is not clear what version of sqlite baseline you can safely use.

E.g. last version [3.46.0](https://www.sqlite.org/releaselog/3_46_0.html) added `json_pretty` function. Imagine that `node:sqlite` was added couple of years ago, libraries won't be able to tell if they can use it or even any `json_*` function.

### What is the feature you are proposing to solve the problem?

1. 
Add `require('node:sqlite').version` field, so libraries can check version if needed
 `process.versions.sqlite` can be used as suggested in the comments https://github.com/nodejs/node/issues/54135#issuecomment-2260125892
2. Specify sqlite version in documentation with a direct link to sqlite release page
3. Specify in documentation that sqlite version won't decrease in any future release (i.e. `node:sqlite` is backward compatible)

### What alternatives have you considered?

You can get version in runtime
```bash
❯ node --experimental-sqlite
Welcome to Node.js v22.5.1.
> new (require('node:sqlite').DatabaseSync)(':memory:').prepare('select sqlite_version()').get()
{ 'sqlite_version()': '3.46.0' }
```

You can do feature testing for specific functions in runtime
```bash
❯ node --experimental-sqlite
Welcome to Node.js v22.5.1.
> > new (require('node:sqlite').DatabaseSync)(':memory:').prepare('select * from pragma_function_list where name="json_pretty"').get()
{
  name: 'json_pretty',
  builtin: 1,
  type: 's',
  enc: 'utf8',
  narg: 1,
  flags: 2099200
}
```

But libraries should have some better api for this IMO
Repository: next.js
Issue: Bug with metadata alternates when using URL
Labels: bug,Metadata

### Link to the code that reproduces this issue

https://github.com/votemike/alternate-urls

### To Reproduce

- Start the application in development
- Visit the homepage
- Inspect the alternate URLs in the HTML
- Notice the US one does not contain the US suffix

### Current vs. Expected behavior

Expected:
I expect the HTML to contain `<link rel="alternate" hreflang="en-GB" href="https://example.com">` and `<link rel="alternate" hreflang="en-US" href="https://example.com/us">`
Current:
The HTML does not contain the US suffix on the URL

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 21.6.0: Wed Apr 24 06:02:02 PDT 2024; root:xnu-8020.240.18.708.4~1/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 4
Binaries:
  Node: 18.18.0
  npm: 9.8.1
  Yarn: 1.22.10
  pnpm: N/A
Relevant Packages:
  next: 15.0.0-canary.94 // Latest available version is detected (15.0.0-canary.94).
  eslint-config-next: N/A
  react: 19.0.0-rc-3208e73e-20240730
  react-dom: 19.0.0-rc-3208e73e-20240730
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


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

Metadata

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

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

### Additional context

I found this bug in Next 14.1.1
Casting the URL to a string gives me the output I expect. Not sure why the HTML doesn't reflect this.

<img width="522" alt="Screenshot 2024-07-31 at 10 31 34" src="https://github.com/user-attachments/assets/ff48fefb-134e-4678-804d-cd4050ff7462">

<img width="335" alt="Screenshot
 2024-07-31 at 10 30 44" src="https://github.com/user-attachments/assets/eeea0207-e2c3-4af6-83fd-647d6cb20b8b">
Repository: opencv
Issue: ORB produces different result with different values in mask pixels 
Labels: bug,category: features2d

### System Information

OS: Any
Branch: 4.x, 5.x affected too

### Detailed description

I fill ORB features mask with 255 and 1 in ROI. The ORB produce different results for the two cases.

### Steps to reproduce

```
TEST(Features2D_ORB, MaskValue)
{
    Mat gray = imread(cvtest::findDataFile("features2d/tsukuba.png"), IMREAD_GRAYSCALE);
    ASSERT_FALSE(gray.empty());

    cv::Rect roi(gray.cols/4, gray.rows/4, gray.cols/2, gray.rows/2);

    Mat mask255 = Mat::zeros(gray.size(), CV_8UC1);
    mask255(roi).setTo(255);

    Mat mask1 = Mat::zeros(gray.size(), CV_8UC1);
    mask1(roi).setTo(1);

    Ptr<ORB> orb = cv::ORB::create();

    vector<KeyPoint> keypoints_mask255;
    Mat descriptors_mask255;
    orb->detectAndCompute(gray, mask255, keypoints_mask255, descriptors_mask255, false);
    std::cout << "keypoints_mask255.size(): " << keypoints_mask255.size() << std::endl;
    std::cout << "descriptors_mask255.size(): " << descriptors_mask255.size()  << std::endl;


    vector<KeyPoint> keypoints_mask1;
    Mat descriptors_mask1;
    orb->detectAndCompute(gray, mask1, keypoints_mask1, descriptors_mask1, false);
    std::cout << "keypoints_mask1.size(): " << keypoints_mask1.size() << std::endl;
    std::cout << "descriptors_mask1.size(): " << descriptors_mask1.size()  << std::endl;

    Mat diff = descriptors_mask1 != descriptors_mask255;
    ASSERT_EQ(countNonZero(diff), 0) << "descriptors are not identical";
}
```
Log:
```
[ RUN      ] Features2D_ORB.MaskValue
keypoints_mask255.size(): 496
descriptors_mask255.size(): [32 x 496]
keypoints_mask1.size(): 109
descriptors_mask1.size(): [32 x 109]
unknown file: Failure
C++ exception with description "OpenCV(4.10.0-dev) /home/alexander/Projects/OpenCV/opencv-master/modules/core/src/arithm.cpp:1345: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and the same type), nor 'array op scalar', nor 'scalar op array' in function 'compare'
" thrown in the test body.
[  FAILED  ] Features2D_ORB.MaskValue (15 ms)
[----------] 1 test from Features2D_ORB (15 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (15 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Features2D_ORB.MaskValue
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: PowerToys
Issue: 键盘快捷键映射和远程使用问题
Labels: Needs-Triage

### Description of the new feature / enhancement

键盘映射功能：
1、使用sunloginclient、todesk情况下不能使用映射的快捷键，如果把alt和ctrl相互调换在远程中无法进行使用。
2、在设置映射的情况下使用无法使用Apple 妙控键盘的锁屏键映射。

### Scenario when this would be used?

win10、sunloginclient、todesk

### Supporting information

_No response_
Repository: go
Issue: proposal: x/time/rate: allow setting available tokens in Limiter
Labels: Proposal

### Proposal Details

Currently, `golang.org/x/time/rate.Limiter` allows setting limit and burst, but not available buckets.

I am interested in the use case where I use `Limiter` to limit my own calls towards a 3rd party API endpoint. Many APIs, including [the expired RFC draft](https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-ratelimit-headers) return in response to API calls a header which tells how many more requests you can make before hitting a limit, for example, something like `RateLimit-Remaining` header or something like that, [Anthropic](https://docs.anthropic.com/en/api/rate-limits) returns `anthropic-ratelimit-requests-remaining`.

I am proposing that `Limiter` get `SetTokens(float64)` method which would allow updating current's available tokens so that it can be kept in sync with the 3rd party server. There might be reasons why `Limiter` would get out of sync with the server, for example, user is calling some additional requests not through the limiter, or there were requests consumed prior to starting the limiter which the program is unaware of and has to sync the initial state with the server.
Repository: ollama
Issue: Keeps switching between cached and wired memory
Labels: bug

### What is the issue?

I offloaded 47 out of 127 layers of Llama 3.1 405b q2 on an M3 Max with 64GB of RAM.
When I run the inference, the memory usage shows only about 8GB, while the cached memory is 56GB. This state persists most of the time, likely indicating that the CPU is in use and data is streaming directly from the disk.
Occasionally, the cached memory decreases, and the wired memory and memory usage increase, suggesting that the GPU is being utilized. Then, the memory usage drops back down to 8GB with the cached memory size at 56GB, repeating the cycle.
Shouldn't the 47 layers be kept in wired memory at all times instead of cached to avoid the constant switching between cached and wired memory? It takes a while to transfer between cached and wired.

### OS

macOS

### GPU

Apple

### CPU

Apple

### Ollama version

v0.3.0
Repository: godot
Issue: `get_scene_groups` error after failing to load an invalid .glb file as scene
Labels: enhancement,topic:import

### Tested versions

- Reproducible in 4.3.rc1.
- Likely reproducible in earlier 4.3 builds too, since scene groups were implemented.

### System information

Fedora Linux 40 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7600M XT (RADV NAVI33) - AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 Threads)

### Issue description

When first importing a project with an invalid `.glb` file (e.g. compressed with Draco, which we don't support), there's a bunch of errors originating from the gltf module (as expected, though we should streamline this further to avoid spamming), but now there's also an error from PackedScene:

```
ERROR: Condition "packed_scene.is_null()" is true. Returning: HashSet<StringName>()
   at: get_scene_groups (scene/resources/packed_scene.cpp:2171)
```

Full log output:
```
ERROR: GLTF: Can't import file 'compress', required extension 'KHR_draco_mesh_compression' is not supported. Are you missing a GLTFDocumentExtension plugin?
   at: _parse_gltf_extensions (modules/gltf/gltf_document.cpp:7462)
ERROR: Condition "err != OK" is true. Returning: ERR_PARSE_ERROR
   at: _parse_gltf_state (modules/gltf/gltf_document.cpp:7194)
ERROR: Condition "err != OK" is true. Returning: err
   at: _parse (modules/gltf/gltf_document.cpp:6896)
ERROR: Condition "err != OK" is true. Returning: err
   at: append_from_file (modules/gltf/gltf_document.cpp:7427)
ERROR: Error importing 'res://object/compress.glb'.
   at: _reimport_file (editor/editor_file_system.cpp:2588)
ERROR: Failed loading resource: res://object/compress.glb. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:283)
ERROR: Condition "packed_scene.is_null()" is true. Returning: HashSet<StringName>()
   at: get_scene_groups (scene/resources/packed_scene.cpp:2171)
```

### Steps to reproduce

- Unzip MRP
- Delete `.godot` folder
- Open and check errors

### Minimal reproduction project (MRP)

[testreimportbug.zip](https://github.com/user-attachments/files/16441762/testreimportbug.zip)
(MRP from another report, contains a few more things than just what's minimal, but it's small enough.)
Repository: node
Issue: Programmatically expose whether a cli flag takes an argument or not
Labels: feature request

### What is the problem this feature will solve?

I am trying to build a wrapper around the Node.js CLI, and for that I need to know which flags are meant to be passed to Node.js and which one should be passed to the script.

I was hoping that `process.allowedNodeEnvironmentFlags` would help with this, but unfortunately it's not enough. Consider this two commands:
```
node --some-flag --some-other-flag foo bar --baz
```

And assume that `process.allowedNodeEnvironmentFlags` includes `--some-flag` and `--some-other-flag`. What are the arguments being passed to node, and what to the script? which script?

There are two possible answers:
- `--some-other-flag` takes a value, so `--some-flag --some-other-flag foo` are for node, the script is `bar`, and `--baz` is in `process.argv`;
- `--some-other-flag` does not take a value, so `--some-flag --some-other-flag` are for node, the script is `foo`, and `bar --baz` is in `process.argv`.

### What is the feature you are proposing to solve the problem?

Make `process.allowedNodeEnvironmentFlags` a map with boolean values telling whether the flag takes a value or not. The logic to use it would then become:
```js
function splitArgs(allArgs) {
  let nodeArgs = [];
  let scriptName;
  let scriptArgs = [];

  let i = 0;
  while (i < allArgs.length && allArgs[i][0] === "-") {
    nodeArgs.push(allArgs[i]);
    if (process.allowedNodeEnvironmentFlags.get(allArgs[i])) nodeArgs.push(allArgs[++i]);
    i++;
  } 
  scriptName = allArgs[i++];
  while (i < allArgs.length) scriptArgs.push(allArgs[i++]);

  return { nodeArgs, scriptName, scriptArgs };
}
```

For backward compatibility, this map should still have a no-op `.add` method.

### What alternatives have you considered?

I can hard-code the list. However, this means that for every new release I have to check if there is any change in the supported flags, and I have to maintain multiple lists one per version.

The maintenance cost for Node.js is much lower, given that new flags already have to be added to `process.allowedNodeEnvironmentFlags` anyway.