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

Investigate and Improve Auto-imports #1839

Closed
sodic opened this issue Feb 29, 2024 · 0 comments · Fixed by #1921
Closed

Investigate and Improve Auto-imports #1839

sodic opened this issue Feb 29, 2024 · 0 comments · Fixed by #1921
Assignees
Labels

Comments

@sodic
Copy link
Contributor

sodic commented Feb 29, 2024

The restructuring (#1688) we've done for Wasp 0.12.0 introduced Wasp's SDK inside node_modules. Imported Wasp functionalities have finally become a normal NPM package.

This opens up an opportunity to greatly improve our DX.
However, our IDE support is a little flaky.

Import autosuggestions should suggest everything a user might want to import (regardless of whether there's already an existing import from that path) and nothing else.

In theory, for each symbol, we should check:

  1. Does the IDE suggest the correct autoimport work (when this is the first symbol imported from that path)?
  2. If not, does the IDE suggest an correct autoimport (when there already is an import from that path)?
  3. Is the correct import suggestion the only import suggestion? We don't want to confuse users and accidentally expose our internals.

In reality, we won't have to do this for each of our public symbols. If we figure out what's going on and how we can best assist the IDE in figuring out what it should suggest, we'll be pretty sure it always works.

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

Successfully merging a pull request may close this issue.

1 participant