Skip to content
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

Go to Definition displays error for built-in Apex classes #4762

Closed
randi274 opened this issue Mar 30, 2023 · 2 comments
Closed

Go to Definition displays error for built-in Apex classes #4762

randi274 opened this issue Mar 30, 2023 · 2 comments

Comments

@randi274
Copy link
Contributor

Summary

Go to Definition support works for user-created Apex classes, but is displaying an error when I try to use this command on built-in Apex classes (like Database).

Steps To Reproduce:

  1. Reference a built-in Apex class in your IDE, like Database.insert()
  2. Right click the Database class, and select Go to Definition.
  3. An error will appear as it tries to navigate to jar:/StandardApexLibrary/System/Database.cls

Expected result

Either no error will appear and we'll say "No definition found" (this is what happens if I use Go to Definition on the insert method), or we'll redirect the user to a faux class that they can use to examine all of the Database methods.

Screenshot 2023-03-30 at 11 25 18 AM

Actual result

Screenshot 2023-03-30 at 11 24 03 AM

Additional information

From examining our LSP, it is the path we're getting back from the Jar. I went back to v47.1.0 (~3 years ago), and we used to just say "No definition found for Database" as well. Then I went back to v52.1.0 (~2 years ago), and this same error pops up, so it's been this way for quite a while. For a bigger lift, we could see about adding these faux classes into our .sfdx directory so the user could examine the methods that we say we support, or redirect the user to our external documentation.

Screenshot 2023-03-30 at 11 35 04 AM

Salesforce Extension Version in VS Code:
v57.7.0 comparing v47.1.0

SFDX CLI Version: 7.183.1

OS and version:
Mac Ventura 13.2.1

@git2gus
Copy link

git2gus bot commented Mar 30, 2023

This issue has been linked to a new work item: W-12777249

@lukeis
Copy link
Contributor

lukeis commented Aug 23, 2023

fixed with commit 62f0813

@lukeis lukeis closed this as completed Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants