Skip to content
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

Feature request: Support global linter/validator #1168

Open
1 of 14 tasks
akphi opened this issue May 17, 2022 · 0 comments
Open
1 of 14 tasks

Feature request: Support global linter/validator #1168

akphi opened this issue May 17, 2022 · 0 comments
Labels
Application: Studio Issues related to Legend Studio application Component: Graph Manager Issues related to graph processing and management (including interaction with engine server) logic Studio Core Team Opened by a member of the Studio core team Type: Discussion Type: Feature Request Type: Refactor
Milestone

Comments

@akphi
Copy link
Contributor

akphi commented May 17, 2022

Similar requests

  • I have searched and found no existing similar requests

How are you using Studio?

Legend Studio

What problems are you trying to solve?

We want a way for users to get quick feedback about their models' veracity before they have to hit compile. It's useful in general.

See #262

Describe the solution you would like to see implemented

  • Implement a generic mechanism to quickly locate element in the graph:
    • Implement ModelCoordinate
// NOTE: one can extend this model coordinate
class ModelCoordinate {
  elementPath!: string;
  id!: string; // the `uuid` of the sub element in a list, e.g. class constraint, derived property, etc. OR a sub-element, query of a service, etc.

  // TODO: convert to-from a string
  serialize(): string { ... }
  // deserialize?
}
  • Refactor current validation and components (mapping test, and service editor) to use this coordinate
  • Refactor revealCompilationError and LambdaEditor to use this new type of coordinate
  • Create a generic mechanism using mobx reaction to run validator - something similar to change detection - see ChangeDetectionState
  • Create some UI indicator for these errors/linting/validation issues
  • Create an aux panel for these issues
  • One big concern we have is when we delete something, other parts of the app still keeps the reference to it. For example: class properties being referred to in class mappings, etc. Right now our strategy after deleting some element is quite inconsistent: For deleting element, we do a full rebuild/recompile, whereas for deleting sub-element, we do nothing. The former is a bit aggressive if we need to do this for every change. That being said, it might be useful to tell user when references are broken/invalid.
    • Add a flag isDeleted for places we want: element, property (basically for each type of reference)
    • ? Add a computed property to each reference (potentially for reference we can do a method isValid() always returning true by default, and we can override for each as we start supporting more and more things)
  • Handle duplicated sub-element - Feature request: Discrepancies in behavior of graph builder and engine compiler #941
  • Handle not-found mapping elements - Feature request: Discrepancies in behavior of graph builder and engine compiler #941

Describe alternatives you have considered

No response

Documentation, Design, Adoption, Migration Strategy

No response

Contribution

  • I would like to work on this feature
@akphi akphi added Type: Discussion Type: Feature Request Component: Graph Manager Issues related to graph processing and management (including interaction with engine server) logic Type: Refactor labels May 17, 2022
@akphi akphi added this to the Backlog milestone May 17, 2022
@akphi akphi added the Application: Studio Issues related to Legend Studio application label May 17, 2022
@akphi akphi mentioned this issue May 17, 2022
2 tasks
@akphi akphi added the Studio Core Team Opened by a member of the Studio core team label May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Application: Studio Issues related to Legend Studio application Component: Graph Manager Issues related to graph processing and management (including interaction with engine server) logic Studio Core Team Opened by a member of the Studio core team Type: Discussion Type: Feature Request Type: Refactor
Projects
None yet
Development

No branches or pull requests

1 participant