Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Test Bug 81 #108

Open
daphne-sfdc opened this issue May 25, 2024 · 3 comments
Open

Test Bug 81 #108

daphne-sfdc opened this issue May 25, 2024 · 3 comments

Comments

@daphne-sfdc
Copy link
Owner

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

SFDX 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
Copy link
Owner Author

Hello @daphne-sfdc 👋 It looks like you didn't provide all the required basic info in your issue.

If you haven't already, please provide the following info:
Salesforce Extension Version in VS Code:
Salesforce CLI Version:
OS and version:
VS Code version:
Most recent version of the extensions where this was working:

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue, as well as all error messages that you see.
    • A repository that clearly demonstrates the bug is ideal.
    • Error messages can be found in the Problems Tab, Output Tab, and from running Developer: Toggle Developer Tools in the command palette.
  • Make sure you've installed the latest version of the Salesforce Extension Pack for VSCode. (docs)
  • Search GitHub for existing related issues.

Thank you!

@daphne-sfdc
Copy link
Owner Author

Hello @daphne-sfdc 👋

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
Copy link
Owner Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant