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

Fix strange warning from existing META.yml license info conflicting with Makefile.PL #436

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

demerphq
Copy link
Member

See #434 for details of an example of this.

This patch keeps track of the generated metadata from the WriteMakefile() command, and then later when we load the data from META.yml we notice if the license data differs between the two.

This avoids the incorrect warning about an invalid license, and allows us to point out when there is a discrepancy so developers can fix it.

lib/ExtUtils/MM_Any.pm Outdated Show resolved Hide resolved
@Leont
Copy link
Member

Leont commented Mar 1, 2023

This branch really needs a tests that shows what the problem really is. I have a strong feeling it's really the dist that's the problem.

And even if it wasn't the solution sits wrong with me, if anything the code should be simpler not more complex.

demerphq added 2 commits March 1, 2023 08:17
…racefully

Use eval to deal with underbars in the version number.
…le.PL

Detect if the generated license metadata from Makefile.PL is different
from that in the META.yml and warn about it. Also do not complain about
it being "unknown" when in fact it is being overiden by the META.yml file.
@demerphq
Copy link
Member Author

demerphq commented Mar 1, 2023

This branch really needs a tests that shows what the problem really is.

Agreed. GIven the noises i was hearing from you about this on p5p I didnt want to put much more effort into it beyond proving that we could do better than we are doing. With this patch in place the Slay::Makefile outputs the following.

$ perl Makefile.PL 
Generating a Unix-style Makefile
Writing Makefile for Slay::Makefile
Your META.yml has a different license (unknown) than your Makefile.PL (perl_5)
Writing MYMETA.yml and MYMETA.json

if anything the code should be simpler not more complex.

Everthing should be as simple as possible, but not simpler. - Einstein.

It looks like we have set up a complex process that does the wrong thing in a bunch of different ways, it doesn't surprise me that requires some complexity to deal with. The complexity of a solution mirrors the complexity of the problem domain it solves. This problem domain seems complex.

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.

3 participants