         @deserializerManager.add
           name: deserializerName,
           deserialize: (state, atomEnvironment) =>
+            @deserialized = true
             @registerViewProviders()
             @requireMainModule()
             @initializeIfNeeded()

  mainModule: null
  mainInitialized: false
  mainActivated: false

  ###
  Section: Construction

      @mainModulePath = fs.resolveExtension(mainModulePath, ["", CompileCache.supportedExtensions...])

  activationShouldBeDeferred: ->
    (@hasActivationCommands() or @hasActivationHooks() or @hasDeferredURIHandler()) and not @deserialized

  hasActivationHooks: ->
    @getActivationHooks()?.length > 0
