When playing around with @glennsl 's code being developed in https://github.com/ml-in-barcelona/jsoo-react/pull/119, I noticed it is not possible to go to function definitions of either elements (div, a), or props "makers" (className, id).
I avoided this when we were using @@@react.dom preprocessing, but with the changes in PR linked above it becomes easier to track down the problem: the ppx should not intervene in any inner parts of the component, just wrap the implementation with what is needed (createElement, JS props make function, etc) and leave any locations in the implementation code as is.
Note the issue could be either that:
the locations of these ast nodes are erased by the preprocessor
or rather, that some generated ast nodes also reuse the original locations, so merlin gets confused
I tend to think the problem might be the latter 🤔 but this needs investigation.
When playing around with @glennsl 's code being developed in https://github.com/ml-in-barcelona/jsoo-react/pull/119, I noticed it is not possible to go to function definitions of either elements (
div
,a
), or props "makers" (className
,id
).I avoided this when we were using
@@@react.dom
preprocessing, but with the changes in PR linked above it becomes easier to track down the problem: the ppx should not intervene in any inner parts of the component, just wrap the implementation with what is needed (createElement
, JS props make function, etc) and leave any locations in the implementation code as is.Note the issue could be either that:
I tend to think the problem might be the latter 🤔 but this needs investigation.