There are two recent changes in zig that effect awshttp.
1. cf65ab8 disallows unused variables. Fair enough and backward
compatible.
2. https://github.com/ziglang/zig/issues/2115#issuecomment-827968279
This comment resulted in a backward incompatible change to use the
underlying value from a C enum rather than its symbol. This reduces
edge cases in the compiler. Ultimately we may want awshttp to define
zig enums that mirror the C enums, but for now I've commented the
definitions of the C enums used.
Key changes:
1. Remove all unused variables (see zig commit cf65ab8)
2. Remove tests requiring other files
3. Specify enum type when providing specific enum values (see zig
commits around 507a8096d)
code in the function required found variable to be a real count
for allocation purposes, but it was originally coded as a flag
instead, which broke any field with more than two underscores
There appears to be a leak in json.zig, which had minimal modifications for
snake/camel case, including use of an allocator. It is not obvious that
the leaks were added by these changes, so I will leave this issue for
later investigation.
This should complete the query protocol calls. However, there are likely
gaps in implementation for the transformation of request parameters
to url encoded body data
This seems silly, but I guess in AWS it is a thing that these two values may
be different. Consumers of awshttp have the option of ignoring this, which
should be correct most of the time. Aws.zig will, however, use the service
metadata to do the right thing
This increases compilation time significantly as all 260+ services
need to be analyzed by zig during compilation. I plan to change
the model from a single "services" constant to a function
that will import only services that plan to be used. This
might be in addition to the single constant to allow
consumers to choose short compile times or all services
support