At work we faced a strange issue with mongoDB 2.x. Whereas our requests were working perfectly with mongoDB 1.8 we always got errors. The message mongoDB was firing at us was of the form :

Caused by: com.mongodb.MongoException: assertion db/../bson/bsonobjbuilder.h:127
       at com.mongodb.MongoException.parse(MongoException.java:82)

I found the following issue in mongoDB's Jira but apparently nothing to do with our requests (we are not using empty properties indexes), it takes me a lot of time to figure out that, at times, our request were sorted on empty properties (as stated here). The fix is really simple, do not sort on empty properties !

As it takes me times to find this and I did not find any blog post explaining this, I hope it will help another developer.

Tuist build test schemes

Tuist build test schemesI use tuist to build most of my iOS projects nowadays. And like every good software engineer I test the code that...… Continue reading

Swift module registration

Published on April 28, 2025

Swift macro : @VisibleForTesting

Published on April 19, 2024