• Cristian Maglie's avatar
    [skip-changelog] Some refactorings on library resolution code (#1766) · 4bf18d61
    Cristian Maglie authored
    * Transformed FailIfImportedLibraryIsWrong into a functon
    
    There was no need to have it encapsulated in a Command
    
    * Move variable near the place it belongs
    
    * Dramatically simplified SourceFile object
    
    Removed dependency from types.Context
    
    * Added comments about utility folder role in library discovery
    
    * Simplified if construct
    
    * Made RelativePath private
    
    * Skip includes detection of precompiled libraries early
    
    Instead of skipping include detection later, avoid to add the sources in
    the queue right from the beginning.
    
    * Keep extra-include dirs due to "utility" folder in SourceFile object
    
    Also remove the reference to the original Library object because it's no
    more needed.
    4bf18d61
container_find_includes.go 18.3 KB