Skip to content

Implement Bad Idol Inheritance#75

Draft
mkeeter wants to merge 1 commit intomainfrom
mkeeter/bad-idol-inheritance
Draft

Implement Bad Idol Inheritance#75
mkeeter wants to merge 1 commit intomainfrom
mkeeter/bad-idol-inheritance

Conversation

@mkeeter
Copy link
Copy Markdown
Contributor

@mkeeter mkeeter commented Apr 3, 2026

This PR adds a minimal inheritance implementation, which is just enough to fix our one problem child. The problem child is, of course, cpu-seq.idol – which has different operations on Cosmo versus Gimlet.

The challenge here is that both client and server still need to agree on operations. The implementation is deliberately limited to make it hard to screw up. It allows exactly one layer of inheritance: an idol file may declare a base member, which must define a BaseInterface(..) object. You can't use the BaseInterface as an Idol interface, removing one possible failure mode. In our motivating example, you must explicitly select either cpu-seq.cosmo.idol or cpu-seq.gimlet.idol (e.g. with feature flags).

We serialize the merged file into the .idolatry section of the generated code, so Humility sees all the operations (in the correct order).

@mkeeter mkeeter requested review from cbiffle, hawkw and labbott April 3, 2026 19:19
@mkeeter mkeeter marked this pull request as draft April 3, 2026 20:09
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.

1 participant