You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/10/22 23:48:40 UTC

svn commit: r707208 - /incubator/buildr/trunk/rakelib/package.rake

Author: assaf
Date: Wed Oct 22 14:48:39 2008
New Revision: 707208

URL: http://svn.apache.org/viewvc?rev=707208&view=rev
Log:
Error message to detect unspecified transitive dependencies.  This seem to be a problem when checking RSpec with RubyGems 1.2 or earlier.

Modified:
    incubator/buildr/trunk/rakelib/package.rake

Modified: incubator/buildr/trunk/rakelib/package.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/package.rake?rev=707208&r1=707207&r2=707208&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/package.rake (original)
+++ incubator/buildr/trunk/rakelib/package.rake Wed Oct 22 14:48:39 2008
@@ -47,16 +47,19 @@
 desc 'Look for new dependencies, check transitive dependencies'
 task 'dependency' do
   puts "Checking that all dependencies are up to date ..."
+=begin
   # Find if anything has a more recent dependency.  These are not errors, just reports.
   for dep in spec.dependencies
     current = Gem::SourceInfoCache.search(dep, true, true).last
     latest = Gem::SourceInfoCache.search(Gem::Dependency.new(dep.name, '>0'), true, true).last
     puts "A new version of #{dep.name} is available, #{latest.version} replaces #{current.version}" if latest.version > current.version
   end
+=end
 
   # Returns orderd list of transitive dependencies for the given dependency.
   transitive = lambda { |depend|
     dep_spec = Gem::SourceIndex.from_installed_gems.search(depend).last
+    fail "No specification for dependency #{depend}" unless dep_spec
     dep_spec.runtime_dependencies.map { |trans| transitive[trans].push(trans) }.flatten.uniq }
   # For each dependency, make sure *all* its transitive dependencies are listed
   # as a Buildr dependency, and order is preserved.