Playwo
Add suffix to version without it showing up as a prerelease
I'm writing a lib that wraps a bunch of external GRPC APIs and exposes them via the same interface. They individually have minor differences so I create binding for each of them.
There's one package per external API so users can selectively install only the required ones e.g.
Cosm.Net.Composable
Cosm.Net.Gaia
etc
Now I have my own versioning that is basically the features that my abstraction provides which I just use the normal C# versioning for.
But there's also the version of the API that is being wrapped which can change (including breaking changes). I'd like to have that version in the package version as well so I can push a new package if that changes without having to change the version of all my packages.
e.g.
Cosm.Net.Composable 1.1.0-composable-v.6.5.0
Cosm.Net.Gaia 1.1.0-gaia-v15.1.0
These versions are considered prereleases tho, even tho they are not meant to be. Is there a flag I can set during build or a different naming convention I can use to avoid this?
28 replies
Parse Rust Enum Json in C#
Rust enums are a cool feature for Rust devs, but now that I gotta parse them in C# I hate them.
I got a JSON input that looks like this:
Key1, Key2, Key3 are 3 possible Enum values in Rust. But I cannot seem to find any reasonable way to parse this in C#.
Yes I could write a JsonConverter for this simple case, in practice I am working on a source generator that has to work on any input where often times enums like this are nested in each other and having to create a JsonConverter for that entire tree is just pain :/
28 replies