Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Parsing fails on JSX + Flow file #59

Closed
bzz opened this issue Feb 19, 2019 · 6 comments
Closed

Parsing fails on JSX + Flow file #59

bzz opened this issue Feb 19, 2019 · 6 comments
Assignees
Labels
Milestone

Comments

@bzz
Copy link
Contributor

bzz commented Feb 19, 2019

Steps to reproduce

docker run --rm -it -p 9432:9432 bblfsh/javascript-driver:v2.6.0
wget https://raw.githubusercontent.com/kiwicom/nitrolib/91c1b4d26d7690690529ba0001f24985b161f2ac/src/components/LocationPicker/index.jsx
bblfsh-cli -l javascript index.jsx

Expected

UASTv2 tree printed (with some nodes may be not annotated)

Actual

couldn't parse index.jsx: transform failed: check: key "specifiers": field was not used: leadingComments
@bzz bzz added the bug label Feb 19, 2019
@juanjux
Copy link
Contributor

juanjux commented Feb 20, 2019

This is because the SDK was updated to 2.14.x but the annotations were not.

@creachadair
Copy link
Contributor

This is because the SDK was updated to 2.14.x but the annotations were not.

Does that mean we need to change something in the driver, or that we need only fix a version skew?

@juanjux
Copy link
Contributor

juanjux commented Feb 20, 2019

@creachadair the driver's annotations must be updated if the SDK dependency is updated to SDK 2.14, the new version adds a check that will detect silently dropped fields in the semantic annotations so a previously working build would fail after the update. So the bug was there, just not detected.

@bzz
Copy link
Contributor Author

bzz commented Feb 22, 2019

@juanjux I do not think so - I think this is a real bug with current (before SDK update) annotations that happens on the :latest JS driver.

Changes related to update of the SDK are in #57 - there CI fails after SDK update but due to lack of new annotations (WIP on my side).

@juanjux
Copy link
Contributor

juanjux commented Feb 22, 2019

True. The message is almost the same so I got that wrong.

@bzz bzz closed this as completed in #60 Feb 22, 2019
@bzz
Copy link
Contributor Author

bzz commented Feb 22, 2019

Yes, that is very tricky - basically this seems like the same validation, but only in runtime.

Has been addressed in #60 and now I'm moving to doing the same for js as you already did for cpp/ruby/etc 😨

@bzz bzz added this to the v2.7.0 milestone Mar 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants