Check a proposed dependency upgrade numerically
String sorting places 1.10 before 1.2. Check numeric ordering and the consumer's upper bound separately. Version 1.10.0 follows 1.2.9 and fits the interval below 2.0.0. The first changed component is minor.
Run the framework with your own input
Install Blyx 0.2.1 and a Rust toolchain with a host linker, then run the versioned project. Each positional argument is a number or a comma-separated numerical vector. The CLI accepts up to 16 entries per vector. The imported module accepts longer inputs.
git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-bowerbird.git
cd blyx-bowerbird
blyxc native-run project.blyx -- "1,2,9" "1,10,0" "1,0,0" "2,0,0"API and return values
Returns [allowed upgrade, candidate versus installed, major/minor/patch index changed, within range]. Equal versions are allowed. This release handles numeric cores and explicit bounds. Invalid input returns an empty vector.
| Argument | Accepted input |
|---|---|
| installed | Vector of: nonnegative exact integer |
| candidate | Vector of: nonnegative exact integer |
| lower | Vector of: nonnegative exact integer |
| upper | Vector of: nonnegative exact integer |
Use the libraries independently
The framework vendors the same library source published in these two repositories. Each module has its own package page, input contract and regression suite.
Try the program
Expected output
1 1 1 1
Practice
Change candidate = [1, 1, 0]. Predict the result, then run the program.
Hint
Returns [allowed upgrade, candidate versus installed, major/minor/patch index changed, within range]. Equal versions are allowed. This release handles numeric cores and explicit bounds.
Worked solution
The result vector is [0, -1, 1, 1]. Compare its fields with the return layout in the API section.
Find
let candidate = [1, 10, 0];Replace with
let candidate = [1, 1, 0];Output after the change
0 -1 1 1
