{"id":22555967,"url":"https://github.com/rrbutani/bazel-ruleset-demo","last_synced_at":"2026-01-07T01:51:24.925Z","repository":{"id":265731832,"uuid":"894664095","full_name":"rrbutani/bazel-ruleset-demo","owner":"rrbutani","description":"...","archived":false,"fork":false,"pushed_at":"2024-11-26T18:59:16.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T03:51:40.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rrbutani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T18:58:10.000Z","updated_at":"2024-11-26T18:59:20.000Z","dependencies_parsed_at":"2024-12-06T07:45:34.771Z","dependency_job_id":"bfc63b49-8c9d-4d05-8942-dc2461326d80","html_url":"https://github.com/rrbutani/bazel-ruleset-demo","commit_stats":null,"previous_names":["rrbutani/bazel-ruleset-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrbutani%2Fbazel-ruleset-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrbutani%2Fbazel-ruleset-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrbutani%2Fbazel-ruleset-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrbutani%2Fbazel-ruleset-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrbutani","download_url":"https://codeload.github.com/rrbutani/bazel-ruleset-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246017726,"owners_count":20710240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-07T19:10:37.013Z","updated_at":"2026-01-07T01:51:24.884Z","avatar_url":"https://github.com/rrbutani.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"previously: https://gist.github.com/rrbutani/e23d68acef3f300dd87b3a8190832c72\n  - example going over some basics:\n    + macros, `genrule`, rules, BUILD files, `rules_python`\n\nwant to cover:\n  - [ ] basics: label, target, packages, BUILD files, repos, etc.\n  - [ ] genrule\n  - [ ] phases: loading, analysis, execution\n    + query\n    + phase ordering restriction\n  - [ ] macros + load-time stuff\n    + `.bzl` files; show expansion\n    + show off that these can be involved\n    + misc convenience stuff like: glob\n  - [ ] rules\n    + interface: attributes\n    + actions: APIs, what they represent, aquery\n    + providers: communicating stuff up the graph\n  - [ ] demonstration: rule interface is decoupled from actions (execution)\n    + actions are lazy\n    + show: monolith, granular with same rule interface\n  - [ ] design principles for rulesets\n    + explicit deps; hierarchically described\n    + composability: providers\n    + strict interfaces: providers and \"artifacts\"; encapsulate internal details\n      * i.e. don't make assumptions about directory structure\n      * more work for ruleset authors to get tools to conform to this ideal but\n      * results in a higher level of abstraction\n        - better user experience, more leverage for ruleset authors\n      * example: include dirs for C/C++, python path\n    + high-level: abstract away domain-specific details where possible\n      * i.e. include paths, object files, command line flags\n      * optimize for the common case, but: provide escape hatches where necessary\n    + generally prefer smaller pieces of work (more granularity)\n      * optimize for reuse\n      * take advantage of ECO (i.e. by normalizing in places)\n    + encapsulation: hide implementation specific details\n      * i.e. file paths, private headers and files, incidental details about directory layout\n    + ensure the dep graph as Bazel sees it matches reality\n      * requires extra effort\n      * i.e. artifact of include paths and transitive includes (C preprocessor) is that targets can implicitly depend on headers from transitive deps (aka checking for \"layering violations\")\n        - not a correctness issue but is still undesirable:\n          + does an end-run around Bazel's visibility machinery\n          + static graph is less accurate: can't find all the genuine direct rdeps\n\nthis time: using C compilation as our example since it's something we're all familiar with\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrbutani%2Fbazel-ruleset-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrbutani%2Fbazel-ruleset-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrbutani%2Fbazel-ruleset-demo/lists"}