Skip to content

panda script improvement - #433

Open
anzz1 wants to merge 1 commit into
hpfxd:masterfrom
anzz1:patch-17
Open

panda script improvement#433
anzz1 wants to merge 1 commit into
hpfxd:masterfrom
anzz1:patch-17

Conversation

@anzz1

@anzz1 anzz1 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor
  • old clean is now distclean, as canonically "clean" should only remove build files and not your current working state. Not fun when you don't RTFM and assume "clean" does what it usually does but nukes your work instead.

  • clean is now a new command that just removes the build files under PandaSpigot-API/build and PandaSpigot-Server/build, leaving your working state intact, as you'd expect.

@uRyanxD

uRyanxD commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Doesn't Gradle already have a tool for that?

./gradlew clean
./gradlew clean build

Or something like that?

@anzz1

anzz1 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

I don't really know about gradle too much to have a solid answer but I think it also does other things like purge some package caches or what not. Just removing the folders manually can be sure that what you want – deleting the build files – is actually what happens. If the clean needs some gradle command added if it holds some hidden caches of the classes somewhere or something like that then by all means it can be added. But so far I've found that deleting the build folder where the classes lie, and killing the stupid daemon, are enough to make it rebuild correctly, whereas simply doing gradlew build its daemon which supposedly watches the filesystem for changes doesn't do it job and actually rebuild the correct changed files. Even if you do gradlew --stop to kill that stupid daemon and then rebuild, it still sometimes doesn't detect that a file has changed, does it not know to check "file modified" dates on the filesystem, which even C toolchains from the 1980s knew how to do?! Shit, I'm ranting again.

The important part of this PR is not the addition of the new clean command but moving the current clean to distclean to signify that its a nuclear option that deletes your work which isn't what clean is canonically supposed to do. You don't want to run clean fully expecting that you can run build after, only to find out it having deleted all your work.

@anzz1
anzz1 force-pushed the patch-17 branch 3 times, most recently from 1a4f674 to a218a07 Compare July 15, 2026 19:59
@anzz1
anzz1 force-pushed the patch-17 branch 2 times, most recently from 21c901a to acfb8d0 Compare August 11, 2026 18:17
old "clean" is now "distclean", as canonically "clean" should only
remove build files and not your current working state. Not fun when you
don't RTFM and assume "clean" does what it usually does but nukes your
work instead.

"clean" is now a new command that just removes the build files under
PandaSpigot-API/build and PandaSpigot-Server/build, leaving your working
state intact, as you'd expect.
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

Successfully merging this pull request may close these issues.

2 participants