Przeglądaj źródła

Merge branch 'candidate-8.4.x' into candidate-8.4.0

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 3 lat temu
rodzic
commit
6b5af33986

+ 7 - 7
ecl/eclcc/eclcc.cpp

@@ -1672,7 +1672,7 @@ void EclCC::processXmlFile(EclCompileInstance & instance, const char *archiveXML
     processDefinitions(localRepositoryManager);
     localRepositoryManager.inherit(repositoryManager); // Definitions, plugins, std library etc.
     Owned<IFileContents> contents;
-    IEclPackage * mainPackage = nullptr;
+    Owned<IEclPackage> mainPackage;
     StringBuffer fullPath; // Here so it doesn't get freed when leaving the else block
 
     if (queryText || queryAttributePath)
@@ -1708,7 +1708,7 @@ void EclCC::processXmlFile(EclCompileInstance & instance, const char *archiveXML
 
     instance.dataServer.setown(localRepositoryManager.createPackage(nullptr));
     if (queryAttributePackage)
-        mainPackage = localRepositoryManager.resolveDependentRepository(nullptr, queryAttributePackage, false);
+        mainPackage.set(localRepositoryManager.queryDependentRepository(nullptr, queryAttributePackage, false));
 
     //Ensure classes are not linked by anything else
     localRepositoryManager.kill();  // help ensure non-shared repositories are freed as soon as possible
@@ -1828,7 +1828,7 @@ void EclCC::processFile(EclCompileInstance & instance)
         if (attributePackage)
         {
             //If attribute package is specified, resolve that package as the source for the query, and pass null to processSingleQuery
-            instance.dataServer.setown(localRepositoryManager.resolveDependentRepository(nullptr, attributePackage, false));
+            instance.dataServer.set(localRepositoryManager.queryDependentRepository(nullptr, attributePackage, false));
         }
         else
         {
@@ -1836,7 +1836,7 @@ void EclCC::processFile(EclCompileInstance & instance)
 
             instance.dataServer.setown(localRepositoryManager.createPackage(nullptr));
         }
-        localRepositoryManager.kill();  // help ensure non-shared repositories are freed as soon as possible
+
         processSingleQuery(instance, queryText, attributePath.str(), nullptr);
     }
 
@@ -2016,7 +2016,7 @@ void EclCC::processReference(EclCompileInstance & instance, const char * queryAt
 
     if (queryAttributePackage)
     {
-        instance.dataServer.set(localRepositoryManager.resolveDependentRepository(nullptr, queryAttributePackage, false));
+        instance.dataServer.set(localRepositoryManager.queryDependentRepository(nullptr, queryAttributePackage, false));
     }
     else
     {
@@ -2026,7 +2026,7 @@ void EclCC::processReference(EclCompileInstance & instance, const char * queryAt
 
         if (looksLikeGitPackage(searchPath))
         {
-            instance.dataServer.set(localRepositoryManager.resolveDependentRepository(nullptr, searchPath, false));
+            instance.dataServer.set(localRepositoryManager.queryDependentRepository(nullptr, searchPath, false));
         }
         else
         {
@@ -2820,7 +2820,7 @@ int EclCC::parseCommandLineOptions(int argc, const char* argv[])
         else if (iter.matchOption(optMonitorInterval, "--monitorinterval"))
         {
         }
-        else if (iter.matchOption(tempArg, "-main"))
+        else if (iter.matchOption(tempArg, "-main") || iter.matchOption(tempArg, "--main"))
         {
             const char * arg = tempArg;
             const char * at = strchr(arg, '@');

+ 1 - 1
ecl/eclcc/eclcc.hpp

@@ -38,7 +38,7 @@ const char * const helpText[] = {
     "                  executable, or stdout)",
     "?   -manifest     Specify path to manifest file listing resources to add",
     "    -foption[=value] Set an ecl option (#option)",
-    "    -main <ref>[@repo] Compile definition <ref> from the source collection, or specified git repo",
+    "    --main <ref>[@repo] Compile definition <ref> from the source collection, or specified git repo",
     "    -syntax       Perform a syntax check of the ECL",
     "    -platform=hthor Generate code for hthor executable",
     "    -platform=roxie Generate code for roxie cluster (default)",

+ 2 - 2
ecl/hql/hqlrepository.cpp

@@ -490,7 +490,7 @@ IHqlExpression * CNewEclRepository::createSymbol(IHqlRemoteScope * rScope, IEclS
             const char * defaultUrl = source->queryPath();
             Owned<IProperties> props = source->getProperties();
             bool requireSHA = false;    // Should possibly be true (or true if it came from a package-lock.json file)
-            IEclRepository * repo = container->resolveDependentRepository(eclId, defaultUrl, requireSHA);
+            IEclRepository * repo = container->queryDependentRepository(eclId, defaultUrl, requireSHA);
             IHqlScope * childScope = repo->queryRootScope();
             body.set(queryExpression(childScope));
             break;
@@ -584,7 +584,7 @@ void EclRepositoryManager::processArchive(IPropertyTree * archiveTree)
     addRepository(archiveCollection, nullptr, true);
 }
 
-IEclPackage * EclRepositoryManager::resolveDependentRepository(IIdAtom * name, const char * defaultUrl, bool requireSHA)
+IEclPackage * EclRepositoryManager::queryDependentRepository(IIdAtom * name, const char * defaultUrl, bool requireSHA)
 {
     //Check to see if the reference is to a filename.  Should possibly be disabled on a switch.
     const char * filename = queryExtractFilename(defaultUrl);

+ 1 - 1
ecl/hql/hqlrepository.hpp

@@ -54,7 +54,7 @@ public:
     void kill();
 
     void processArchive(IPropertyTree * archiveTree);
-    IEclPackage * resolveDependentRepository(IIdAtom * name, const char * defaultUrl, bool requireSHA);
+    IEclPackage * queryDependentRepository(IIdAtom * name, const char * defaultUrl, bool requireSHA);
     void setOptions(const char * _eclRepoPath, const char * _defaultGitPrefix, bool _fetchRepos, bool _updateRepos, bool _verbose)
     {
         options.eclRepoPath.set(_eclRepoPath);