Update to v2.61.0 of Zitadel API and a few rebuild script fixes.
Since the last release of this project a lot of new protos have been added to the zitadel project. The previous rebuild script used to generate the Elixir SDK in this project relied on the proto structure being flat and all in one directory.
This change introduces a few changes to bin/rebuild.sh that are needed to compile the protos to Elixir:
- Use a temp directory paired with git sparse checkout to download proto files in the download_proto_files function (the previous approach would have been more complicated to implement recursively)
- Set ERL_AFLAGS environment variable to set standard io_encoding to latin1 to fix apparent regression introduced in Erlang 26 that prevented several of the protos from being compiled without the fix
A few changes were also made to make the rebuild script easier to maintain:
- Move to bash to use pushd/popd
- Separate utility functions into a separate file
- Rename download_files to download_proto_files
I did not bump the version of this package in mix.exs in favor of letting you determine versioning strategy.
That said, what do you think about using the associated Zitadel version instead of having a separate version for the SDK? In this case it would be 2.61.0. This would probably make it easier for consumers of the Elixir SDK to pick the right version and reason about what protos were used to generate it.
I just realized I'll need to fix the workaround I mentioned that was stopping protoc-gen-elixir from working with the latest version of Elixir and Erlang. The fix stops it from working on versions currently pinned in .tool-versions. That issue should probably be fixed in elixir-protobuf/protobuf.