Endle / rust-bundler-cp

rust-bundler-cp bundles a cargo package into a single rust file. It's designed for Competitive programming like Codeforces.
https://crates.io/crates/rust_bundler_cp
MIT License
17 stars 6 forks source link

Added support for new-style modules #26

Closed Jazzinghen closed 2 years ago

Jazzinghen commented 2 years ago

Sadly my rustfmt has constantly reformatted the code. I am not sure why.

codecov-commenter commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@b92cd7d). Click here to learn what that means. The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #26   +/-   ##
=========================================
  Coverage          ?   15.46%           
=========================================
  Files             ?        8           
  Lines             ?     3279           
  Branches          ?        0           
=========================================
  Hits              ?      507           
  Misses            ?     2772           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b92cd7d...484055a. Read the comment docs.

Endle commented 2 years ago

Hi Jazzinghen,

I'm sorry that I didn't notice your PR in time. I guess rustfmt is not your fault. As you see, my current code style is terrible.

As you submitted this PR, I assume you published your work under MIT license. I plan to review your PR gradually:

  1. I manually cherry-pick the easy-to-review parts, like format change. It would reduce the diff between your branch and the truck
  2. I review the real critical part in your PR

Thank you again for your interest on my project

Jazzinghen commented 2 years ago

Hi @Endle! All the code I wrote is following your license, so no worries :D I am really sorry for the amount of changes, I think my VSCode just went crazy and applied both rustfmt and clippy changes. The important part of the code is in commit 484055a, the rest is just formatting.

I have a slight issue with a project I am writing as it seems that something did not get exposed properly when converting it to a single file, however the tests in the project behave in the right way. I will double check my other project.

Thank you for working on this. Without it I would be cursed to write everything on Codingame's Web IDE.

Endle commented 2 years ago

Hi Jazzinghen,

May I ask for a bit more explanation for

Added support for modules that have the module definition outside the module folder (instead of having a mod.rs file in the folder).

Can you share a link for it (rust news, docs, blogs, SO, etc.), so I can fulfill my background knowledge? Thank you

Jazzinghen commented 2 years ago

Hi Jazzinghen,

May I ask for a bit more explanation for

Added support for modules that have the module definition outside the module folder (instead of having a mod.rs file in the folder).

Can you share a link for it (rust news, docs, blogs, SO, etc.), so I can fulfill my background knowledge? Thank you

Absolutely! Here is Rust's book chapter on modules separation: https://doc.rust-lang.org/book/ch07-05-separating-modules-into-different-files.html

Endle commented 2 years ago

This Pull Request has been separated into

https://github.com/Endle/rust-bundler-cp/pull/30 (core change) https://github.com/Endle/rust-bundler-cp/pull/29 https://github.com/Endle/rust-bundler-cp/pull/28 https://github.com/Endle/rust-bundler-cp/pull/27