sourcegraph / scip-python

SCIP indexer for Python
Other
53 stars 25 forks source link

Document how to get proper stack traces in tests #95

Closed varungandhi-src closed 1 year ago

varungandhi-src commented 1 year ago

It seems like whatever the webpack configuration is by default, if you do npm run webpack (do a dev build) and then npm run check-snapshots, the stack traces point inside dist/scip-python.js instead of the TypeScript files.

I'm assuming there is a way to configure the source maps properly to provide more useful stack traces (there is a line in webpack.config.js which I'm guessing is supposed to this... https://sourcegraph.com/github.com/sourcegraph/scip-python/-/blob/packages/pyright-scip/webpack.config.js?L33), it's just that I haven't figured it out yet.

varungandhi-src commented 1 year ago

Just needs an extra flag in the testing line node --enable-source-maps <other flags>