Skip to content

fix: documentation and code quality improvements since 0.1.3 - #312

Merged
hedgar2017 merged 4 commits into
mainfrom
docs/fix-documentation-inconsistencies
Mar 27, 2026
Merged

hedgar2017 merged 4 commits into
mainfrom
docs/fix-documentation-inconsistencies

Conversation

@hedgar2017

@hedgar2017 hedgar2017 commented Mar 26, 2026 •

Copy link
Copy Markdown
Contributor
  • Regenerate all CLI output examples from the current compiler build (v0.1.4, solc 0.8.34, osaka default), fixing stale version strings, a zksolc CBOR hex leftover, and Test→Simple contract name mismatches
  • Fix incorrect commands in sanitizer and LLVM options guides, broken installation link, wrong standard JSON field types/mappings, missing evm.bytecode.linkReferences selector, stale benchmarks nesting and type
  • Add missing --threads CLI section, state osaka as --evm-version default, fix --ir "via-ir only" qualifier, fix grammar and broken #--yul anchor
  • Unify filename sanitization into ContractName::sanitize_path across three code paths
  • Reject BLOBHASH and BLOBBASEFEE in the Yul pipeline (was silently miscompiling via --via-ir), remove dead Verbatim variant, seal the match as exhaustive
  • Gate -O0 behind MIDDLE_END_LEVELS, rename try_from_standard_json to try_from_mode, deduplicate validation across all three I/O paths

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates user/developer documentation to match the post-0.1.3 behavior and outputs (now 0.1.4), and tightens CLI optimization validation to align with existing env-var restrictions.

Changes:

  • Regenerates/refreshes CLI example outputs and fixes multiple doc inaccuracies (commands, defaults, JSON field types/mappings).
  • Documents additional behavior/limitations (threads flag, osaka default, blob* builtins status).
  • Rejects unsupported -O0 via CLI by validating optimization levels against MIDDLE_END_LEVELS.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
solx-core/src/arguments.rs Adds CLI-side validation for optimization levels (disallowing -O0 via MIDDLE_END_LEVELS).
solx-codegen-evm/src/optimizer/settings/mod.rs Minor comment removal within optimizer settings parsing.
docs/src/user-guide/04-limitations.md Clarifies blob opcode limitation semantics (parsed but not lowered).
docs/src/user-guide/03-standard-json.md Fixes standard JSON spec inconsistencies (types/mappings/placeholders) and wording.
docs/src/user-guide/02-command-line-interface.md Refreshes CLI outputs/examples, documents --threads, updates defaults and naming in examples.
docs/src/user-guide/01-installation.md Minor wording/link adjustment around toolchain pinning.
docs/src/internals/04-yul-builtins.md Adds blob-related builtins and clarifies current lowering status.
docs/src/developer-guide/04-sanitizers.md Fixes LLVM build command references/paths.
docs/src/developer-guide/03-llvm-options.md Fixes solx-dev llvm build command usage in docs.
docs/src/developer-guide/02-debugging.md Removes incorrect “via-ir only” qualifier for --ir docs.
CLAUDE.md Fixes cargo test-slang alias expansion to include target dir.

Comment thread solx-core/src/arguments.rs Outdated
Comment thread solx-codegen-evm/src/optimizer/settings/mod.rs
Comment thread solx-core/src/arguments.rs Outdated
@hedgar2017
hedgar2017 force-pushed the docs/fix-documentation-inconsistencies branch 11 times, most recently from b5069b6 to 7a4f5f7 Compare March 27, 2026 05:27
@hedgar2017
hedgar2017 requested a review from Copilot March 27, 2026 05:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

Comment thread solx-yul/src/parser/statement/expression/function_call/mod.rs
Comment thread solx-codegen-evm/src/optimizer/settings/mod.rs
hedgar2017 and others added 3 commits March 27, 2026 13:57
Regenerate all output examples from the current compiler build,
fixing stale version strings (0.1.0/0.1.3 → 0.1.4), a zksolc CBOR
hex leftover, wrong evmVersion default (cancun → osaka), stale solc
0.8.30 metadata, and Test→Simple contract name mismatches throughout.

Fix incorrect commands in sanitizer and LLVM options guides, broken
link in installation docs, wrong field types and comment mappings in
standard JSON spec.

Add missing --threads CLI section, state osaka as --evm-version
default, remove incorrect --ir "via-ir only" qualifier, and fix
CLAUDE.md alias.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deduplicate three separate path-to-filename sanitization rules into a
single `ContractName::sanitize_path` in solx-utils. The unified rule
replaces `\`, `/`, `.`, `:`, and space with underscores, fixing an
inconsistency where IR dump files kept dots (`Simple.sol_Simple.evmla`)
while build artifacts replaced them (`Simple_sol_Simple.bin`).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The `--via-ir` pipeline silently miscompiled contracts using `blobhash`
or `blobbasefee` — the catch-all `_ => Ok(None)` dropped these calls
without generating code or errors. The legacy EVMLA pipeline already
rejected both correctly.

Add explicit error messages matching the legacy pipeline, and replace
the wildcard catch-all with `Name::Verbatim { .. } => Ok(None)` so the
match is exhaustive. Any new `Name` variant will now produce a compile
error until explicitly handled.

Update yul builtins reference and limitations docs to reflect
compile-time rejection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hedgar2017
hedgar2017 force-pushed the docs/fix-documentation-inconsistencies branch from 7a4f5f7 to 48bad4e Compare March 27, 2026 05:57
@hedgar2017
hedgar2017 requested a review from Copilot March 27, 2026 06:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated no new comments.

The help string advertised -O0 but the CLI rejects it. Update to
reflect the current supported values and add a regression test.

Rename `try_from_standard_json` to `try_from_mode` and route all three
I/O paths (CLI, env var, standard JSON) through it, eliminating
duplicate MIDDLE_END_LEVELS validation in arguments.rs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hedgar2017
hedgar2017 force-pushed the docs/fix-documentation-inconsistencies branch from 48bad4e to 100f75f Compare March 27, 2026 06:35
@hedgar2017 hedgar2017 changed the title docs: fix documentation inconsistencies since 0.1.3 release fix: documentation and code quality improvements since 0.1.3 Mar 27, 2026
@hedgar2017
hedgar2017 requested review from a team March 27, 2026 06:40
@hedgar2017 hedgar2017 self-assigned this Mar 27, 2026
@hedgar2017 hedgar2017 added ci:coverage ci:sanitizer Trigger sanitizer workflow on PR ci:integration Trigger integration tests workflow on PR ci:release Trigger dry-run release workflow on PR labels Mar 27, 2026
@hedgar2017

Copy link
Copy Markdown
Contributor Author

To be rebased without squashing.

@github-actions

Copy link
Copy Markdown

Coverage Summary

Crate Line Coverage Function Coverage
solx 🟢 94.7% 🟡 68.0%
solx-benchmark-converter 🔴 0.0% 🔴 0.0%
solx-codegen-evm 🟢 88.4% 🟢 80.7%
solx-compiler-downloader 🔴 0.0% 🔴 0.0%
solx-core 🟢 92.9% 🟢 87.8%
solx-dev 🔴 2.7% 🔴 3.5%
solx-evm-assembly 🟡 74.6% 🟡 67.4%
solx-mlir 🟡 67.2% 🟡 56.9%
solx-slang 🟡 52.0% 🟡 65.5%
solx-solc-test-adapter 🔴 1.7% 🔴 2.1%
solx-standard-json 🟢 94.9% 🟢 92.6%
solx-tester 🔴 36.7% 🔴 34.6%
solx-utils 🟢 90.0% 🟢 83.3%
solx-yul 🟡 78.9% 🟡 71.3%
Total 🟡 56.6% 🟡 50.1%

Codecov Report | HTML Report | Workflow Run

@PavelKopyl PavelKopyl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@nebasuke nebasuke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks really good, one nit.

Comment thread solx-core/src/arguments.rs
@hedgar2017
hedgar2017 merged commit d157e47 into main Mar 27, 2026
137 of 145 checks passed
@hedgar2017
hedgar2017 deleted the docs/fix-documentation-inconsistencies branch March 27, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:integration Trigger integration tests workflow on PR ci:release Trigger dry-run release workflow on PR ci:sanitizer Trigger sanitizer workflow on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants