Depending on osasm in plugin

39 views
Skip to first unread message

Brad Hards

unread,
Mar 25, 2018, 8:26:30 PM3/25/18
to OpenSphere
I am working on a plugin that generates ellipse features. It works OK in the main build, but running "yarn test" in my plugin fails for the Chrome runner (not, apparently, the Firefox runner).

I see:
HeadlessChrome 65.0.3325 (Linux 0.0.0) plugin.actdf.ACTDFParser should parse mission FAILED
    TypeError: osasm.geodesicDirect is not a function
        at Object.os.geo.interpolateEllipse (/home/bradh/opensphere-yarn-workspace/workspace/opensphere/src/os/geo/geo.js:1143:21)
        at os.geom.Ellipse.interpolateEllipse (/home/bradh/opensphere-yarn-workspace/workspace/opensphere/src/os/geom/ellipse.js:75:30)
        at new os.geom.Ellipse (/home/bradh/opensphere-yarn-workspace/workspace/opensphere/src/os/geom/ellipse.js:48:8)
        at src/plugin/actdf/actdfparser.js:9:5494

I'm not sure how to say "please import osasm for this plugin", or even if I should need to know how os.geom.Ellipse is implemented. Is there some way to resolve this kind of dependency automatically?

Brad

wallw-bits

unread,
Mar 26, 2018, 7:05:53 PM3/26/18
to OpenSphere
Anything requiring use of osasm should goog.require('os.osasm.wait'), which is in opensphere/test/wait-for-osasm.js

br...@frogmouth.net

unread,
Mar 27, 2018, 2:07:12 AM3/27/18
to wallw-bits, OpenSphere

Thanks. For the archive, that goes into the test code.

 

Brad

--
You received this message because you are subscribed to the Google Groups "OpenSphere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opensphere+...@googlegroups.com.
To post to this group, send email to opens...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opensphere/e6b0ab72-85fd-4e9a-ae97-0fea6f8d17bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages