[{"id":"7264712351","type":"IssueCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":674376414,"name":"HKalbasi/zngur","url":"https://api.github.com/repos/HKalbasi/zngur"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/67","repository_url":"https://api.github.com/repos/HKalbasi/zngur","labels_url":"https://api.github.com/repos/HKalbasi/zngur/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/HKalbasi/zngur/issues/67/comments","events_url":"https://api.github.com/repos/HKalbasi/zngur/issues/67/events","html_url":"https://github.com/HKalbasi/zngur/pull/67","id":3597445641,"node_id":"PR_kwDOKDIq3s6x_BC6","number":67,"title":"Split infrastructure types into zngur.h","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":7,"created_at":"2025-11-06T20:10:33Z","updated_at":"2026-03-10T18:42:47Z","closed_at":null,"assignee":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/HKalbasi/zngur/pulls/67","html_url":"https://github.com/HKalbasi/zngur/pull/67","diff_url":"https://github.com/HKalbasi/zngur/pull/67.diff","patch_url":"https://github.com/HKalbasi/zngur/pull/67.patch","merged_at":null},"body":"Working towards https://github.com/HKalbasi/zngur/issues/48, this PR splits zngur infrastructure types (`rust::Unit`, `rust::Ref`, `rust::RefMut`, and others) into a new `zngur.h` that is `#include`d by `generated.h`.\r\n\r\nThis obviously comes with some infrastructure changes. Now, clients must be concerned with include paths - notice the changes to the example `Makefile`s to now add `-I.` to their C++ compiler invocations. We also now have a `-o path/to/output/dir` argument to zngur.\r\n\r\nI think this is a reasonable milestone to get some feedback on the overall design. Please let me know what you think! If we do merge this, I think it should be a breaking change. We could make the default argument to `-o` be the CWD to approximate backwards compatibility, but I think that runs the risk of confusing users. \r\n\r\n","reactions":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/67/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/HKalbasi/zngur/issues/67/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/comments/4033649397","html_url":"https://github.com/HKalbasi/zngur/pull/67#issuecomment-4033649397","issue_url":"https://api.github.com/repos/HKalbasi/zngur/issues/67","id":4033649397,"node_id":"IC_kwDOKDIq3s7wbJr1","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-03-10T18:42:47Z","updated_at":"2026-03-10T18:42:47Z","body":"@adsnaider please do! Thank you. Happy to review any changes.","pin":null,"reactions":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/comments/4033649397/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2026-03-10T18:42:47Z"},{"id":"7231008574","type":"IssueCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":674376414,"name":"HKalbasi/zngur","url":"https://api.github.com/repos/HKalbasi/zngur"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/100","repository_url":"https://api.github.com/repos/HKalbasi/zngur","labels_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/comments","events_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/events","html_url":"https://github.com/HKalbasi/zngur/issues/100","id":4018176993,"node_id":"I_kwDOKDIq3s7vgIPh","number":100,"title":"sailfish Template breaks the generator with Bazel","user":{"login":"adsnaider","id":11418516,"node_id":"MDQ6VXNlcjExNDE4NTE2","avatar_url":"https://avatars.githubusercontent.com/u/11418516?v=4","gravatar_id":"","url":"https://api.github.com/users/adsnaider","html_url":"https://github.com/adsnaider","followers_url":"https://api.github.com/users/adsnaider/followers","following_url":"https://api.github.com/users/adsnaider/following{/other_user}","gists_url":"https://api.github.com/users/adsnaider/gists{/gist_id}","starred_url":"https://api.github.com/users/adsnaider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsnaider/subscriptions","organizations_url":"https://api.github.com/users/adsnaider/orgs","repos_url":"https://api.github.com/users/adsnaider/repos","events_url":"https://api.github.com/users/adsnaider/events{/privacy}","received_events_url":"https://api.github.com/users/adsnaider/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":9,"created_at":"2026-03-03T18:39:17Z","updated_at":"2026-03-09T22:13:02Z","closed_at":null,"assignee":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"@HKalbasi and @nickpdemarco, I believe https://github.com/HKalbasi/zngur/pull/61 unfortunately broke our tooling. We use bazel for our build system and when I use this generator, it emits files at build time which breaks Bazel's hermeticity. It uses a read-only file system at build time and the `#[derive(Template)]` seems to generate some files at compile time.\n\nThese are the errors I'm seeing\n\n```\nerror: proc-macro derive panicked\n  --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:45:10\n   |\n45 | #[derive(Template)]\n   |          ^^^^^^^^\n   |\n   = help: message: called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: \"Read-only file system\" }\n\nerror: proc-macro derive panicked\n  --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:97:10\n   |\n97 | #[derive(Template)]\n   |          ^^^^^^^^\n   |\n   = help: message: called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: \"Read-only file system\" }\n\nerror[E0599]: no method named `render` found for struct `CppHeaderTemplate<'a>` in the current scope\n   --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/cpp.rs:371:32\n    |\n371 |         state.text += template.render().unwrap().as_str();\n    |                                ^^^^^^ method not found in `CppHeaderTemplate<'_>`\n    |\n   ::: external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:47:1\n    |\n 47 | pub(crate) struct CppHeaderTemplate<'a> {\n    | --------------------------------------- method `render` not found for this struct\n    |\n    = help: items from traits can only be used if the trait is implemented and in scope\n    = note: the following traits define an item `render`, perhaps you need to implement one of them:\n            candidate #1: `Render`\n            candidate #2: `Template`\n\nerror[E0599]: no method named `render` found for struct `CppSourceTemplate<'a>` in the current scope\n   --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/cpp.rs:382:32\n    |\n382 |         state.text += template.render().unwrap().as_str();\n    |                                ^^^^^^ method not found in `CppSourceTemplate<'_>`\n    |\n   ::: external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:99:1\n    |\n 99 | pub(crate) struct CppSourceTemplate<'a> {\n    | --------------------------------------- method `render` not found for this struct\n    |\n    = help: items from traits can only be used if the trait is implemented and in scope\n    = note: the following traits define an item `render`, perhaps you need to implement one of them:\n            candidate #1: `Render`\n            candidate #2: `Template`\n\nerror: aborting due to 4 previous errors\n```","reactions":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},"comment":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/comments/4027233077","html_url":"https://github.com/HKalbasi/zngur/issues/100#issuecomment-4027233077","issue_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100","id":4027233077,"node_id":"IC_kwDOKDIq3s7wCrM1","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-03-09T22:10:40Z","updated_at":"2026-03-09T22:13:02Z","body":"I suppose I was picturing something that tests zngur’s hermiticity specifically, which might be achievable without setting up a whole bazel toolchain.\n\nEdit: then again, maybe the simplest solution is to draft a rules_zngur and use that as a test.","pin":null,"reactions":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/comments/4027233077/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2026-03-09T22:10:40Z"},{"id":"7194110169","type":"IssueCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":674376414,"name":"HKalbasi/zngur","url":"https://api.github.com/repos/HKalbasi/zngur"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/100","repository_url":"https://api.github.com/repos/HKalbasi/zngur","labels_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/comments","events_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/events","html_url":"https://github.com/HKalbasi/zngur/issues/100","id":4018176993,"node_id":"I_kwDOKDIq3s7vgIPh","number":100,"title":"sailfish Template breaks the generator with Bazel","user":{"login":"adsnaider","id":11418516,"node_id":"MDQ6VXNlcjExNDE4NTE2","avatar_url":"https://avatars.githubusercontent.com/u/11418516?v=4","gravatar_id":"","url":"https://api.github.com/users/adsnaider","html_url":"https://github.com/adsnaider","followers_url":"https://api.github.com/users/adsnaider/followers","following_url":"https://api.github.com/users/adsnaider/following{/other_user}","gists_url":"https://api.github.com/users/adsnaider/gists{/gist_id}","starred_url":"https://api.github.com/users/adsnaider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsnaider/subscriptions","organizations_url":"https://api.github.com/users/adsnaider/orgs","repos_url":"https://api.github.com/users/adsnaider/repos","events_url":"https://api.github.com/users/adsnaider/events{/privacy}","received_events_url":"https://api.github.com/users/adsnaider/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":9,"created_at":"2026-03-03T18:39:17Z","updated_at":"2026-03-09T22:13:02Z","closed_at":null,"assignee":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"@HKalbasi and @nickpdemarco, I believe https://github.com/HKalbasi/zngur/pull/61 unfortunately broke our tooling. We use bazel for our build system and when I use this generator, it emits files at build time which breaks Bazel's hermeticity. It uses a read-only file system at build time and the `#[derive(Template)]` seems to generate some files at compile time.\n\nThese are the errors I'm seeing\n\n```\nerror: proc-macro derive panicked\n  --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:45:10\n   |\n45 | #[derive(Template)]\n   |          ^^^^^^^^\n   |\n   = help: message: called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: \"Read-only file system\" }\n\nerror: proc-macro derive panicked\n  --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:97:10\n   |\n97 | #[derive(Template)]\n   |          ^^^^^^^^\n   |\n   = help: message: called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: \"Read-only file system\" }\n\nerror[E0599]: no method named `render` found for struct `CppHeaderTemplate<'a>` in the current scope\n   --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/cpp.rs:371:32\n    |\n371 |         state.text += template.render().unwrap().as_str();\n    |                                ^^^^^^ method not found in `CppHeaderTemplate<'_>`\n    |\n   ::: external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:47:1\n    |\n 47 | pub(crate) struct CppHeaderTemplate<'a> {\n    | --------------------------------------- method `render` not found for this struct\n    |\n    = help: items from traits can only be used if the trait is implemented and in scope\n    = note: the following traits define an item `render`, perhaps you need to implement one of them:\n            candidate #1: `Render`\n            candidate #2: `Template`\n\nerror[E0599]: no method named `render` found for struct `CppSourceTemplate<'a>` in the current scope\n   --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/cpp.rs:382:32\n    |\n382 |         state.text += template.render().unwrap().as_str();\n    |                                ^^^^^^ method not found in `CppSourceTemplate<'_>`\n    |\n   ::: external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:99:1\n    |\n 99 | pub(crate) struct CppSourceTemplate<'a> {\n    | --------------------------------------- method `render` not found for this struct\n    |\n    = help: items from traits can only be used if the trait is implemented and in scope\n    = note: the following traits define an item `render`, perhaps you need to implement one of them:\n            candidate #1: `Render`\n            candidate #2: `Template`\n\nerror: aborting due to 4 previous errors\n```","reactions":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},"comment":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/comments/4020136098","html_url":"https://github.com/HKalbasi/zngur/issues/100#issuecomment-4020136098","issue_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100","id":4020136098,"node_id":"IC_kwDOKDIq3s7vnmii","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-03-08T22:17:03Z","updated_at":"2026-03-08T22:17:03Z","body":"I can try something this week - @adsnaider would you be able to write a test that demonstrates the breakage so I can be sure my fix works?","pin":null,"reactions":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/comments/4020136098/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2026-03-08T22:17:03Z"},{"id":"7179974344","type":"IssueCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":674376414,"name":"HKalbasi/zngur","url":"https://api.github.com/repos/HKalbasi/zngur"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/100","repository_url":"https://api.github.com/repos/HKalbasi/zngur","labels_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/comments","events_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/events","html_url":"https://github.com/HKalbasi/zngur/issues/100","id":4018176993,"node_id":"I_kwDOKDIq3s7vgIPh","number":100,"title":"sailfish Template breaks the generator with Bazel","user":{"login":"adsnaider","id":11418516,"node_id":"MDQ6VXNlcjExNDE4NTE2","avatar_url":"https://avatars.githubusercontent.com/u/11418516?v=4","gravatar_id":"","url":"https://api.github.com/users/adsnaider","html_url":"https://github.com/adsnaider","followers_url":"https://api.github.com/users/adsnaider/followers","following_url":"https://api.github.com/users/adsnaider/following{/other_user}","gists_url":"https://api.github.com/users/adsnaider/gists{/gist_id}","starred_url":"https://api.github.com/users/adsnaider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsnaider/subscriptions","organizations_url":"https://api.github.com/users/adsnaider/orgs","repos_url":"https://api.github.com/users/adsnaider/repos","events_url":"https://api.github.com/users/adsnaider/events{/privacy}","received_events_url":"https://api.github.com/users/adsnaider/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":9,"created_at":"2026-03-03T18:39:17Z","updated_at":"2026-03-09T22:13:02Z","closed_at":null,"assignee":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"@HKalbasi and @nickpdemarco, I believe https://github.com/HKalbasi/zngur/pull/61 unfortunately broke our tooling. We use bazel for our build system and when I use this generator, it emits files at build time which breaks Bazel's hermeticity. It uses a read-only file system at build time and the `#[derive(Template)]` seems to generate some files at compile time.\n\nThese are the errors I'm seeing\n\n```\nerror: proc-macro derive panicked\n  --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:45:10\n   |\n45 | #[derive(Template)]\n   |          ^^^^^^^^\n   |\n   = help: message: called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: \"Read-only file system\" }\n\nerror: proc-macro derive panicked\n  --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:97:10\n   |\n97 | #[derive(Template)]\n   |          ^^^^^^^^\n   |\n   = help: message: called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: \"Read-only file system\" }\n\nerror[E0599]: no method named `render` found for struct `CppHeaderTemplate<'a>` in the current scope\n   --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/cpp.rs:371:32\n    |\n371 |         state.text += template.render().unwrap().as_str();\n    |                                ^^^^^^ method not found in `CppHeaderTemplate<'_>`\n    |\n   ::: external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:47:1\n    |\n 47 | pub(crate) struct CppHeaderTemplate<'a> {\n    | --------------------------------------- method `render` not found for this struct\n    |\n    = help: items from traits can only be used if the trait is implemented and in scope\n    = note: the following traits define an item `render`, perhaps you need to implement one of them:\n            candidate #1: `Render`\n            candidate #2: `Template`\n\nerror[E0599]: no method named `render` found for struct `CppSourceTemplate<'a>` in the current scope\n   --> external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/cpp.rs:382:32\n    |\n382 |         state.text += template.render().unwrap().as_str();\n    |                                ^^^^^^ method not found in `CppSourceTemplate<'_>`\n    |\n   ::: external/rules_rust++crate+crates_std__zngur-generator-0.8.0/src/template.rs:99:1\n    |\n 99 | pub(crate) struct CppSourceTemplate<'a> {\n    | --------------------------------------- method `render` not found for this struct\n    |\n    = help: items from traits can only be used if the trait is implemented and in scope\n    = note: the following traits define an item `render`, perhaps you need to implement one of them:\n            candidate #1: `Render`\n            candidate #2: `Template`\n\nerror: aborting due to 4 previous errors\n```","reactions":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},"comment":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/comments/4017357668","html_url":"https://github.com/HKalbasi/zngur/issues/100#issuecomment-4017357668","issue_url":"https://api.github.com/repos/HKalbasi/zngur/issues/100","id":4017357668,"node_id":"IC_kwDOKDIq3s7vdANk","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-03-07T21:02:43Z","updated_at":"2026-03-07T21:02:43Z","body":"We also might consider https://github.com/nickpdemarco/gyb-rust - it’s a bit more appropriate than sailfish for our purposes, and the template syntax is very readable. Disclaimer, I made it and it’s a very new OSS project.","pin":null,"reactions":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/comments/4017357668/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2026-03-07T21:02:43Z"},{"id":"6919651625","type":"IssuesEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":674376414,"name":"HKalbasi/zngur","url":"https://api.github.com/repos/HKalbasi/zngur"},"payload":{"action":"opened","issue":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/97","repository_url":"https://api.github.com/repos/HKalbasi/zngur","labels_url":"https://api.github.com/repos/HKalbasi/zngur/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/HKalbasi/zngur/issues/97/comments","events_url":"https://api.github.com/repos/HKalbasi/zngur/issues/97/events","html_url":"https://github.com/HKalbasi/zngur/issues/97","id":3997178057,"node_id":"I_kwDOKDIq3s7uQBjJ","number":97,"title":"Can we cut v0.8?","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-02-26T18:44:50Z","updated_at":"2026-02-26T22:44:45Z","closed_at":"2026-02-26T22:44:45Z","assignee":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"I'd like to make use of https://github.com/HKalbasi/zngur/pull/96\n\nThanks!","reactions":{"url":"https://api.github.com/repos/HKalbasi/zngur/issues/97/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/HKalbasi/zngur/issues/97/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null}},"public":true,"created_at":"2026-02-26T18:44:51Z"},{"id":"8395143181","type":"PushEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"repository_id":399925664,"push_id":30690219807,"ref":"refs/heads/npd/swift-check","head":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","before":"b6c38375799932880f5ea0bd57a565fac419ade6"},"public":true,"created_at":"2026-02-12T19:26:17Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"8394976919","type":"PushEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"repository_id":399925664,"push_id":30690064302,"ref":"refs/heads/npd/swift-check","head":"b6c38375799932880f5ea0bd57a565fac419ade6","before":"9ffb8862fd2ef87b37b216cbb85f5cba923b70ba"},"public":true,"created_at":"2026-02-12T19:20:29Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6536051860","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792985842,"node_id":"PRR_kwDOF9ZhoM7iFF7y","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"9ffb8862fd2ef87b37b216cbb85f5cba923b70ba","submitted_at":"2026-02-12T18:45:33Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792985842","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792985842"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T18:45:33Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T18:45:34Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6536051326","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800508725","pull_request_review_id":3792985842,"id":2800508725,"node_id":"PRRC_kwDOF9ZhoM6m7F81","diff_hunk":"@@ -522,15 +544,15 @@ contracts are upheld. [^compile_time_checks]\n compile time, such as Dafny and Lean 4, but we do not think they are\n practical tools for programming at scale.\n \n-```swift\n+```swift,ignore\n struct MyArray<T> {\n-  ...\n+  /* ... */\n \n   // Returns the `i`th element.\n   @requires(i >= 0 && i < self.count)\n-  fun getNth(i: Integer): T\n+  fun getNth(i: Integer) -> T","path":"better-code/src/chapter-2-contracts.md","commit_id":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","original_commit_id":"9ffb8862fd2ef87b37b216cbb85f5cba923b70ba","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"Wait, @dabrahams is this swift or hylo? I'm seeing `fun` and `: T` which makes me unsure.","created_at":"2026-02-12T18:45:33Z","updated_at":"2026-02-12T18:45:33Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800508725","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800508725"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800508725"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800508725/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"original_position":136,"position":136,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T18:45:33Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6534113661","type":"IssueCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/stlab/better-code/issues/42","repository_url":"https://api.github.com/repos/stlab/better-code","labels_url":"https://api.github.com/repos/stlab/better-code/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/stlab/better-code/issues/42/comments","events_url":"https://api.github.com/repos/stlab/better-code/issues/42/events","html_url":"https://github.com/stlab/better-code/pull/42","id":3893310411,"node_id":"PR_kwDOF9ZhoM7BTKuM","number":42,"title":"Build and check Swift snippets","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":4,"created_at":"2026-02-03T21:25:25Z","updated_at":"2026-02-12T19:26:18Z","closed_at":null,"assignee":null,"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","html_url":"https://github.com/stlab/better-code/pull/42","diff_url":"https://github.com/stlab/better-code/pull/42.diff","patch_url":"https://github.com/stlab/better-code/pull/42.patch","merged_at":null},"body":"This PR adds support for checking Swift examples, copying the Rust-mdbook experience as much as possible: lines beginning with `#` will be omitted from the book output, but are used to compile the examples. Additionally, as a preprocessor step, all `{ ... }` blocks are replaced with `{ fatalError() }`.\r\n\r\n```swift\r\n# let a = [1, 2, 3]\r\n# let x = 1\r\nvar i = 0\r\nwhile (i != a.count && a[i] != x) {\r\n  i += 1\r\n}\r\n```\r\n\r\nA block marked with `swift,ignore` will not be built. \r\n\r\nThe examples can be checked with `mdbook build`. Several examples were slightly changed to pass the check. Without the two `#` lines above, the following error is emitted.\r\n\r\n```\r\n$ mdbook build better-code \r\n2026-02-03 16:23:39 [INFO] (mdbook::book): Book building has started\r\n2026-02-03 16:23:39 [INFO] (mdbook::book): Running the html backend\r\n2026-02-03 16:23:40 [INFO] (mdbook::book): Running the swift-test backend\r\n2026-02-03 16:23:40 [INFO] (mdbook::renderer): Invoking the \"swift-test\" renderer\r\n============================================================\r\nSwift Code Example Testing\r\n============================================================\r\n\r\nResults: 19 passed, 1 failed, 20 total\r\n\r\n------------------------------------------------------------\r\nFAILURES:\r\n------------------------------------------------------------\r\n\r\nFAIL: chapter-2-contracts.md:238\r\n/var/folders/zm/ll4504dd6dgbvy20y9ls2_hr0000gq/T/tmpwu0wf27f.swift:2:13: error: cannot find 'a' in scope\r\n1 | var i = 0\r\n2 | while (i != a.count && a[i] != x) {\r\n  |             `- error: cannot find 'a' in scope\r\n3 |   i += 1\r\n4 | }\r\n\r\n/var/folders/zm/ll4504dd6dgbvy20y9ls2_hr0000gq/T/tmpwu0wf27f.swift:2:24: error: cannot find 'a' in scope\r\n1 | var i = 0\r\n2 | while (i != a.count && a[i] != x) {\r\n  |                        `- error: cannot find 'a' in scope\r\n3 |   i += 1\r\n4 | }\r\n\r\n/var/folders/zm/ll4504dd6dgbvy20y9ls2_hr0000gq/T/tmpwu0wf27f.swift:2:32: error: cannot find 'x' in scope\r\n1 | var i = 0\r\n2 | while (i != a.count && a[i] != x) {\r\n  |                                `- error: cannot find 'x' in scope\r\n3 |   i += 1\r\n4 | }\r\n\r\n============================================================\r\n2026-02-03 16:23:44 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.\r\n2026-02-03 16:23:44 [ERROR] (mdbook::utils): Error: Rendering failed\r\n2026-02-03 16:23:44 [ERROR] (mdbook::utils):    Caused By: The \"swift-test\" renderer failed\r\n```","reactions":{"url":"https://api.github.com/repos/stlab/better-code/issues/42/reactions","total_count":2,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":2,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/stlab/better-code/issues/42/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/stlab/better-code/issues/comments/3892353787","html_url":"https://github.com/stlab/better-code/pull/42#issuecomment-3892353787","issue_url":"https://api.github.com/repos/stlab/better-code/issues/42","id":3892353787,"node_id":"IC_kwDOF9ZhoM7oAJr7","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-02-12T17:34:51Z","updated_at":"2026-02-12T17:34:51Z","body":"Thanks for your feedback @dabrahams. I've resolved or addressed the issues you've expressed so far.","pin":null,"reactions":{"url":"https://api.github.com/repos/stlab/better-code/issues/comments/3892353787/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2026-02-12T17:34:51Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6534066315","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792532983,"node_id":"PRR_kwDOF9ZhoM7iDXX3","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:33:12Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792532983","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792532983"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:33:12Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:33:14Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6534065557","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800176553","pull_request_review_id":3792532983,"id":2800176553,"node_id":"PRRC_kwDOF9ZhoM6m502p","diff_hunk":"@@ -0,0 +1,156 @@\n+#!/usr/bin/env python3\n+\"\"\"\n+mdbook backend that verifies Swift code examples compile.\n+\n+Configuration (book.toml):\n+    [output.swift-test]\n+    command = \"python3 scripts/mdbook-swift-test.py\"\n+\n+Attributes:\n+    ```swift,ignore    - skip compilation\n+\n+Hidden lines:\n+    # import Foundation    - compiled but hidden from readers\n+    #                      - becomes empty line\n+    \\\\#available(...)      - shown as #available(...), compiled\n+\n+Placeholder bodies:\n+    { ... }  ->  { fatalError() }\n+\"\"\"\n+\n+import json\n+import os\n+import re\n+import subprocess\n+import sys\n+import tempfile\n+from dataclasses import dataclass\n+from itertools import chain\n+from typing import Iterator\n+\n+\n+@dataclass(frozen=True)\n+class CodeBlock:\n+    \"\"\"A Swift code block extracted from markdown.\"\"\"\n+    content: str\n+    start_line: int  # 1-indexed line number in source file\n+    path: str\n+    ignore: bool = False\n+\n+\n+@dataclass(frozen=True)\n+class TestResult:","path":"scripts/mdbook-swift-test.py","commit_id":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","original_commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"I disagree. Propagating exceptions would make it difficult to collect the test failures and present all of them at once. A propagated-exception model would encourage the caller to bail on the first test failure, but it's useful to users to see all of their failures in one place (so they don't have to needlessly rebuild). To support something like that with an exception propagation model, we'd need a cumbersome try/catch/append at the call site.","created_at":"2026-02-12T17:33:12Z","updated_at":"2026-02-12T17:33:13Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800176553","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800176553"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800176553"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800176553/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":2796154201,"original_position":42,"position":54,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T17:33:12Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6534026251","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792523948,"node_id":"PRR_kwDOF9ZhoM7iDVKs","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:31:43Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792523948","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792523948"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:31:43Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:31:45Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6534025399","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800169957","pull_request_review_id":3792523948,"id":2800169957,"node_id":"PRRC_kwDOF9ZhoM6m5zPl","diff_hunk":"@@ -0,0 +1,156 @@\n+#!/usr/bin/env python3\n+\"\"\"\n+mdbook backend that verifies Swift code examples compile.\n+\n+Configuration (book.toml):\n+    [output.swift-test]\n+    command = \"python3 scripts/mdbook-swift-test.py\"\n+\n+Attributes:\n+    ```swift,ignore    - skip compilation\n+\n+Hidden lines:\n+    # import Foundation    - compiled but hidden from readers\n+    #                      - becomes empty line\n+    \\\\#available(...)      - shown as #available(...), compiled\n+\n+Placeholder bodies:\n+    { ... }  ->  { fatalError() }\n+\"\"\"\n+\n+import json\n+import os\n+import re\n+import subprocess\n+import sys\n+import tempfile\n+from dataclasses import dataclass\n+from itertools import chain\n+from typing import Iterator\n+\n+\n+@dataclass(frozen=True)\n+class CodeBlock:\n+    \"\"\"A Swift code block extracted from markdown.\"\"\"\n+    content: str\n+    start_line: int  # 1-indexed line number in source file\n+    path: str\n+    ignore: bool = False\n+\n+\n+@dataclass(frozen=True)\n+class TestResult:\n+    \"\"\"Outcome of compiling a code block.\"\"\"\n+    ok: bool\n+    error: str\n+\n+\n+def parse_attributes(info: str) -> tuple[str | None, bool]:\n+    \"\"\"The (language, ignore) pair from a code fence info string.\"\"\"\n+    parts = [p.strip() for p in info.split(\",\")] if info else []\n+    lang = parts[0].lower() if parts and parts[0] else None\n+    ignore = \"ignore\" in parts[1:]\n+    return lang, ignore\n+\n+\n+def unhide_line(line: str) -> str:\n+    \"\"\"The line with hidden-line prefix stripped or literal # unescaped.\"\"\"\n+    if line.startswith(\"# \"):\n+        return line[2:]\n+    if line == \"#\":\n+        return \"\"\n+    if line.startswith(\"\\\\#\"):\n+        return line[1:]\n+    return line\n+\n+\n+# Matches fenced code blocks: ```info\\n...content...\\n```\n+# Groups: (1) info string e.g. \"swift,ignore\", (2) content between fences\n+FENCE = re.compile(r'^[ \\t]*```(\\S*)\\n(.*?)^[ \\t]*```[ \\t]*$', re.MULTILINE | re.DOTALL)\n+\n+\n+def extract_blocks(content: str, path: str) -> Iterator[CodeBlock]:\n+    \"\"\"Yields Swift code blocks from markdown content.\"\"\"\n+    for m in FENCE.finditer(content):\n+        lang, ignore = parse_attributes(m.group(1))\n+        if lang == \"swift\":","path":"scripts/mdbook-swift-test.py","commit_id":"515aebeea71664cd92f62189fdc5b4369bdc768e","original_commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"First, creating a regex to match both `swift,ignore` and `ignore,swift` (which seemed useful to support) was needlessly complex. Second, it's entirely possible we'll want to add support for other languages (e.g. Dafny, already referenced in this chapter), so the added regex complexity didn't seem worth it.","created_at":"2026-02-12T17:31:43Z","updated_at":"2026-02-12T17:31:43Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800169957","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800169957"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800169957"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800169957/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":2796175089,"original_position":76,"position":1,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T17:31:43Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533981012","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792513830,"node_id":"PRR_kwDOF9ZhoM7iDSsm","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:30:07Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792513830","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792513830"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:30:07Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:30:08Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533980448","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800162637","pull_request_review_id":3792513830,"id":2800162637,"node_id":"PRRC_kwDOF9ZhoM6m5xdN","diff_hunk":"@@ -0,0 +1,156 @@\n+#!/usr/bin/env python3\n+\"\"\"\n+mdbook backend that verifies Swift code examples compile.\n+\n+Configuration (book.toml):\n+    [output.swift-test]\n+    command = \"python3 scripts/mdbook-swift-test.py\"\n+\n+Attributes:\n+    ```swift,ignore    - skip compilation\n+\n+Hidden lines:\n+    # import Foundation    - compiled but hidden from readers\n+    #                      - becomes empty line\n+    \\\\#available(...)      - shown as #available(...), compiled\n+\n+Placeholder bodies:\n+    { ... }  ->  { fatalError() }\n+\"\"\"\n+\n+import json\n+import os\n+import re\n+import subprocess\n+import sys\n+import tempfile\n+from dataclasses import dataclass\n+from itertools import chain\n+from typing import Iterator\n+\n+\n+@dataclass(frozen=True)\n+class CodeBlock:\n+    \"\"\"A Swift code block extracted from markdown.\"\"\"\n+    content: str\n+    start_line: int  # 1-indexed line number in source file\n+    path: str\n+    ignore: bool = False\n+\n+\n+@dataclass(frozen=True)\n+class TestResult:\n+    \"\"\"Outcome of compiling a code block.\"\"\"\n+    ok: bool\n+    error: str\n+\n+\n+def parse_attributes(info: str) -> tuple[str | None, bool]:\n+    \"\"\"The (language, ignore) pair from a code fence info string.\"\"\"","path":"scripts/mdbook-swift-test.py","commit_id":"515aebeea71664cd92f62189fdc5b4369bdc768e","original_commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"Thanks for that feedback. I've refactored this to make the intention more clear. [\"Fenced code blocks\"](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks) is a term used in Markdown, and I thought `attributes` was a reasonable term to refer to the string following the opening backticks.","created_at":"2026-02-12T17:30:07Z","updated_at":"2026-02-12T17:30:07Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800162637","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800162637"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800162637"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800162637/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":2796177724,"original_position":49,"position":1,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T17:30:07Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533908979","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792496418,"node_id":"PRR_kwDOF9ZhoM7iDOci","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:27:37Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792496418","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792496418"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:27:37Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:27:38Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533908333","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800151124","pull_request_review_id":3792496418,"id":2800151124,"node_id":"PRRC_kwDOF9ZhoM6m5upU","diff_hunk":"@@ -0,0 +1,156 @@\n+#!/usr/bin/env python3\n+\"\"\"\n+mdbook backend that verifies Swift code examples compile.\n+\n+Configuration (book.toml):\n+    [output.swift-test]\n+    command = \"python3 scripts/mdbook-swift-test.py\"\n+\n+Attributes:\n+    ```swift,ignore    - skip compilation\n+\n+Hidden lines:\n+    # import Foundation    - compiled but hidden from readers\n+    #                      - becomes empty line\n+    \\\\#available(...)      - shown as #available(...), compiled\n+\n+Placeholder bodies:\n+    { ... }  ->  { fatalError() }\n+\"\"\"\n+\n+import json\n+import os\n+import re\n+import subprocess\n+import sys\n+import tempfile\n+from dataclasses import dataclass\n+from itertools import chain\n+from typing import Iterator\n+\n+\n+@dataclass(frozen=True)\n+class CodeBlock:\n+    \"\"\"A Swift code block extracted from markdown.\"\"\"\n+    content: str\n+    start_line: int  # 1-indexed line number in source file\n+    path: str\n+    ignore: bool = False\n+\n+\n+@dataclass(frozen=True)\n+class TestResult:\n+    \"\"\"Outcome of compiling a code block.\"\"\"\n+    ok: bool\n+    error: str\n+\n+\n+def parse_attributes(info: str) -> tuple[str | None, bool]:\n+    \"\"\"The (language, ignore) pair from a code fence info string.\"\"\"\n+    parts = [p.strip() for p in info.split(\",\")] if info else []\n+    lang = parts[0].lower() if parts and parts[0] else None\n+    ignore = \"ignore\" in parts[1:]\n+    return lang, ignore\n+\n+\n+def unhide_line(line: str) -> str:\n+    \"\"\"The line with hidden-line prefix stripped or literal # unescaped.\"\"\"\n+    if line.startswith(\"# \"):\n+        return line[2:]\n+    if line == \"#\":\n+        return \"\"\n+    if line.startswith(\"\\\\#\"):\n+        return line[1:]\n+    return line\n+\n+\n+# Matches fenced code blocks: ```info\\n...content...\\n```\n+# Groups: (1) info string e.g. \"swift,ignore\", (2) content between fences\n+FENCE = re.compile(r'^[ \\t]*```(\\S*)\\n(.*?)^[ \\t]*```[ \\t]*$', re.MULTILINE | re.DOTALL)\n+\n+\n+def extract_blocks(content: str, path: str) -> Iterator[CodeBlock]:\n+    \"\"\"Yields Swift code blocks from markdown content.\"\"\"\n+    for m in FENCE.finditer(content):\n+        lang, ignore = parse_attributes(m.group(1))\n+        if lang == \"swift\":\n+            start_line = content[:m.start()].count('\\n') + 2\n+            yield CodeBlock(m.group(2).rstrip('\\n'), start_line, path, ignore)\n+\n+\n+def extract_from_chapter(item: dict) -> Iterator[CodeBlock]:\n+    \"\"\"Yields code blocks from a chapter and its sub-chapters.\"\"\"\n+    if \"Chapter\" not in item:\n+        return\n+    ch = item[\"Chapter\"]\n+    yield from extract_blocks(ch.get(\"content\", \"\"), ch.get(\"path\", \"unknown.md\"))\n+    yield from chain.from_iterable(extract_from_chapter(sub) for sub in ch.get(\"sub_items\", []))\n+\n+\n+def compile_swift(source: str) -> TestResult:\n+    \"\"\"Type-checks source via swiftc.\"\"\"\n+    with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".swift\", delete=False) as f:\n+        f.write(source)\n+        path = f.name\n+    try:\n+        r = subprocess.run([\"swiftc\", \"-typecheck\", path], capture_output=True, text=True, timeout=30)\n+        if r.returncode == 0:\n+            return TestResult(True, \"\")\n+        return TestResult(False, r.stderr or r.stdout or \"Unknown error\")\n+    except FileNotFoundError:\n+        return TestResult(False, \"swiftc not found\")\n+    except subprocess.TimeoutExpired:\n+        return TestResult(False, \"Timeout (30s)\")\n+    finally:\n+        try:\n+            os.unlink(path)\n+        except OSError:\n+            pass\n+\n+\n+def prepare_source(content: str) -> str:\n+    \"\"\"The content with hidden lines revealed and placeholder bodies expanded.\"\"\"\n+    processed = \"\\n\".join(unhide_line(line) for line in content.split(\"\\n\"))\n+    return re.sub(r'\\{\\s*\\.\\.\\.\\s*\\}', '{ fatalError() }', processed)\n+\n+\n+def test_block(block: CodeBlock) -> TestResult | None:\n+    \"\"\"Compiles block; returns None if skipped or content is empty.\"\"\"","path":"scripts/mdbook-swift-test.py","commit_id":"515aebeea71664cd92f62189fdc5b4369bdc768e","original_commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"Not slop. I've since refactored this, but the intention was to model ignored tests as `None`, rather than passing, to more accurately reflect the number of correct tests in the final output.","created_at":"2026-02-12T17:27:37Z","updated_at":"2026-02-12T17:27:37Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800151124","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800151124"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800151124"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800151124/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":2796167809,"original_position":118,"position":1,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T17:27:37Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533864020","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792486029,"node_id":"PRR_kwDOF9ZhoM7iDL6N","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:26:03Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792486029","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792486029"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:26:03Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:26:04Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533863569","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800143710","pull_request_review_id":3792486029,"id":2800143710,"node_id":"PRRC_kwDOF9ZhoM6m5s1e","diff_hunk":"@@ -726,7 +748,7 @@ Design\n Guidelines](https://www.swift.org/documentation/api-design-guidelines/),\n only slightly modified.\n \n-```swift\n+```swift,ignore","path":"better-code/src/chapter-2-contracts.md","commit_id":"f6dc0311d168b5cbbee122b45e9e166fbfd85177","original_commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"Done.","created_at":"2026-02-12T17:26:03Z","updated_at":"2026-02-12T17:26:04Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800143710","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800143710"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800143710"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800143710/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":2796126693,"original_position":169,"position":1,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T17:26:03Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"8391463430","type":"PushEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"repository_id":399925664,"push_id":30686642846,"ref":"refs/heads/npd/swift-check","head":"9ffb8862fd2ef87b37b216cbb85f5cba923b70ba","before":"f6dc0311d168b5cbbee122b45e9e166fbfd85177"},"public":true,"created_at":"2026-02-12T17:25:49Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533707843","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792448540,"node_id":"PRR_kwDOF9ZhoM7iDCwc","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:20:37Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792448540","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792448540"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:20:37Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:20:38Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533707545","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800117553","pull_request_review_id":3792448540,"id":2800117553,"node_id":"PRRC_kwDOF9ZhoM6m5mcx","diff_hunk":"@@ -420,12 +427,17 @@ meaning, the `append` method must account for these new internal\n states.  Here's one way we could do it:\n \n ```swift\n+# struct PairArray<X, Y> {\n+#   private var xs: [X] = []\n+#   private var ys: [Y] = []\n+#","path":"better-code/src/chapter-2-contracts.md","commit_id":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","original_commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"Yes, I considered this. I don't think it'll be too hard to add, but probably belongs in a separate PR.","created_at":"2026-02-12T17:20:37Z","updated_at":"2026-02-12T17:20:37Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800117553","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800117553"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800117553"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800117553/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":2796111815,"original_position":75,"position":75,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T17:20:37Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533697795","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792446076,"node_id":"PRR_kwDOF9ZhoM7iDCJ8","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:20:16Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792446076","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792446076"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:20:16Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:20:17Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533697385","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800115799","pull_request_review_id":3792446076,"id":2800115799,"node_id":"PRRC_kwDOF9ZhoM6m5mBX","diff_hunk":"@@ -653,26 +675,26 @@ code.  This is one of the most powerful code transformations you can\n make.\n \n ```swift\n+# struct SQLDatabase {}\n+# struct EmployeeID {}\n /// The employees of a company.\n ///\n /// Invariant: every employee has a manager in the database.\n struct EmployeeDatabase {\n   /// The raw storage.\n-  private var storage: SQLDatabase;\n+  private var storage: SQLDatabase\n \n   /// Adds a new employee named `name` with manager `m`, returning the\n   /// new employee's ID.\n   ///\n   /// - Precondition: `m` identifies an employee.\n-  public addEmployee(_ name: String, managedBy m: EmployeeID) -> EmployeeID\n+  public func addEmployee(_ name: String, managedBy m: EmployeeID) -> EmployeeID { ... }\n \n   /// Removes the employee identified by `e`.\n   ///\n   /// - Precondition: `e` identifies an employee who is not the\n   ///   manager of any other employee.\n-  public remove(_ e: EmployeeID)\n-\n-  ...","path":"better-code/src/chapter-2-contracts.md","commit_id":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","original_commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"No, we don't have to drop it. I could add support for simply removing those. Would it be sufficient to remove all lines that contain only whitespace and `...` exactly?","created_at":"2026-02-12T17:20:16Z","updated_at":"2026-02-12T17:20:16Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800115799","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800115799"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800115799"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800115799/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":2796115437,"original_position":159,"position":170,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T17:20:16Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533681134","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792442038,"node_id":"PRR_kwDOF9ZhoM7iDBK2","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:19:40Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792442038","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792442038"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:19:40Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:19:43Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533680099","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800112834","pull_request_review_id":3792442038,"id":2800112834,"node_id":"PRRC_kwDOF9ZhoM6m5lTC","diff_hunk":"@@ -1297,20 +1328,28 @@ Here, the conformance strengthens the performance guarantee given by\n the protocol requirement:\n \n ```swift\n+# struct SortedArray<Element>: Collection {\n+#   var elements: [Element] = []\n+#   var startIndex: Int { elements.startIndex }\n+#   var endIndex: Int { elements.endIndex }\n+#   subscript(i: Int) -> Element { elements[i] }\n+#   func index(after i: Int) -> Int { elements.index(after: i) }\n+# }\n+#\n protocol Searchable: Collection {\n   /// Returns the first position where `x` occurs.\n   ///\n   /// - Complexity: at most `count` comparisons and index adjustment\n   ///   calls.\n-  func index(of x: Element) -> Index\n+  func index(of x: Element) -> Index?","path":"better-code/src/chapter-2-contracts.md","commit_id":"515aebeea71664cd92f62189fdc5b4369bdc768e","original_commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"Reverted.","created_at":"2026-02-12T17:19:40Z","updated_at":"2026-02-12T17:19:40Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800112834","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800112834"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800112834"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800112834/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":2796133527,"original_position":392,"position":1,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T17:19:40Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533677005","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792441089,"node_id":"PRR_kwDOF9ZhoM7iDA8B","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:19:32Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792441089","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792441089"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:19:32Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:19:34Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533675861","type":"PullRequestReviewCommentEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800112075","pull_request_review_id":3792441089,"id":2800112075,"node_id":"PRRC_kwDOF9ZhoM6m5lHL","diff_hunk":"@@ -1297,20 +1328,28 @@ Here, the conformance strengthens the performance guarantee given by\n the protocol requirement:\n \n ```swift\n+# struct SortedArray<Element>: Collection {\n+#   var elements: [Element] = []\n+#   var startIndex: Int { elements.startIndex }\n+#   var endIndex: Int { elements.endIndex }\n+#   subscript(i: Int) -> Element { elements[i] }\n+#   func index(after i: Int) -> Int { elements.index(after: i) }\n+# }\n+#\n protocol Searchable: Collection {\n   /// Returns the first position where `x` occurs.\n   ///\n   /// - Complexity: at most `count` comparisons and index adjustment\n   ///   calls.\n-  func index(of x: Element) -> Index\n+  func index(of x: Element) -> Index?\n }\n \n extension SortedArray: Searchable {\n   /// Returns the first position where `x` occurs.\n   ///\n   /// - Complexity: at most log2(`count`) comparisons and index\n   ///   adjustment calls.\n-  func index(of x: Element) -> Index\n+  func index(of x: Element) -> Index? { ... }","path":"better-code/src/chapter-2-contracts.md","commit_id":"515aebeea71664cd92f62189fdc5b4369bdc768e","original_commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"Reverted.","created_at":"2026-02-12T17:19:32Z","updated_at":"2026-02-12T17:19:32Z","html_url":"https://github.com/stlab/better-code/pull/42#discussion_r2800112075","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800112075"},"html":{"href":"https://github.com/stlab/better-code/pull/42#discussion_r2800112075"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"reactions":{"url":"https://api.github.com/repos/stlab/better-code/pulls/comments/2800112075/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":2796134271,"original_position":401,"position":1,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}}},"public":true,"created_at":"2026-02-12T17:19:32Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"6533672573","type":"PullRequestReviewEvent","actor":{"id":12536895,"login":"nickpdemarco","display_login":"nickpdemarco","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","avatar_url":"https://avatars.githubusercontent.com/u/12536895?"},"repo":{"id":399925664,"name":"stlab/better-code","url":"https://api.github.com/repos/stlab/better-code"},"payload":{"review":{"id":3792439874,"node_id":"PRR_kwDOF9ZhoM7iDApC","user":{"login":"nickpdemarco","id":12536895,"node_id":"MDQ6VXNlcjEyNTM2ODk1","avatar_url":"https://avatars.githubusercontent.com/u/12536895?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpdemarco","html_url":"https://github.com/nickpdemarco","followers_url":"https://api.github.com/users/nickpdemarco/followers","following_url":"https://api.github.com/users/nickpdemarco/following{/other_user}","gists_url":"https://api.github.com/users/nickpdemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpdemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpdemarco/subscriptions","organizations_url":"https://api.github.com/users/nickpdemarco/orgs","repos_url":"https://api.github.com/users/nickpdemarco/repos","events_url":"https://api.github.com/users/nickpdemarco/events{/privacy}","received_events_url":"https://api.github.com/users/nickpdemarco/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"8c04b1e755a030d0703b4801f1b48311336802b0","submitted_at":"2026-02-12T17:19:23Z","state":"commented","html_url":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792439874","pull_request_url":"https://api.github.com/repos/stlab/better-code/pulls/42","_links":{"html":{"href":"https://github.com/stlab/better-code/pull/42#pullrequestreview-3792439874"},"pull_request":{"href":"https://api.github.com/repos/stlab/better-code/pulls/42"}},"updated_at":"2026-02-12T17:19:23Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/better-code/pulls/42","id":3243027340,"number":42,"head":{"ref":"npd/swift-check","sha":"d8c220fd819746682af6c420e8888ff0bdc2e3c6","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}},"base":{"ref":"main","sha":"e305db479c51529141c6324a7df4cc64ea484cad","repo":{"id":399925664,"url":"https://api.github.com/repos/stlab/better-code","name":"better-code"}}},"action":"created"},"public":true,"created_at":"2026-02-12T17:19:26Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}}]