sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: storybook
Issue: [Bug]: Cannot read properties of undefined (reading 'navigator') on node with globals
Labels: bug,help wanted,sev:S3,addon: test

### Describe the bug

I have a project containing both server and client code.
So I want to run tests also in `node`.

When I run `vitest`, I get `Cannot read properties of undefined (reading 'navigator')` error:

```sh
TypeError: Cannot read properties of undefined (reading 'navigator')
 ❯ resetClipboardStubOnView node_modules/.pnpm/@storybook+test@8.3.5_storybook@8.3.5/node_modules/@storybook/test/dist/index.mjs:178:7052
 ❯ node_modules/.pnpm/@storybook+test@8.3.5_storybook@8.3.5/node_modules/@storybook/test/dist/index.mjs:178:8238
```

This occurs when I set `test.globals: true` in `vite.config.ts`.

### Reproduction link

https://github.com/cyberuni/sb-test-nav

### Reproduction steps

run `pnpm test`

### System

npx storybook@latest info

Storybook Environment Info:

  System:
    OS: macOS 14.7
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.9.0 - ~/.local/state/fnm_multishells/74613_1728508612022/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v20.12.2/bin/yarn
    npm: 10.8.3 - ~/.local/state/fnm_multishells/74613_1728508612022/bin/npm <----- active
    pnpm: 8.15.6 - ~/.nvm/versions/node/v20.12.2/bin/pnpm
  Browsers:
    Chrome: 129.0.6668.90
    Safari: 18.0
  npmPackages:
    @storybook/addon-essentials: ^8.3.5 => 8.3.5 
    @storybook/addon-interactions: ^8.3.5 => 8.3.5 
    @storybook/addon-links: ^8.3.5 => 8.3.5 
    @storybook/addon-onboarding: ^8.3.5 => 8.3.5 
    @storybook/blocks: ^8.3.5 => 8.3.5 
    @storybook/react: ^8.3.5 => 8.3.5 
    @storybook/react-vite: ^8.3.5 => 8.3.5 
    @storybook/test: ^8.3.5 => 8.3.5 
    eslint-plugin-storybook: ^0.9.0 => 0.9.0 
    storybook: ^8.3.5 => 8.3.5 

### Additional context

The `@storybook/test` is probably doing some work at load time which is not ideal.

It should avoid that or at least check for `window?...`
Repository: pytorch
Issue: Easier way of seeing dynamic shape specializations in C++?
Labels: triaged,enhancement,oncall: pt2,module: dynamic shapes

@Chillee and I were debugging https://github.com/pytorch/pytorch/issues/137560. The problem is that somewhere in C++ we were calling tensor.size() instead of tensor.sym_sizes(), causing the specialization.

TORCH_LOGS=+dynamic told us that a dynamic shape specialization happened at the line `dense_mask[row_indices, valid_indices] = 1`, but we were unable to get anything like a C++ stack trace out of it, so we ended up reading C++ code really hard until we spotted the `tensor.size()` call.

It would be cool if there were an easier way to spot the specialization (perhaps just a mode to error on specialization in C++ so that we can do a backtrace?)

cc @ezyang @chauhang @penguinwu @bobrenjc93
Repository: flutter
Issue: [Impeller] consider allocating textures at step interval sizing and supporting different framebuffer/texture sizes.
Labels: P3,e: impeller,team-engine,triaged-engine

we could change render target allocation so that we always allocate textures a particular sizes (256, 512, n + 256 or some other interval) and then update the render target cache to go off of texture size. Like @chinmaygarde  mentioned a while back, the render pass size doesn't have to match the texture size (the render pass can be smaller).

But have a lot of places that assume render pass size == texture size, so there would be some refactoring.

The goal of this change would be to improve cache efficiency when the saveLayer sizes are unstable, like in the example app in https://github.com/flutter/flutter/issues/148496
Repository: neovim
Issue: vim.on_key() can prevent mapping (fixed: can consume the key and)
Labels: enhancement,input,multicursor,mappings

### Problem

This is about a implementing a compatibility layer to provide `vim`'s `popup` API.

Without the option to consume the keys, `vim.on_key()` is not suitable for implementing a `popup`'s  `filter`.

With `vim.on_key()` there's also
```
{key} is the key after mappings have been applied, and {typed} is the
key(s) before mappings are applied
```
Which also interferes with correct operation of `popup`'s  `filter`, since it may need to see each key as it's entered, not multiple keys.  This is likely related to the following.

There's a `popup` option `mapping` 
```
If the filter consumes all the keys, set the "mapping" property to zero
so that mappings do not get in the way
```
In the `vim` code, in `vgetc()` there's a check for `popup_no_mapping` which is missing in the following `neovim` code
```
  if (mod_mask) {           // no mapping after modifier has been read
    no_mapping++;
```
(But my analysis could be flawed, since `no_mapping` can be set in various ways)

-----

This is related to #30504 and #30542.


### Expected behavior

Some things that comes to mind around `vim.on_key()`. Change the signature to
```
on_key(fn: function?, ns_id: integer? [, {options}]): bool?
```

1. Use the return value to indicate if the key should be discarded and/or has been handled
2. Add `allow_mapping` option to `vim.on_key()`, default `true`
   For when the `mapping` property on the `popup` is active.
3. Add `enable_return_value_controls_discard` option to `vim.on_key()`
   Only needed if there's compatibility concerns around (1)?
   Could also be useful to insure that `on_key` callbacks that do not have this set are invoked first.

There's some weirdness possible since, in `vgetc()`, the mappings are done before the callback is executed. So, depending on implementation, when `allow_mapping` is `false` then other uses of `vim.on_key()` might see different arguments than they would otherwise have seen.
Repository: deno
Issue: Some dependencies not being resolved when using RsBuild
Labels: bundler-resolution

Version: Deno 2.0.0

Hi, Take the following RsBuild + SolidJS repo running under Deno:

https://github.com/sachaw/rsbuild-issue

When running `deno install`, as `"nodeModulesDir": "auto"` is set, it is populated as follows:

![image](https://github.com/user-attachments/assets/d5b71eff-f8a5-4417-9499-d62ed7e16cf5)

As can be seen modules like `date-fns` are populated at the root level, and hence are located and compile fine under RsBuild.

Now take my next dependency: `@dewars/protobufs` which is published to JSR:

It is resolved by my IDE (because of the Deno plugin), but is not populated in my `node_modules` folder, leading RsBuild to fail to resolve it.

Ideally I can eventually ditch the whole `node modules` folder, so I'm hoping the solution isn't to copy all of my native deno deps under `node_modules`
Repository: flutter
Issue: [Impeller] add all commonly supported pixel formats to dart:ui supported pixel formats
Labels: P3,e: impeller,team-engine,triaged-engine

Most of these are not supported by skia, but can be used in impeller for either rendering or for binding in shaders. 

Considerations:

* Document unsupported in Skia backend and throw when attempting to construct
* Document unsuppored readback to compressed formats. Add "original" or similar enum.
* Document which formats are renderable and throw exceptions if they're bound incorrectly.
Repository: flutter
Issue: `Mac_ios microbenchmarks_ios` fails with random seed 225627159
Labels: team-infra,P2,triaged-infra

The test and its recent runs: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20microbenchmarks_ios

Last 3 failed builds:

- https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20microbenchmarks_ios/14122/infra
- https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20microbenchmarks_ios/14124/infra
- https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20microbenchmarks_ios/14123/infra

There is no obvious culprit:

- it happens across multiple physical bots
- the first commit (I can see) where it failed seems unrelated: https://github.com/flutter/flutter/pull/156375
Repository: tauri
Issue: Running "Hello World" example on Ubuntu fails
Labels: type: bug,platform: Linux,status: needs triage

### Describe the bug

```git clone``` of the 2.02 version or Tauri.

```cargo run --release --example helloworld``` required an ENORMOUS 649 crates !!!

```
The following warnings were emitted during compilation:

warning: soup3-sys@0.5.0: 

error: failed to run custom build command for `soup3-sys v0.5.0`
```

### Reproduction

As above.

### Expected behavior

It should compile or have instructions in the README.md.

### Full `tauri info` output

```text
The following warnings were emitted during compilation:

warning: soup3-sys@0.5.0: 

error: failed to run custom build command for `soup3-sys v0.5.0`

Caused by:
  process didn't exit successfully: `/home/resonanz/Github/tauri/target/release/build/soup3-sys-d98c7a7748251da5/build-script-build` (exit status: 1)
```
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: ui
Issue: [bug]: Unable to download accordion with `npx shadcn@latest add accordion`
Labels: bug

### Describe the bug

When I run the command 
```bash
npx shadcn@latest add accordion
```

I got: 
✔ Checking registry.
⠋ Updating tailwind.config.js
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

ENOENT: no such file or directory, open '/Users/repo/tailwind.config.js'
```

I'm using tailwind.config.ts instead of js, but I had no problem downloading other components, just the accordion one. 

### Affected component/components

Accordion

### How to reproduce

1. Have a nextjs repo with `tailwind.config.ts` file
2. run `npx shadcn@latest add accordion`


### Codesandbox/StackBlitz link

_No response_

### Logs

```bash
✔ Checking registry.
⠋ Updating tailwind.config.js
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

ENOENT: no such file or directory, open '/Users/repo/dir/tailwind.config.js'
```


### System Info

```bash
Nextjs 14
"devDependencies": {
    "@babel/core": "^7.24.9",
    "@babel/preset-env": "^7.24.8",
    "@babel/preset-typescript": "^7.24.7",
    "@clerk/testing": "^1.3.5",
    "@jest/globals": "^29.7.0",
    "@playwright/test": "^1.47.2",
    "@tailwindcss/typography": "^0.5.14",
    "@testing-library/jest-dom": "^6.4.6",
    "@testing-library/react": "^16.0.0",
    "@types/jest": "^29.5.12",
    "@types/node": "^20.14.10",
    "@types/node-fetch": "^2.6.11",
    "@types/react": "^18.3.3",
    "@types/react-dom": "^18.3.0",
    "autoprefixer": "^10.4.19",
    "babel-jest": "^29.7.0",
    "dotenv": "^16.4.5",
    "eslint": "^8.57.0",
    "eslint-config-next": "14.2.3",
    "jest": "^29.7.0",
    "jest-environment-jsdom": "^29.7.0",
    "jest-environment-node": "^29.7.0",
    "jest-playwright-preset": "^4.0.0",
    "npm-run-all": "^4.1.5",
    "postcss": "^8.4.39",
    "tailwindcss": "^3.4.5",
    "ts-jest": "^29.2.2",
    "ts-node": "^10.9.2",
    "typescript": "^5.5.3"
  },
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: flutter
Issue: 3.27 Branch Info
Labels: team-release

### 3.27 beta branch info ###

| Repo | Branch | Commit | g3 CL |
| --- | --- | --- | --- |
| flutter/flutter | [flutter-3.27-candidate.0](https://github.com/flutter/flutter/tree/flutter-3.27-candidate.0) | https://github.com/flutter/flutter/commit/c78c166e3ecf963ca29ed503e710fd3c71eda5c9 | [cl/684205393](https://critique.corp.google.com/cl/684205393) |
| flutter/engine | [flutter-3.27-candidate.0](https://github.com/flutter/engine/tree/flutter-3.27-candidate.0) | https://github.com/flutter/engine/commit/3a95d6e1ddbfb1e71e5f5b0240ae884507f14006 | N/A |
| dart-lang/sdk | [3.6.0-334.3.beta](https://github.com/dart-lang/sdk/tree/3.6.0-334.3.beta) | https://github.com/dart-lang/sdk/commit/e7a42fbc90c14c2d2eb1c00d132de202018d3777 | [cl/684002945](https://critique.corp.google.com/cl/684002945) |
| google/skia | as needed | https://github.com/google/skia/commit/1349ddc074ad616c6660eb29f75dafe18f3714c0 | N/A |

CC @christopherfujino @reidbaker @zanderso
Repository: electron
Issue: [Bug]: `process.exit()` should kill utility process immediately
Labels: bug :beetle:,platform/all,status/confirmed,has-repro-gist,component/utilityProcess,32-x-y,33-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

33.0.0-beta.9

### What operating system(s) are you using?

macOS

### Operating System Version

macOS Sonoma 14.7

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

_No response_

### Expected Behavior

If I call `process.exit()` in a utility process, code execution should stop and the process should be killed **synchronously**.

From https://nodejs.org/api/process.html#processexitcode:

> The `process.exit()` method instructs Node.js to terminate the process synchronously with an exit status of `code`.

The TypeScript signature explicitly states that `process.exit()` must **never** return ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/454deafa05c6a42cf7f18cda2074ca04afad4372/types/node/process.d.ts#L884)):

```typescript
interface Process extends EventEmitter {
  exit(code?: number | string | null | undefined): never;
}
```

### Actual Behavior

If I start a utility process with the following JS file, code execution continues after `process.exit()` and the `console.error()` is executed:

```js
// utility.js
process.exit(1)
console.error('Should not be printed') // but will be printed
```

Console output:

```
Should not be printed
```

### Testcase Gist URL

https://gist.github.com/nikwen/90879bd8dd7454f3d3083e1441fe4a58

### Additional Information

### Consistency

* In Node.js worker threads, `process.exit()` causes the process to exit synchronously ([Fiddle](https://gist.github.com/nikwen/68381f48c2fbf03a9759694ca57ad792)).
* In Node.js child processes, `process.exit()` causes the process to exit synchronously ([Fiddle](https://gist.github.com/nikwen/735e85b295fc451967112b838f9073df)).
Repository: ant-design
Issue: 优化：Tabs 的下划线 mount 时不应该有动画效果，应该只需要切换的时候有动画
Labels: Inactive,unconfirmed

### Reproduction link

https://stackblitz.com/edit/react-gs6jhb?file=demo.tsx

### Steps to reproduce

点击按钮

### What is expected?

初始不应该有动画，只有切换的时候才有动画

### What is actually happening?

都会有动画

| Environment | Info |
| --- | --- |
| antd | 5.21.3 |
| React | latest |
| System | mac |
| Browser | chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: [FEA] Add nvsci support in pytorch multiprocessing module for nvidia jetson devices.
Labels: module: cuda,triaged,enhancement,needs design

### 🚀 The feature, motivation and pitch

Pytorch is wildly used not only on servers but also in edge devices, especially devices with nvidia gpus.
NVSCI is a IPC method that for nvidia edge devices that with iGPU, which is Nvidia Drive/Jetson AGX product series. 

NVSCI is available in x86 and aarch64, the intro doc is in https://developer.nvidia.com/blog/sharing-cuda-resources-through-interoperability-with-nvscibuf-and-nvscisync/ 
the manual is in https://developer.nvidia.com/nvsci-l4tpdf and more resources in https://developer.nvidia.com/embedded/jetson-linux-r341

PyTorch implements multiprocessing with CUDA IPC. However, on Jetson, CUDA IPC is not supported. If PyTorch adds the NvSCI support, then the multiprocessing feature can work on Jetson.

### Alternatives

_No response_

### Additional context

the issue is originally from https://forums.developer.nvidia.com/t/operation-not-supported-of-spawn-method-in-pytorch-multiprocessing-on-jetson-xavier-nx/231548/6

cc @ptrblck @msaroufim
Repository: ant-design
Issue: RangePicker 增加对 DateMath 表达式的支持
Labels: Inactive

### What problem does this feature solve?

DateMath 表达式在相对日期/时间方面的表达更为直观，并且输入也相对简洁。

* 场景1：查询最近10分钟的某项操作日志
现有的范围选择器必须不断地手动去变更开始时间和结束时间（虽然结束时间可以设为23:59:59, 但是开始时间每次查询必须手动变更）， 在支持 DateMath 表达式后， RangePicker 只需校验表达式的合法性，具体的时间计算可以交给服务端， 每次查询前就无需再去选择或输入，并且每次查询的时间范围都是正确的；

* 场景2：IoT 数据查询
在IoT应用场景下， 数据量大且变化频率较高， 在查询数据时对时间条件比较敏感， DateMath 可以更为高效的进行时间计算， 某些时序数据库甚至直接支持 DateMath ；

参考 grafana-ui 或 elastic-ui 的时间选择器

### What does the proposed API look like?

增加一个参数，是否启用Datemath 
allowDatemath: boolean

同时，onChange回调的参数类型需要做兼容 
onChange: function(date: moment | string, dateString: string)

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: AOT compile `tensor.size()` gives NotImplementedError: No registered serialization name for <class 'torch.Size'> found. 
Labels: triaged,oncall: pt2,export-triaged,oncall: export,module: aotinductor

### 🐛 Describe the bug

Hi, this happens with aot compile.

repro:
```python
class TestModel(torch.nn.Module):
        def forward(self, x):
            return x.size()

model = TestModel().cuda()
x = torch.rand(2, 6, 6).cuda()

bs = torch.export.dynamic_shapes.Dim("bs", max=128)
ep = torch.export.export(model, (x,), dynamic_shapes={"x": {1: bs}}, strict=False)
aot_model = torch._inductor.aot_compile(ep.module(), (x,))
```

error:
```
/scripts/henrylhtsang/repros/pt.py", line 36, in main
    aot_model = torch._inductor.aot_compile(ep.module(), (x,))
/torch/_inductor/__init__.py", line 170, in aot_compile
    pytree.treespec_dumps(out_spec) if out_spec is not None else ""
/torch/utils/_pytree.py", line 1436, in treespec_dumps
    json_spec = _SUPPORTED_PROTOCOLS[protocol].treespec_to_json(treespec)
/torch/utils/_pytree.py", line 1365, in _treespec_to_json
    raise NotImplementedError(
NotImplementedError: No registered serialization name for <class 'torch.Size'> found. Please update your _register_pytree_node call with a `serialized_type_name` kwarg.
```

### Versions

trunk

cc @ezyang @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4 @desertfire @chenyang78
Repository: next.js
Issue: Could there be a caching issue causing the page to load based on the previous redirection logic when accessing the page?
Labels: create-next-app,bug

### Link to the code that reproduces this issue

https://github.com/minsu0012/test

### To Reproduce

1. Install npx create-next-app@latest. 
2. Install using the app router method.
3. Keep app/layout and delete app/page.
4. Create an app/start folder and virtually create layout.tsx and page.tsx.
5. In next.config.mjs, add redirects with source as `/` and destination as `/start`.
6. When running locally, when you normally enter `/`, you will be moved to `/start`.
7. After changing app/start to app/home, change next.config.mjs destination to /home.
8. When running local, when you enter `/`, you should move to `/home`, but you enter `/start`.

When accessing in a new browser window without local work, it correctly redirects to /home. However, if previously accessed /start, it redirects to /start instead of /home.


### Current vs. Expected behavior


I added code to redirect to `/start` when entering `/`.
When running locally, it normally enters /start.

next.config.mjs 

```
 async redirects() {
    return [
      {
        source: '/',
        destination: '/start',
        permanent: true,
      },
    ];
  },
```

The existing app/start was renamed to app/home, and the redirection part was also modified to point to /home.

```
 async redirects() {
    return [
      {
        source: '/',
        destination: '/home',
        permanent: true,
      },
    ];
  },
```
However, if you run it locally and enter `/`, you will be redirected to the `/start` page.

### Provide environment information

```bash
I installed it in app router tailiwndcss format with `npx create-next-app@latest`.

Packages 


  "dependencies": {
    "react": "^18",
    "react-dom": "^18",
    "next": "14.2.15"
  },
  "devDependencies": {
    "typescript": "^5",
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "postcss": "^8",
    "tailwindcss": "^3.4.1",
    "eslint": "^8",
    "eslint-config-next": "14.2.15"
  }
```

Could this be a routing cache issue? 
How to solve this problem?
Repository: ant-design
Issue: the first parameter of onChange of Date picker miss null type
Labels: Inactive,unconfirmed

### Reproduction link

[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/react-ow5nhn?file=demo.tsx)

### Steps to reproduce

The type definition of `DatePickerProps['onChange']` is currently `onChange?: (date: ValueType, dateString: string | string[]) => void; `, but in fact, when I delete the form element, `date` is `null`. Therefore, the definition should be added with a `null` type, which should be like this, `onChange?: (date: ValueType | null, dateString: string | string[]) => void; `.

### What is expected?

onChange?: (date: ValueType | null, dateString: string | string[]) => void; 

### What is actually happening?

onChange?: (date: ValueType, dateString: string | string[]) => void; 

| Environment | Info |
| --- | --- |
| antd | 5.21.0 |
| React | 18.3.1 |
| System | mac os |
| Browser | chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: transformers
Issue: trainer resume from checkpoint，the learning rate is not the same as retraining,learning rate is discontinuous
Labels: Good First Issue,trainer,bug

### System Info

- Platform: Windows-10
- transformers version: 4.43.4
- Python version: 3.10.11
- PyTorch version (GPU?): 2.3.1+cu121

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

the Trainer does not set a warmup and the lr_scheduler is set to linear, and the training is continued from an interruption to complete all steps, the learning rates will be different from those when training all steps from the beginning. Here are the specific learning rates:

Learning rates for training from the beginning for each step:
- Step 1: "learning_rate": 1e-05,
- Step 2: "learning_rate": 1e-05,
- Step 3: "learning_rate": 9e-06,
- Step 4: "learning_rate": 8.000000000000001e-06,
- Step 5: "learning_rate": 7e-06,
- Step 6: "learning_rate": 6e-06,
- Step 7: "learning_rate": 5e-06,
- Step 8: "learning_rate": 4.000000000000001e-06,
- Step 9: "learning_rate": 3e-06,
- Step 10: "learning_rate": 2.0000.

If training is continued from a checkpoint at step 5, the learning rates for each step are:
- Step 6: "learning_rate": 7e-06,
- Step 7: "learning_rate": 7e-06,
- Step 8: "learning_rate": 6e-06,
- Step 9: "learning_rate": 5e-06,
- Step 10: "learning_rate": 4.000000000000001e-06.

Why are the learning rates for step 6 and step 7 different when training continues from a checkpoint compared to training from the start?


Reproduction steps:
1. Train from the beginning for 10 steps, save a checkpoint for each step, and record the learning rate in each step.
2. Delete the checkpoints for steps 6 through 7 in the folder.
3. Then use `trainer.train(resume_from_checkpoint=True)` to continue training from step 5, and after training is completed, record the learning rate in the new checkpoint.


### Expected behavior

Please explain why the learning rate is not continuous as it is when training from the beginning, for example:
Step 6: "learning_rate": 6e-06,
Step 7: "learning_rate": 5e-06.
........