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

Generated Install/Files.pm can't be overridden #393

Closed
djerius opened this issue Apr 18, 2023 · 8 comments
Closed

Generated Install/Files.pm can't be overridden #393

djerius opened this issue Apr 18, 2023 · 8 comments
Labels
🐣Enhancement Useful potential future feature (not a bug)

Comments

@djerius
Copy link

djerius commented Apr 18, 2023

I run perltidy tests as part of my release process, and the Install/files.pm file generated by Alien::Build::MM::build fails my particular brand of tidyness.

I'm more than happy to provide a replacement, but there doesn't seem to be a mechanism to do so.

[This is all done via Dist::Zilla::Plugin::Test::Perl::Critic, and their doesn't appear to be a mechanism to instruct it to ignore certain files]

@djerius
Copy link
Author

djerius commented Apr 18, 2023

A simple approach might be to check if the file is in the distribution and not do anything if it is.

This might cause problems in the future if the functionality of Install/Files.pm changes.

Perhaps requiring a $ALIEN_BUILD_API_VERSION_FOR_INSTALL_FILES (or something suitably bike-shedded) variable be defined in Install/Files.pm and croaking if it return something that's older than what Alien::Build expects?

@plicease
Copy link
Member

I'm sorry, I don't quite understand your suggestion.

My feeling is that [Test::Perl::Critic] should not be checking files in blib, though that will be hard to change now since all_critic_ok simply recurses from .. Failing that I think [Test::Perl::Critic] should provide an option to test specific files + directories instead of .. For an AB based alien you'd want lib and alienfile, for dists that have a script directory you would also want to test that as well.

@djerius
Copy link
Author

djerius commented May 2, 2023

I'm sorry, I don't quite understand your suggestion.

Sorry about that.

Install/Files.pm is generated unconditionally. Instead, only generate it if the author hasn't provided one.

@plicease plicease added the 🐣Enhancement Useful potential future feature (not a bug) label May 2, 2023
@plicease
Copy link
Member

plicease commented May 2, 2023

Install/Files.pm is generated unconditionally. Instead, only generate it if the author hasn't provided one.

Got it, I can do that it and it seems reasonable.

Caveat: if we need to add features to ::Install::Files then stuff may break in the future, and IMO [Test::Perl::Critic] should be fixed. In practice I don't think we have changed the behavior of ::Install::Files since it was first implemented.

@plicease
Copy link
Member

plicease commented May 2, 2023

@djerius can you try it with 3e3d53a and let me know if that does what you need?

@plicease
Copy link
Member

plicease commented May 9, 2023

@djerius I'm working on a release so I went ahead and merged #397, and will close this, but please LMK if this doesn't do what you need.

@plicease plicease closed this as completed May 9, 2023
@djerius
Copy link
Author

djerius commented Aug 17, 2023

Hi, sorry for the long silence. This works for my needs. Thanks!

@plicease
Copy link
Member

@djerius great! no worries. Thanks for the confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐣Enhancement Useful potential future feature (not a bug)
Development

No branches or pull requests

2 participants