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

$VERSION is not parsable via static analysis #12

Open
karenetheridge opened this issue Jul 24, 2015 · 3 comments
Open

$VERSION is not parsable via static analysis #12

karenetheridge opened this issue Jul 24, 2015 · 3 comments

Comments

@karenetheridge
Copy link

This line in SVN/Core.pm:

$SVN::Core::VERSION = "$SVN::Core::VER_MAJOR.$SVN::Core::VER_MINOR.$SVN::Core::VER_MICRO";

...means that static analysis tools like Module::Metadata and MM->parse_version cannot determine a version. The code to determine the version must be contained all on one line and not depend on any values outside of it.

I suggest you generate that version assignment line during the build process.

@karenetheridge
Copy link
Author

@jamessan
Copy link

SVN::Core is from upstream Subversion code. It's not part of this module, other than the module providing a means to easily install it. That discussion should probably be brought up with the Subversion maintainers.

@karenetheridge
Copy link
Author

It sounds like there are two options:

  • patch the upstream subversion code;
  • make the patch here locally (and reapply it when packaging each release).

The second option has the advantage of not having to wait for anyone else to make the change.
Here is the appropriate patch:

--- src/subversion/subversion/bindings/swig/perl/native/Core.pm 2015-09-26 20:18:48.000000000 -0700
+++ src/subversion/subversion/bindings/swig/perl/native/Core-new.pm 2015-09-26 20:21:13.000000000 -0700
@@ -3,8 +3,8 @@

 package SVN::Core;
 use SVN::Base qw(Core svn_ VERSION);
-# Some build tool hates VERSION assign across two lines.
-$SVN::Core::VERSION = "$SVN::Core::VER_MAJOR.$SVN::Core::VER_MINOR.$SVN::Core::VER_MICRO";
+# from constants defined in svn_version.h
+$SVN::Core::VERSION = "1.8.11";

 =head1 NAME

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