Let me elaborate a bit on the few aspects:
- it’s fully internal, so it’s possible for a minor revision to make a breaking change that forces you to edit your code to keep up.
- separate precompilation caches fundamentally cannot handle a duplicated method because loading order is chaotic and thus should not affect behavior. For example, precompiling a 3rd package loading 2 prior caches would need a fixed loading order to pick 1 of 2 duplicated method definitions, but you could easily load those caches in the opposite order before importing the 3rd package, causing a silent discrepancy. This is especially bad when load order can be fully arbitrary e.g. extensions
CExtAandCExtBwith the statementimport A, B, C. This clear danger is what the error is trying to stop. If you work around this withdelete_method, you will encounter this danger. My earlier question was about overwriting within the same cache prior to any specializations. __init__executes after loading, so nothing in it includingprecompileresults will make it into the cache. I would still avoid overwriting methods there because it’ll invalidate precompiled methods, but at least this is suboptimal rather than impossible.