-
Notifications
You must be signed in to change notification settings - Fork 1
V0.0.9 - Refactor into more modular architecture for future expansion #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2a8e756 to
5b43615
Compare
andrewkern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a great refactor. thanks for splitting this all up! I've put in a couple minor comments / thoughts for you. What do you think? Neither is a blocker and we could just merge this and keep going
| import * as fs from 'fs'; | ||
| import { ClassInfo } from '../config/types'; | ||
| import { EIDOS_CLASSES_PATH, SLIM_CLASSES_PATH } from '../config/paths'; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the fault of my original implementation-- we are doing duplicate file reads for class constructors. i wonder if could use the already-loaded classesData from the documentation service instead? what do you think? not a blocker for this PR though
| // Export the instance to class map from config | ||
| export const instanceToClassMap = INSTANCE_TO_CLASS_MAP; | ||
|
|
||
| export let instanceDefinitions: { [key: string]: string } = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again an issue with my original implementation-- I don't think the instanceDefinitions are being reset between documents. potentially this could lead to stale data when a user switches files. maybe we should reset instanceDefinitions at the start of trackInstanceDefinitions() or per-document?
|
@andrewkern Future updates expand on the completion service and instance tracking substantially, and I believe those updates resolve both of these problems - if you're alright with it, I think it'd be easiest to merge this version as-is if there are no other issues, and then resolve these issues in the PRs that expand upon each of these features? |
|
okay sounds good to me. I'll get this merged |
PR 3/? for expanded, refactored SLiM vscode extension, addressing issue #12
This PR shouldn't change much (potentially any) functionality; it only breaks up the language server index.ts into a much more modular format, which will be expanded upon in future versions.