chore(model): delete reflect mode code
Alternative to #286
Reflect mode has been deprecated in favor of package mode. These functions, which were intended to be called from the generated code in reflect mode, are no longer needed.
Delete them.
This change will break the existing code that does the model import. It will force to raise the major version.
@tulzke are you using this? I’m curious what people are doing with this.
I ask because originally this was only used by the code generated in reflect mode, which doesn’t exist anymore.
But if someone is hand rolling their own reflect mode with this and the undocumented gob flag, this should probably be kept around and get some testing.
@abhinav I'm talking about this. https://github.com/golang/mock/blob/main/README.md?plain=1#L275
The old code might have retained imports that do nothing today after replacing reflect with package mode. However, if you delete the package now, it will break backward compatibility when updating the dependency, since the import may have persisted. It seems like it's enough to just delete the import, but it's not obvious. This will raise obvious questions about why the package was deleted within the same major version.
I think it's just worth adding to the checklist of changes for the new major version.
@tulzke this change doesn’t delete the package, only a couple functions from it. The placeholder import will continue to work.