Skip to content

extensionTipService does not find possible executables for nu, etc #246545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anthonykim1
Copy link
Contributor

@anthonykim1 anthonykim1 commented Apr 14, 2025

While trying to figure out: #245698,

I noticed that there was already some logic where we search for executables and try to recommend appropriate extensions to install. I've noticed that I wasn't getting expected result (for example, nu language extension should've be suggested if nu executable was detected on my system).

It seems like in

private async getValidExecutableBasedExtensionTips(executableTips: Map<string, IExeBasedExtensionTips>): Promise<IExecutableBasedExtensionTip[]> {
we are missing some location where we could look to find executables. Such as homebrew directory for Mac and LOCALAPPDATA for Windows.

I can't really test this change since:

  • the executableTips(in getValidExecutableBasedExtensionTips) always seem empty for me.
  • Blocked on testing if adding homebrew directory for Mac and LOCALAPPDATA for Windows. works since the executableTips were always empty, and highImportanceRecommendations and mediumImportanceRecommendations seemed to empty as well from the constructor.

I tried to set bunch of logs, breakpoints but it seems like breakpoints inside the constructor of AbstractNativeExtensionTipsService never hits and I can't get any of the console.logs to show up in my dev tools.

Can I get some help? @sandy081

@anthonykim1 anthonykim1 self-assigned this Apr 14, 2025
@@ -148,6 +148,10 @@ export abstract class AbstractNativeExtensionTipsService extends ExtensionTipsSe
this.allOtherExecutableTips.set(key, { exeFriendlyName: exeBasedExtensionTip.friendlyName, windowsPath: exeBasedExtensionTip.windowsPath, recommendations: otherRecommendations });
}
});
console.log('these recommendations(both highImportanceRecommendations and mediumImportanceRecommendations) always seem to be empty: ');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish I can get these to show up in my dev tools!
I've set my log level to trace, did fresh build, but still cannot see any logs nor get the breakpoints to hit here.

Perhaps it has to do something with being abstract class constructor? I'm pretty lost.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ILogService instead and you can see them in the shared log view

}
} else {
exePaths.push(join('/usr/local/bin', exeName));
exePaths.push(join('/usr/bin', exeName));
exePaths.push(join(this.userHome.fsPath, exeName));
// TODO: Should we look for </opt/homebrew/bin>?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not test this since executableTips were always empty for me
Same story with LOCALAPPDATA

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to copy exeBasedExtensionTips from product.json into product.overrides.json to get these populated

@anthonykim1 anthonykim1 requested a review from sandy081 April 14, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants