Merge pull request #995 from pulsar-edit/debug-for-services

Debugging when a package service is incorrect
This commit is contained in:
DeeDeeG 2024-05-10 01:37:06 -04:00 committed by GitHub
commit c6f2d8dc29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -428,6 +428,8 @@ module.exports = class Package {
methodName = versions[version];
if (typeof this.mainModule[methodName] === 'function') {
servicesByVersion[version] = this.mainModule[methodName]();
} else {
console.warn(`Package ${this.name} declares it provides ${name}@${version} but it doesn't expose a function in ${methodName}`)
}
}
this.activationDisposables.add(
@ -447,6 +449,8 @@ module.exports = class Package {
this.mainModule[methodName].bind(this.mainModule)
)
);
} else {
console.warn(`Package ${this.name} declares it consumes ${name}@${version} but it doesn't expose a function in ${methodName}`)
}
}
}