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

Fix zero return imports, and support for result types #726

Merged
merged 3 commits into from
Mar 7, 2025

Conversation

mangas
Copy link
Contributor

@mangas mangas commented Feb 22, 2025

  • Bumped tool versions of erlang and elixir, hope that's ok
  • Added package.json and company to gitignore
  • Functions with no return values were not working correctly, added the native code changes to support this use case.
  • Result types were not being mapped when running running an export. Wire this and added some test coverage.

The imports test already had most of what I needed so seemed like a good idea to add more cases to it.

@mangas mangas force-pushed the fix-zero-return-imports branch from be2c553 to d1bf0ba Compare February 22, 2025 22:49
@mangas
Copy link
Contributor Author

mangas commented Feb 28, 2025

Hey @tessi, just in case you missed the PR, can I get a review on this when you get the chance?

@superchris
Copy link
Collaborator

superchris commented Mar 6, 2025

Hey, I'm sorry I didn't notice this PR before I added result type support in a separate PR along with the other remaining types other than resources. Everything else looks good, sorry for causing conflicts for you :(

Comment on lines +1 to +2
erlang 27.2.4
elixir 1.18.2-otp-27
Copy link
Owner

Choose a reason for hiding this comment

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

💜

@tessi
Copy link
Owner

tessi commented Mar 6, 2025

hey @mangas - sorry for letting you wait 💚 and thanks a lot for you PR!

@mangas mangas force-pushed the fix-zero-return-imports branch from d1bf0ba to 3bd5aef Compare March 6, 2025 09:34
@mangas
Copy link
Contributor Author

mangas commented Mar 6, 2025

Hey, I'm sorry I didn't notice this PR before I added result type support in a separate PR along with the other remaining types other than resources. Everything else looks good, sorry for causing conflicts for you :(

All good, I've fixed the conflicts now

@mangas
Copy link
Contributor Author

mangas commented Mar 6, 2025

hey @mangas - sorry for letting you wait 💚 and thanks a lot for you PR!

No worries at all, I've rebased the PR, let me know if there's any changes needed

@mangas mangas requested a review from tessi March 7, 2025 10:54
Comment on lines +346 to +349
wit_parser::Results::Named(vec) if vec.is_empty() => {
*return_values = Some((true, vals));
return Ok(());
}
Copy link
Owner

Choose a reason for hiding this comment

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

❤️

@tessi
Copy link
Owner

tessi commented Mar 7, 2025

Hey @mangas - thanks again for your contribution! the code looks great and I love the tests you added. 💚

@tessi tessi merged commit e736256 into tessi:main Mar 7, 2025
13 checks passed
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.

3 participants