Skip to content

cleanup internal pad implementation

Chad Hanna requested to merge cleanup-internal into main

THIS IS A BREAKING CHANGE REQUIRING UPDATES FOR ALL SGN LIBRARIES* (but hopefully very trivial ones)

At present the internal pad implementation has two faults

  1. It allows a user to specify it in ElementLike but doesn't really expose any way for someone to do that in derived classes. ElementLike creates an internal pad if it is None, which is required because internal pads are required. In the current setup, ElementLike always just creates the pad
  2. The call method for an internal pad takes the pad as an argument. This pad is never referred to in any code and is pretty confusing for the developer and user. In other cases for e.g., pull, having the pad as an argument is necessary since pull will be called for each pad. But our current model is that internal is called exactly once and only requires the elements state

This MR removes the ability for a user to specify an internal pad in ElementLike and removes the pad from internal() and the underlying call method. This reduces the future scope that InternalPads could ever take on, but I think that it is desirable to do so. They are very purpose built things that should have a very limited scope.

Merge request reports

Loading