mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 09:35:39 -05:00
ML - Updating sqlmlutil to fix R package management (#11432)
Updating sqlmlutil to fix R package management
This commit is contained in:
@@ -8,25 +8,29 @@
|
||||
],
|
||||
"requiredRPackages": [
|
||||
{
|
||||
"name": "RODBCext",
|
||||
"repository": "https://mran.microsoft.com/snapshot/2019-02-01/"
|
||||
"name": "vctrs",
|
||||
"repository": "https://cran.r-project.org"
|
||||
},
|
||||
{
|
||||
"name": "odbc",
|
||||
"repository": "https://cran.r-project.org"
|
||||
},
|
||||
{
|
||||
"name": "sqlmlutils",
|
||||
"fileName": "sqlmlutils_0.7.1.zip",
|
||||
"downloadUrl": "https://github.com/microsoft/sqlmlutils/blob/master/R/dist/sqlmlutils_0.7.1.zip?raw=true",
|
||||
"fileName": "sqlmlutils_0.7.3.zip",
|
||||
"downloadUrl": "https://github.com/microsoft/sqlmlutils/releases/download/R-0.7.3/sqlmlutils_0.7.3.zip",
|
||||
"platform" : "win32"
|
||||
},
|
||||
{
|
||||
"name": "sqlmlutils",
|
||||
"fileName": "sqlmlutils_0.7.1.tar.gz",
|
||||
"downloadUrl": "https://github.com/microsoft/sqlmlutils/blob/master/R/dist/sqlmlutils_0.7.1.tar.gz?raw=true",
|
||||
"fileName": "sqlmlutils_0.7.3.tar.gz",
|
||||
"downloadUrl": "https://github.com/microsoft/sqlmlutils/releases/download/R-0.7.3/sqlmlutils_0.7.3.tar.gz",
|
||||
"platform" : "darwin"
|
||||
},
|
||||
{
|
||||
"name": "sqlmlutils",
|
||||
"fileName": "sqlmlutils_0.7.1.tar.gz",
|
||||
"downloadUrl": "https://github.com/microsoft/sqlmlutils/blob/master/R/dist/sqlmlutils_0.7.1.tar.gz?raw=true",
|
||||
"fileName": "sqlmlutils_0.7.3.tar.gz",
|
||||
"downloadUrl": "https://github.com/microsoft/sqlmlutils/releases/download/R-0.7.3/sqlmlutils_0.7.3.tar.gz",
|
||||
"platform" : "linux"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -35,14 +35,14 @@ export class Config {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the config value of required python packages
|
||||
* Returns the config value of required python packages. The order of the packages is based on the order they should install
|
||||
*/
|
||||
public get requiredSqlPythonPackages(): PackageConfigModel[] {
|
||||
return this._configValues.sqlPackageManagement.requiredPythonPackages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the config value of required r packages
|
||||
* Returns the config value of required r packages. The order of the packages is based on the order they should install
|
||||
*/
|
||||
public get requiredSqlRPackages(): PackageConfigModel[] {
|
||||
return this._configValues.sqlPackageManagement.requiredRPackages;
|
||||
|
||||
@@ -133,7 +133,13 @@ export class PackageManager {
|
||||
|
||||
await utils.createFolder(utils.getRPackagesFolderPath(this._rootFolder));
|
||||
const packages = this._config.requiredSqlRPackages.filter(p => !p.platform || p.platform === process.platform);
|
||||
await Promise.all(packages.map(x => this.installRPackage(x)));
|
||||
|
||||
// Installs packages in order of listed in the config. The order specifies the dependency of the packages and
|
||||
// packages cannot install as parallel because of the dependency for each other
|
||||
for (let index = 0; index < packages.length; index++) {
|
||||
const packageName = packages[index];
|
||||
await this.installRPackage(packageName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user