Skip to content

Nested CQL Files in Folders #61

Open
@csenn

Description

@csenn

When managing a large number of cql files, a single flat folder of cql files can get unwieldy. Having nested sub-folders can help.

When searching for diagnostics (red squiggles) with the following directory strucutre:

  • cql
    • file1-0.0.1.cql
    • /sub-folder
      • file2-0.0.1.cql

file1.cql WILL properly include file2.cql. But file2.cql WILL NOT properly include file1.cql.

The following line shows that "root" is being searched recursively, however root is not called with with the /cql directory but the directory of the current file's parent. In other words file1 will look anywhere in /cql, but file2 will only look in /sub-folder.

https://github.com/DBCG/cql-language-server/blob/b07a791522a40ccadd6184ab5e615fddc5df68df/ls/server/src/main/java/org/opencds/cqf/cql/ls/server/service/FileContentService.java#L54

Firstly, is this uni-directional resolution intentional?

Second, are there already thoughts on nested folders in cql? It would probably be pretty easy to pass in the /cql folder always as "root" in the above function, but there may be issues such as test/execute folder locations and the requirement that no two files can have the same {name}-{version}.cql in multiple folders.

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