Fix Pypi Dev version parsing #57
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Our PipComponentDetector is having issues resolving for dev dependency versions that do not have any number as suffix, e.g.
0.5.7.dev. This causesIPyPiClientto parse that version as if it were a release candidate0.5.7and consequently throws errors when adding it to dictionary, see line below:component-detection/src/Microsoft.ComponentDetection.Detectors/pip/IPyPiClient.cs
Line 213 in 6176381
Steps to reproduce
requirements.txtfilenltk==3.6.2Solution
Add a new property that stores the
devlabel, and set thedevNumberversion to 0 to ensure we don't flag this package version as a "released".