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

[TECHNICAL DEBT] Split Ares into two parts, project_ares and ares_lib #166

Open
bee-san opened this issue Dec 26, 2022 · 2 comments
Open
Assignees
Labels
good first issue Good for newcomers Technical Debt A conscious decision we have made to reach our goals faster which has resulted in technical debt

Comments

@bee-san
Copy link
Owner

bee-san commented Dec 26, 2022

Why?

Ares is made up of 2 parts:

  1. The CLI
  2. The Library

If someone wants to use the library they would need to import the CLI stuff too. It is a good idea to make the CLI a different app and make it call the library, rather than have them both bundled into one.

@bee-san bee-san added the Technical Debt A conscious decision we have made to reach our goals faster which has resulted in technical debt label Dec 26, 2022
@bee-san
Copy link
Owner Author

bee-san commented Dec 26, 2022

We can do this using Cargo Workspaces https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html

@bee-san bee-san added the good first issue Good for newcomers label Dec 27, 2022
@bee-san bee-san self-assigned this Feb 2, 2023
@bee-san
Copy link
Owner Author

bee-san commented Feb 2, 2023

I am working on this!

So far I have split Ares into two, but I need to rename the packages and make sure that the CLI can use the library.

Our workflow will be a bit weird. Our CLI will only update if we push an update to its cargo.toml updating the library.

Good news is that we can update the library with breaking changes without breaking the CLI, slightly sad news is that our release.yml GitHub action will break.

However I am reading this blog post:
https://blog.axo.dev/2023/02/cargo-dist

Which talks about a nice way to distribute Cargo projects using CI and I think we should switch to it. My instinct is to:

  • Break our packages into two
  • Delete the old CI and go back to manual for now
  • Write a new release CI with cargo-dist

This will also mean we can automatically distribute .exe for windows too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Technical Debt A conscious decision we have made to reach our goals faster which has resulted in technical debt
Projects
None yet
Development

No branches or pull requests

1 participant