Skip to content

Commit

Permalink
Minor changes for version checking
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed May 4, 2024
1 parent 924e636 commit c2ca578
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/analysis/typepal/Collector.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ Collector newCollector(str modelName, map[str,Tree] namedTrees, TypePalConfig co
}

void _addTModel(TModel tm){
if(!isValidVersion(tm.version)){
if(!isValidTplVersion(tm.version)){
throw TypePalUsage("TModel for <tm.modelName> uses TPL version <tm.version>, but <getCurrentTplVersion()> is required");
}

Expand Down
1 change: 1 addition & 0 deletions src/analysis/typepal/Exception.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ data RuntimeException
| TypePalInternalError(str reason) // TypePal internal error
| TypeUnavailable() // Type is not available: used in control flow of solver
| checkFailed(list[FailMessage] msgs) // Type check failed: used in control flow of solver
| wrongTPLVersion(str reason)
;

data Exception
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/typepal/Version.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module analysis::typepal::Version

import util::SemVer;

private str currentTplVersion = "1.1.0";
private str currentTplVersion = "2.0.0";

bool isValidVersion(str version){
bool isValidTplVersion(str version){
return equalVersion(version, currentTplVersion);
}

Expand Down

0 comments on commit c2ca578

Please sign in to comment.