Skip to content

06. Issues

poseidonCore edited this page May 17, 2016 · 17 revisions

######PREFETCHING MODULES CALLED BY VARIABLE IDS Because the prefetching looks for literal patterns like require("./someModule") in the module definitions, and it uses this as its sole basis for fetching, there will be occasions where patters like require(name) will fail because the value of name can not be determined at the point of definition inspection.

TODO: To circumvent this, I will be implementing a synchronous process to allow dynamically required modules to be fetched synchronously while executing module code, as a fail-safe mechanism of last resort.


######MISSING MODULE PARAMETERS
Some module parameters are currently missing from the NodalRequire interface for module. These are not currently critical, but will be addressed. See this page for more info.

TODO: Add in support for missing module properties.


######SYNCHRONOUS MODE
There is currently no support for synchronous mode. Some browsers don't support synchronous mode well, but I intend to offer it as a standard feature for all processes. The default will be asynchronous still for prefetched modules.

TODO: Add in support for synchronous fetching.


######MULTIPLE SIMULTANEOUS CALLS TO NodalRequire.requireAsync
Currently, you should not make multiple simultaneous calls to NodalRequire.requireAsync. If you do, you will confuse the code at the point of exiting the final process and and only the last callback and principal module will be executed.

TODO: This will eventually be resolved by wrapping the process in a closure.


######RELATIVE ADDRESSING TO LOADER FOLDER
Currently, NodalRequire does not know how to handle patterns like require("/moduleName"). Ideally, these would be resolved from the loader folder. The loader is the HTML document that was loaded into the browser to start the process. This is not Node.js standard behaviour.

TODO: Modules with a relative address starting with / are searched from the loader folder.


######RELATIVE ADDRESSING TO ROOT
Currently, NodalRequire does not know how to handle patterns like require("//moduleName"). Ideally, these would be resolved from the root (domain folder). This is not Node.js standard behaviour.

TODO: Modules with a relative address starting with // are searched from the root (domain folder).


######MODULE NAMES ARE NOT ALWAYS CASE-CONSISTENT WITH NODE.JS STANDARDS
Currently, NodalRequire stores the ids for modules in lower case and compares all paths in lower case. The correct behaviour should be to store paths in lower case and store names in the case that they are requested in.

The problem with this is that this behaviour can lead to false positives anyway because most web servers are case-insensitive and so fetching a file differing only in case (eg ModuleName and modulename) from the same folder can be problematic or even impossible. However, from the perspective of writing code in Node.js editors that do differentiate case, it is better to be consistent.

Note that the id may be given as ../folder/FOLDER/ModuleName, but the module name is just ModuleName, and the remainder is just part of the path.

TODO: Make the module name in the module path case-consistent with Node.js standard behaviour.

Clone this wiki locally