Skip to content
  • Justin Timmons's avatar
    fix: load all protofiles at once to fix partial package import issues · f45f2c57
    Justin Timmons authored
    whenever protoLoader handles a file import it will attempt to unify that file
    into the overall 'package definition' for that package. However, since we were
    invoking protoLoader multiple times we could end up failing to fully unify
    some of those packages. Take for example:
    
      - file A imports file 'common/first.proto' in the 'common' package
      - file B imports file 'common/second.proto' in the 'common' package
    
    if we load files A & B in separate protoLoader.load() calls then it cannot unify
    them and each definition will have a partial view of the 'common' package. This
    will cause issues when we attempt to lookup info on the 'common' package later.
    
    loading all of these files at once will allow protoLoader to have a single view
    of that 'common' package
    f45f2c57