The app is sometimes failing when advanced compilation options are selected.
This is a way to reproduce the bug:
Select :advanced as the optimisation level in the project.clj file
lein api-modeller-web
start the application in a browser
load > Uber API
If you have the console open, you should see an error thrown from the AMF library code.
The code is within core.async. Something is reading from a channel using <! but the producer is putting a nil value.
I have fixed other problems with advanced compilation options, adding the right externs into
js/externs.js
The app is sometimes failing when advanced compilation options are selected. This is a way to reproduce the bug:
If you have the console open, you should see an error thrown from the AMF library code. The code is within core.async. Something is reading from a channel using
<!
but the producer is putting a nil value.I have fixed other problems with advanced compilation options, adding the right externs into
js/externs.js
Inspecting the minimised JS stack tracae, the problem seem to be located in the callback to the JS_REST extern function here https://github.com/mulesoft-labs/api-modelling-framework/blob/master/src/api_modelling_framework/platform.cljs#L29
We are using the property name
entity
in the response object and it seems to be replaced by a compilation symbol.Finding a way to add that field to extern or replacing the property access with a lookup using the property string name might fix the issue.