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 into workspace #87

Closed
teymour-aldridge opened this issue Jan 22, 2022 · 6 comments · Fixed by #100
Closed

Refactor into workspace #87

teymour-aldridge opened this issue Jan 22, 2022 · 6 comments · Fixed by #100
Assignees

Comments

@teymour-aldridge
Copy link
Contributor

teymour-aldridge commented Jan 22, 2022

It might be worth refactoring Lunatic so that the API is defined in separate crates, which can then be activated through feature flags (so that we can add more experimental APIs that can be excluded from more stable builds).

It might also be worth bringing the rust-lib into the main repo, so that it can be tested in tandem with the runtime.

@bkolobara
Copy link
Contributor

This is something that I have on my todo list for a long time. It requires a bit of refactoring for us to be able to pull the host functions out into separate crates.

And I would also like to bring rust-lib and lunatic-as into the same repository, so that we can sync up the tests. I'm not sure what the ideal setup would look like. I imagine that we could get away with just a bash script that cds into the right folder, builds the vm, runs all tests for it and then uses the vm to test all guest libraries. So that we don't need to introduce another dependency, like make.

I will take onto this task as soon as I'm done with the current work inside of the rust-lib.

@bkolobara bkolobara self-assigned this Jan 23, 2022
@teymour-aldridge
Copy link
Contributor Author

And I would also like to bring rust-lib and lunatic-as into the same repository, so that we can sync up the tests. I'm not sure what the ideal setup would look like. I imagine that we could get away with just a bash script that cds into the right folder, builds the vm, runs all tests for it and then uses the vm to test all guest libraries. So that we don't need to introduce another dependency, like make.

I think just bash scripts would work, and if not maybe a Rust test which builds the libraries and performs the tests? Otherwise something like https://github.com/sagiegurari/cargo-make is a (in my view) more human-friendly make alternative.

@jtenner
Copy link
Contributor

jtenner commented Jan 30, 2022

And I would also like to bring rust-lib and lunatic-as into the same repository, so that we can sync up the tests.

Is this really necessary? I'm really happy with the way things currently are, and don't mind standardizing tests in isolated repos.

@bkolobara
Copy link
Contributor

Is this really necessary? I'm really happy with the way things currently are, and don't mind standardizing tests in isolated repos.

I'm not that happy with the current situation. For example, changes to the tcp read/write timeout code slightly broke the rust library and this can't be detected with the current setup. Currently we depend on a released version of the vm to test the libraries. If there is a breaking change in the host functions it's impossible to catch it inside of the libraries until we have a release.

Only after we push out a release can we see the tests failing. This is not ideal, and it is only going to get worse once we have multiple languages supported and more people working asynchronously on different parts that are not aware of all changes. It would also force us to address every breaking change in the host functions right away.

@teymour-aldridge
Copy link
Contributor Author

Maybe we can start with at least moving the Rust library to the monorepo and the AssemblyScript one later?

@bkolobara
Copy link
Contributor

This is partially resolved by #96

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 a pull request may close this issue.

3 participants