-
Notifications
You must be signed in to change notification settings - Fork 2
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
Task name namespacing #84
Comments
Moved this back to the 1.7 release so that new features can be added soon. Still need to figure out how before/after directives would work with this feature. Ideas:
|
Additionally, the preprocessing idea would fail for macros or extends statements depending on the final order of the template. Because of the nature of the template processing, I think the namespaces could only be scoped to the root-template or pipeline. |
New idea - when loading a template, if a pipeline context is provided, the task names are converted to When declaring dependencies, task names can include a pipeline or not. This would allow before/after directives to link between pipelines. Input/output directives would still be "global". |
Namespaces are a honking good idea. But tasks have no namespace. If two pipelines are run on the same project, and both pipelines have a task called
start
, it's tracking data will be overwritten by the last pipeline ran. This has been bugging me for a long time, but think I have an idea for how to fix it:Since the import system is handled entirely by Jinja, the template files would have to be pre-processed before loading and rendering. During this process, data could be added which the task loader can identify to prepend task names with pipeline/template info.
Example pipeline
foo
:After preprocessing (still not sure if this would have to happen on disk when installing, or if the DictLoader in Jinja could be used)
Final document after rendering:
And the loader would just:
The text was updated successfully, but these errors were encountered: