malloydata / malloy

Malloy is an experimental language for describing data relationships and transformations.
http://www.malloydata.dev
MIT License
1.92k stars 75 forks source link

Make Malloy documents resilient to syntax errors #1632

Open carlineng opened 4 months ago

carlineng commented 4 months ago

Right now, if a Malloy file has a single syntax error, the entire file breaks. None of the other queries in the file are runnable, and the Malloy schema viewer in VS Code goes blank.

It's often the case that while working on a file, I write partially complete syntax that doesn't compile to valid Malloy, but then need to reference something in the schema to finish my thought. Unfortunately, because the schema viewer has disappeared, I can't actually reference the schema, and need to comment out what I had just written. This has been raised by several users in Slack as well:

In VSCode, occasionally students would do the following: 1) Click Schema and view the schema. 2) They would start writing a query, and they could not quite remember the column name, so they would go back to click on schema, but then they couldn't click on schema because they had a partially written malloy statement (error) that they had to fix (delete or comment out) before they did something. Perhaps I could have showed them how to "pop out" the schema or look at the data directly.

mtoy-googly-moogly commented 4 months ago

Another fix though would be to have vscode keep the old schema view around somehow until there is a new one, somehow, handwave handwave ....

carlineng commented 4 months ago

Agreed, that could be an easier path for solving the issue. @whscullin any thoughts on how feasible this would be?