Skip to content

Add option to specify root folder when searching for existing applets #493

@jdidion

Description

@jdidion

When building a workflow, the default search scope is the target folder only (specified by -folder).

Setting the -projectWideReuse flag instructs the compiler to look for existing applets/workflows in the entire target project before generating new ones. The search starts at the root folder (/) and is recursive. This can take a long time for large projects.

Add a new option, -executableReuseFolder, that specifies the folder where the search should start.

  • This option is mutually exclusive with -projectWideReuse.
  • The option's value is a project folder
    • The folder must start with /
    • The folder may have a trailing /
    • If the folder has a trailing /**, the search will be recursive, otherwise the search will not be recursive
  • Resolution of ./ and ../ are not supported.
  • If the specified folder does not exist, a warning is issued but compilation does not fail - the compiler just does not reuse any existing applets

There should be a test for each of these:

  • -projectWideReuse is also specified: dxCompiler throws "can not specify both projectWideReuse and executableReuseFolder" error
  • -executableReuseFolder /**: is the entire project, recursively. Equivalent to '-projectWideReuse`
  • -executableReuseFolder /a/b/** : dxCompiler will search the folder /a/b/ recursively for executables to reuse
  • -executableReuseFolder /a/b: dxCompiler will search the folder /a/b/non-recursively for executables to reuse
  • -executableReuseFolder /a/b/: same as previous
  • -executableReuseFolder /nonExistentFolder/ : dxCompiler will search emilt a warning and not reuse any executables
  • -executableReuseFolder a/b: dxCompiler throws "executableReuseFolder argument must start with '/'" error
  • -executableReuseFolder /a/../a: dxCompiler throws 'Folder name ".." is reserved' error (may happen during compilation, after the initial argument checking)
  • -executableReuseFolder /a/./: same as previous

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions