depfun finds unrelated dependancies

3 views (last 30 days)
Gabriel
Gabriel on 12 Mar 2014
Answered: Kelly Kearney on 12 Mar 2014
Hello,
I'm having trouble using 'depfun' to identify dependencies in my code. When I run the function, it reports a dependency on a file in my MATLAB user directory.
The file I'm running depfun on is in a package '+biopack\resolveoverlaps.m' and has no actual dependencies but the search for dependencies is finding 'ResolveOverlaps.m' in my MATLAB folder.
Just to make things more peculiar, the Dependency Report for the file does not find this file from my user space.
I need a reliable, programmatic way of confirming that the code I'm executing is coming from a specific set of folders.
Does anyone know why depfun is reporting false dependencies? Is there a way of configuring it that follows the expected behaviour as shown in the 'dependency report'? Does anyone have any ideas for a way of managing the scenario to tell the difference between a file that has a dependency on a file of the same name in your user folder and this false dependency?
Any advice would be greatly appreciated.
- Gabe
  1 Comment
Gabriel
Gabriel on 12 Mar 2014
On the plus side, the problem seems to be fixed in R2014a by using matlab.codetools.requiredFilesAndProducts instead.

Sign in to comment.

Answers (1)

Kelly Kearney
Kelly Kearney on 12 Mar 2014
I stopped using depfun years ago... I find it often makes these sort of mistakes, where it latches on to a shadowed function or subfunction rather than the proper dependency, and when you have a lot of toolboxes installed this can lead to ridiculous results (returning hundreds of incorrect dependencies for a single file).
The newer version may be a little better, but my solution was to switch to fdep to analyze dependencies. Much more reliable, in my opinion, and gives more detailed output as well.

Categories

Find more on Downloads in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!