mljet icon indicating copy to clipboard operation
mljet copied to clipboard

Scan path strategies

Open qnbhd opened this issue 3 years ago • 0 comments

Now,

At the moment, scanning directories for needed dependencies takes place in the current working directory. sometimes this can lead to the following effects:

image

This example pulls dependencies that are not specific to a particular scenario.

There are several solution:

  • Leave it as it is, just warn the user about it.
  • Explicitly ask for the files to be scanned, in some cases scan_path=file is the best option.
  • With python's great features we can use framestack and pull the call location from there, then we can use that file, or its parent.
  • Create some search strategies, for example: cwd - current working directory; explicitly specify the file (just pass the path to it); auto strategy that will use framestack, other options ...

CC: @pacifikus

qnbhd avatar Nov 20 '22 13:11 qnbhd