Hello Couchbase Lite users,
You may have run into issues installing Couchbase Lite 2.0.0 from Nuget if running on a non-Windows machine. Or you might be wondering what the difference is between 22.214.171.124 and 2.0.0. This post is to explain both of those. This was originally reported via CBL 2.0.0 NuGets iOS/Android won't install
Our release story is based on some paradigms that I consider important. The main one at play here is “release what you have tested.” This means that instead of testing and then packaging, we package and then test. This leaves one small wrinkle though: The package that is tested has an internal Nuget version (2.0.0-b####) which means it is considered “prerelease.” So how to get it to be release without rebuilding? Well I wrote a script to do that but unfortunately I goofed. The script unzips the nupkg (since it is just a standard zip file), modifies the nuspec with the new version, and then zips it back up again. Simple right? What could go wrong?
Well the thing that went wrong this time stems from some intricacies with the actual zip format. I’m not sure of the exact difference but it seems that when I was using
ZipFile::CreateFromDirectory from Powershell, it encoded the resulting zip (i.e. nupkg) with literal backslashes in the filename, so instead of directory/subdirectory/file, there was a file names directory\subdirectory\file. On Windows this is fine, because that is the correct way to make directories but on non-Windows it breaks. The solution is, as usual with zip issues, to use the awesome 7zip command line utility instead. This will properly encode directories.
So what is the difference? In terms of features / binaries absolutely nothing. Both contain the version 2.0.0-b0713 of the library. So use 126.96.36.199 unless you want to try to use 2.0.0 for some reason. If you can, it is fine, if you have trouble installing it then use 188.8.131.52.
I very much dislike putting out 4 digit releases, so next time around I’ll make sure this is not an issue from the start! Thanks!