In part 1 of this series, we covered parsing NAV objects in text file format in order to get a list of their dependencies. If you haven’t gone through that part yet, I suggest reading it first.
Once we have a list of object dependencies, the next step is to sort them to ensure they are compiled in the proper order (and compiled only once, since some objects may have been imported multiple times from multiple changesets; we only need to compile the final version of the object). We will cover a dependency sorting strategy in this post.