Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

refactor: rework FRAME codegen #919

Merged
merged 29 commits into from
Apr 21, 2023
Merged

refactor: rework FRAME codegen #919

merged 29 commits into from
Apr 21, 2023

Conversation

harrysolovay
Copy link
Contributor

Resolves #901

Copy link
Contributor

@tjjfvi tjjfvi left a comment

Choose a reason for hiding this comment

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

For all the other codegen, we don't indent the template tags, e.g.

function foo() {
  return `
console.log("Hello World")
`
}

Even though the code is formatted by dprint, it's nice for it to be less adhoc-ly indented before formatting. Can you update frameCodegen.ts to follow this convention?

codegen/frameCodegen.ts Outdated Show resolved Hide resolved
codegen/frameCodegen.ts Outdated Show resolved Hide resolved
codegen/frameCodegen.ts Outdated Show resolved Hide resolved
codegen/frameCodegen.ts Outdated Show resolved Hide resolved
examples/watch.eg.ts Show resolved Hide resolved
@harrysolovay
Copy link
Contributor Author

For all the other codegen, we don't indent the template tags

I think it helps with legibility. Certainly makes it easier for newcomers.

@tjjfvi
Copy link
Contributor

tjjfvi commented Apr 21, 2023

Unlike the rest of our formatting, though, dprint doesn't handle it, and so the indentation can get out of sync with the surrounding code.

codegen/frameCodegen.ts Outdated Show resolved Hide resolved
@harrysolovay harrysolovay added this pull request to the merge queue Apr 21, 2023
Merged via the queue into main with commit 42c455d Apr 21, 2023
@harrysolovay harrysolovay deleted the rework-codegen branch April 21, 2023 20:41
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.

codegen pallet bindings on ChainRune subtype
2 participants