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

AutoCompletions show up even without preview feature enabled #816

Closed
janpio opened this issue Jun 29, 2021 · 6 comments
Closed

AutoCompletions show up even without preview feature enabled #816

janpio opened this issue Jun 29, 2021 · 6 comments
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. topic: autocompletion

Comments

@janpio
Copy link
Member

janpio commented Jun 29, 2021

This should only show up with previewFeatures = ["referentialActions"] in the schema file:

image

Note: referentialActions is now GA so this example is outdated

@janpio janpio added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: referentialActions process/candidate Candidate for next Milestone. team/schema Issue for team Schema. labels Jun 29, 2021
@tomhoule tomhoule removed the process/candidate Candidate for next Milestone. label Jun 30, 2021
@janpio janpio added the process/candidate Candidate for next Milestone. label Jul 1, 2021
@janpio janpio changed the title referentialActions: Show up in auto complete even with preview feature disabled referentialActions: Actions show up in auto complete even without preview feature disabled Jul 1, 2021
@janpio janpio changed the title referentialActions: Actions show up in auto complete even without preview feature disabled referentialActions: Actions show up in auto complete even without preview feature Jul 1, 2021
@janpio janpio changed the title referentialActions: Actions show up in auto complete even without preview feature AutoCompletions show up in auto complete even without preview feature enabled Jul 6, 2021
@janpio janpio changed the title AutoCompletions show up in auto complete even without preview feature enabled AutoCompletions show up even without preview feature enabled Jul 6, 2021
@janpio
Copy link
Member Author

janpio commented Jul 6, 2021

Note: Need to figure out how best get the value of the previewFeatures array here, either via the Engine somehow or via a dirty regex on the schema file content.

@tomhoule tomhoule removed the process/candidate Candidate for next Milestone. label Jul 15, 2021
@Jolg42 Jolg42 added the process/candidate Candidate for next Milestone. label Jul 29, 2021
@thebiglabasky
Copy link

Relates to #818
Difficult to know how much work there is for now but we should look into it.

@thebiglabasky thebiglabasky added this to the 2.30.0 milestone Aug 11, 2021
@Jolg42 Jolg42 removed the process/candidate Candidate for next Milestone. label Aug 11, 2021
@janpio
Copy link
Member Author

janpio commented Aug 13, 2021

Not relevant for referentialActions GA as making that feature go GA, will remove the problem as there will be no more preview feature for it.

This issue is more general - the VSCode extension can not use preview feature flags or datasource.provider values to inform its auto completion right now at all. This will need to be solved by somehow parsing the schema file and using these values to inform the auto completion process.

(This might be simpler in the future when the Formatter binary is not more but we can use a Webassembly module that provides this functionality, that can rely on the Rust side parsing of the schema file that already exists.)

@tomhoule tomhoule removed this from the 2.30.0 milestone Aug 25, 2021
@tomhoule
Copy link
Contributor

ReferentialActions are GA, so this is not a problem anymore.

🌐 Language Tools Issue Categorization automation moved this from Bug to Closed/Done Sep 23, 2021
@janpio
Copy link
Member Author

janpio commented Sep 23, 2021

The problem itself unfortunately is not fixed by this one feature going GA: There is no way to have auto completions only when specific preview features are enabled.

@janpio janpio reopened this Sep 23, 2021
@Jolg42 Jolg42 moved this from Closed/Done to Infrastructure in 🌐 Language Tools Issue Categorization Sep 24, 2021
@Jolg42 Jolg42 added the process/candidate Candidate for next Milestone. label Sep 24, 2021
@tomhoule tomhoule added process/candidate Candidate for next Milestone. and removed process/candidate Candidate for next Milestone. labels Sep 27, 2021
@tomhoule tomhoule removed the process/candidate Candidate for next Milestone. label Oct 6, 2021
@Jolg42 Jolg42 added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Mar 15, 2022
@Jolg42
Copy link
Member

Jolg42 commented Mar 15, 2022

We now have a way to filter on previewFeatures flags with https://github.com/prisma/language-tools/blob/main/packages/language-server/src/completion/completions.ts#L337-L366

Added in 9751628

@Jolg42 Jolg42 closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. topic: autocompletion
Development

No branches or pull requests

4 participants