Conversation
- Filter stdlib symbol.define events to reduce trace noise (122→38 lines) - Add traceEnabled() guards to avoid TraceField construction overhead - Remove meaningless line:1,col:1 from session events - Warn on --trace-out file open failure instead of silent disable - Fix musttail + trace conflict (skip exit trace on tail-call path) - Fix session.start/end mismatch when --trace is passed to subcommands - Add missing #include <vector> in test_trace.cpp - Upgrade timestamp precision from milliseconds to microseconds (ts_us) - Add thread ID (tid) field to trace events for parallelism analysis - Show timed-out it() case name in test timeout message - Add asan-trace CI job for concurrency/network tests with --trace
- Fix potential deadlock in test_trace.cpp by draining stdout/stderr concurrently via poll instead of sequentially - Fix fd leak on pipe()/fork() failure in test helper - Remove unused #include "ry/source_manager.hpp" from trace.cpp - Write CI trace output to temp file and dump only on failure to avoid bloating GitHub Actions logs
- Replace Intrinsic::getDeclaration with getOrInsertDeclaration (LLVM 21) - Fix array-to-bool implicit conversion with explicit ArrayRef - Simplify asan-trace CI to use --trace directly to stderr
In-process JIT execution of parallel-for / async tests hangs under ASan due to thread-sanitizer overhead, causing SIGALRM (exit 142) after 300s. The same concurrency tests are covered by `ry test -p` (subprocess) and the asan-trace CI job.
[codex] add structured trace mode
Resolve DNS once via __ry_resolve() and pass the addrinfo result to both the private-host SSRF check and the connection, closing the window where an attacker-controlled hostname could return different addresses between the two lookups. Also detect IPv4-mapped IPv6 addresses (::ffff:x.x.x.x) in the private-address filter, and add multi-address connect iteration (happy-eyeballs-lite) via __ry_connect_resolved().
print() emitted multiple separate printf calls (value + newline, brackets + elements for composites), causing thread-interleaved output in @parallel for. Introduce a thread-local buffered print runtime: __ry_print_begin() starts accumulating output, __ry_print_printf() appends to the buffer (falling through to vprintf when not buffering), and __ry_print_end() flushes atomically under a mutex. Supports nested print calls via a depth counter.
- Use memcpy instead of pointer cast for IPv4-mapped IPv6 extraction to avoid unaligned access and strict-aliasing UB (Copilot review) - Reduce per-address connect timeout from 5s to 1s to mitigate delays in dual-stack environments with blackholed IPv6 (Copilot review)
- Defer tl_cap update until after realloc succeeds to prevent heap overflow when realloc fails - Add malloc null-check in __ry_print_begin to avoid UB on alloc failure - Move fflush(stdout) inside the mutex for atomic flush semantics - Update doc comment to accurately describe non-buffered fallback path
Replace the `fn` declaration keyword with `function` across parser, stdlib, tests, and docs, and add Option A lambda parsing for `(args) -> type: expr` forms to keep lambda ergonomics while clarifying named function syntax. Made-with: Cursor
…#471) Switch from blacklist (symlinks/hardlinks only) to whitelist approach, allowing only regular files and directories. This rejects device nodes, FIFOs, sockets, and any future unknown entry types by default.
Remove parser-level legacy `fn` migration errors so `fn` can be used as a normal identifier while keeping `function` as the declaration keyword. Made-with: Cursor
fix: eliminate DNS rebinding TOCTOU gap in SSRF protection
fix: buffer print output to prevent interleaving in @parallel for
- Fail closed on unparseable tar listing lines instead of skipping them - Add run_command status check and fs::exists assertion in test helper
…dation-#471 # Conflicts: # CHANGELOG.md
Invert the default signature policy so that self-update fails closed when the signature file is missing, instead of warning and continuing. This prevents an attacker who can tamper with release distribution from replacing both the archive and checksums.txt while suppressing the .sig file. - Replace RY_REQUIRE_SIGNATURE with RY_SKIP_SIGNATURE=1 opt-out - Extract evaluate_signature_policy() for testable policy decisions - Add 6 signature policy tests covering the full truth table - Update help text, docs (en/ja/zh), and CHANGELOG Closes #469
…a-syntax Made-with: Cursor # Conflicts: # tests/test_codegen_stmt.cpp
fix: harden self-update tar validation against special file entries
…invalid Address PR review feedback: the documentation implied RY_SKIP_SIGNATURE=1 bypasses all signature verification, but the implementation only allows proceeding when the signature file is missing. Invalid signatures always abort the update regardless of this setting.
Skip response headers containing CR or LF characters in __ry_http_response_create() to prevent HTTP response splitting attacks, matching the existing client-side request header hardening. Consolidate the shared has_crlf() helper into runtime_http_types.hpp and remove duplicate struct definitions from test file.
feat: rename function keyword and add Option A lambdas
fix: require Ed25519 signature verification by default in self-update
…ution (#458) Introduce /pattern/ regex literal syntax that produces a Regex type, enabling type-based overload resolution to distinguish regex from string arguments. This allows UFCS-compatible text-first function calls like `"hello".match(/[a-z]+/)` and `"a1b2".split(/[0-9]/)`. - Lexer: context-aware `/` disambiguation using prev_kind_ (division vs regex) - AST: RegexExpr node for regex literal expressions - Codegen: RK_Regex resource tracking with separate global cache to avoid collision with string literals of the same content - New unprefixed functions: match, search, replace, split, find_all (text-first arg order, Regex type parameter) - Existing regex_* functions remain for backward compatibility - Extract buildArcGlobal() to eliminate ARC global construction duplication
fix: sanitize HTTP response headers to prevent response splitting
Update regex.ry declarations and spec tests to use 'function' keyword per the fn → function rename on v0.0.6.
…adlock Re-check the completion predicate after reacquiring the lock in waitWithWorkerHelp. Previously, when tryRunOne() returned false, the code fell through to cv.wait() without rechecking pred(). If the task completed and called cv.notify_all() while the lock was released (between unlock and lock), the notification was lost and the caller blocked forever. This race was observable under ASan + trace overhead where the timing window was wide enough for the task to complete during the unlock gap.
- Add FStringEnd to value-producing token list in lexer disambiguation
to prevent f-string followed by `/` being mis-tokenized as regex
- Fix docs to accurately describe the lexer's disambiguation rules
- Fix replace test descriptions ("first match" → "all matches") and
add multi-match assertions to verify semantics match regex_replace
feat: add regex literal syntax (/.../) for type-based overload resolution
…ue:` (#482) - Add `match` as a reserved keyword (TokenKind::Match) in lexer - Split parseWhenStatement() into parseWhenStatement() (conditional only) and new parseMatchStatement() (pattern matching) - Rename AST struct WhenMatchStmt → MatchStmt - Update all codegen error messages from "when:" to "match:" - Rename regex builtin function `match` → `is_match` to avoid keyword conflict - Update formatter to emit `match` instead of `when` for pattern matching - Fix misplaced #include <unordered_set> in parser_decl.cpp - Update all tests (C++ and .test.ry) and English documentation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughRelease prep for v0.0.6: adds ASan build/config, CI/workflow enhancements (CodeQL, ASan, dev/nightly releases, copilot reviewer), checksum signing action and conditional signature upload, extensive docs and localized tutorials/reference updates, new tracing/runtime source files, and version/changelog updates. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Pull request overview
Merges the v0.0.6 release branch into main, bringing substantial language/runtime updates plus expanded documentation and CI/release pipeline improvements.
Changes:
- Updates tutorials/references across EN/JA/ZH for new syntax and APIs (e.g.,
function,when/match,receive, array syntax, relative imports, f-strings). - Adds new reference docs for
thread,path,filesystem, andgc, and updates project tooling docs (ry run, stdin-c, trace mode). - Improves build/CI/release operations (ASan preset + CI job, CodeQL workflow, checksum signing for releases/nightlies).
Reviewed changes
Copilot reviewed 124 out of 360 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/zh/tutorial/02-variables-and-types.md | Updates array syntax; adds f-string + as casting sections (ZH). |
| docs/zh/tutorial/01-getting-started.md | Replaces source-build prerequisites with install instructions and -c stdin usage (ZH). |
| docs/zh/reference/thread.md | Adds ZH thread package reference. |
| docs/zh/reference/structs.md | Updates syntax examples (function, when), and doc tweaks (ZH). |
| docs/zh/reference/project.md | Documents -c, entry-point execution, ry run, and self-update security notes (ZH). |
| docs/zh/reference/path.md | Adds ZH path package reference. |
| docs/zh/reference/packages.md | Adds ZH relative import docs; aligns syntax (function) and exclusion rules. |
| docs/zh/reference/net.md | Renames networking APIs in docs (receive, set_receive_timeout, to_bytes) and ARC notes (ZH). |
| docs/zh/reference/json.md | Renames JSON APIs in docs (kind/get/at/to_*, length/keys) (ZH). |
| docs/zh/reference/io.md | Renames IO APIs in docs (exists, to_bytes) (ZH). |
| docs/zh/reference/gc.md | Adds ZH GC reference. |
| docs/zh/reference/filesystem.md | Adds ZH filesystem reference. |
| docs/zh/reference/directives.md | Updates directive examples to function + lambda syntax (ZH). |
| docs/zh/reference/contracts.md | Updates terminology from struct→record and fn→function (ZH). |
| docs/zh/reference/base64.md | Updates IO conversion naming and function syntax (ZH). |
| docs/zh/README.md | Large ZH doc restructure and new reference links for added packages. |
| docs/tutorial/11-testing.md | Updates navigation + lambda syntax; adds matchers, fail(), and contract-testing section. |
| docs/tutorial/10-contracts.md | Removes old “Design by Contract” tutorial (content moved/restructured elsewhere). |
| docs/tutorial/09-modules.md | Updates tutorial ordering and adds relative-import documentation (EN). |
| docs/tutorial/06-structs.md | Removes old “Structs and Enums” tutorial (replaced by records-focused chapters). |
| docs/tutorial/04-control-flow.md | Introduces when/match expression docs; updates if section (EN). |
| docs/tutorial/03-operators.md | Updates operator semantics docs and adds overflow-safety note (EN). |
| docs/tutorial/02-variables-and-types.md | Updates array syntax; adds f-string + as casting sections (EN). |
| docs/tutorial/01-getting-started.md | Replaces source-build prerequisites with install instructions and -c stdin usage (EN). |
| docs/reference/thread.md | Adds EN thread package reference. |
| docs/reference/testing.md | Updates lambda syntax; adds --outline docs; clarifies mock contract behavior. |
| docs/reference/structs.md | Renames page title to records; updates examples to function + when. |
| docs/reference/project.md | Documents -c, entry-point execution, ry run, and self-update security notes (EN). |
| docs/reference/path.md | Adds EN path package reference. |
| docs/reference/packages.md | Adds EN relative import docs and package resolution rules. |
| docs/reference/net.md | Renames networking APIs in docs (receive, set_receive_timeout, to_bytes) and ARC notes (EN). |
| docs/reference/json.md | Renames JSON APIs in docs (kind/get/at/to_*, length/keys) (EN). |
| docs/reference/io.md | Renames IO APIs in docs (exists, to_bytes) (EN). |
| docs/reference/gc.md | Adds EN GC reference. |
| docs/reference/filesystem.md | Adds EN filesystem reference. |
| docs/reference/errors.md | Updates examples for new syntax (function) and match wording (EN). |
| docs/reference/directives.md | Updates directive examples to function + lambda syntax (EN). |
| docs/reference/contracts.md | Updates terminology from struct→record and fn→function (EN). |
| docs/reference/base64.md | Updates IO conversion naming and function syntax (EN). |
| docs/ja/tutorial/10-contracts.md | Removes old “Design by Contract” tutorial (JA). |
| docs/ja/tutorial/09-modules.md | Updates tutorial ordering and adds relative-import documentation (JA). |
| docs/ja/tutorial/06-structs.md | Removes old “Structs and Enums” tutorial (JA). |
| docs/ja/tutorial/04-control-flow.md | Introduces when/match docs; updates if section (JA). |
| docs/ja/tutorial/03-operators.md | Updates operator semantics docs and adds overflow-safety note (JA). |
| docs/ja/tutorial/02-variables-and-types.md | Updates array syntax; adds f-string + as casting sections (JA). |
| docs/ja/tutorial/01-getting-started.md | Replaces source-build prerequisites with install instructions and -c stdin usage (JA). |
| docs/ja/reference/testing.md | Updates lambda syntax; adds --outline docs (JA). |
| docs/ja/reference/structs.md | Updates syntax examples to function + when; adjusts example formatting (JA). |
| docs/ja/reference/project.md | Documents -c, entry-point execution, ry run, and self-update security notes (JA). |
| docs/ja/reference/path.md | Adds JA path package reference. |
| docs/ja/reference/packages.md | Adds JA relative import docs and package resolution rules. |
| docs/ja/reference/net.md | Renames networking APIs in docs (receive, set_receive_timeout, to_bytes) and ARC notes (JA). |
| docs/ja/reference/json.md | Renames JSON APIs in docs (kind/get/at/to_*, length/keys) (JA). |
| docs/ja/reference/io.md | Renames IO APIs in docs (exists, to_bytes) (JA). |
| docs/ja/reference/gc.md | Adds JA GC reference. |
| docs/ja/reference/filesystem.md | Adds JA filesystem reference. |
| docs/ja/reference/errors.md | Updates examples for new syntax (function) and match wording (JA). |
| docs/ja/reference/directives.md | Updates directive examples to function + lambda syntax (JA). |
| docs/ja/reference/contracts.md | Updates terminology from struct→record and fn→function (JA). |
| docs/ja/reference/base64.md | Updates IO conversion naming and function syntax (JA). |
| docs/ja/README.md | Updates JA tutorial index and reference links for new packages/chapters. |
| docs/README.md | Updates EN docs index for new tutorial structure and new stdlib references. |
| VERSION | Bumps version to 0.0.6. |
| README.zh.md | Updates top-level ZH README examples and CLI docs (function, record, -c, trace, new packages). |
| README.md | Updates top-level EN README examples and CLI docs (function, record, -c, trace, new packages). |
| README.ja.md | Updates top-level JA README examples and CLI docs (function, record, -c, trace, new packages). |
| CMakePresets.json | Adds asan configure/build presets. |
| CMakeLists.txt | Adds ENABLE_ASAN, adds new runtime/codegen sources, adjusts Linux link flags, adds new tests. |
| CLAUDE.md | Documents local ASan workflow and rationale. |
| AGENTS.md | Adds trace guidance; switches changelog process to fragments; adds ASan verification step. |
| .github/workflows/release.yml | Adds checksum signing to release workflow; adjusts assets; tweaks LLVM install steps. |
| .github/workflows/dev-release.yml | Adds scheduled nightly releases, cleanup logic, and checksum signing. |
| .github/workflows/copilot-review.yml | Adds workflow to auto-request Copilot review on PR open. |
| .github/workflows/codeql.yml | Adds CodeQL Advanced workflow for Actions + C/C++. |
| .github/workflows/ci.yml | Adds Ry self-tests to CI and introduces an ASan CI job. |
| .github/actions/sign-checksums/action.yml | Adds composite action to sign checksums.txt and emit checksums.txt.sig. |
| .coderabbit.yaml | Adds CodeRabbit configuration. |
Comments suppressed due to low confidence (1)
docs/reference/project.md:9
- The top-level command summary shows stdin execution without
-c, but the same page now documents stdin execution as requiring-c. Please update the command summary line toecho '<code>' | ry -cso the quick-reference section matches the documented behavior.
echo '<code>' | ry # Run code from stdin
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix `//` operator table: "int for int operands, float if either is float" → "always int" (matches actual behavior) - Fix `**` operator comments: remove "(float)" annotation (returns int for int operands) - Update `recv` → `receive` in docs/README.md network reference table - Add `-c` flag to stdin examples in README.md and docs/reference/project.md - Update here-document example to use `ry -c <<'RY'`
|
レビューで指摘されたドキュメントの不整合は #620 で修正します。このPRはそのままマージします。 |
There was a problem hiding this comment.
Actionable comments posted: 37
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
docs/reference/http.md (1)
1-1: 🧹 Nitpick | 🔵 TrivialLanguage switcher links may be missing.
This file only has
[English](http.md)without links to Japanese or Chinese translations. Other reference files include the full language switcher (e.g.,[English](...) | [日本語](...) | [繁體中文](...)). If translations exist or are planned, consider adding the full switcher for consistency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/reference/http.md` at line 1, The language switcher at the top currently only contains "[English](http.md)"; update it to include the full set of language links (e.g., add "[日本語](...)" and "[繁體中文](...)" alongside the English link) so it matches other reference files; if translations are not yet available, add the full switcher with placeholder or TODO links and ensure the link text and order match the pattern used elsewhere (English | 日本語 | 繁體中文).docs/zh/reference/io.md (1)
1-1:⚠️ Potential issue | 🟡 MinorLanguage switcher label mismatch: "繁體中文" should be "简体中文".
The file is in
docs/zh/and uses Simplified Chinese characters, but the language switcher shows "繁體中文" (Traditional Chinese). This should be "简体中文" (Simplified Chinese) to match the actual content.Suggested fix
-[English](../../reference/io.md) | [日本語](../../ja/reference/io.md) | [繁體中文](io.md) +[English](../../reference/io.md) | [日本語](../../ja/reference/io.md) | [简体中文](io.md)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/zh/reference/io.md` at line 1, The language switcher label currently shows "[繁體中文](io.md)" but the file under docs/zh is Simplified Chinese; update the label text to "[简体中文](io.md)" so the link reads "简体中文" instead of "繁體中文" (locate the language switcher line containing the "[繁體中文](io.md)" string and replace the label only).docs/reference/structs.md (1)
3-7: 🧹 Nitpick | 🔵 TrivialClarify "Record" vs. "Struct" terminology for consistency.
The page title is "Record Reference" but the overview text (line 7) says "Structs are value types allocated on the stack." This creates a terminology inconsistency. Consider one of these approaches:
- Preferred: Update references throughout to use "records" consistently with the title
- Alternative: Change the title to "Struct Reference" to match the content
Since the language keyword is
record(line 16), using "Record Reference" and "records" throughout would be more consistent with the actual language syntax.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/reference/structs.md` around lines 3 - 7, The title and overview use inconsistent terminology ("Record Reference" vs "Structs"); update the doc to use "record" and "records" consistently to match the language keyword `record` (change occurrences of "Structs", "Struct", and "struct" in the overview and any headings to "Records"/"Record"), or alternatively change the page title to "Struct Reference" if you prefer the struct terminology—ensure all references (including the heading text and the sentence "Structs are value types allocated on the stack.") align with the chosen term so that `record` remains the canonical keyword referenced.docs/ja/reference/testing.md (1)
184-193:⚠️ Potential issue | 🟡 MinorAdd language identifiers to newly introduced fenced blocks.
The blocks starting at Line 184 and Line 278 are missing fence languages (MD040), which will keep lint warnings active.
Proposed fix
-``` +```python describe("verify", (): it("counts calls", (): mock(fetch_data, () => "fake") fetch_data() fetch_data() expect(verify(fetch_data)).to_eq(2) ) )@@
-+text
describe mock
it replaces function
it auto-restores after it block
it with arguments
describe verify
it counts calls
it zero callsAlso applies to: 278-286
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/ja/reference/testing.md` around lines 184 - 193, The two fenced code blocks that show the test snippets (the block starting with describe("verify", ... and the block listing "describe mock ... describe verify ...") are missing language identifiers; add appropriate fence languages (e.g., use ```python for the code-like test snippet and ```text for the plain example list) to both occurrences (the verify example and the later block around the second occurrence) so the markdown linter MD040 warnings are resolved.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/actions/sign-checksums/action.yml:
- Around line 18-30: The script uses the unquoted input path ${
inputs.checksums_dir } in the OpenSSL commands causing failures if the directory
contains spaces; update the pkeyutl and base64 invocations to quote the path
(e.g. use "${{ inputs.checksums_dir }}/checksums.txt" and "${{
inputs.checksums_dir }}/checksums.txt.sig") so the variables are treated as
single arguments, and likewise ensure any other uses of inputs.checksums_dir or
similar path variables in this action.yml are wrapped in quotes; keep the rest
of the OPENSSL, KEY_FILE and SIG_RAW usage unchanged.
In @.github/workflows/ci.yml:
- Around line 64-71: Add an inline comment in the CI workflow near the
ASAN_OPTIONS entries for the "Test (C++ / ASan)" and "Test (Ry self-tests /
ASan)" steps explaining why detect_container_overflow=0 and detect_leaks=0 are
disabled (e.g., known false positives with specific STL implementations, and
intentional suppression of LeakSanitizer during these tests or a temporary
workaround), and indicate whether this is temporary or permanent and what
conditions would allow re-enabling them; place the comment directly above or
beside the ASAN_OPTIONS env lines so it's clearly tied to those settings.
In @.github/workflows/codeql.yml:
- Around line 14-21: Normalize the bracket spacing in the GitHub Actions trigger
arrays to be consistent; update the branches arrays under the "push" and
"pull_request" keys (the arrays shown with branches: [ "main" ] and branches: [
"main", "v*.*.*" ]) to a consistent style such as ["main"] and ["main","v*.*.*"]
so YAML lint warnings about bracket spacing are resolved.
- Around line 71-76: The workflow currently forces CodeQL init to use
trap-caching: false which lowers extraction performance to save cache quota;
either enable trap-caching (set trap-caching: true) on the
github/codeql-action/init@v4 step to improve performance if your repo has
sufficient GitHub Actions cache quota, or keep trap-caching: false but add a
comment/documentation in the workflow explaining the cache-quota-driven choice
so future maintainers understand why trap-caching is disabled.
In @.github/workflows/dev-release.yml:
- Around line 195-202: The step "Sign checksums" uses if:
env.RY_SIGNING_PRIVATE_KEY != '' but the env is only defined inside that step so
the condition never becomes true; move the secret to a scope evaluated by the if
(e.g., set RY_SIGNING_PRIVATE_KEY in the job-level env or change the condition
to check the secret directly with if: secrets.RY_SIGNING_PRIVATE_KEY != '') and
keep the step's env assignment (RY_SIGNING_PRIVATE_KEY: ${{
secrets.RY_SIGNING_PRIVATE_KEY }}) so the step can both be conditionally
executed and receive the key.
- Around line 107-114: The "Sign checksums" step's if condition uses
env.RY_SIGNING_PRIVATE_KEY which isn't available at step-evaluation time; change
the condition to reference the secrets context (e.g. use
secrets.RY_SIGNING_PRIVATE_KEY != '') or move RY_SIGNING_PRIVATE_KEY into a
job-level env so the step-level if can see it; update the if on the "Sign
checksums" step (the step with uses: ./.github/actions/sign-checksums and with:
checksums_dir: dist) to use secrets.RY_SIGNING_PRIVATE_KEY instead of
env.RY_SIGNING_PRIVATE_KEY.
In `@AGENTS.md`:
- Around line 237-245: In the ASan section (3.5) the
ASAN_OPTIONS=detect_container_overflow=0 flag is used without explanation;
update AGENTS.md to add a brief comment next to the ASan command that explains
why detect_container_overflow=0 is set (e.g., to suppress known false positives
from certain STL implementations while running tests) and when it is acceptable
to use this flag versus investigating a real container overflow; reference the
exact token ASAN_OPTIONS=detect_container_overflow=0 and ASan in the sentence so
readers can quickly identify the rationale.
In `@CHANGELOG.md`:
- Around line 7-12: The [Unreleased] section in CHANGELOG.md is missing the
required categorized headings; update the [Unreleased] heading to include the
four category blocks "### Added", "### Changed", "### Fixed", and "### Removed"
(under the existing [Unreleased] anchor) and populate each with the appropriate
user-impacting entries (or a brief placeholder like "No user-impacting changes"
if none) so the file complies with the repository guideline about grouping
feat:/fix:/breaking changes into those categories.
- Around line 55-71: The changelog contains contradictory control-flow notes:
one line says `when value:` was renamed to `match value:` while another later
line says `match` was replaced with `when value:`; pick the correct canonical
change for version 0.0.6 and remove the conflicting sentence so both the
specific bullet (the one mentioning `when value:`/`match value:`) and the
summary line under "Control-flow syntax" consistently state the same direction;
update the remaining sentence to use the exact token names (`when value:` or
`match value:`) and ensure no other bullets in the list contradict it.
In `@docs/ja/reference/control-flow.md`:
- Around line 505-508: The ADT match example is using the wrong variant name;
update the match arm that reads "case Shape::Rect(w, h)" to use the declared
enum variant "Shape::Rectangle(w, h)" so the match on shape (variable area =
match shape) is consistent with the enum definition (Shape::Circle,
Shape::Rectangle, Shape::Point).
In `@docs/ja/reference/packages.md`:
- Line 106: The fenced code block in docs/ja/reference/packages.md is missing an
info string causing MD040; update the opening fence to include a language tag
(for example change the fence from ``` to ```text or ```bash as appropriate for
the block's content) so the block has an info string and the markdownlint error
is resolved.
In `@docs/ja/reference/regex.md`:
- Line 1: The language switcher line at the top shows a mismatch: the link
target "../../zh/reference/regex.md" (Simplified Chinese) is labeled "繁體中文"
(Traditional Chinese); update either the label to "简体中文" to match the
"../../zh/..." target or change the target to the Traditional Chinese path
(e.g., "../../zh-Hant/...") so the label and target locale align in the language
switcher line (the first Markdown line containing the three locale links).
- Around line 38-41: The snippet uses is_match but doesn't import it; add a
top-line import "from regex import is_match" before the shown code so the
lexer-disambiguation example is self-contained and can be copy-pasted and
executed; ensure the import appears above the lines containing x = 10 / 2 and y
= is_match("a", /a/).
In `@docs/ja/tutorial/02-variables-and-types.md`:
- Around line 191-194: Two consecutive blockquote blocks cause markdownlint
MD028; merge the two separate blockquotes into a single blockquote (the f-string
explanation and the "よくあるミス" note) so there is no blank line between them,
preserving both sentences and their emphasis; update the block that currently
contains the f-string rationale and the common-mistake note into one continuous
>-prefixed block to fix the lint error.
In `@docs/ja/tutorial/03-operators.md`:
- Line 17: The table entry for the `//` operator is incorrect: update its
description to state that `//` performs integer (floor) division and always
returns an int regardless of operand types; locate the table row containing the
`//` operator and change the second column text from "整数除算(int 同士なら int、片方が
float なら float)" to wording that clearly says it always returns int (e.g.,
"整数除算(常に int を返す)"), ensuring consistency with examples like `7.0 // 2` shown
later.
In `@docs/ja/tutorial/10-concurrency.md`:
- Around line 62-65: Remove the blank line inside the blockquote so the two
quoted paragraphs become a single contiguous blockquote; specifically edit the
block that contains "**なぜ async/await なのか?** 逐次的なコードのように読める..." and the
following "**よくあるミス**: 非 async 関数内で `await` を使うと..." so there is no empty line
between them (this will satisfy MD028).
- Around line 182-201: The import statement is missing symbols used by the TCP
example: add receive, send, close and the TcpListener type to the existing from
net import list so the echo_server function can reference receive(conn, 4096),
send(conn, data), close(conn) and accept's TcpListener parameter without
unresolved names.
In `@docs/ja/tutorial/12-building-a-project.md`:
- Around line 172-181: Update the fenced code block that contains the checklist
(the block starting with ``` and containing "All tasks:" / "Pending tasks:") to
include a language specifier by changing the opening fence from ``` to ```text
so the block becomes ```text ... ``` for consistency with the rest of the
documentation.
- Around line 30-35: Update the fenced code block showing the project directory
structure (the block containing "task-tracker/ package.toml src/ main.ry") to
include a language specifier "text" after the opening backticks so the snippet
renders consistently; locate the code block in the tutorial page and change the
opening "```" to "```text" for that directory listing.
- Around line 87-100: The complete_task function is mutating a local copy of a
task (t) returned by find_task so the original tasks list is unchanged; change
complete_task to produce and return a modified tasks list instead—e.g., locate
the task by id and replace it in the list (use index-based update or map/fold)
so the returned Ok(tasks) contains the task with status set to Status::Done;
update the implementation of complete_task (and keep pending_tasks as-is) to
return the reconstructed List<Task> with the updated Task rather than mutating
the local copy t.
In `@docs/reference/gc.md`:
- Line 1: Replace the lone language link "[English](gc.md)" with the full
language switcher matching other reference files by appending the Japanese and
Chinese links: "[English](gc.md) | [日本語](../ja/reference/gc.md) |
[繁體中文](../zh/reference/gc.md)"; locate the existing line containing
"[English](gc.md)" in docs/reference/gc.md and update it to the three-part
format so it matches the pattern used across other reference pages.
In `@docs/reference/json.md`:
- Around line 86-95: The example imports parse, at, to_int, length, and
json_free but calls to_str() on the results; update the import list to include
to_str so the example uses to_str, e.g. add the to_str symbol to the from json
import ... line that currently contains parse, at, to_int, length, json_free.
In `@docs/reference/project.md`:
- Line 22: The CLI overview example is inconsistent with the updated required -c
flag; update the top example line that currently shows "echo '<code>' | ry" to
include the -c flag (e.g., "echo '<code>' | ry -c") so it matches the documented
`-c` stdin behavior and avoids contradictory usage on the same page; locate the
example text referring to piping code into the CLI and change it to use the `-c`
flag or, alternatively, replace with an equivalent "ry -c '<code>'" example to
keep the page consistent.
In `@docs/reference/types.md`:
- Around line 477-479: The save function currently returns Ok(0 as u8) but its
signature is Result<Unit, Error>; update the return to Ok(Unit) in the save
function to match the declared Result<Unit, Error> type and ensure the Unit
symbol/type is in scope or imported where save is defined so the code compiles.
In `@docs/tutorial/01-getting-started.md`:
- Around line 13-15: The installer URL in the docs uses the floating branch path
"https://raw.githubusercontent.com/t0k0sh1/ry/main/install.sh" which can change
after release; update the command in the Getting Started doc to reference a
specific release tag (for example replace "main" with a pinned tag like
"v0.0.6") or add a clear note that the command installs the latest main and is
not version-pinned, so readers know the implications.
In `@docs/tutorial/03-operators.md`:
- Line 17: The "Type Promotion Rules" text incorrectly states that the floor
division operator '//' always yields int; change the wording in the "Type
Promotion Rules" section to match the table and spec: state that '//' yields int
when both operands are int and yields float when either operand is float, and
update the example (replace "7.0 // 2 -> 3" with a float-result example or note
that "7.0 // 2 -> 3.0") so the prose and the '//' examples (e.g., "7 // 2" and
"7.0 // 2") are consistent.
In `@docs/tutorial/08-error-handling.md`:
- Around line 166-168: Update the fenced output block that currently contains
"Contract violation: require failed in deposit()" by adding a language
identifier (e.g., use ```text or ```console) after the opening backticks so the
snippet is rendered as example output rather than executable code; locate the
fenced block containing the exact string "Contract violation: require failed in
deposit()" and prepend the language token to the opening ``` delimiter.
In `@docs/tutorial/12-building-a-project.md`:
- Around line 30-35: The fenced code block showing the directory tree lacks a
language identifier; update the opening fence from ``` to ```text (or ```bash)
so the block is annotated (e.g., replace the existing triple-backtick fence
before "task-tracker/" with ```text) to ensure the static analyzer accepts it
and renders correctly.
- Around line 172-181: The fenced code block showing the task lists is missing a
language identifier; update the opening fence from ``` to ```text so the program
output sample is marked correctly (e.g., change the block that begins with the
three backticks before "All tasks:" to start with ```text), ensuring the entire
sample remains unchanged other than adding the language tag.
In `@docs/zh/reference/directives.md`:
- Line 261: The fenced code block containing the example with
`@inline`(mode="always") and function hot_path(x: int) -> int lacks a language
identifier and triggers MD040; fix it by adding a language tag (e.g., "python")
to the opening fence so the block starts with ```python, ensuring the snippet
for `@inline`(mode="always") and function hot_path is correctly recognized by
markdownlint.
In `@docs/zh/reference/thread.md`:
- Around line 32-44: Update the example to explicitly handle the Result returned
by thread_join (and not ignore it); replace the bare thread_join(t) call with a
match on thread_join(t) that handles Ok (proceeding) and Err (log or raise the
error) so the example aligns with the documented signature `thread_join:
(thread: Thread) -> Result<Unit, Error>` and demonstrates proper error handling
for the `thread_join` call alongside the existing `thread_spawn`,
`atomic_int_new`, `atomic_int_add`, and `atomic_int_load` usage.
In `@docs/zh/reference/types.md`:
- Around line 477-479: The example for function save has a mismatched return
value: the signature uses Result<Unit, Error> but the implementation returns
Ok(0 as u8); change the return to a Unit value so the types align — replace the
Ok(0 as u8) with Ok(()) in the save function example to return Unit instead of a
u8.
In `@docs/zh/tutorial/01-getting-started.md`:
- Line 14: The install command in the docs uses the main branch URL (curl
.../raw.githubusercontent.com/t0k0sh1/ry/main/install.sh | sh) which can drift;
update the URL to the release-tagged path for the intended release (e.g.,
v0.0.6) so the installation command references the specific tag instead of
`main`, ensuring the tutorial's curl/install.sh invocation consistently installs
the documented release.
In `@docs/zh/tutorial/02-variables-and-types.md`:
- Around line 191-194: Two consecutive blockquotes ("**为什么使用 f-string?** …" and
"**常见错误**:…") are separated by a blank line which triggers markdownlint MD028;
remove the blank line and merge them into a single blockquote so the two
paragraphs are inside one blockquote, or if you prefer the visual separation
keep the blank line and ignore the lint — to fix, delete the empty line between
the two blockquote lines so both paragraphs become one continuous blockquote.
In `@docs/zh/tutorial/03-operators.md`:
- Line 135: The table row for the `|=` operator currently contains an escaped
pipe in the equivalent-expression cell (`x = x \| n`), which breaks Markdown
column alignment; update the cell so the entire expression is enclosed in inline
code backticks without escaping (e.g., use backticks around `x = x | n`) so the
pipe is treated as code and the table remains three columns; locate the row
containing the `|=` symbol and replace the equivalent expression accordingly.
In `@README.ja.md`:
- Line 46: The examples show two lambda styles; make the intent explicit by
adding a short comment or aligning them: either demonstrate both forms
intentionally or make them consistent. Update the snippet with add_offset = (x:
int) -> int => x + offset to include a trailing comment like "# explicit return
type" and the other lambda (e.g., (x: int) => x > 1) with "# inferred return
type", or change one to match the other's style so readers clearly see the
difference between add_offset and the predicate lambda.
In `@README.md`:
- Around line 46-47: The lambda definition for add_offset uses an inconsistent
return-type syntax; update the expression for add_offset (the function named
add_offset) from using `(x: int) -> int => x + offset` to the documented form
`(x: int) => x + offset` so it matches the rest of the examples and tutorials.
---
Outside diff comments:
In `@docs/ja/reference/testing.md`:
- Around line 184-193: The two fenced code blocks that show the test snippets
(the block starting with describe("verify", ... and the block listing "describe
mock ... describe verify ...") are missing language identifiers; add appropriate
fence languages (e.g., use ```python for the code-like test snippet and ```text
for the plain example list) to both occurrences (the verify example and the
later block around the second occurrence) so the markdown linter MD040 warnings
are resolved.
In `@docs/reference/http.md`:
- Line 1: The language switcher at the top currently only contains
"[English](http.md)"; update it to include the full set of language links (e.g.,
add "[日本語](...)" and "[繁體中文](...)" alongside the English link) so it matches
other reference files; if translations are not yet available, add the full
switcher with placeholder or TODO links and ensure the link text and order match
the pattern used elsewhere (English | 日本語 | 繁體中文).
In `@docs/reference/structs.md`:
- Around line 3-7: The title and overview use inconsistent terminology ("Record
Reference" vs "Structs"); update the doc to use "record" and "records"
consistently to match the language keyword `record` (change occurrences of
"Structs", "Struct", and "struct" in the overview and any headings to
"Records"/"Record"), or alternatively change the page title to "Struct
Reference" if you prefer the struct terminology—ensure all references (including
the heading text and the sentence "Structs are value types allocated on the
stack.") align with the chosen term so that `record` remains the canonical
keyword referenced.
In `@docs/zh/reference/io.md`:
- Line 1: The language switcher label currently shows "[繁體中文](io.md)" but the
file under docs/zh is Simplified Chinese; update the label text to
"[简体中文](io.md)" so the link reads "简体中文" instead of "繁體中文" (locate the language
switcher line containing the "[繁體中文](io.md)" string and replace the label only).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ccb8154a-fdc9-4125-8b3a-6dcf17c75b84
⛔ Files ignored due to path filters (6)
docs/reference-en.pdfis excluded by!**/*.pdf,!**/*.pdfdocs/reference-ja.pdfis excluded by!**/*.pdf,!**/*.pdfdocs/reference-zh.pdfis excluded by!**/*.pdf,!**/*.pdfdocs/tutorial-en.pdfis excluded by!**/*.pdf,!**/*.pdfdocs/tutorial-ja.pdfis excluded by!**/*.pdf,!**/*.pdfdocs/tutorial-zh.pdfis excluded by!**/*.pdf,!**/*.pdf
📒 Files selected for processing (294)
.coderabbit.yaml.github/actions/sign-checksums/action.yml.github/workflows/ci.yml.github/workflows/codeql.yml.github/workflows/copilot-review.yml.github/workflows/dev-release.yml.github/workflows/release.yml.gitignoreAGENTS.mdCHANGELOG.mdCLAUDE.mdCMakeLists.txtCMakePresets.jsonREADME.ja.mdREADME.mdREADME.zh.mdVERSIONchangelog.d/.gitkeepdocs/README.mddocs/ja/README.mddocs/ja/reference/base64.mddocs/ja/reference/builtins-string.mddocs/ja/reference/builtins.mddocs/ja/reference/collections.mddocs/ja/reference/contracts.mddocs/ja/reference/control-flow.mddocs/ja/reference/directives.mddocs/ja/reference/errors.mddocs/ja/reference/filesystem.mddocs/ja/reference/functions.mddocs/ja/reference/gc.mddocs/ja/reference/http.mddocs/ja/reference/io.mddocs/ja/reference/json.mddocs/ja/reference/net.mddocs/ja/reference/operators.mddocs/ja/reference/packages.mddocs/ja/reference/path.mddocs/ja/reference/project.mddocs/ja/reference/regex.mddocs/ja/reference/structs.mddocs/ja/reference/testing.mddocs/ja/reference/thread.mddocs/ja/reference/types.mddocs/ja/tutorial/01-getting-started.mddocs/ja/tutorial/02-variables-and-types.mddocs/ja/tutorial/03-operators.mddocs/ja/tutorial/04-control-flow.mddocs/ja/tutorial/05-functions.mddocs/ja/tutorial/06-records.mddocs/ja/tutorial/06-structs.mddocs/ja/tutorial/07-collections.mddocs/ja/tutorial/08-advanced.mddocs/ja/tutorial/08-error-handling.mddocs/ja/tutorial/09-modules.mddocs/ja/tutorial/10-concurrency.mddocs/ja/tutorial/10-contracts.mddocs/ja/tutorial/11-testing.mddocs/ja/tutorial/12-building-a-project.mddocs/reference/base64.mddocs/reference/builtins-string.mddocs/reference/builtins.mddocs/reference/collections.mddocs/reference/contracts.mddocs/reference/control-flow.mddocs/reference/directives.mddocs/reference/errors.mddocs/reference/filesystem.mddocs/reference/functions.mddocs/reference/gc.mddocs/reference/http.mddocs/reference/io.mddocs/reference/json.mddocs/reference/net.mddocs/reference/operators.mddocs/reference/packages.mddocs/reference/path.mddocs/reference/project.mddocs/reference/regex.mddocs/reference/structs.mddocs/reference/testing.mddocs/reference/thread.mddocs/reference/types.mddocs/tutorial/01-getting-started.mddocs/tutorial/02-variables-and-types.mddocs/tutorial/03-operators.mddocs/tutorial/04-control-flow.mddocs/tutorial/05-functions.mddocs/tutorial/06-records.mddocs/tutorial/06-structs.mddocs/tutorial/07-collections.mddocs/tutorial/08-advanced.mddocs/tutorial/08-error-handling.mddocs/tutorial/09-modules.mddocs/tutorial/10-concurrency.mddocs/tutorial/10-contracts.mddocs/tutorial/11-testing.mddocs/tutorial/12-building-a-project.mddocs/zh/README.mddocs/zh/reference/base64.mddocs/zh/reference/builtins-string.mddocs/zh/reference/builtins.mddocs/zh/reference/collections.mddocs/zh/reference/contracts.mddocs/zh/reference/control-flow.mddocs/zh/reference/directives.mddocs/zh/reference/errors.mddocs/zh/reference/filesystem.mddocs/zh/reference/functions.mddocs/zh/reference/gc.mddocs/zh/reference/http.mddocs/zh/reference/io.mddocs/zh/reference/json.mddocs/zh/reference/net.mddocs/zh/reference/operators.mddocs/zh/reference/packages.mddocs/zh/reference/path.mddocs/zh/reference/project.mddocs/zh/reference/regex.mddocs/zh/reference/structs.mddocs/zh/reference/testing.mddocs/zh/reference/thread.mddocs/zh/reference/types.mddocs/zh/tutorial/01-getting-started.mddocs/zh/tutorial/02-variables-and-types.mddocs/zh/tutorial/03-operators.mddocs/zh/tutorial/04-control-flow.mddocs/zh/tutorial/05-functions.mddocs/zh/tutorial/06-records.mddocs/zh/tutorial/06-structs.mddocs/zh/tutorial/07-collections.mddocs/zh/tutorial/08-advanced.mddocs/zh/tutorial/08-error-handling.mddocs/zh/tutorial/09-modules.mddocs/zh/tutorial/10-concurrency.mddocs/zh/tutorial/10-contracts.mddocs/zh/tutorial/11-testing.mddocs/zh/tutorial/12-building-a-project.mdinclude/ry/ast.hppinclude/ry/builtin_stdlib_registry.hppinclude/ry/codegen.hppinclude/ry/formatter.hppinclude/ry/lexer.hppinclude/ry/module_loader.hppinclude/ry/parser.hppinclude/ry/project_config.hppinclude/ry/runtime_arc.hppinclude/ry/runtime_error.hppinclude/ry/runtime_gc.hppinclude/ry/runtime_http.hppinclude/ry/runtime_http_types.hppinclude/ry/runtime_io.hppinclude/ry/runtime_list.hppinclude/ry/runtime_net.hppinclude/ry/runtime_print.hppinclude/ry/runtime_thread.hppinclude/ry/runtime_tls.hppinclude/ry/self_update.hppinclude/ry/sema_return.hppinclude/ry/trace.hpplib/std/base64/base64.rylib/std/builtins.rylib/std/convert.rylib/std/filesystem/filesystem.rylib/std/gc/gc.rylib/std/higher_order.rylib/std/http/http.rylib/std/io/io.rylib/std/json/json.rylib/std/list.rylib/std/manifest.jsonlib/std/map.rylib/std/math/math.rylib/std/net/net.rylib/std/path/path.rylib/std/regex.rylib/std/set.rylib/std/str.rylib/std/thread/thread.ryscripts/assemble-changelog.shsrc/codegen.cppsrc/codegen_any.cppsrc/codegen_arc.cppsrc/codegen_arith.cppsrc/codegen_builtin.cppsrc/codegen_call.cppsrc/codegen_call_collection.cppsrc/codegen_call_dispatch.cppsrc/codegen_call_filesystem.cppsrc/codegen_call_gc.cppsrc/codegen_call_higher_order.cppsrc/codegen_call_io.cppsrc/codegen_call_iterator.cppsrc/codegen_call_json.cppsrc/codegen_call_path.cppsrc/codegen_call_result.cppsrc/codegen_call_set_ops.cppsrc/codegen_call_string.cppsrc/codegen_call_thread.cppsrc/codegen_expr.cppsrc/codegen_expr_cast.cppsrc/codegen_expr_literal.cppsrc/codegen_fn.cppsrc/codegen_lambda.cppsrc/codegen_match.cppsrc/codegen_print.cppsrc/codegen_stmt.cppsrc/codegen_stmt_loop.cppsrc/codegen_test.cppsrc/codegen_type.cppsrc/formatter.cppsrc/formatter_stmt.cppsrc/lexer.cppsrc/main.cppsrc/module_loader.cppsrc/parser.cppsrc/parser_decl.cppsrc/parser_expr.cppsrc/project_config.cppsrc/runtime_any.cppsrc/runtime_base64.cppsrc/runtime_convert.cppsrc/runtime_filesystem.cppsrc/runtime_gc.cppsrc/runtime_http.cppsrc/runtime_http_client.cppsrc/runtime_io.cppsrc/runtime_json.cppsrc/runtime_net.cppsrc/runtime_parallel.cppsrc/runtime_path.cppsrc/runtime_print.cppsrc/runtime_regex.cppsrc/runtime_sort.cppsrc/runtime_thread.cppsrc/runtime_tls.cppsrc/runtime_utf8.cppsrc/self_update.cppsrc/sema_return.cppsrc/test_runtime.cppsrc/trace.cppsrc/type_node.cpptests/spec/any.test.rytests/spec/any_fn_return.test.rytests/spec/arc_resource_alias_free.test.rytests/spec/array.test.rytests/spec/base64.test.rytests/spec/bounds_check.test.rytests/spec/builtins.test.rytests/spec/checked_arith.test.rytests/spec/closure_arc.test.rytests/spec/closure_capture_arc.test.rytests/spec/closure_higher_order.test.rytests/spec/collections.test.rytests/spec/concurrency.test.rytests/spec/constantint_sharing.test.rytests/spec/contracts.test.rytests/spec/control_flow.test.rytests/spec/cow.test.rytests/spec/default_args.test.rytests/spec/env.test.rytests/spec/expr_stmt.test.rytests/spec/filesystem.test.rytests/spec/functions.test.rytests/spec/gc.test.rytests/spec/gc_struct_smoke.test.rytests/spec/generic_bounds.test.rytests/spec/generic_collection_param.test.rytests/spec/generics.test.rytests/spec/http.test.rytests/spec/http_client.test.rytests/spec/implicit_widening.test.rytests/spec/inline.test.rytests/spec/int_overflow.test.rytests/spec/io.test.rytests/spec/iterator.test.rytests/spec/json.test.rytests/spec/leading_dot_float.test.rytests/spec/low_level_types.test.rytests/spec/map_chained_index.test.rytests/spec/matchers.test.rytests/spec/math.test.rytests/spec/mock.test.rytests/spec/mutual_recursion.test.rytests/spec/net.test.rytests/spec/numeric_literal_suffix.test.rytests/spec/numeric_underscore_separator.test.rytests/spec/operator_overload.test.rytests/spec/operator_overload_fn_type.test.rytests/spec/operators.test.rytests/spec/parameterized.test.rytests/spec/path.test.rytests/spec/print_result_option.test.rytests/spec/print_tuple_collection.test.ry
💤 Files with no reviewable changes (6)
- docs/tutorial/10-contracts.md
- docs/ja/tutorial/06-structs.md
- docs/ja/tutorial/10-contracts.md
- docs/tutorial/06-structs.md
- docs/ja/tutorial/08-advanced.md
- docs/tutorial/08-advanced.md
| run: | | ||
| OPENSSL="${{ inputs.openssl_bin }}" | ||
| KEY_FILE="$(mktemp /tmp/signing_key.XXXXXX.pem)" | ||
| SIG_RAW="$(mktemp /tmp/checksums.sig.XXXXXX.raw)" | ||
| trap 'rm -f "$KEY_FILE" "$SIG_RAW"' EXIT | ||
| echo "$RY_SIGNING_PRIVATE_KEY" > "$KEY_FILE" | ||
| chmod 600 "$KEY_FILE" | ||
| "$OPENSSL" pkeyutl -sign \ | ||
| -inkey "$KEY_FILE" \ | ||
| -rawin \ | ||
| -in ${{ inputs.checksums_dir }}/checksums.txt \ | ||
| -out "$SIG_RAW" | ||
| "$OPENSSL" base64 -A -in "$SIG_RAW" -out ${{ inputs.checksums_dir }}/checksums.txt.sig |
There was a problem hiding this comment.
Quote path variables to handle spaces safely.
The checksums_dir input is used unquoted on lines 28 and 30. If the path contains spaces, this will cause the script to fail.
🛡️ Proposed fix to quote path variables
"$OPENSSL" pkeyutl -sign \
-inkey "$KEY_FILE" \
-rawin \
- -in ${{ inputs.checksums_dir }}/checksums.txt \
+ -in "${{ inputs.checksums_dir }}/checksums.txt" \
-out "$SIG_RAW"
- "$OPENSSL" base64 -A -in "$SIG_RAW" -out ${{ inputs.checksums_dir }}/checksums.txt.sig
+ "$OPENSSL" base64 -A -in "$SIG_RAW" -out "${{ inputs.checksums_dir }}/checksums.txt.sig"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/actions/sign-checksums/action.yml around lines 18 - 30, The script
uses the unquoted input path ${ inputs.checksums_dir } in the OpenSSL commands
causing failures if the directory contains spaces; update the pkeyutl and base64
invocations to quote the path (e.g. use "${{ inputs.checksums_dir
}}/checksums.txt" and "${{ inputs.checksums_dir }}/checksums.txt.sig") so the
variables are treated as single arguments, and likewise ensure any other uses of
inputs.checksums_dir or similar path variables in this action.yml are wrapped in
quotes; keep the rest of the OPENSSL, KEY_FILE and SIG_RAW usage unchanged.
| - name: Test (C++ / ASan) | ||
| env: | ||
| ASAN_OPTIONS: detect_container_overflow=0:detect_leaks=0:halt_on_error=1 | ||
| run: ./build-asan/ry_tests | ||
| - name: Test (Ry self-tests / ASan) | ||
| env: | ||
| ASAN_OPTIONS: detect_container_overflow=0:detect_leaks=0:halt_on_error=1 | ||
| run: ./build-asan/ry test -p |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Consider documenting the rationale for disabled ASan options.
The ASan configuration disables detect_container_overflow and detect_leaks:
detect_container_overflow=0- commonly needed to avoid false positives with certain STL implementationsdetect_leaks=0- disables LeakSanitizer
Consider adding a comment explaining why these are disabled, especially for leak detection, to help future maintainers understand if this is a temporary workaround or intentional design choice.
💡 Suggested comment addition
- name: Test (C++ / ASan)
env:
+ # detect_container_overflow=0: avoid STL false positives
+ # detect_leaks=0: leak detection handled separately / known issues being addressed
ASAN_OPTIONS: detect_container_overflow=0:detect_leaks=0:halt_on_error=1
run: ./build-asan/ry_tests📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Test (C++ / ASan) | |
| env: | |
| ASAN_OPTIONS: detect_container_overflow=0:detect_leaks=0:halt_on_error=1 | |
| run: ./build-asan/ry_tests | |
| - name: Test (Ry self-tests / ASan) | |
| env: | |
| ASAN_OPTIONS: detect_container_overflow=0:detect_leaks=0:halt_on_error=1 | |
| run: ./build-asan/ry test -p | |
| - name: Test (C++ / ASan) | |
| env: | |
| # detect_container_overflow=0: avoid STL false positives | |
| # detect_leaks=0: leak detection handled separately / known issues being addressed | |
| ASAN_OPTIONS: detect_container_overflow=0:detect_leaks=0:halt_on_error=1 | |
| run: ./build-asan/ry_tests | |
| - name: Test (Ry self-tests / ASan) | |
| env: | |
| # detect_container_overflow=0: avoid STL false positives | |
| # detect_leaks=0: leak detection handled separately / known issues being addressed | |
| ASAN_OPTIONS: detect_container_overflow=0:detect_leaks=0:halt_on_error=1 | |
| run: ./build-asan/ry test -p |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/ci.yml around lines 64 - 71, Add an inline comment in the
CI workflow near the ASAN_OPTIONS entries for the "Test (C++ / ASan)" and "Test
(Ry self-tests / ASan)" steps explaining why detect_container_overflow=0 and
detect_leaks=0 are disabled (e.g., known false positives with specific STL
implementations, and intentional suppression of LeakSanitizer during these tests
or a temporary workaround), and indicate whether this is temporary or permanent
and what conditions would allow re-enabling them; place the comment directly
above or beside the ASAN_OPTIONS env lines so it's clearly tied to those
settings.
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main", "v*.*.*" ] | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| schedule: | ||
| - cron: '40 14 * * 6' |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Minor YAML style inconsistency with bracket spacing.
The YAMLlint warnings about bracket spacing are minor style issues. Consider normalizing to either ["main"] or [ "main" ] for consistency, though this doesn't affect functionality.
Optional: Normalize bracket style
on:
push:
- branches: [ "main" ]
+ branches: ["main"]
pull_request:
- branches: [ "main", "v*.*.*" ]
+ branches: ["main", "v*.*.*"]
types: [opened, synchronize, reopened, ready_for_review]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main", "v*.*.*" ] | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| schedule: | |
| - cron: '40 14 * * 6' | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main", "v*.*.*"] | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| schedule: | |
| - cron: '40 14 * * 6' |
🧰 Tools
🪛 YAMLlint (1.38.0)
[warning] 14-14: truthy value should be one of [false, true]
(truthy)
[error] 16-16: too many spaces inside brackets
(brackets)
[error] 16-16: too many spaces inside brackets
(brackets)
[error] 18-18: too many spaces inside brackets
(brackets)
[error] 18-18: too many spaces inside brackets
(brackets)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/codeql.yml around lines 14 - 21, Normalize the bracket
spacing in the GitHub Actions trigger arrays to be consistent; update the
branches arrays under the "push" and "pull_request" keys (the arrays shown with
branches: [ "main" ] and branches: [ "main", "v*.*.*" ]) to a consistent style
such as ["main"] and ["main","v*.*.*"] so YAML lint warnings about bracket
spacing are resolved.
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v4 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| build-mode: ${{ matrix.build-mode }} | ||
| trap-caching: false |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
🌐 Web query:
What does trap-caching do in CodeQL GitHub Actions and when should it be disabled?
💡 Result:
Trap-caching in CodeQL GitHub Actions is a caching mechanism that speeds up the extraction phase of CodeQL analysis. During extraction, CodeQL processes source code into a local database format for analysis. Trap-caching caches TRAP (Trap Representation of Abstract Pointers) files generated by supported language extractors. On the default branch, it creates a fresh cache (up to 1GB) and uploads it after analysis. On PR branches, it downloads the cache from the base commit or a recent commit and uses it in read-only mode during extraction. This reduces extraction time, especially beneficial for scheduled analyses on default branches. Disable trap-caching with trap-caching: false in the with: section of the github/codeql-action/init step, e.g.: - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: javascript trap-caching: false Disable when it consumes excessive GitHub Actions cache quota (e.g., monorepos with frequent default branch merges create multiple large caches ~100-300MB each, exhausting limits and evicting other caches). The deprecated CODEQL_ACTION_CLEANUP_TRAP_CACHES=true environment variable no longer reliably works; use the input instead. As of April 2026, TRAP cache cleanup is deprecated and will be removed in May 2026.
Citations:
- 1: https://github.com/github/codeql-action/actions/runs/23854111425
- 2: Automatically clean up old TRAP caches github/codeql-action#2306
- 3: Introduce TRAP caching github/codeql-action#1172
- 4: TRAP caching causes GitHub Actions Cache to churn github/codeql-action#2030
- 5: CODEQL_ACTION_CLEANUP_TRAP_CACHES is not working github/codeql-action#2885
- 6: https://github.com/github/codeql-action/actions/runs/23854111375
Review trap-caching configuration against cache quota constraints.
trap-caching: false sacrifices extraction performance for reduced cache quota consumption. This is a justified trade-off for monorepos with frequent default branch merges that risk exhausting GitHub Actions cache limits. If cache quota is not a concern, enabling trap-caching would improve performance. If this repository frequently encounters cache eviction issues, the current setting is appropriate.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/codeql.yml around lines 71 - 76, The workflow currently
forces CodeQL init to use trap-caching: false which lowers extraction
performance to save cache quota; either enable trap-caching (set trap-caching:
true) on the github/codeql-action/init@v4 step to improve performance if your
repo has sufficient GitHub Actions cache quota, or keep trap-caching: false but
add a comment/documentation in the workflow explaining the cache-quota-driven
choice so future maintainers understand why trap-caching is disabled.
| - name: Sign checksums | ||
| if: env.RY_SIGNING_PRIVATE_KEY != '' | ||
| uses: ./.github/actions/sign-checksums | ||
| with: | ||
| checksums_dir: dist | ||
| openssl_bin: ${{ env.OPENSSL_BIN }} | ||
| env: | ||
| RY_SIGNING_PRIVATE_KEY: ${{ secrets.RY_SIGNING_PRIVATE_KEY }} |
There was a problem hiding this comment.
Signing step condition will never trigger — env context unavailable at if evaluation.
The if: env.RY_SIGNING_PRIVATE_KEY != '' condition references the step's own env block, but if is evaluated before the step runs, so env.RY_SIGNING_PRIVATE_KEY is always empty at that point. The secret is only injected into the step's environment, not the workflow/job level.
Use secrets context directly in the condition.
🔧 Proposed fix
- name: Sign checksums
- if: env.RY_SIGNING_PRIVATE_KEY != ''
+ if: ${{ secrets.RY_SIGNING_PRIVATE_KEY != '' }}
uses: ./.github/actions/sign-checksums
with:
checksums_dir: dist
openssl_bin: ${{ env.OPENSSL_BIN }}
env:
RY_SIGNING_PRIVATE_KEY: ${{ secrets.RY_SIGNING_PRIVATE_KEY }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Sign checksums | |
| if: env.RY_SIGNING_PRIVATE_KEY != '' | |
| uses: ./.github/actions/sign-checksums | |
| with: | |
| checksums_dir: dist | |
| openssl_bin: ${{ env.OPENSSL_BIN }} | |
| env: | |
| RY_SIGNING_PRIVATE_KEY: ${{ secrets.RY_SIGNING_PRIVATE_KEY }} | |
| - name: Sign checksums | |
| if: ${{ secrets.RY_SIGNING_PRIVATE_KEY != '' }} | |
| uses: ./.github/actions/sign-checksums | |
| with: | |
| checksums_dir: dist | |
| openssl_bin: ${{ env.OPENSSL_BIN }} | |
| env: | |
| RY_SIGNING_PRIVATE_KEY: ${{ secrets.RY_SIGNING_PRIVATE_KEY }} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/dev-release.yml around lines 107 - 114, The "Sign
checksums" step's if condition uses env.RY_SIGNING_PRIVATE_KEY which isn't
available at step-evaluation time; change the condition to reference the secrets
context (e.g. use secrets.RY_SIGNING_PRIVATE_KEY != '') or move
RY_SIGNING_PRIVATE_KEY into a job-level env so the step-level if can see it;
update the if on the "Sign checksums" step (the step with uses:
./.github/actions/sign-checksums and with: checksums_dir: dist) to use
secrets.RY_SIGNING_PRIVATE_KEY instead of env.RY_SIGNING_PRIVATE_KEY.
|
|
||
| --- | ||
| ```bash | ||
| curl -fsSL https://raw.githubusercontent.com/t0k0sh1/ry/main/install.sh | sh |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Consider using a versioned install script URL for release stability.
The install script URL points to the main branch. For a release version (v0.0.6), consider using a tagged/versioned URL:
curl -fsSL https://raw.githubusercontent.com/t0k0sh1/ry/v0.0.6/install.sh | shThis ensures consistency between the documentation and the actual release version.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/zh/tutorial/01-getting-started.md` at line 14, The install command in
the docs uses the main branch URL (curl
.../raw.githubusercontent.com/t0k0sh1/ry/main/install.sh | sh) which can drift;
update the URL to the release-tagged path for the intended release (e.g.,
v0.0.6) so the installation command references the specific tag instead of
`main`, ensuring the tutorial's curl/install.sh invocation consistently installs
the documented release.
| > **为什么使用 f-string?** 它们比手动拼接 `"Hello " + name` 更具可读性且更不容易出错。当混合文本和动态值时,请使用 f-string。 | ||
|
|
||
| > **常见错误**:不加 `f` 前缀写 `"Hello {name}"` 会得到字面文本 `{name}`,而非变量的值。 | ||
|
|
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Consider merging blockquotes or removing blank line between them.
The blank line at line 192 between two blockquotes triggers markdownlint MD028. While the separation is visually intentional, you could either:
- Remove the blank line and combine into a single blockquote with both tips, or
- Keep as-is if the visual separation is preferred (this is a minor lint warning).
Option 1: Merge into single blockquote
> **为什么使用 f-string?** 它们比手动拼接 `"Hello " + name` 更具可读性且更不容易出错。当混合文本和动态值时,请使用 f-string。
-
-> **常见错误**:不加 `f` 前缀写 `"Hello {name}"` 会得到字面文本 `{name}`,而非变量的值。
+>
+> **常见错误**:不加 `f` 前缀写 `"Hello {name}"` 会得到字面文本 `{name}`,而非变量的值。📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| > **为什么使用 f-string?** 它们比手动拼接 `"Hello " + name` 更具可读性且更不容易出错。当混合文本和动态值时,请使用 f-string。 | |
| > **常见错误**:不加 `f` 前缀写 `"Hello {name}"` 会得到字面文本 `{name}`,而非变量的值。 | |
| > **为什么使用 f-string?** 它们比手动拼接 `"Hello " + name` 更具可读性且更不容易出错。当混合文本和动态值时,请使用 f-string。 | |
| > | |
| > **常见错误**:不加 `f` 前缀写 `"Hello {name}"` 会得到字面文本 `{name}`,而非变量的值。 |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 192-192: Blank line inside blockquote
(MD028, no-blanks-blockquote)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/zh/tutorial/02-variables-and-types.md` around lines 191 - 194, Two
consecutive blockquotes ("**为什么使用 f-string?** …" and "**常见错误**:…") are separated
by a blank line which triggers markdownlint MD028; remove the blank line and
merge them into a single blockquote so the two paragraphs are inside one
blockquote, or if you prefer the visual separation keep the blank line and
ignore the lint — to fix, delete the empty line between the two blockquote lines
so both paragraphs become one continuous blockquote.
| | `//=` | 整除赋值 | `x = x // n` | | ||
| | `**=` | 幂运算赋值 | `x = x ** n` | | ||
| | `&=` | 位与赋值 | `x = x & n` | | ||
| | `|=` | 位或赋值 | `x = x \| n` | |
There was a problem hiding this comment.
Table cell escaping breaks column alignment.
The escaped pipe \| in the equivalent expression column is interpreted as a column delimiter by Markdown parsers, causing a 4-column row in a 3-column table. Use inline code backticks properly to contain the pipe:
Proposed fix
-| `|=` | 位或赋值 | `x = x \| n` |
+| `\|=` | 位或赋值 | `x = x \| n` |Alternatively, ensure the entire expression is within backticks without escaping:
-| `|=` | 位或赋值 | `x = x \| n` |
+| `\|=` | 位或赋值 | `x = x | n` |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | `|=` | 位或赋值 | `x = x \| n` | | |
| | `\|=` | 位或赋值 | `x = x \| n` | |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 135-135: Table column count
Expected: 3; Actual: 4; Too many cells, extra data will be missing
(MD056, table-column-count)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/zh/tutorial/03-operators.md` at line 135, The table row for the `|=`
operator currently contains an escaped pipe in the equivalent-expression cell
(`x = x \| n`), which breaks Markdown column alignment; update the cell so the
entire expression is enclosed in inline code backticks without escaping (e.g.,
use backticks around `x = x | n`) so the pipe is treated as code and the table
remains three columns; locate the row containing the `|=` symbol and replace the
equivalent expression accordingly.
| # ラムダとクロージャ | ||
| offset = 10 | ||
| add_offset = (x: int): int => x + offset | ||
| add_offset = (x: int) -> int => x + offset |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Clarify lambda syntax consistency.
Line 46 uses (x: int) -> int => x + offset with an explicit return type annotation, while line 72 uses (x: int) => x > 1 without one. Both forms appear to be valid (explicit vs. inferred return type), but it may help readers to add a brief comment or ensure the sample code section demonstrates both forms intentionally.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.ja.md` at line 46, The examples show two lambda styles; make the
intent explicit by adding a short comment or aligning them: either demonstrate
both forms intentionally or make them consistent. Update the snippet with
add_offset = (x: int) -> int => x + offset to include a trailing comment like "#
explicit return type" and the other lambda (e.g., (x: int) => x > 1) with "#
inferred return type", or change one to match the other's style so readers
clearly see the difference between add_offset and the predicate lambda.
| add_offset = (x: int) -> int => x + offset | ||
| print(add_offset(5)) # 15 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for lambda syntax documentation and examples in the codebase
rg -n '=> ' --type=md -g '!CHANGELOG.md' | grep -E '\([^)]*\)\s*(->|=>)' | head -30Repository: t0k0sh1/ry
Length of output: 2516
Fix lambda syntax on line 46 to match documentation standards.
Line 46 uses (x: int) -> int => x + offset with an explicit return type annotation, which is inconsistent with all other examples in the codebase. Every other lambda in the tutorials and reference documentation uses the format (param: type) => expression without the return type prefix.
Update line 46 to add_offset = (x: int) => x + offset to align with the documented lambda syntax.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 46 - 47, The lambda definition for add_offset uses an
inconsistent return-type syntax; update the expression for add_offset (the
function named add_offset) from using `(x: int) -> int => x + offset` to the
documented form `(x: int) => x + offset` so it matches the rest of the examples
and tutorials.
- `//` returns float when either operand is float (not always int) - `**` always returns float (print displays without .0 for integer values)
…ncies docs: fix English docs inconsistencies
- copy: replace stat() + fopen() + chmod() with fd-based open() + fstat() + fchmod() to prevent race between check and use - remove_all: replace lstat() + conditional remove() with unlink() first, falling back to nftw() on EISDIR/EPERM Fixes CodeQL cpp/toctou-race-condition alerts.
- Remove O_NOFOLLOW to allow symlink dereferencing (matches cp(1)) - Add EINTR retry for read() and write() calls - Check fchmod() return value (non-fatal, best-effort) - Disambiguate EPERM with lstat in remove_all to avoid false directory assumption
Open dst without O_TRUNC, compare src/dst inodes via fstat, reject same-file copies (including hard links and symlinks), then ftruncate only after confirming different inodes.
fix: eliminate TOCTOU race conditions in filesystem runtime
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 124 out of 360 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| thread_join(t) | ||
| print(atomic_int_load(counter)) # 1 |
There was a problem hiding this comment.
thread_join is documented as returning Result<Unit, Error>, but the example ignores the return value. This is likely to confuse readers (and may not compile depending on whether unused Result values are allowed). Update the example to handle the Result (e.g., match thread_join(t): ... or use ? in a function returning Result).
| thread_join(t) | |
| print(atomic_int_load(counter)) # 1 | |
| match thread_join(t): | |
| Ok(()): | |
| print(atomic_int_load(counter)) # 1 | |
| Err(e): | |
| print("thread failed:", e) |
| thread_join(t) | ||
| print(atomic_int_load(counter)) # 1 |
There was a problem hiding this comment.
该示例中 thread_join 的签名是 (...) -> Result<Unit, Error>,但示例直接调用并忽略返回值。为避免误导(以及潜在的编译错误),建议在示例里用 match 处理 Ok/Err,或在返回 Result 的函数中使用 ?。
| thread_join(t) | |
| print(atomic_int_load(counter)) # 1 | |
| match thread_join(t): | |
| Ok(_): | |
| print(atomic_int_load(counter)) # 1 | |
| Err(err): | |
| print(err) |
| x -= 3 # x == 12 | ||
| x *= 2 # x == 24 | ||
| x /= 4 # x == 6.0 (becomes float) | ||
| x /= 4 # x == 6 (becomes float) |
There was a problem hiding this comment.
Several examples/comments are internally inconsistent about float results: the table says exponentiation is "always float" but the example result is 1024 (no .0), and multiple comments label values as float while showing integer formatting (e.g., x /= 4 comment says x == 6 while also saying it becomes float). Please align example outputs with the stated numeric behavior (either show ...0 where appropriate, or clarify that printing a float may render without a trailing .0).
| print(1 + 2) # 3 (int) | ||
| print(1 + 2.0) # 3.0 (float) | ||
| print(1.0 + 2) # 3.0 (float) | ||
| print(1 + 2.0) # 3 (float) |
There was a problem hiding this comment.
Several examples/comments are internally inconsistent about float results: the table says exponentiation is "always float" but the example result is 1024 (no .0), and multiple comments label values as float while showing integer formatting (e.g., x /= 4 comment says x == 6 while also saying it becomes float). Please align example outputs with the stated numeric behavior (either show ...0 where appropriate, or clarify that printing a float may render without a trailing .0).
|
|
||
| # / always produces float | ||
| print(4 / 2) # 2.0 (float) | ||
| print(4 / 2) # 2 (float) |
There was a problem hiding this comment.
Several examples/comments are internally inconsistent about float results: the table says exponentiation is "always float" but the example result is 1024 (no .0), and multiple comments label values as float while showing integer formatting (e.g., x /= 4 comment says x == 6 while also saying it becomes float). Please align example outputs with the stated numeric behavior (either show ...0 where appropriate, or clarify that printing a float may render without a trailing .0).
| print(0) | ||
| else: | ||
| print(-1) | ||
| print(0) |
There was a problem hiding this comment.
This if/else example currently prints 0 for both x == 0 and x < 0, which is confusing given the surrounding explanation of branching and the earlier 3-way example. Consider changing the example so the else branch represents the "non-positive" case clearly (or keep a 3-way example using when: and make this one explicitly a 2-branch example with matching output semantics).
| print(0) | |
| print("non-positive") |
| - name: Sign checksums | ||
| if: env.SKIP != 'true' && env.RY_SIGNING_PRIVATE_KEY != '' | ||
| uses: ./.github/actions/sign-checksums | ||
| with: | ||
| checksums_dir: artifacts | ||
| env: | ||
| RY_SIGNING_PRIVATE_KEY: ${{ secrets.RY_SIGNING_PRIVATE_KEY }} |
There was a problem hiding this comment.
The signing action defaults openssl_bin to openssl. On macOS runners, openssl may be LibreSSL, which may not support the required pkeyutl -rawin behavior. To avoid release failures when signing is enabled, pass an OpenSSL 3.x binary explicitly (like the dev-release workflow does via openssl_bin).
Summary
Merge the
v0.0.6release branch intomain.Highlights (389 commits)
New Features:
and_thenandmapmethod chaining forResulttype (feat: add and_then/map method chain for Result type #597)weakreference type (feat: introduceweakreference type for ARC #416)threadpackage: native OS thread API (ネイティブスレッド API の導入(Thread, Lock, Semaphore 等) #363)pathstandard library package (feat:pathパッケージの追加 — ファイルパス操作 #185)filesystemstandard library package (feat:filesystemパッケージの追加 — ファイルシステム操作 #184)/pattern/) (Simplify regex function names with Regex literal syntax (/.../) #458)matchexpression syntax with=>arms (Add match expression with=>syntax for single-expression arms #499)print()multi-argument support,body_bytes()for HTTP (enhancement: HTTP バイナリボディを Ry レベルで扱えるようにする #284)--trace/--trace-outCLI modery runcommand for project scripts (feat:package.tomlに[scripts]セクションを追加しry runで実行できるようにする #384)Breaking Changes:
when value:→match value:(proposal: rename pattern matching syntax fromwhen value:tomatch value:#482)fn→function(params) => expr(Refactor lambda syntax:=>for single-expression,:for block #498)to_int(str)returnsResult<int, Error>(enhancement:to_int()silently returns 0 for invalid input instead of returning Result or error #543)intoverflow raises runtime error (enhancement:intarithmetic overflow wraps silently without error #544)Bug Fixes:
Documentation:
Test plan
./build/ry_tests— 1315 C++ tests passed./build/ry test -p— 76 Ry test files, 0 failuresSummary by CodeRabbit
New Features
Documentation
Breaking Changes
Style