fix: Replace generic QueryStringMapParameter attribute with Type argument#118
Conversation
|
It is sad that netstandard2.0 allows this... |
|
It fixes the hello world repro, thanks! (I couldn't get a definitive run in my original environment - struggles with patching in the fix - but LGTM anyway) |
I walked away for a while and came back to a clean run having taken about 10 minutes to initialise, vs about 1 min in testcontainers 4.11. It seems to be spending a significant amount of time in SharpZipLib writing a tar, but anyway, that's a problem for another day, and this fix works. Thanks 👍 |
Yes, unfortunately, there are no compile checks. We could probably use the |
I doubt it's related to this change. Your image build is probably quite large, or you're copying a lot of files into the image, which TC needs to package into a tarball first. |
Generic attributes are a .NET 7+ runtime feature. On net48 and other pre net7.0 runtimes, reflecting over
QueryStringMapParameter<T>throwsSystem.NotSupportedException("Generic types are not valid.") when the query string is built, breakingListImagesAsyncand every other call that uses filter/map parameters.Make the attribute non-generic by passing the mapped type via
typeofinstead of a type parameter:/cc @Rob-Hague @campersau