Perl5-IDEA icon indicating copy to clipboard operation
Perl5-IDEA copied to clipboard

Add build project before launch task

Open hurricup opened this issue 1 year ago • 6 comments

If we have a Makefile.PL we need to run it with make

image

hurricup avatar Mar 12 '23 06:03 hurricup

Actually we do perl Makefile.PL, and then run make on the generated Makefile.

And that's only for ExtUtils-MakeMaker distributions.

For Module-Build distributions we do:

perl Build.PL
./Build
./Build test
./Build install

instead.

The latter, being pure Perl, doesn't require the make utility to be present (which may be absent on Windows).

Both of these are core Perl distribution builders.

rwp0 avatar Mar 12 '23 07:03 rwp0

Looks like there are several build systems we need to support: ExtUtils::MakeMaker, Module::Build, Dist::Zilla (which is just a proxy to the MakeMaker in terms of building as far as I understand, but still)

Also there is an issue with prove, see Perl-Toolchain-Gang/Test-Harness#117

hurricup avatar Mar 12 '23 09:03 hurricup

perl on windows may have make or dmake. Msys2 helps a lot with this.

hurricup avatar Mar 12 '23 09:03 hurricup

Dist::Zilla (which is just a proxy to the MakeMaker in terms of building as far as I understand, but still)

Dist-Zilla can be a front-end to many things including ExtUtils-MakeMaker and Module-Build.

It just has a lot of built-in and external plugins that can do almost anything imaginable.

rwp0 avatar Mar 12 '23 09:03 rwp0

I expect a lot of problems with Dist::Zilla because it makes/runs tests in the build sandbox. Not sure how to handle that yet. Probably will need to map stuff like coverage/profiling/debugging

hurricup avatar Mar 12 '23 09:03 hurricup

I expect a lot of problems with Dist::Zilla because it makes/runs tests in the build sandbox. Not sure how to handle that yet. Probably will need to map stuff like coverage/profiling/debugging

Yes, it's not in the core, and has a lot of dependencies, Moose included.

So I think it might be better to start supporting ExtUtils-MakeMaker and Module-Build as the Perl build systems at the initial phase.

What I personally do is just create run configurations for Dist-Zilla to be run in the IDE's Run window which is being almost always just enough for my use case.

So a plain menu with those four command could suffice for now:

dzil build
dzil install
dzil release
dzil clean

rwp0 avatar Mar 12 '23 09:03 rwp0