latticexyz / mud

MUD is a framework for building autonomous worlds
https://mud.dev
MIT License
724 stars 181 forks source link

deprecate codegen index.sol pattern #2838

Open holic opened 4 months ago

holic commented 4 months ago

I thought this pattern would be nice to simplify importing codegen things from one place, e.g.

import { Tables, ResourceIds, StoreHooks } from "./codegen/index.sol";

but it turns out ANY changes to things imported in this index.sol file, even if its not imported into the user project, will change the resulting bytecode of the contract doing the import.

We should probably deprecate/discourage this pattern for better deterministic deploys. We should also migrate our usages before we tackle #2835.