Importing psychoscript throws RangeError in Safari (WebKit/JavaScriptCore)

Đang mở
#100 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@vibdev đang làm issue này rồi.

Từ ngày 27/11/2026.

  • #108 của @vibdev — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, playwright
Lĩnh vực
testing-qa, web-dev

Hướng nghiên cứu

Start with dist/runtime/limits.js, where the oversized BigInt shift is calculated at module load. Reproduce with await import("psychoscript") in Playwright's WebKit build and compare the boundary expression with Chromium and Node. Done means the package imports without a RangeError in WebKit while retaining the intended runtime limit and existing behavior elsewhere.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Environment
  • psychoscript 0.3.0
  • Fails: WebKit 27.2 (Safari 27.2 engine, via Playwright's WebKit build)
  • Works: Chromium 158, Node 24.22
What happens

Importing psychoscript in Safari (or any JavaScriptCore runtime) throws at module load:

RangeError: Out of memory: BigInt generated from this operation is too big
  at module code@.../psychoscript/dist/runtime/limits.js:15:21

so psychoscript can't be used in Safari at all, including iOS browsers.

Minimal repro

Any page that does:

await import("psychoscript");

The same RangeError comes from this expression in Safari's console:

1n << BigInt(1 << 20)        // RangeError in WebKit 27.2; 1048577 bits in Chromium 158 and Node 24
1n << BigInt((1 << 20) - 1)  // works everywhere (1048576 bits)
Expected

psychoscript imports in Safari as it does in Chrome and Node.

Ngôn ngữ chính
Rust
Star
470
Fork
11
Merge trung bình
4 giờ 10 phút
Pull request đã merge (30 ngày)
89

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của anomalyco/psychoscript

Tất cả issue của anomalyco/psychoscript

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.