Skip to content

Move codegen from Config.res file - #59

Merged
DZakh merged 1 commit into
mainfrom
dz/envio-context
Jul 4, 2024
Merged

Move codegen from Config.res file#59
DZakh merged 1 commit into
mainfrom
dz/envio-context

Conversation

@DZakh

@DZakh DZakh commented Jul 4, 2024

Copy link
Copy Markdown
Member

Ideally:

  • Remove the global ref and start passing config as an argument once it's codegened
  • Remove Config.getConfig usage and use config from args

What I'll do next:

  • Migrate ChainMap from handlebars and add support for Fuel chains.

@DZakh
DZakh force-pushed the dz/envio-context branch from cc23e0b to f68ef3f Compare July 4, 2024 11:00
@DZakh
DZakh force-pushed the dz/envio-context branch from f68ef3f to 60426f8 Compare July 4, 2024 11:04
@github-actions

github-actions Bot commented Jul 4, 2024

Copy link
Copy Markdown

Here's the diff of the codegen output.🙌🧠🦜

@DZakh
DZakh requested a review from JonoPrest July 4, 2024 11:29
Comment on lines +48 to +49
let empty = () => []->Map.fromArray(~id=module(Chain.ChainIdCmp))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't see where this is used...

},
shouldUseHypersyncClientDecoder: true,
isUnorderedMultichainMode: false,
chainMap: ChainMap.empty(),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah I see it's here. Hmmm, I actually don't like that mock is generated here. Since it's only for our internal tests.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looking through, I also can't see that this is used.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's in Integration_ts_helpers

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah I see it's here. Hmmm, I actually don't like that mock is generated here. Since it's only for our internal tests.

I can remove it in the next PR when I clean up ChainMap

@JonoPrest JonoPrest left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we remove the empty function on ChainMap and the unused mock function?

Otherwise I'm happy with the change 👍🏼

Perhaps we should think about have a unified place where we store refs, that need to be set and registered.

@DZakh
DZakh merged commit 42f4b7d into main Jul 4, 2024
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