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

Remove public api #858

Merged
merged 5 commits into from
Nov 29, 2021
Merged

Remove public api #858

merged 5 commits into from
Nov 29, 2021

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Nov 22, 2021

This PR depends on #857, which needs to be merged first.

Our activate function returned moduleCallers and clientHandler which enabled other extensions to use them. We didn't intend this behavior and don't want to expose any public API yet.

See:

https://code.visualstudio.com/api/references/vscode-api#extensions
Extension writers can provide APIs to other extensions by returning their API public surface from the activate call.

This PR removes the return value from activate and refactors the workspaces.spec.ts test, which used this API.

Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for context - I believe the original intention behind the public API exposure was testability, but naturally it can be tested as a decoupled unit too, as you have demonstrated here. 👍🏻

I agree with the conservative decision of not exposing any API yet until we know what the consumer needs are. I reckon we'll investigate some use cases as part of #692

src/extension.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@jpogran jpogran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small suggestion to check for undefined, otherwise approved!

src/extension.ts Show resolved Hide resolved
src/extension.ts Show resolved Hide resolved
@jpogran
Copy link
Contributor

jpogran commented Nov 29, 2021

🚢

@dbanck dbanck merged commit aa3ee19 into main Nov 29, 2021
Terraform Editor Experience Public Roadmap automation moved this from In Progress to Done Nov 29, 2021
@dbanck dbanck deleted the remove-public-api branch November 29, 2021 15:50
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants