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(reformat): completely separate relation additions from AST reformatting #3016

Conversation

tomhoule
Copy link
Contributor

That way we can do pure AST reformatting if we want, and reuse the logic
for relation and relation scalar field additions in code actions. As a
side-effect, that makes the formatter idempotent (and much simpler).

There will be a follow-up PR to split the two functionalities in two
different modules, but I stopped here for readability in this PR.

closes prisma/prisma#12726

@tomhoule tomhoule added this to the 4.1.0 milestone Jun 29, 2022
…eformatting

That way we can do pure AST reformatting if we want, and reuse the logic
for relation and relation scalar field additions in code actions. As a
side-effect, that makes the formatter idempotent.

There will be a follow-up PR to split the two functionalities in two
different modules, but I stopped here for readability in this PR.

closes prisma/prisma#12726
@tomhoule tomhoule force-pushed the datamodel/move-all-magic-relation-reformatting-logic-to-reformat-rs branch from edf1508 to 64b00fa Compare June 29, 2022 10:57
@tomhoule tomhoule marked this pull request as ready for review June 29, 2022 11:00
@tomhoule tomhoule requested a review from a team as a code owner June 29, 2022 11:00
@tomhoule tomhoule merged commit a460085 into main Jun 29, 2022
@tomhoule tomhoule deleted the datamodel/move-all-magic-relation-reformatting-logic-to-reformat-rs branch June 29, 2022 15:10
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.

Internal: reformatter is not idempotent
2 participants