{"id":15286148,"url":"https://github.com/kentnl/dist-zilla-app-command-bakeini","last_synced_at":"2025-03-23T21:22:02.212Z","repository":{"id":17622765,"uuid":"20426979","full_name":"kentnl/Dist-Zilla-App-Command-bakeini","owner":"kentnl","description":"bake dist.ini to not need the bundles","archived":false,"fork":false,"pushed_at":"2017-03-04T06:07:03.000Z","size":192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T04:42:47.411Z","etag":null,"topics":["dist-zilla","perl"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kentnl.png","metadata":{"files":{"readme":"README.mkdn","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-03T02:26:26.000Z","updated_at":"2017-03-04T05:48:22.000Z","dependencies_parsed_at":"2022-08-04T20:15:54.879Z","dependency_job_id":null,"html_url":"https://github.com/kentnl/Dist-Zilla-App-Command-bakeini","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-App-Command-bakeini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-App-Command-bakeini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-App-Command-bakeini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-App-Command-bakeini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kentnl","download_url":"https://codeload.github.com/kentnl/Dist-Zilla-App-Command-bakeini/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245169925,"owners_count":20571980,"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":["dist-zilla","perl"],"created_at":"2024-09-30T15:10:46.308Z","updated_at":"2025-03-23T21:22:02.184Z","avatar_url":"https://github.com/kentnl.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nDist::Zilla::App::Command::bakeini - bake dist.ini to not need the bundles.\n\n# VERSION\n\nversion 0.002007\n\n# SYNOPSIS\n\n    cp dist.ini dist.ini.meta\n    dzil bakeini\n\n    less dist.ini # no more bundles :D\n\n# DESCRIPTION\n\n`bakeini` is an `App::Command` module for `Dist::Zilla` that enables one to have two versions\nof their `dist.ini`, one which contains their bundle, and the other which is generated from the\nfirst in a static and portable way, without requiring the bundle to be present.\n\nThis allows contributors and test targets to have a mostly \"static\" configuration that is less\nprone to randomly breaking your distributions every time you change something significant in your bundle.\n\nIt also allows contributors to only need the dependencies they **really** need, not the super-set\nof dependencies your bundle probably implies.\n\nAnd at the same time, you still have the flexibility and power you normally have with a centralized\nconfiguration stored in a bundle, which you can roll out on demand, instead of having the roll out\nautomatically propagate every time the bundle gets updated.\n\n# DISCUSSION\n\n## The Quibbles\n\nThere's several long standing point of contention surrounding the use of bundles.\n\nA few poignant ones that bother me are:\n\n- Bundles change over time and configuration parameters can change in validity\n\n    For example, I might add a requirement in a later incarnation of a bundle that a given parameter be specified. But that creates\n    a confusing backwards compatibility problem for people who merely want to check out and build the code.\n\n- Some contributors tend not to like dealing with bundles due to bundle complexity\n\n    Bundles often declare far more dependencies than contributors **need** to build one specific distribution, and the bundle\n    obscures the visibility of what plugins are being used.\n\n    This also manifests as a difficulty to work around problems produced by bundles such as bundles `use`-ing broken modules,\n    which is not straight forward to iron out with the `@Filter` bundle.\n\n    `@Filter` is also complicated for end users who are not familiar with `dzil` to use, and `@Filter` also lacks abilities to\n    re-order plugins if that is necessary to avoid a bug.\n\n    Additionally, routing configuration to a single plugin within a bundle can be confusing with messy syntax, especially if the\n    bundle doesn't `do` `ConfigSlicer` or something like that.\n\n    And the effort of learning and using those tools is high if all you want to do is _temporarily_ change a build setting for the\n    point of local use or local testing.\n\n## The Benefits and Method\n\nSo this command attempts to avoid these problems by separating the bundle from its configuration until configuration is wanted\nupdated.\n\nThis means `Dist::Zilla` based distributions **DON'T** have their build configuration radically changed simply because somebody\nupgraded a bundle, and the configuration is _MORE_ local to the distribution instead of being more global.\n\nThis means bundle specific configuration demands **ONLY** need to be satisfied during the baking process, but **NOT** every\nsubsequent build, and are thus **NOT** prone to causing a sea of unusable `dist.ini`s if a bundle gets changed.\n\n## The Downsides\n\nThe biggest known downside of this approach at present is with much more advanced bundle usage.\n\nBecause the bundle itself is being taken out of the loop, that means `dist.ini` will **NOT** be able to automatically have new\nplugins added to it in response to changes in the tree. `dzil bakeini` will have to be run subsequently to take tree changes\ninto consideration and emit updated configuration.\n\nAnd because the bundle itself is being taken out of the loop, that means `ENV` based controls in bundles will be bound at the\ntime of calling `dzil bakeini`, which means if you're like `@ETHER` and have an \"Airplane mode\", then:\n\n    AIRPLANE=1 dzil build\n\nWon't work on a baked `dist.ini`, and you will instead need:\n\n    AIRPLANE=1 dzil bakeini \u0026\u0026 dzil build\n\nThough, that could be beneficial too depending on how you use it.\n\n    # Get on the plane\n    AIRPLANE=1 dzil bakeini\n\n    # dzil runs everything in airplane mode now\n    dzil build\n\n    # Get off the plane\n    dzil bakeini\n\n    # dzil runs normally\n    dzil build\n\n# TIPS AND TRICKS\n\n## `bakeini` dependent behavior in a bundle\n\nIf you want to codify some unique behavior to how your bundle performs under `dzil bakeini`, ( for instance, to change the `prereqs` advertised as being `develop.requires` )\n\nHere, [`::Util::CurrentCmd`](https://metacpan.org/pod/Dist::Zilla::Util::CurrentCmd) comes in handy:\n\n    use Dist::Zilla::Util::CurrentCmd qw(current_cmd);\n\n    my @config;\n    ...\n    if ( 'bakeini' eq ( current_cmd() || '' ) ) {\n        push @config, [ 'baked dist prereqs', 'Dist::Zilla::Plugin::Prereqs', { 'Foo::Bar' =\u003e 2  }];\n    } else {\n      ...\n    }\n\n# PARAMETERS\n\n## `--comments`\n\n`--comments` allows to control which comments are copied into the target `dist.ini`\n\n### `all`\n\n**DEFAULT** Inject all comments regardless\n\n### `authordeps`\n\nInject all comments that are `Dist::Zilla` `AuthorDeps`\n\n### `none`\n\nInject no comments.\n\n# AUTHOR\n\nKent Fredric \u003ckentnl@cpan.org\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2017 by Kent Fredric \u003ckentfredric@gmail.com\u003e.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentnl%2Fdist-zilla-app-command-bakeini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkentnl%2Fdist-zilla-app-command-bakeini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentnl%2Fdist-zilla-app-command-bakeini/lists"}