You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For me the question is: What does a user need to know to solve the problem?
I would say: the name of the files that are involved in the cyclic import (and not necessarily the entire import flow).
Currently this is the error message:
Error: 'Cyclic imported json file '... /dynamic_imports/YYY/AA/BB/CC/imported.CC.jsonp'!
In file: '... /dynamic_imports/YYY/AA/BB/CC/DD/imported.DD.jsonp'
In file: '... /dynamic_imports/YYY/AA/BB/CC/imported.CC.jsonp'
In file: '... /dynamic_imports/YYY/AA/BB/imported.BB.jsonp'
In file: '... /dynamic_imports/YYY/AA/imported.AA.jsonp'
In file: '... /dynamic_imports/YYY/imported.jsonp'
In file: '... /jpp_examples_01.jsonp''!
This is too much. Because it's hard to find the relevant information in this list. In my opinion the user only needs to know that CC is imported by DD and previously by BB also.
An alternative error message could be:
Cyclic import error: The file '... /dynamic_imports/YYY/AA/BB/CC/imported.CC.jsonp' is imported by file '... /dynamic_imports/YYY/AA/BB/CC/DD/imported.DD.jsonp'
and by file '... /dynamic_imports/YYY/AA/BB/imported.BB.jsonp' before. But every file can only be imported once.
Another question that came into my mind: What will happen, if the JsonPreprocessor ignores all cyclic imports (silently in background)? Without throwing an error? Will this have any negative impact? Is there a certain reason to stop? Ok, a cyclic import may cause an endless loop in the code. But that can be prevented. Does it change anything if the same is imported again? If not, the JsonPreprocessor can simply ignore the import of all files that are already imported. Maybe a cyclic import is worth a warning in console only.
I am not really sure about this - but I have some doubts.
The text was updated successfully, but these errors were encountered:
"But every file can only be imported once."
This is not correct.
Cyclic imports are not allowed, but the same file can be imported to different places in the configuration.
Recursion with the same file is not allowed.
Scenario: Cyclic import
Use case (order of file imports):
For me the question is: What does a user need to know to solve the problem?
I would say: the name of the files that are involved in the cyclic import (and not necessarily the entire import flow).
Currently this is the error message:
This is too much. Because it's hard to find the relevant information in this list. In my opinion the user only needs to know that
CC
is imported byDD
and previously byBB
also.An alternative error message could be:
Another question that came into my mind: What will happen, if the JsonPreprocessor ignores all cyclic imports (silently in background)? Without throwing an error? Will this have any negative impact? Is there a certain reason to stop? Ok, a cyclic import may cause an endless loop in the code. But that can be prevented. Does it change anything if the same is imported again? If not, the JsonPreprocessor can simply ignore the import of all files that are already imported. Maybe a cyclic import is worth a warning in console only.
I am not really sure about this - but I have some doubts.
The text was updated successfully, but these errors were encountered: