Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Probe golden 34_auto_harvest_smoke is stale: CharacterSet.isDisjoint(with: inverted) now prints true on macOS

Đang mở Phù hợp với người mới
#22 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đá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
67/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
swift
Lĩnh vực
testing

Hướng nghiên cứu

Bắt đầu bằng cách đọc Examples/llm_probes/expected/34_auto_harvest_smoke.out cùng với Examples/llm_probes/34_auto_harvest_smoke.swift, sau đó chạy probeMatchesStockSwift("34_auto_harvest_smoke") và so sánh đầu ra trên môi trường macOS mục tiêu. Issue chỉ ra assertion CharacterSet.isDisjoint(with:) khác biệt và script tạo golden, Tools/regen-probe-expectations.sh. Công việc hoàn tất khi kỳ vọng của probe và hành vi của kiểm thử nhất quán với mức hỗ trợ OS dự kiến.

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

Mô tả

probeMatchesStockSwift("34_auto_harvest_smoke") fails on current macOS (Darwin 27, Swift 6.4 / swiftlang-6.4.0.34.1), on untouched main (d298d01):

probe 34_auto_harvest_smoke diverged from stock Swift
normalizedOut == normalizedExpected → false

The only differing line is the 14th, print(allLetters.isDisjoint(with: nonLetters)) where nonLetters = allLetters.inverted:

value
golden Examples/llm_probes/expected/34_auto_harvest_smoke.out false
stock swift Examples/llm_probes/34_auto_harvest_smoke.swift on this machine true
SwiftScript interpreter true

So the interpreter agrees with stock Swift here; it's the checked-in golden that was captured against an older Foundation where CharacterSet.isDisjoint(with:) returned false for a set and its inverse (likely a bitmap-vs-inverted-flag quirk that Apple fixed). The suite is documented as Darwin-only and goldens come from Tools/regen-probe-expectations.sh, which makes it OS-version dependent.

Options:

  • Regenerate the golden on the current OS and accept that CI's macos-15 runner may disagree until it moves to a newer image, or
  • Drop that one line from the probe (the inverse/disjoint pair is the only OS-sensitive assertion in the file), or
  • Make the harness tolerant of a per-OS golden.

Found while moving ShellKit to a version requirement in #21; unrelated to that change.

Ngôn ngữ chính
Swift
Star
75
Fork
6
Merge trung bình
25 phút
Pull request đã merge (30 ngày)
1

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 Cocoanetics/SwiftScript

Tất cả issue của Cocoanetics/SwiftScript

Issue tương tự

Thêm issue về Swift

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.