     dependencyRoostfile.directory = directory
     dependencyRoostfile.parseFromString(contents)
 
-    let dependencyPackage = dependencyRoostfile.asPackage()
-
-    dependencyPackage.compile()
-
     // Save the Roostfile of the dependency for later
     dependency.roostfile = dependencyRoostfile
+
+    let dependencyPackage = dependencyRoostfile.asPackage()
+
+    return dependencyPackage.compile()
   }// compileDependency
 
 

import Foundation
import Tasker

extension Package {

  var fileManager: NSFileManager {
    get { return NSFileManager.defaultManager() }
  }
  var vendorDirectory: String {
    get { return "\(roostfile.directory)/vendor" }
  }
  var frameworkSearchPaths: [String] {
    get { return roostfile.frameworkSearchPaths }
  }
  var mustRecompile: Bool {
    get {
      let environment = NSProcessInfo.processInfo().environment

    NSFileManager.defaultManager().removeItemAtPath(temporaryObjectPath, error: &error)
  }

  func compileModule(module: Package.Module) -> CompilationResult {
    // First check if we even need to compile it
    let libraryPath = libraryFilePathForModule(module)
    let libraryModificationDate = getFileModificationDate(libraryPath)

    if let date = libraryModificationDate {
      if !module.lastModificationDate.isNewerThan(date) {
        return .Skipped
      }
    }

