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

refactor(provider-bindgen): fix import & export semantics #1435

Conversation

vados-cosmonic
Copy link
Contributor

@vados-cosmonic vados-cosmonic commented Feb 2, 2024

Feature or Problem

The current semantics are unintuitive -- interfaces "exported" from a provider signifies functionality provided to the lattice, and the WIT worlds should reflect that.

At present, functionality exposed to the lattice for actors to use is signified by WIT imports in the provider worlds.

This commit reverses the import and export semantics that were used for WIT contracts in the providers, to make them more intuitive.

Resolves #715

Related Issues

Release Information

Consumer Impact

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

@vados-cosmonic vados-cosmonic requested review from a team as code owners February 2, 2024 20:33
The current semantics are unintuitive -- interfaces
"exported" from a provider signifies functionality *provided* to the
lattice, and the WIT worlds should reflect that.

At present, functionality exposed to the lattice for actors to use is
signified by WIT *imports* in the provider worlds.

This commit reverses the import and export semantics that were used
for WIT contracts in the providers, to make them more intuitive.

Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
@vados-cosmonic vados-cosmonic force-pushed the refactor/provider-bindgen/fix-import-and-export-semantics branch from e3ccc7a to 119bb2c Compare February 2, 2024 20:50
Copy link
Member

@brooksmtownsend brooksmtownsend left a comment

Choose a reason for hiding this comment

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

This is really awesome stuff. I love the wits and some of the new config code, might warrant a second review from another maintainer more familiar with provider SDK but the semantics are great

Copy link
Member

@brooksmtownsend brooksmtownsend left a comment

Choose a reason for hiding this comment

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

This is really awesome stuff. I love the wits and some of the new config code, might warrant a second review from another maintainer more familiar with provider SDK but the semantics are great

@connorsmith256
Copy link
Contributor

@vados-cosmonic can you point to where the logical changes happened here, or split into multiple commits? With this being only one commit, I can't easily tell what was simply split into multiple files, and where the import/export semantics were reversed

@vados-cosmonic
Copy link
Contributor Author

Sure @connorsmith256 -- noted some areas that saw change -- most of the rest was splitting up the functionality

@vados-cosmonic vados-cosmonic merged commit 213c8ec into wasmCloud:main Feb 7, 2024
44 checks passed
@vados-cosmonic vados-cosmonic deleted the refactor/provider-bindgen/fix-import-and-export-semantics branch February 7, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Reverse the imports/exports WIT usage in bindgen
3 participants