Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested CQL Files in Folders #61

Open
csenn opened this issue Nov 28, 2022 · 0 comments
Open

Nested CQL Files in Folders #61

csenn opened this issue Nov 28, 2022 · 0 comments

Comments

@csenn
Copy link

csenn commented Nov 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant