Perl-Toolchain-Gang / CPAN-Meta-Requirements

a set of version requirements for a CPAN dist
5 stars 15 forks source link

Explode @DAGOLDEN bundle in dist.ini #23

Closed dagolden closed 8 years ago

dagolden commented 9 years ago

Rather than use @DAGOLDEN, the individual plugins should be broken out separately.

dolmen commented 9 years ago

:+1: I think that @kentfredric has a tool for that...

kentfredric commented 9 years ago

^ https://metacpan.org/pod/Dist::Zilla::App::Command::bakeini

mv dist.ini dist.ini.meta
dzil bakeini

In theory should solidify your current state in ini form. In practice however it could be different.

It aims to keep everything the same ( to the extent x_Dist_Zilla shouldn't even change ).

kentfredric commented 9 years ago

Looks like it works for me =).

; This file is generated from dist.ini.meta by dzil bakeini.
; Edit that file or the bundles contained within for long-term changes.
name = CPAN-Meta-Requirements
author = David Golden <dagolden@cpan.org>
author = Ricardo Signes <rjbs@cpan.org>
license = Perl_5
copyright_holder = David Golden and Ricardo Signes
copyright_year = 2010

[RewriteVersion / Dist::Zilla::PluginBundle::DAGOLDEN/RewriteVersion]

[Git::Contributors / Dist::Zilla::PluginBundle::DAGOLDEN/Git::Contributors]

[Git::GatherDir / Dist::Zilla::PluginBundle::DAGOLDEN/Git::GatherDir]
exclude_filename = README.mkdn
exclude_filename = cpanfile
exclude_filename = Makefile.PL

[PruneCruft / Dist::Zilla::PluginBundle::DAGOLDEN/PruneCruft]

[ManifestSkip / Dist::Zilla::PluginBundle::DAGOLDEN/ManifestSkip]

[InsertCopyright / Dist::Zilla::PluginBundle::DAGOLDEN/InsertCopyright]

[PodWeaver / Dist::Zilla::PluginBundle::DAGOLDEN/PodWeaver]
config_plugin = @DAGOLDEN
post_code_replacer = replace_with_nothing
replacer = replace_with_comment

[Pod2Readme / Dist::Zilla::PluginBundle::DAGOLDEN/Pod2Readme]

[License / Dist::Zilla::PluginBundle::DAGOLDEN/License]

[Test::Compile / Dist::Zilla::PluginBundle::DAGOLDEN/Test::Compile]
fake_home = 1
xt_mode = 1

[Test::MinimumVersion / Dist::Zilla::PluginBundle::DAGOLDEN/Test::MinimumVersion]
max_target_perl = 5.010

[Test::ReportPrereqs / Dist::Zilla::PluginBundle::DAGOLDEN/Test::ReportPrereqs]

[Test::PodSpelling / Dist::Zilla::PluginBundle::DAGOLDEN/Test::PodSpelling]
stopwords = invocant

[Test::Perl::Critic / Dist::Zilla::PluginBundle::DAGOLDEN/Test::Perl::Critic]

[MetaTests / Dist::Zilla::PluginBundle::DAGOLDEN/MetaTests]

[PodSyntaxTests / Dist::Zilla::PluginBundle::DAGOLDEN/PodSyntaxTests]

[PodCoverageTests / Dist::Zilla::PluginBundle::DAGOLDEN/PodCoverageTests]

[Test::Portability / Dist::Zilla::PluginBundle::DAGOLDEN/Test::Portability]
options = test_one_dot = 0

[Test::Version / Dist::Zilla::PluginBundle::DAGOLDEN/Test::Version]

[Authority / Dist::Zilla::PluginBundle::DAGOLDEN/Authority]
authority = cpan:DAGOLDEN
do_munging = 0

[MinimumPerl / Dist::Zilla::PluginBundle::DAGOLDEN/MinimumPerl]

[AutoPrereqs / Dist::Zilla::PluginBundle::DAGOLDEN/AutoPrereqs]
skip = ^t::lib

[MetaNoIndex / Dist::Zilla::PluginBundle::DAGOLDEN/MetaNoIndex]
directory = t
directory = xt
directory = examples
directory = corpus
package = DB

[MetaProvides::Package / Dist::Zilla::PluginBundle::DAGOLDEN/MetaProvides::Package]
meta_noindex = 1

[GithubMeta / Dist::Zilla::PluginBundle::DAGOLDEN/GithubMeta]
issues = 1
remote = origin
remote = github

[Prereqs::AuthorDeps / Dist::Zilla::PluginBundle::DAGOLDEN/Prereqs::AuthorDeps]

[MetaYAML / Dist::Zilla::PluginBundle::DAGOLDEN/MetaYAML]

[MetaJSON / Dist::Zilla::PluginBundle::DAGOLDEN/MetaJSON]

[CPANFile / Dist::Zilla::PluginBundle::DAGOLDEN/CPANFile]

[ExecDir / Dist::Zilla::PluginBundle::DAGOLDEN/ExecDir]

[ShareDir / Dist::Zilla::PluginBundle::DAGOLDEN/ShareDir]

[MakeMaker / Dist::Zilla::PluginBundle::DAGOLDEN/MakeMaker]
default_jobs = 9
eumm_version = 6.17

[PromptIfStale / Dist::Zilla::PluginBundle::DAGOLDEN/PromptIfStale]
check_all_plugins = 1
modules = Dist::Zilla
modules = Dist::Zilla::PluginBundle::DAGOLDEN

[CopyFilesFromBuild / Dist::Zilla::PluginBundle::DAGOLDEN/CopyFilesFromBuild]
copy = Makefile.PL

[Manifest / Dist::Zilla::PluginBundle::DAGOLDEN/Manifest]

[Git::CheckFor::CorrectBranch / Dist::Zilla::PluginBundle::DAGOLDEN/Git::CheckFor::CorrectBranch]

[Git::Check / Dist::Zilla::PluginBundle::DAGOLDEN/Git::Check]
allow_dirty = Makefile.PL

[CheckMetaResources / Dist::Zilla::PluginBundle::DAGOLDEN/CheckMetaResources]

[CheckPrereqsIndexed / Dist::Zilla::PluginBundle::DAGOLDEN/CheckPrereqsIndexed]

[CheckChangesHasContent / Dist::Zilla::PluginBundle::DAGOLDEN/CheckChangesHasContent]

[RunExtraTests / Dist::Zilla::PluginBundle::DAGOLDEN/RunExtraTests]
default_jobs = 9

[TestRelease / Dist::Zilla::PluginBundle::DAGOLDEN/TestRelease]

[ConfirmRelease / Dist::Zilla::PluginBundle::DAGOLDEN/ConfirmRelease]

[UploadToCPAN / Dist::Zilla::PluginBundle::DAGOLDEN/UploadToCPAN]

[Git::Commit / Dist::Zilla::PluginBundle::DAGOLDEN/Commit_Dirty_Files]
allow_dirty = Makefile.PL
commit_msg = Update Makefile.PL

[Git::Tag / Dist::Zilla::PluginBundle::DAGOLDEN/Git::Tag]
tag_format = release-%v

[NextRelease / Dist::Zilla::PluginBundle::DAGOLDEN/NextRelease]

[BumpVersionAfterRelease / Dist::Zilla::PluginBundle::DAGOLDEN/BumpVersionAfterRelease]

[Git::Commit / Dist::Zilla::PluginBundle::DAGOLDEN/Commit_Changes]
allow_dirty = Changes
allow_dirty = Makefile.PL
allow_dirty_match = ^lib
commit_msg = After release: bump $VERSION and timestamp Changes

[Git::Push / Dist::Zilla::PluginBundle::DAGOLDEN/Git::Push]
push_to = origin

[MakeMaker::Highlander]
:version = 0.003

[Prereqs]
version = 0.88

*edited to use updated git copy of dist.ini

kentfredric commented 9 years ago

Diff between builds before and after baking:

https://gist.github.com/kentfredric/1313ef4349f9ad313e18

kentfredric commented 9 years ago

Though I realised a subtle bug: For some reason the "@" alias is getting expanded somewhere that it doesn't in dzil! Hmm.

ghost commented 9 years ago

Not sure why this is desirable - it looks like it adds a lot more maintenance hassles with that much more dependency stuff to manage. Or is the idea that most of them aren't actually being used, and could get deleted?

kentfredric commented 9 years ago

Author bundles change more rapidly than any dist, and author bundle changes frequently cause dists built against them to fail to be buildable due to bundle changes, because the dists themselves have trouble keeping up.

Thus, a strategy of de-bundling makes a dist more resistent to changes at the whims of an authors bundle, which is useful for dists that intend to be maintained by multiple people.

It does have the added overhead that if one wants to catch up to an authors configuration, additional steps must be performed.

But everyone wanting to hack on a dist getting this workflow is bad:

[1] occurs easily as the assurances of cpanm bundle is entirely reliant on the author to make it obvious what deps their bundle uses, which is not entirely trivial to get right. Sometimes there's conditional deps that only show for certain dists.

The counter to [1] is of course "declare all your deps", but then contributors have to install dependencies they don't even need!.

Summarised: Pros:

Cons:

But that last one is mutually exclusive with the pace issue.