Uploaded image for project: 'Trapperkeeper'
  1. Trapperkeeper
  2. TK-453

TK services can't be found when AOT'd code is mixed with non-AOT'd code



    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • TK 1.5.1
    • None
    • TrapperKeeper
    • None
    • Needs Assessment
    • Needs Assessment


      When I AOT-compile code that includes TK service definitions and then bring the jar with the AOT'd code in as a dependency to a project where those TK services were defined – so the namespace exists both in AOT form in the jar, and in source form in the project's source directories – I get an error when I try to compile the namespace:

      Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: orchestrator-dispatch-service in this context, compiling:(puppetlabs/orchestrator/dispatch.clj:542:1)

      This is a little bizarre to me because the defservice form that should define that symbol is right there, but when I try to evaluate the form, I get that error. I don't understand why. I can macro-expand it.

      nick has described getting the same error in a different situation with a jar containing AOT'd code. In his case, he has an uberjar with all the namespaces listed in the bootstrap.cfg AOT-compiled. When he tries to add a new service (that was not AOT'd) to the bootstrap.cfg, he gets the same kind of error:

      Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: nrepl-service in this context, compiling:(puppetlabs/trapperkeeper/services/nrepl/nrepl_service.clj:48:1)




            dan.lidral-porter Dan Lidral-Porter
            dan.lidral-porter Dan Lidral-Porter
            0 Vote for this issue
            3 Start watching this issue



              Zendesk Support