raml-org / api-modeling-framework

DEPRECATED - This project has been moved
https://github.com/aml-org/amf
Other
27 stars 11 forks source link

Advanced compilation errors #28

Closed antoniogarrote closed 7 years ago

antoniogarrote commented 7 years ago

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.