Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Distar #17

Closed
wants to merge 5 commits into from
Closed

Port to Distar #17

wants to merge 5 commits into from

Conversation

mohawk2
Copy link
Contributor

@mohawk2 mohawk2 commented Jan 28, 2018

Also includes as discussed a release-test to check existence of opt-dep .pod, and that it's newer than the .pm. The generating is done effectively at perl Makefile.PL-time and should probably instead be a build-time thing.

When I ran the Distar-enhanced make test, I got a xt/whitespace.t fail from a t/var/...something.pm. Probably needs a grep on that but the modules don't seem to offer an "exclude" option.

@mohawk2
Copy link
Contributor Author

mohawk2 commented Jan 28, 2018

The CI is failing, looks like it's missing deps like CAG and Test::Exception, probably because the .travis.yml needs updating. I will investigate.

Makefile.PL Outdated
};
}
delete $eumm_args{META_MERGE} if $eumm_version < 6.45_01;
_move_to(\%eumm_args, 'CONFIGURE_REQUIRES', 'PREREQ_PM')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't accomplish much. It's too late for configure prereqs to be satisfied here. Deleting CONFIGURE_REQUIRES to silence the warning is the only useful thing that can be done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, force-pushed!

Makefile.PL Outdated
if $eumm_version < 6.55_01;
$eumm_args{NO_MYMETA} = 1
if $eumm_version >= 6.57_02 and $eumm_version < 6.57_07;
_move_to(\%eumm_args, 'TEST_REQUIRES', 'PREREQ_PM')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should move the prereqs to BUILD_REQUIRES and be moved before BUILD_REQUIRES gets conditionally moved to PREREQ_PM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, force-pushed!

my @req_groups = keys %{ $optdeps->req_group_list };
my @rdbms_groups = grep { /rdbms/ } @req_groups;
my @other_groups = grep { !/rdbms/ } @req_groups;
our (%dev_requires, %runtime_suggests);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a confusing way to communicate with the rest of the Makefile.PL.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't disagree, but it was the only way I could think of that fit with how Distar works. Do you have an alternative?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One option would be to return a hash from the script and do something like

my %dev_requires = -f 'META.yml' ? () : (do './maint/Makefile.PL.include' or die $@);

in Makefile.PL, but I'm not entirely sure I like that either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done this instead as a hash-ref, allowing for future expansion by adding to the returned list.

Makefile.PL Outdated
my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
my %eumm_args = (
NAME => 'DBIx::Class::Schema::Loader',
AUTHOR => 'Caelum: Rafael Kitover <rkitover@cpan.org>',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant with Distar's author handing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, force-pushed!

x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class',
},
no_index => {
directory => [qw(maint xt)],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PAUSE already doesn't index anything in inc, xt, and t, so I think we should either list t explicitly here for completeness, or only explicitly list maint for conciseness.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EUMM adds t and inc, so the list ends up sent to PAUSE as all 4. It is thus complete. The current code makes a META file with repetition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having checked the current CPAN META.yml, it in fact doesn't have repetition. However it did locally when I added t, so I left it out here, rationale as above.

my @other_groups = grep { !/rdbms/ } @req_groups;
our (%dev_requires, %runtime_suggests);
%dev_requires = %{ $optdeps->modreq_list_for(\@other_groups) };
%runtime_suggests = %{ $optdeps->modreq_list_for(\@rdbms_groups) };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't currently suggest any of the RDBMS-specific modules, and I'd like to keep actual behaviour changes to a minimum in this PR. If we want to further tweak the deps, that should be a separate discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, changed.

my @req_groups = keys %{ $optdeps->req_group_list };
my @rdbms_groups = grep { /rdbms/ } @req_groups;
my @other_groups = grep { !/rdbms/ } @req_groups;
our (%dev_requires, %runtime_suggests);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One option would be to return a hash from the script and do something like

my %dev_requires = -f 'META.yml' ? () : (do './maint/Makefile.PL.include' or die $@);

in Makefile.PL, but I'm not entirely sure I like that either.

web => 'https://github.com/dbsrgits/dbix-class-schema-loader',
},
x_IRC => 'irc://irc.perl.org/#dbix-class',
license => [ 'http://dev.perl.org/licenses/' ],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't EUMM automatically generate this from the LICENSE => 'perl' above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not as far as I can determine?

Makefile.PL Outdated
'File::Temp' => '0.16',
'File::Path' => '2.07',
},
test => {TESTS => 't/*.t t/*/*.t'},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to include t/*/*/*.t, since the backcompat tests are two directories deep. There aren't actually any files matching t/*/*.t, but I guess it doesn't hurt to include it for future-proofing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Counting is hard!

@mohawk2
Copy link
Contributor Author

mohawk2 commented Jan 30, 2018

The CI is still failing but now only on CLEANTEST=true. I will investigate this later, but in the meantime if reviewers can look over the CI changes and/or respond further on review points that will be very helpful.

@ilmari
Copy link
Member

ilmari commented Feb 23, 2018

The Travis failures all seem to be due to dependencies failing to build or install, so not a blocker. I've adjusted things a bit and merged it as fb4432c, and pushed a dev release.

@ilmari ilmari closed this Feb 23, 2018
@abraxxa
Copy link

abraxxa commented Feb 23, 2018

What‘s the reason for this change?

@mohawk2
Copy link
Contributor Author

mohawk2 commented Feb 24, 2018

@ilmari Let me know if further tweaks are required. I think it would be better for accountability if it were my name/id on fb4432c rather than yours. However, I guess I don't mind you getting the blame ;-)

@mohawk2
Copy link
Contributor Author

mohawk2 commented Feb 24, 2018

@abraxxa Moving off Module::Install, less complicated CI, easier release process.

@mohawk2 mohawk2 deleted the eumm branch July 15, 2018 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants