currently when some package has ccall imports that are not implemented in shims, GHCJS does not complain about any missing imports, but you get a runtime exception about undefined symbols, this is not a great user experience (especially since there are so many packages out there, and it's often unclear which packages use foreign code)
Proposal:
- Keep track of all
ccall imports per module, save a list in the .js_o file
- When linking shims, build a list of supplied symbols for each
.js file (keep these in a cache)
- Print a warning about all missing symbols
- Add flag to avoid printing these warnings
Limitations:
- Works only per module, not per package (I don't think this is a problem, although it makes it harder to check that everything in a package is shimmed)
- Either limited to some particular styles of declarations (since accurately detecting top-level symbols provided would require running the code), or requires some extra annotation syntax to indicated what symbols are supplied
currently when some package has
ccallimports that are not implemented in shims, GHCJS does not complain about any missing imports, but you get a runtime exception about undefined symbols, this is not a great user experience (especially since there are so many packages out there, and it's often unclear which packages use foreign code)Proposal:
ccallimports per module, save a list in the.js_ofile.jsfile (keep these in a cache)Limitations: