Leverage type system to restrict invalid version specification
Having a version specification syntax hidden in opaque strings is a shame given a powerful type system of F#. Having a strongly typed DSL in F# would make API more discoverable. Carefully chosen discriminated unions may provide better type safety than regular records with int fields. ~> 3.1 is not same as ~> 3.1.0.
Consider something like this: https://gist.github.com/shishkin/f4b4cb9d8a9d3959fccc.
A Nuget type provider would be even better. Thoughts?
We probably need a set of version formats found in the wild to test against.
I am not sure if anything not supporting the major.minor.patch scheme should be considered at all. There are a few schemes I know of that do not fit in, but they are far below what we can call a minority. I like the idea.
@shishkin @forki After a few days, with a now somewhat clearer view on what Paket wants to achieve, as well as seeing the demands to Paket, I now changed my mind.
Yet it is quite unclear what other constraint models will pop up. We don't have (or expect) user interaction on Paket.lock. Plus, we are about to support different sources.
I think we should at least wait until above things are sorted out.
closing this since we dropped FCS.