handlePluginVersionCheck method
Future<PluginVersionCheckResult>
handlePluginVersionCheck(
- PluginVersionCheckParams parameters
inherited
Handle a 'plugin.versionCheck' request.
Throw a RequestFailure
if the request could not be handled.
Implementation
Future<PluginVersionCheckResult> handlePluginVersionCheck(
PluginVersionCheckParams parameters) async {
var byteStorePath = parameters.byteStorePath;
var sdkPath = parameters.sdkPath;
var versionString = parameters.version;
var serverVersion = Version.parse(versionString);
_byteStore = MemoryCachingByteStore(
FileByteStore(byteStorePath,
tempNameSuffix: DateTime.now().millisecondsSinceEpoch.toString()),
64 * M);
_sdkManager = DartSdkManager(sdkPath);
return PluginVersionCheckResult(
isCompatibleWith(serverVersion), name, version, fileGlobsToAnalyze,
contactInfo: contactInfo);
}