Thought experiment: What if `flux-lsp-*/{parse|format_from_js_file}` went away?
- Dominant language
- TypeScript
- Stars
- 117
- Forks
- 51
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 4
Description
The title says it all. What if, for whatever reason, we went to import `flux-lsp-browser/parse` and it wasn't there. What would break? What could be re-worked to work in a different way? What features would we lose? What bugs would go away?
Below is a (comprehensive as possible) list of places where `parse` and `format_from_js_file` are being used, and an attempt to speak to how this might need to change in order to keep feature sets.
Please consider this issue a place to add historical context and clarifying information.
- [ ] `flows/pipes/Visualization/index.ts` - `parse` is being used here to check to see if the flux has any statements it, and if not, return an empty string. The `ast` is then thrown away, and then the raw query string could have `|> limit(n: 100)` and/or `|> last()` tacked onto the end. The original intent was to check if there were only comments in the file before trying to append to the query. A potential fix is in #5132 .
- [ ] `flows/pipes/Notification/ExportTask.ts`
- `parse` is used to extract `option v` values and `option task` values
- `parse` is used to generate a series of imports from raw text
- `format_from_js_file` is used to insert a mutated query into another query as a string
- [ ] `src/flows/pipes/Notification/view.tsx`
- `parse` is used to find `option task` statements
- [ ] `src/flows/pipes/RawFluxEditor/index.ts`
- `parse` and `format_from_js_file` are used to merge two queries together
- [ ] `src/flows/pipes/Schedule/view.tsx`
- [ ] `src/flows/pipes/Table/index.ts`
- [ ] `src/flows/templates/types/task.ts`
- [ ] `src/languageSupport/languages/flux/parser/index.ts`
- [ ] `src/shared/contexts/query.tsx`
- [ ] `src/writeData/components/ClientCodeQueryHelper.tsx`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.