Hmm, just writing the abstract forms to a file is an interesting option that I hadn’t thought of. I’d like to think through the Pros/Cons compared to namespacing the abstract forms during compilation.
Pros:
- Faster compilation because namespacing happens ahead of time.
- Multiple libraries can depend on and use the same lib_elixir instead of having to re-namespace per library.
- Easier setup, just add dependency like
:lib_elixir_1_17_2and then useLibElixir_1_17_2.Code(etc.) instead of having to set up custom config, pre-download, and namespace the abstract forms. (Though that would only happen once.)
Cons:
- More difficult maintainership, or at least more complex setup to get automations in place to distribute multiple lib_elixir versions, stay up-to-date with releases, etc.
- Possibly misusing the hex package registry by encoding the Elixir version in the package name.
:lib_elixir_1_17_2instead of:lib_elixir. (This is necessary for different libraries to depend on different versions.) - Doesn’t support building arbitrary ref, e.g. whatever the latest dev build is.
Things I missed?






















