justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: Hi Justin! Would you mind describing exactly how JSFX resolves its imports? It seems to search fx folder recursively, but also ignores path "part" that doesn't exist? Thanks :)
Asked by Souf (37.166.128.x) on April 17 2024, 11:30am
Reply on April 17 2024, 1:32pm (edited at April 17 2024, 1:33pm):
    If you specify a relative_path, e.g a/b/c.jsfx-inc: it first looks for path_of_calling_code/a/b/c.jsfx-inc, then path_of_calling_code/b/c.jsfx-inc then path_of_calling_code/c.jsfx-inc.

    If you specify a filename only, e.g. c.jsfx-inc, it first looks in path_of_calling_code/c.jsfx-inc.

    If the above paths are not found, then it does a recursive search of the JSFX Effects directory for the file in question, ignoring any relative path. The recursive search is a bit random in the order, if you have foo/c.jsfx-inc and foo/bar/way/down/deep/c.jsfx-inc, it could return either depending on the filesystem. (IMO this isn't ideal, it would be nicer if it always returned foo/c.jsfx-inc in that case, but alas...)


Comments:
  • Posted by Souf (88.181.136.x) on April 17 2024, 6:16pm:
    Thanks!


Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2024 Justin Frankel. | RSS