JSPPW0017 for Externals of Eliminated Module
Got this warning:
[ WARNING ] JSPPW0017: External `http' is initialized but never used. Code will not be automatically removed in case of external side effects at line 9 char 9 at ip-location.jspp
This was either the wrong warning or very useful. I stopped using the module at ip-location.jspp from its dependencies. (I just commented out the code to test something.) It does not look like the module was compiled into the final output. (It defines a getLocation method, and I couldn't find this name anywhere.) The module depended on an external named http defined outside the module scope, e.g.:
external require;
external http = require("http");
module IPLocation
{
public void getLocation() {
http.doStuff();
}
}
However, even though there is no more use of IPLocation, the external still gets initialized in the compiled code. This is a design issue. Should we keep the current behavior or eliminate externals that are no longer used by eliminated modules/module members too?