-
Notifications
You must be signed in to change notification settings - Fork 127
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
Difficult to read roles::test-utils::mining-device
in single file
#1174
Comments
roles::test-utils::mining-device
roles::test-utils::mining-device
in single file
nack if we start blindly following it we will end up with millions of file and things will be much harder to understand (not to talk about import and exports). A module can contains several data type that work together. This test mining-device is very simple I would leave everything in main. If we really want to split it for sure not one file for data type. And should be very low priority.
ack. Most of the time agree, some time make sense to import something in a different namespace (if we have conflicts), keep that in mind.
ack
ack |
I really disagree. I don't see a downside in having multiple files. I think it breaks up the logic very nicely and the user knows exactly what to expect in each file. I am open to other suggestions tho. What other options are you thinking of? |
the downside is to have too many files and make thing even harder to read as I said above. Also is very common to have multiple struct that work together and to expose only one; in that case what you propose? To add a directory with a module and a file for each struct? Remember that every time that you add a directory and you nests files you make the project a little bit harder to explore. I don't think that blindly following the rule of one file per struct will bring us in a better place. |
The
roles::test-utils::mining-device
crate has all of its logic in a single file. There are several data types and standalone functions in this file. It can be overwhelming for a user to read in this format. After #1163 is merged, this crate should be modularized into multiple files for clarity.README.md
(explain how to start the local pool to get the crate to work)The text was updated successfully, but these errors were encountered: