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

Refactor Types and Exprs modules #293

Conversation

krzemin
Copy link
Member

@krzemin krzemin commented Apr 18, 2023

Refactor of Types and Exprs modules according to the idea presented in this comment

Also extracted Chimney-specific types/exprs to separate modules.

@krzemin krzemin added this to the scala-3 milestone Apr 18, 2023
@krzemin krzemin requested a review from MateuszKubuszok April 18, 2023 16:51
@MateuszKubuszok MateuszKubuszok merged commit 8c7d674 into feature/typed-inner-abatractions Apr 18, 2023
@MateuszKubuszok MateuszKubuszok deleted the feature/typed-inner-abstractions-types-exprs-refactor branch April 18, 2023 17:11
@krzemin krzemin changed the title Refactor Types/Exprs module Refactor Types and Exprs modules Apr 18, 2023
krzemin added a commit that referenced this pull request Apr 18, 2023
* The first draft of an elternative structure for macros towards which current code could be migrated, one rule by one

* Small cleanup

* fixup! Small cleanup

* Split Transformer, PartialTransformer and Patcher into shared code and *Platform files

* Initial Scala 3 implementation for some of compiletime abstractions

* Remodel new types abstractions a bit

* Move logging from Context to DerivationResult

* Add missing abstractions from old macros

* Refactor Types/Exprs module (#293)

* Refactor Types abstractions:

- split Types (language & stdlib types) and ChimneyTypes (library-specific types)
- simplify the API structure

* Restructure Scala 2 platform types impl

* make Scala 2 code compiling

* implement Scala 3 types, make it compile

* refactor Exprs interface

* implementation of new Expr interface for Scala 2

* implementation of new Expr interface for Scala 3

* remove unused code

* resolved TODO comments with implicit exprs resolution

* uncomment code

* Share TransformerDefinitionErrors, split TransformerContext and PatcherContext, fix legacy macro workaround implementation (#294)

* Share TransformerDefinitionErrors, split TransformerContext and PatcherContext, fix legacy macro workaround implementation

* Improve error handling in Results

* Move DerivationResult to a separate file outside mix-in

* Remove unnecessary src = src

* Fix to actually use the implementation in Gateway

* Remove resolved todo in reportError

* Align transformerDefinitionPrefix type with what is used in legacy macros, use proper error reporing in flag parsing

* Move derivation related traits to transformer subpackage

---------

Co-authored-by: Piotr Krzemiński <2477704+krzemin@users.noreply.github.com>
krzemin added a commit that referenced this pull request Apr 19, 2023
* The first draft of an elternative structure for macros towards which current code could be migrated, one rule by one

* Small cleanup

* fixup! Small cleanup

* Split Transformer, PartialTransformer and Patcher into shared code and *Platform files

* Initial Scala 3 implementation for some of compiletime abstractions

* Remodel new types abstractions a bit

* Move logging from Context to DerivationResult

* Add missing abstractions from old macros

* Refactor Types/Exprs module (#293)

* Refactor Types abstractions:

- split Types (language & stdlib types) and ChimneyTypes (library-specific types)
- simplify the API structure

* Restructure Scala 2 platform types impl

* make Scala 2 code compiling

* implement Scala 3 types, make it compile

* refactor Exprs interface

* implementation of new Expr interface for Scala 2

* implementation of new Expr interface for Scala 3

* remove unused code

* resolved TODO comments with implicit exprs resolution

* uncomment code

* Share TransformerDefinitionErrors, split TransformerContext and PatcherContext, fix legacy macro workaround implementation (#294)

* Share TransformerDefinitionErrors, split TransformerContext and PatcherContext, fix legacy macro workaround implementation

* Improve error handling in Results

* Move DerivationResult to a separate file outside mix-in

* Remove unnecessary src = src

* Fix to actually use the implementation in Gateway

* Remove resolved todo in reportError

* Align transformerDefinitionPrefix type with what is used in legacy macros, use proper error reporing in flag parsing

* Move derivation related traits to transformer subpackage

---------

Co-authored-by: Piotr Krzemiński <2477704+krzemin@users.noreply.github.com>
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