system/src/sc/lang/js/JSRuntimeProcessor.java
public void postStart(LayeredSystem sys, Layer genLayer) {
      // For each file, for each type in that file, look for transitive dependencies on those types that might need to be added
      addTransitiveDependencies();

      sortJSFiles();

      int numOrigChangedJSFiles;
      entryPointsFrozen = true;
      do {
         numOrigChangedJSFiles = changedJSFiles.size();
         for (Iterator<EntryPoint> it = jsBuildInfo.entryPoints.values().iterator(); it.hasNext(); ) {
            EntryPoint ent = it.next();
            ent.initLayer(sys);
            if (ent.layer != null && !genLayer.buildsLayer(ent.layer))
               continue;

            if (isJSFileChanged(ent.jsFile)) {
               if (!ent.initType(sys)) {
                  if (system.options.verbose)
                     System.out.println("Type: " + ent.typeName + " removed from source since last build");
                  // In an incremental compile, if the type was removed since the last build, need to clean it out of the entry points.
                  // TODO: remove this from anyplace else in the JS build info, like the JS type info?
                  it.remove();
               }
            }
         }
         if (queuedEntryPoints != null) {
            for (EntryPoint ent: queuedEntryPoints.values())
               jsBuildInfo.entryPoints.put(ent, ent);
            queuedEntryPoints = null;
         }
      // Keep going as long as this process added any new JS files
      } while (changedJSFiles.size() != numOrigChangedJSFiles);
      entryPointsFrozen = false;

      if (genLayer == system.buildLayer)
         postStarted = true;

      if (jsDebug) {
         System.out.println("Sorted jsFiles: " + jsBuildInfo.jsFiles + " using dependencies:\n" + jsBuildInfo.typeDeps);
      }
   }
/** Called after all components have been started. We should not have any more entryPoints added after this point */
Called after all components have been started. We should not have any more entryPoints added after this point
Called after all components have been started . We should not have any more entryPoints added after this point
public void postStart(LayeredSystem sys, Layer genLayer) {
      addTransitiveDependencies();
      sortJSFiles();
      int numOrigChangedJSFiles;
      entryPointsFrozen = true;
      do {
         numOrigChangedJSFiles = changedJSFiles.size();
         for (Iterator<EntryPoint> it = jsBuildInfo.entryPoints.values().iterator(); it.hasNext(); ) {
            EntryPoint ent = it.next();
            ent.initLayer(sys);
            if (ent.layer != null && !genLayer.buildsLayer(ent.layer))
               continue;
            if (isJSFileChanged(ent.jsFile)) {
               if (!ent.initType(sys)) {
                  if (system.options.verbose)
                     System.out.println("Type: " + ent.typeName + " removed from source since last build");
                  it.remove();
               }
            }
         }
         if (queuedEntryPoints != null) {
            for (EntryPoint ent: queuedEntryPoints.values())
               jsBuildInfo.entryPoints.put(ent, ent);
            queuedEntryPoints = null;
         }
      } while (changedJSFiles.size() != numOrigChangedJSFiles);
      entryPointsFrozen = false;
      if (genLayer == system.buildLayer)
         postStarted = true;
      if (jsDebug) {
         System.out.println("Sorted jsFiles: " + jsBuildInfo.jsFiles + " using dependencies:\n" + jsBuildInfo.typeDeps);
      }
   }
public void postStart ( LayeredSystem sys , Layer genLayer ) { addTransitiveDependencies ( ) ; sortJSFiles ( ) ; int numOrigChangedJSFiles ; entryPointsFrozen = true ; do { numOrigChangedJSFiles = changedJSFiles . size ( ) ; for ( Iterator < EntryPoint > it = jsBuildInfo . entryPoints . values ( ) . iterator ( ) ; it . hasNext ( ) ; ) { EntryPoint ent = it . next ( ) ; ent . initLayer ( sys ) ; if ( ent . layer != null && ! genLayer . buildsLayer ( ent . layer ) ) continue ; if ( isJSFileChanged ( ent . jsFile ) ) { if ( ! ent . initType ( sys ) ) { if ( system . options . verbose ) System . out . println ( "Type: " + ent . typeName + " removed from source since last build" ) ; it . remove ( ) ; } } } if ( queuedEntryPoints != null ) { for ( EntryPoint ent : queuedEntryPoints . values ( ) ) jsBuildInfo . entryPoints . put ( ent , ent ) ; queuedEntryPoints = null ; } } while ( changedJSFiles . size ( ) != numOrigChangedJSFiles ) ; entryPointsFrozen = false ; if ( genLayer == system . buildLayer ) postStarted = true ; if ( jsDebug ) { System . out . println ( "Sorted jsFiles: " + jsBuildInfo . jsFiles + " using dependencies:\n" + jsBuildInfo . typeDeps ) ; } }
Called after all components have been started.
Called after all components have been started .
// For each file, for each type in that file, look for transitive dependencies on those types that might need to be added // In an incremental compile, if the type was removed since the last build, need to clean it out of the entry points. // TODO: remove this from anyplace else in the JS build info, like the JS type info? // Keep going as long as this process added any new JS files