fix(asn1): docs.rs read-only generate_schema / generated.rs writes - #49
Merged
Merged
Conversation
Add a failing integration test that runs the keetanetwork-asn1 build under DOCS_RS=1 with a chmod a-w crate source tree, matching the docs.rs sandbox. generate_schema() still writes asn1/iso20022.asn and panics with Permission denied (os error 13), the chmod equivalent of Read-only file system (os error 30). No production fix. Co-authored-by: Tanveer Wahid <sephynox@users.noreply.github.com>
generate_schema() no longer panics when asn1/iso20022.asn is not writable. Rendered schema and other .asn inputs are staged under OUT_DIR for compile. src/generated.rs stays a committed include! stub; build.rs writes the helper generated.rs only under OUT_DIR. Co-authored-by: Tanveer Wahid <sephynox@users.noreply.github.com>
Reword rustdocs on the docs.rs read-only path to STE positive contracts. No behavior change. Co-authored-by: Tanveer Wahid <sephynox@users.noreply.github.com>
sephynox
marked this pull request as ready for review
September 21, 2026 21:38
|
sephynox
added this pull request to stack #51
September 21, 2026 23:07
Srayman
approved these changes
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Makes the red
docsrs_readonlyreproduction on this branch green. No test weakening.keetanetwork-asn1build.rswrites ASN.1 staging and generated Rust underOUT_DIRwhen docs.rs setsDOCS_RSor the crate source is read-only.Pattern: stop rewriting
src/generated.rs. That file is a committedinclude!stub overOUT_DIR. Compile helpergenerated.rsand ASN.1/OID Rust outputs stay underOUT_DIR.asn1/*.asnremain inputs.iso20022.asnis refreshed fromoids.jsonwhen the source tree is writable.Rustdocs on this path are positive STE contracts.
Test
cargo test -p keetanetwork-asn1 --all-features --test docsrs_readonly -- --nocaptureAfter merge
Publish a new
keetanetwork-asn1and trigger docs.rs rebuilds for it and dependents (+rebuildor new versions).Evidence: