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

Refactoring the project #1247

Open
1 of 6 tasks
onur-ozkan opened this issue Apr 8, 2022 · 2 comments
Open
1 of 6 tasks

Refactoring the project #1247

onur-ozkan opened this issue Apr 8, 2022 · 2 comments
Labels
improvement: docs improvement: error handling Improvements made on error-handling improvement: resource usage Improvements made on resource usage on runtime or/and compile time priority: medium Moderately important tasks that should be completed but are not urgent.

Comments

@onur-ozkan
Copy link
Member

onur-ozkan commented Apr 8, 2022

In order to improve the maintainability of mm2, there are things that they are really necessary to make some improvements in terms of maintaining the project, debugging the source code, etc.

Our current improvement goals will be as following:

  • Improvement: '/mm2src' should only have crate directories. And merge related modules into same crate and keep the root directory as simple as possible.
  • Reason: At the moment, it's really messed up about where are the modules and crates. Some of the crates are in the 2-3x nested directory so you can't even see them in the first place.
  • Improvement: Write a simple description for each module about what they are responsible for.
  • Reason: In a large project that contains modules consisting of 2000-3000 lines, it will be very useful to understand the functionality of the modules by reading 10-15 lines short summaries.
  • Improvement: Doc comment(///) every implemented functions and custom data types.
  • Reason: When the size of the project is considered, trying to understand everything from the names will be quite difficult. Therefore, giving a short explanation on functions and custom data types might help every developer.
  • Improvement: Apply rust's common package structure for each crate. details
  • Reason: Using Rust's common standards will make mm2 more familiar to Rust developers for who will contribute to mm2.

EDIT
additional task:

cc @artemii235

@artemii235
Copy link
Member

Additional note - I have already tried to restructure project a bit and noticed few cycle dependencies between various mm2 modules. It's worth trying to remove these cycles during the refactoring.

@onur-ozkan
Copy link
Member Author

We can provide a module that re-exports other modules, this would fix circular dependency problem.

artemii235 pushed a commit that referenced this issue May 19, 2022
* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: ozkanonur <[email protected]>

* exclude unused dependencies

Signed-off-by: ozkanonur <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* save development state (can finally build!!!)

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: ozkanonur <[email protected]>

* fix formatting

Signed-off-by: Onur Özkan <[email protected]>

* save development state

Signed-off-by: Onur Özkan <[email protected]>

* finalize fixing compiler,clipply,fmt errors

Signed-off-by: ozkanonur <[email protected]>

* update docs

Signed-off-by: ozkanonur <[email protected]>

* fix fmt

Signed-off-by: Onur Özkan <[email protected]>

* fix wasm testt

Signed-off-by: ozkanonur <[email protected]>

* fix fmt

Signed-off-by: ozkanonur <[email protected]>

* fix `test_mm_rpc_response_serialize`

Signed-off-by: Onur Özkan <[email protected]>

* rename `mm2_ehandle` into `mm2_err_handle`

Signed-off-by: ozkanonur <[email protected]>

* fix `cargo check test`

Signed-off-by: ozkanonur <[email protected]>

* fix pr notes

Signed-off-by: ozkanonur <[email protected]>

* fix another pr notes

Signed-off-by: ozkanonur <[email protected]>

* fix PR notes

Signed-off-by: Onur Özkan <[email protected]>

* disable doctest for `mm2_core` crate

Signed-off-by: ozkanonur <[email protected]>

* disable doctest for `mm2_err_handle` crate

Signed-off-by: ozkanonur <[email protected]>
@onur-ozkan onur-ozkan added priority: low Tasks with low importance that can be addressed when time permits. improvement: error handling Improvements made on error-handling improvement: resource usage Improvements made on resource usage on runtime or/and compile time improvement: docs and removed Low priority labels Dec 12, 2024
@shamardy shamardy added priority: medium Moderately important tasks that should be completed but are not urgent. and removed priority: low Tasks with low importance that can be addressed when time permits. labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement: docs improvement: error handling Improvements made on error-handling improvement: resource usage Improvements made on resource usage on runtime or/and compile time priority: medium Moderately important tasks that should be completed but are not urgent.
Projects
None yet
Development

No branches or pull requests

3 participants