Partially addresses #563: Introduces use functionality with wildcards to load elements from other files.
wildcard use use * from "relative/path/file.jv"
validation to ensure used files exist
rename the use property of block type TableTransformer to uses, otherwise the new keyword use would be ambiguous
for this PR, export all reusable root-level elements in a file besides pipelines
when using the interpreter cli, always load the whole directory of the jv file into the workspace (so they can be used)
For testing, introduce a helper function, parseTestFileInWorkingDir that allows loading the test files with their working directory instead of only reading the single file. This is a competing test setup with the used parseHelper function. We should discuss whether we need two separate test setups or if this one should be applied everywhere.
Future Work
I tried to keep the PR short, so here an outlook of what's next
I see the follow-up tasks before tackling further import features:
Auto-completion for file paths
Rework of the test setup (as mentioned above)
Check whether the import influences auto-completion functionality in general
I see the next import features to be:
Explicitly publish elements instead of publishing all
Explicitly use elements instead of using a wildcard
@rhazn @joluj I'd like to tackle this PR in a test-driven manner. I added all test scenarios that came to my mind in 9637146. Feedback on them is already very welcome ;-)
Edit: removed them from this PR in a566bc4 as I want to keep the PR short.
Partially addresses #563: Introduces
use
functionality with wildcards to load elements from other files.use * from "relative/path/file.jv"
use
property of block typeTableTransformer
touses
, otherwise the new keyworduse
would be ambiguousparseTestFileInWorkingDir
that allows loading the test files with their working directory instead of only reading the single file. This is a competing test setup with the usedparseHelper
function. We should discuss whether we need two separate test setups or if this one should be applied everywhere.Future Work
I tried to keep the PR short, so here an outlook of what's next
I see the follow-up tasks before tackling further import features:
I see the next import features to be:
publish
elements instead of publishing alluse
elements instead of using a wildcard