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

CPANFile Plugin Creating Two cpanfiles #700

Closed
theory opened this issue Oct 17, 2021 · 5 comments
Closed

CPANFile Plugin Creating Two cpanfiles #700

theory opened this issue Oct 17, 2021 · 5 comments

Comments

@theory
Copy link
Contributor

theory commented Oct 17, 2021

Looks like a recent-ish change to Dist::Zilla causes some plugin to create a cpanfile even if the CPANFile plugin isn't enabled. Noticed with this config:

[CPANFile]
filename = dist/cpanfile

Used to just create dist/cpanfile, but now I see there is also a cpanfile. If I remove the filename line, I get an error:

[DZ] attempt to add cpanfile multiple times; added by: filename set by GatherDir (Dist::Zilla::Plugin::GatherDir line 226); encoded_content added by GatherDir (Dist::Zilla::Plugin::GatherDir line 227); text from coderef added by CPANFile (Dist::Zilla::Plugin::CPANFile line 113)
aborting; duplicate files would be produced at lib/perl5/site_perl/5.30.2/Dist/Zilla/App/Command/build.pm line 107.

Does GatherDir now always create a cpanfile?

@Grinnz
Copy link
Contributor

Grinnz commented Oct 17, 2021

No, but it will gather one if it exists in the directory and is not excluded.

@theory
Copy link
Contributor Author

theory commented Oct 17, 2021

Seems like it ought not do that if CPANFile generated it.

@Grinnz
Copy link
Contributor

Grinnz commented Oct 17, 2021

Plugins have no interaction as to what files they generate in the build. It's up to you to prevent a file from being gathered if it is also being generated.

@theory
Copy link
Contributor Author

theory commented Oct 17, 2021

Right, but didn't do that before; perhaps the order in which the plugins run is non-deterministic, and I just by chance didn't notice it happen before?

@theory
Copy link
Contributor Author

theory commented Oct 17, 2021

I'm an idiot. It is not generating the root cpanfile, I just happened to have a copy of it in my working directory, not committed or anything. 🤦🏻 Sorry for the noise.

@theory theory closed this as completed Oct 17, 2021
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

No branches or pull requests

2 participants