daphne-sfdc / salesforcedx-vscode-github-issue-management

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Test Bug 84 #111

Open daphne-sfdc opened 4 months ago

daphne-sfdc commented 4 months ago

Summary

While using VSCode, While 'Surface Semantic Errors' is true Reference a Custom Metadata Type that exists, and the LSP will surface a 'semantic error' stating that the Type is invalid.

image

if, however, you disable the semantic warnings, and then re-enable them, the error is seemingly fixed until restart.

conjecture

I think the LSP is caching types, and not picking up new metadata types and / or forgetting them after restart.

Steps To Reproduce:

  1. Enable the option to surface semantic errors in VSCode's Apex settings
  2. Reference an existing custom metadata type
  3. See error (image above)
  4. Disable the option to surface semantic errors
  5. Save file referencing Custom Metadata
  6. See error go away
  7. Re-enable the option to surface semantic errors
  8. See error not re-appear on file save.
  9. Restart VSCode, see error re-appear.

Expected result

I would like to expect that the LSP is knowledgeable of custom metadata types, and that the command to refresh sobject types updated the lsp's understanding of custom metadata types.

Actual result

a semantic error is raised.

Additional information

Salesforce Extension Version in VS Code: v56.5.1

Salesforce CLI Version: sfdx-cli/7.176.1 darwin-arm64 node-v18.11.0

OS and version: MacOS Ventura (13.0.1)

VS Code version: 1.83.4

Most recent version of the extensions where this was working: the feature has always been broken

daphne-sfdc commented 4 months ago

Hello @daphne-sfdc :wave: None of the versions of the Salesforce Extension Pack you shared match the latest release.

Shared: 56.5.1 Latest: 60.13.0

Update to the latest version of the Salesforce Extension Pack in the VSCode Extensions view and confirm that you're still seeing your issue.

After updating, share your current extensions version.

daphne-sfdc commented 4 months ago

Hello @daphne-sfdc :wave:

It looks like you're using an outdated version of Salesforce CLI. sfdx (v7) is no longer supported by the Salesforce Extensions for VSCode as of April 3, 2024. We highly recommend you move from sfdx (v7) to sf (v2) ASAP.

Moving to sf (v2) is easy and takes just two commands. Find all the information here.

After you move to the latest version of sf (v2), run your command again and see if the CLI upgrade resolves your issue. If the issue still persists, please provide the output of sf --version and we can continue diagnosing.

daphne-sfdc commented 4 months ago

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.