Skip to content

Commit

Permalink
Reinstate the exception when there is a version mismatch in installed…
Browse files Browse the repository at this point in the history
… vs required R packages when compiling
  • Loading branch information
programLyrique committed Nov 21, 2024
1 parent b2835a0 commit c9e2d3a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/src/main/java/org/prlprg/session/GNURSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ public void loadPackage(String name, String version) {
DESCRIPTION description = getDescription(name);

String installedVersion = description.getVersion();
// if (!version.equals(installedVersion)) {
// throw new RuntimeException(
// "Version mismatch: expected " + version + " but found " + installedVersion);
// }

// TODO: Handle that better that throwing an error.
if (!version.equals(installedVersion)) {
throw new RuntimeException(
"Version mismatch: expected " + version + " but found " + installedVersion);
}

// Use suggests and imports as needed
var suggests = description.getSuggests();
Expand Down

0 comments on commit c9e2d3a

Please sign in to comment.