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

[RewriteVersion] Do not warn about missing $VERSION in packages hidden from indexing #7

Open
dolmen opened this issue Jan 8, 2015 · 3 comments
Labels

Comments

@dolmen
Copy link

dolmen commented Jan 8, 2015

My distribution has internal packages hidden from indexing using the package\nFoo trick.
As those package are private they don't need to have an explicit $VERSION: not providing $VERSION is even a way to ensure that noone relies on a particular $VERSION of those packages.

But [RewriteVersion] (and probably [BumpVersionAfterRelease], I haven't checked yet) warns about those packages:

[RewriteVersion] Skipping: no "our $VERSION = '...'" found in "lib/..."

I think it would be worth hidding the warning if no package has been found in the file. (I also use [MetaProvides::Package] that already complains about hidden packages).

@dagolden
Copy link
Collaborator

dagolden commented Jan 9, 2015

The way it works now, it doesn't do any package analysis whatsoever -- it's just doing string replacement.

I don't want to add package analysis, but I might be willing to do something like this:

  • if META 'provides' exists (which it might because the content is generated late), then missing version for any module/file listed in 'provides' will warn.
  • If there is no META 'provides', every missing file warns

That way, assuming one gives a 'provides', it doesn't matter if the packages have the "hide from PAUSE" trick or are excluded via "no_index". If there is a 'provides' we trust that it's enumerating the things that matter.

@dolmen
Copy link
Author

dolmen commented Jan 9, 2015

I like this proposal.

But for the implementation I see some difficulties. Warnings are currently displayed while the files are scanned. This would have to be delayed to later.

[MetaProvides::Package] uses version from files. So it has to pass after [RewriteVersion] to get the proper version (for the case where the user overrides the version with $ENV{V}). So [RewriteVersion] warnings should be displayed after [MetaProvides::Package] (or maybe after any DZR::MetaProvider::Provider). Is that possible?

@dagolden
Copy link
Collaborator

dagolden commented Jan 9, 2015

It could accumulate the data as it goes and then issues warnings using the AfterBuild role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants