Closed mfikes closed 9 years ago
Much richer stack trace is possible with changes:
example=> (om/root widget {:text "Hello world!"} {:target 1})
Error: Invariant Violation: ReactCompositeComponent.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.
invariant (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:1804:24)
_renderValidatedComponent (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:16767:14)
ReactCompositeComponent__renderValidatedComponent (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:5143:26)
mountComponent (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:16196:55)
ReactCompositeComponent_mountComponent (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:5143:26)
mountComponent (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:5212:49)
mountComponentIntoNode (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:15669:46)
perform (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:6275:24)
batchedMountComponentIntoNode (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:15688:22)
perform (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:6275:24)
batchedUpdates (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:13790:26)
batchedUpdates (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:4807:34)
renderComponent (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:15740:32)
ReactMount__renderNewRootComponent (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:5143:26)
render (NO_SOURCE_FILE <http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle>:1438:32)
om.dom/render (om/dom.cljs:49:4)
om$core$root_$_rootf (om/core.cljs:1128:32)
om$core$root (om/core.cljs:1187:8)
global code (NO_SOURCE_FILE)
Ambly's stack parsing is currently hardcoded to expect
file://
URIs.When experimenting with React Native (letting its bundler pull in stuff), JavaScriptCore gets source loaded in specifying
http://
URIs and these can appear in the stack trace emitted by JavaScriptCore:which results in anemic information in the mapped stacktrace presented:
Even though the bundled React Native JavaScript can't be source mapped back to ClojureScript, there are useful JavaScript function names and line numbers that can at least be extracted.