Skip to content

Commit

Permalink
Treat a dependency of 0.0.0-default as any version (#6798)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Oct 5, 2020
1 parent 7b69f7a commit 3477773
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OMCompiler/Compiler/Script/PackageManagement.mo
Expand Up @@ -151,6 +151,11 @@ algorithm
matches := true; /* Any version matches the empty */
return;
then fail();
case SemanticVersion.SEMVER(major=0, minor=0, patch=0, prerelease={"default"})
algorithm
matches := true; /* Any version matches the empty */
return;
then fail();
else ();
end match;
JSON.ARRAY(providedVersions) := provides;
Expand Down
14 changes: 14 additions & 0 deletions OMCompiler/Examples/InstallAllPackages.py
@@ -0,0 +1,14 @@
#!/usr/bin/env python3

import os.path
import json
import OMPython

with open(os.path.expanduser("~/.openmodelica/libraries/index.json")) as f:
data = json.load(f)
om = OMPython.OMCSessionZMQ()
for lib in data['libs'].keys():
om.sendExpression("installPackage(%s)" % lib)
s = om.sendExpression("getErrorString()").strip()
if s:
print(s)

0 comments on commit 3477773

Please sign in to comment.