Skip to content
This repository was archived by the owner on Oct 26, 2025. It is now read-only.

Conversation

@orta
Copy link
Member

@orta orta commented Nov 9, 2024

Uses the new builder API I came up with for burr

if (!hasPrettierInstalled) return content

try {
const prettier = await import("prettier")
Copy link
Member Author

Choose a reason for hiding this comment

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

this might have been slow because of the dynamic import?

@orta
Copy link
Member Author

orta commented Nov 11, 2024

Greens on the Puzzmo codebase

Screenshot 2024-11-11 at 09 38 56

@orta
Copy link
Member Author

orta commented Nov 11, 2024

stdout | src/tests/integration.puzzmo.test.ts > Puzzmo > Runs the entire puzzmo codebase fast
[sdl-codegen] Read the GraphQL schema
[sdl-codegen] Read the GraphQL schema: 102.85ms
[sdl-codegen] Read the Prisma schema
[sdl-codegen] Read the Prisma schema: 70.97ms
[sdl-codegen] Create shared schema files
[sdl-codegen] Creating shared schema files
[sdl-codegen] Creating shared schema files: 98.763ms
[sdl-codegen] Creating shared return position schema files
[sdl-codegen] Creating shared return position schema files: 48.075ms
[sdl-codegen] Create shared schema files: 147.026ms
[sdl-codegen] Create DTS files for all services
[sdl-codegen] Create DTS files for all services: 730.681ms
[sdl-codegen]: Full run took 1053ms

@orta orta marked this pull request as ready for review November 11, 2024 09:40
@orta
Copy link
Member Author

orta commented Nov 11, 2024

speculative name for the builder: conform (of the Danger family)

@orta
Copy link
Member Author

orta commented Nov 12, 2024

Sans prettier

[sdl-codegen] Read the GraphQL schema
[sdl-codegen] Read the GraphQL schema: 120.586ms
[sdl-codegen] Read the Prisma schema
[sdl-codegen] Read the Prisma schema: 68.898ms
[sdl-codegen] Create shared schema files
[sdl-codegen] Creating shared schema files
[sdl-codegen] Creating shared schema files: 93.514ms
[sdl-codegen] Creating shared return position schema files
[sdl-codegen] Creating shared return position schema files: 31.124ms
[sdl-codegen] Create shared schema files: 124.849ms
[sdl-codegen] Create DTS files for all services
[sdl-codegen] Create DTS files for all services: 751.862ms
[sdl-codegen]: Full run took 1070ms

With prettier

stdout | src/tests/integration.puzzmo.test.ts > Puzzmo > Runs the entire puzzmo codebase fast
[sdl-codegen] Read the GraphQL schema
[sdl-codegen] Read the GraphQL schema: 158.037ms
[sdl-codegen] Read the Prisma schema
[sdl-codegen] Read the Prisma schema: 116.549ms
[sdl-codegen] Create shared schema files
[sdl-codegen] Creating shared schema files
[sdl-codegen] Creating shared schema files: 344.757ms
[sdl-codegen] Creating shared return position schema files
[sdl-codegen] Creating shared return position schema files: 132.745ms
[sdl-codegen] Create shared schema files: 477.722ms
[sdl-codegen] Create DTS files for all services
[sdl-codegen] Create DTS files for all services: 1.019s
[sdl-codegen]: Full run took 1777ms

@orta
Copy link
Member Author

orta commented Nov 12, 2024

Explored a separate babel printer: https://github.com/putoutjs/printer - #25

[sdl-codegen] Read the GraphQL schema
[sdl-codegen] Read the GraphQL schema: 119.873ms
[sdl-codegen] Read the Prisma schema
[sdl-codegen] Read the Prisma schema: 68.777ms
[sdl-codegen] Create shared schema files
[sdl-codegen] Creating shared schema files
[sdl-codegen] Creating shared schema files: 155.163ms
[sdl-codegen] Creating shared return position schema files
[sdl-codegen] Creating shared return position schema files: 55.476ms
[sdl-codegen] Create shared schema files: 211.011ms
[sdl-codegen] Create DTS files for all services
[sdl-codegen] Create DTS files for all services: 798.738ms
[sdl-codegen]: Full run took 1200ms

its stricter about making perfect ASTs though, and so a bunch of code is lost

@orta orta merged commit 953d0b8 into main Nov 23, 2024
4 of 6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants