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

make reset - avoid "rm *.cpp"? #212

Open
rheiland opened this issue Feb 21, 2024 · 6 comments
Open

make reset - avoid "rm *.cpp"? #212

rheiland opened this issue Feb 21, 2024 · 6 comments

Comments

@rheiland
Copy link
Collaborator

Could we possibly not have make reset do a rm *.cpp? Just wondering what the danger is in having them? I've been bitten by this on multiple occasions. I make my own personal backup copy of a main.cpp, due to testing edits I've made, then it's removed on a make reset.

@heberlr
Copy link

heberlr commented Feb 22, 2024

I'm not a huge fan of the "make reset" method. Maybe we can explore a setup where project folders containing the .cpp files are retained, and the main makefile calls the project-specific makefile within each folder, handling paths appropriately? I've encountered issues with "make reset," leading to the loss of a few hours of work. It could be more productive to collaborate and compile directly from the same .cpp file rather than relying on a copied version.

@MathCancer
Copy link
Owner

MathCancer commented Feb 22, 2024 via email

@elmbeech
Copy link
Contributor

elmbeech commented Mar 9, 2024

i agree with Paul. i need make restet and make clean often, and they are for different tasks!
however, when I do make reset i always have to do a make clean before because make reset will as well reset the Makefile, and as such the current make clean function, which might not be the same as in the default project.

@elmbeech
Copy link
Contributor

In my PhysiCell user_projects i added a line at the top of the make reset command to first call make clean.
I recommend this here as a default.

@drbergman
Copy link
Contributor

I would advocate for not changing the functionality of these common commands. I and others have come to rely on them and what they do. I don't see any of them as inherently broken. If we want, we can either extend any existing commands by introducing new FLAGS or add new commands, e.g. make soft-reset, make save-reset, make clean-reset. I don't think there's much downside in the Makefiles getting bloated. We just start users with the "base" commands and they can pick up new ones as they need.

@elmbeech
Copy link
Contributor

elmbeech commented Apr 12, 2024

@drbergman i don't think it is a good idea to add more commands.
it is already hard enough to learn PhysiCell.
more command that do nearly the same will confuse.
i believe in RISC we should boil down to best practice and a minimal instruction set.

the point that i made is, that when you do a make reset without doing a make clean before, you might end up with orphan leftovers for the previous project!
this means, currently, for a proper reset, you should never do a make reset without doing a make clean before. so why not call make clean inside the make reset function? this would eliminate the possibility of orphan leftovers.
and for the ones who have come to rely with the old commands, it will cause absolutely no harm if you with this changes do a make clean reset instead of a make reset.

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

No branches or pull requests

5 participants