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/07/28 19:15:27 UTC

svn commit: r680403 - in /incubator/buildr/trunk: CHANGELOG lib/buildr/core/compile.rb

Author: assaf
Date: Mon Jul 28 10:15:26 2008
New Revision: 680403

URL: http://svn.apache.org/viewvc?rev=680403&view=rev
Log:
Fixed: BUILDR-108 Trace to explain why a compile is done (Lacton).

Modified:
    incubator/buildr/trunk/CHANGELOG
    incubator/buildr/trunk/lib/buildr/core/compile.rb

Modified: incubator/buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/CHANGELOG?rev=680403&r1=680402&r2=680403&view=diff
==============================================================================
--- incubator/buildr/trunk/CHANGELOG (original)
+++ incubator/buildr/trunk/CHANGELOG Mon Jul 28 10:15:26 2008
@@ -5,6 +5,7 @@
 supported terminal, error message is red.
 * Changed: BUILDR-104 Buildr::group has :under and :version, but not :type.
 Now it has :type too (Lacton).
+* Fixed: BUILDR-108 Trace to explain why a compile is done (Lacton).
 * Fixed: BUILDR-106 download(artifact(...)=>url) broken in certain cases
 (Lacton).
 

Modified: incubator/buildr/trunk/lib/buildr/core/compile.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/core/compile.rb?rev=680403&r1=680402&r2=680403&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/core/compile.rb (original)
+++ incubator/buildr/trunk/lib/buildr/core/compile.rb Mon Jul 28 10:15:26 2008
@@ -122,6 +122,8 @@
         map = compile_map(sources, target)
         return false if map.empty?
         return true unless File.exist?(target.to_s)
+        source_files_not_yet_compiled = map.select { |source, target| !File.exist?(target) }
+        puts "Compile needed because source file #{source_files_not_yet_compiled[0][0]} has no corresponding #{source_files_not_yet_compiled[0][1]}" if Buildr.application.options.trace && !source_files_not_yet_compiled.empty?
         return true if map.any? { |source, target| !File.exist?(target) || File.stat(source).mtime > File.stat(target).mtime }
         oldest = map.map { |source, target| File.stat(target).mtime }.min
         return dependencies.any? { |path| file(path).timestamp > oldest }