(
actual_str: string | null,
expected_str: string | null,
title: string,
)
| 142 | } |
| 143 | |
| 144 | function warn_on_version_mismatch( |
| 145 | actual_str: string | null, |
| 146 | expected_str: string | null, |
| 147 | title: string, |
| 148 | ) { |
| 149 | if (!actual_str) { |
| 150 | return place_warn(Place_Name.Detector_Real_World, `No actual ${title} version found!`) |
| 151 | } |
| 152 | if (!expected_str) { |
| 153 | return place_warn(Place_Name.Detector_Real_World, `No expected ${title} version found!`) |
| 154 | } |
| 155 | |
| 156 | // warn if the matching adapter version is not the same minor version range as the actual adapter |
| 157 | let [actual, actual_ok] = version_from_string(actual_str) |
| 158 | let [expected, expected_ok] = version_from_string(expected_str) |
| 159 | |
| 160 | if (!actual_ok) { |
| 161 | place_warn(Place_Name.Detector_Real_World, `Actual version ${title}@${actual_str} cannot be parsed.`) |
| 162 | } |
| 163 | if (!expected_ok) { |
| 164 | place_warn(Place_Name.Detector_Real_World, `Expected version ${title}@${expected_str} cannot be parsed.`) |
| 165 | } |
| 166 | if (!match_version_patch(actual, expected)) { |
| 167 | place_warn(Place_Name.Detector_Real_World, `VERSION MISMATCH! |
| 168 | Current version: ${title}@${actual_str} |
| 169 | Expected version: ${title}@${expected_str}`) |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | |
| 174 | main() |
no test coverage detected
searching dependent graphs…