Skip to content

Commit

Permalink
Merge pull request #995 from pulsar-edit/debug-for-services
Browse files Browse the repository at this point in the history
Debugging when a package service is incorrect
  • Loading branch information
DeeDeeG authored May 10, 2024
2 parents 6c1f1ad + 8064ea6 commit c6f2d8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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}`)
}
}
}
Expand Down

0 comments on commit c6f2d8d

Please sign in to comment.