PhysiCell icon indicating copy to clipboard operation
PhysiCell copied to clipboard

make reset - avoid "rm *.cpp"?

Open rheiland opened this issue 1 year ago • 6 comments
trafficstars

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.

rheiland avatar Feb 21 '24 14:02 rheiland

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.

heberlr avatar Feb 22 '24 13:02 heberlr

Make reset returns you to a blank slate.

Those existing CPP files are not a blank slate.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Paul Macklin, Ph.D. Associate Professor of Intelligent Systems Engineering Associate Dean for Undergraduate Education Luddy School of Informatics, Computing and Engineering Indiana University

Founder and Lead of PhysiCellhttp://physicell.org/ mobile: 626-372-1203 email: @.*** / @.*** web: MathCancer.orghttp://mathcancer.org/ Twitter: @MathCancerhttps://twitter.com/MathCancer


From: Heber Lima da Rocha @.> Sent: Thursday, February 22, 2024 8:46:58 AM To: MathCancer/PhysiCell @.> Cc: Subscribed @.***> Subject: Re: [MathCancer/PhysiCell] make reset - avoid "rm *.cpp"? (Issue #212)

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.

— Reply to this email directly, view it on GitHubhttps://github.com/MathCancer/PhysiCell/issues/212#issuecomment-1959484658, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACVZW4HIB5QHSK32DAUHLI3YU5D5FAVCNFSM6AAAAABDTD3HCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJZGQ4DINRVHA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

MathCancer avatar Feb 22 '24 18:02 MathCancer

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 avatar Mar 09 '24 08:03 elmbeech

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.

elmbeech avatar Mar 30 '24 08:03 elmbeech

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.

drbergman avatar Mar 30 '24 12:03 drbergman

@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.

elmbeech avatar Apr 12 '24 08:04 elmbeech

See a comment at the (current) bottom of this PR #244 regarding whether make clean should be inside make reset. Link: https://github.com/MathCancer/PhysiCell/pull/244#issuecomment-2294103509.

As I recall, this was added during a live, virtual discussion of PRs. Unfortunately, not much written record for how we came to that consensus.

drbergman avatar Aug 18 '25 11:08 drbergman