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

Various improvements for v0.1 #46

Merged
merged 37 commits into from
Dec 19, 2024
Merged

Various improvements for v0.1 #46

merged 37 commits into from
Dec 19, 2024

Conversation

JohannesMeierSE
Copy link
Collaborator

@JohannesMeierSE JohannesMeierSE commented Dec 17, 2024

Beyond improving comments, refactorings, polishing and so on, these notable improvements are done in this PR:

  • functions and operators can be annotated with validations now (review: should we support that for all our types?)
  • Typir module:
    • reorganized the grouping of services
    • don't merge Langium+Typir services, but provide the Typir services via an "typir"-property/service within the Langium services
    • override only selected services of a group
    • extracted missing service interface
    • extracted logic to resolve TypeSelectors into its own service to make the implementation exchangable
    • the module now looks into the kind registry, whether the kind is already initialized, before a new one is created (this partially fulfills Integrate remaining types into the factory API #44)
  • removed dependencies to 'langium/lsp' from Typir-Langium in order to use it also in non-LSP projects
  • switched to Langium v3.3, simplified API, removed duplicated code for a fix which is part of Langium 3.3 now
  • added missing READMEs, ChangeLog, added content, added EclipseCon slides
  • associate domain elements with Typir types
  • implemented overloaded functions and methods in LOX by using Typir already during Linking!
  • reduced code for the "Tiny Typir" example a bit

Hints for the review

  • Sorry for the huge number of changes!
  • Therefore, I suggest to review commit by commit.
  • Feel free to ask for a joint review session!

…or LOX, enabled the removal of validation rules
…er, since not all child services need to be overridden, only the desired ones
…er to use Langium-Typir also in non-LSP projects
…ation of validations in Typir-Langium as well
…, might be useful in the future, improves readability already now
…es are not new but are already supported, but typechecking by TypeScript didn't show warnings due to 'unknown'
…rvice to make the implementation exchangable
…rovide the Typir services via an "typir"-property/service within the Langium services
…emoving the hand-written type checking some commits ago as well)
@JohannesMeierSE JohannesMeierSE added this to the v0.1 milestone Dec 17, 2024
@JohannesMeierSE JohannesMeierSE marked this pull request as ready for review December 17, 2024 11:01
@JohannesMeierSE JohannesMeierSE changed the title Final improvements for v0.1 Various improvements for v0.1 Dec 17, 2024
@aabounegm aabounegm mentioned this pull request Dec 18, 2024
Copy link
Member

@insafuhrmann insafuhrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this big lot of improvements @JohannesMeierSE. They look fine to me, I just have a few detail remarks.

examples/lox/src/language/type-system/lox-type-checking.ts Outdated Show resolved Hide resolved
examples/lox/src/language/type-system/lox-type-checking.ts Outdated Show resolved Hide resolved
packages/typir/src/services/validation.ts Show resolved Hide resolved
packages/typir/src/services/validation.ts Show resolved Hide resolved
examples/lox/src/language/type-system/lox-type-checking.ts Outdated Show resolved Hide resolved
packages/typir/src/graph/type-node.ts Outdated Show resolved Hide resolved
examples/lox/src/language/lox-linker.ts Show resolved Hide resolved
examples/lox/src/language/lox-linker.ts Show resolved Hide resolved
Copy link
Member

@insafuhrmann insafuhrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvements, looks fine to me!

@JohannesMeierSE JohannesMeierSE merged commit b1cb1fb into main Dec 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants