-
Notifications
You must be signed in to change notification settings - Fork 7
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
add or retain an eval $VERSION when version has an underscore #11
add or retain an eval $VERSION when version has an underscore #11
Conversation
f84fdac
to
c33b1e1
Compare
PkgVersion modified similarly in rjbs/Dist-Zilla#466 |
The logic is incorrect. The version shouldn't be eval'd if it's a tuple, Nor am I sold on doing anything to further encourage underscores, which That's why we have the #TRIAL comment and the -TRIAL suffix. Cc: @rjbs
|
Please clarify? '_' is not numeric, so whenever it is present, the version must be eval'd to remove it. (edit: I see what you mean; have fixed in a force-push.)
I used to believe this, but especially for dual-life modules, using an underscore to indicate a trial version is invaluable. It's the only way in which a version is obviously a trial version, e.g. when reading a list of installed modules in a smoke report. I'm requesting this support be added here and in [PkgVersion] expressly to support the management of dual-life modules. |
Ah I see what you mean about when to eval. Will fix. |
c33b1e1
to
3c91a6d
Compare
Still wrong logic. Fails for
See how horrible underscores are? The number of people who know how to correctly deal with them can probably be counted on one hand and even they (me included!) get it wrong occasionally. Even p5p can't seem to resist sticking underscores in things. Underscores must be stopped. Version reports in smoke tests aren't a compelling reason to encourage further use. |
I've not seen this case be made anywhere yet, certainly not as vocally as the discussion around v-strings or two-dot versions. |
@dagolden Nor am I sold on doing anything to further encourage underscores, which You think they don't. I think they do. DBIx::Class relies on both, using underscores for alphas and TRIAL for RCs. If you want to exclude underscore based versions you are intentionally ignoring a valid and long standing part of cpan for personal political reasons. I don't believe you've made that case. |
There's legitimate advantages to underscore versions. Maybe there are bigger reasons to not use them. I'm willing to be persuaded, but that discussion needs to happen before action is taken. |
@shadowcat-mst If you want to exclude underscore based versions you are intentionally ignoring a valid and long standing part of cpan for personal political reasons s/political/technical/ |
@dagolden you keep saying that but I've offered to fix it technically repeatedly and every time I offer that you ignore it and then claim it's a technical question. John Peacock refusing to listen to people is not a technical reason. If you actually want to fix this, you've known for years I'd be happy to help. If you don't, stop lying about the reasons for destroying a useful feature because you don't want to have the argument. "I don't want to have the argument" is a valid reason. Claiming that's a technical rather than a political reason is not valid. Pick a consistent position please. |
Technical rationale: Please describe unambiguously for an 'average' Perl developer how to specify a dependency on a non-indexed module containing an underscore in its Your answer should include:
Extra credit is available for explaining how the above can be done without reading the dependency's source to see how they've defined Look – I think you'd acknowledge that I've dug into the details of However, not using underscores in versions makes it all easy. Want to specify a non-indexed version as a prerequisite? Just use it. In Makefile.PL. On a I think that's a powerful technical rationale: horrible complexity versus simplicity (except for the decimal vs tuple duality bit). On consistency:
So I think I've been consistent for a long time that attaching semantics to underscores is a bad idea. Would I advocate that something like EUMM drop support for underscore (to the extent it has much support anyway)? No. I know CPAN has had underscores for ages. But I have no problem advocating against long-standing (bad) practice in a tool for authors. I'm fine responding to a user's argument "please, I want to use underscores with this tool you wrote" with the response "no, you really don't". I'm not going out filing bug tickets for every distro that uses underscore. I'm saying "no, I don't want to include a feature to help authors make a bad decision". |
@dagolden I've offered to write this before now and you've said "but JPEACOCK won't accept it so I don't care". So I call it political. |
Can we make sure this ticket doesn't stale? The history of this debate is of no interest to most people on the sidelines. The bullet list presented by @dagolden at the beginning of #11 (comment) is a reasonable list of things "the PTG at large must have answers to". @shadowcat-mst would you be able to put together a technical answer to it? (assume JPEACOCK never existed, commits to both CPAN and p5p are non-problems, yadayada) |
After reflecting on this, I'm inclined to make users opt-in to decimal underscore support with a config option. |
perhaps something like this if the config is not set and an underscore is not seen? karenetheridge/Dist-Zilla-Plugin-RewriteVersion-Transitional@676a4ff (I haven't updated this PR to reflect the edits I made for PkgVersion, as I wanted to see where this discussion went.. but I think the PkgVersion changes are correct -- rjbs/Dist-Zilla#466 ) |
3c91a6d
to
ead6e11
Compare
@dagolden config option seems fine to me @karenetheridge "warn loudly and mention the config option exists" would work for me |
Note: I'm not in a hurry for this PR. I'd rather get it right and be slow than get it wrong and have to go fix downstream. |
Rebased, added config option and shipped to CPAN as -TRIAL |
did you upload? I see nothing new on PAUSE. |
ok, it's not on https://metacpan.org/recent nor did GumbyNET7 mention it on irc, so one of the data feeds must be down again. |
I thought we'd decided on irc that inlining the munged version (a la |
The historical usage is "eval", so that's fine for this. Since it's only added for underscores and version tuples with underscores are prohibited, it will only ever exist for decimal underscore versions. |
Adds
$VERSION = eval $VERSION;
when using an underscore trial version; it turns out that Dist::Zilla is quite happy to deal with underscore versions everywhere; we just usually don't :)(I'm doing a similar patch for PkgVersion; will link when it's up.)
This includes the commits for PR #10 to resolve conflicts. Please take that one first; it is much more important.