Why isn't "clear output directory" enabled by default?

Why isn't the "Clear output directory on rebuild" option in Project
Settings : Compiler : General not enabled by default?

Are there times when you would want obsolete class files sitting around?
Or am I misunderstanding what this option is for?


--
Erik Hanson

5 comments
Comment actions Permalink

"Erik Hanson" <ehanson-lists@eh.cdeh.org> wrote in message
news:ehanson-lists-E62FBA.14410202012004@host98.intellij.net...

Why isn't the "Clear output directory on rebuild" option in Project
Settings : Compiler : General not enabled by default?


Probably to make it harder to f**k up royally by accidentally deleting a
directory you did not want deleted by setting the output directory to
somewhere you really shouldn't have set it to. Not that I've ever done
something like that. ;)

/Jonas


0
Comment actions Permalink

"Clear" means "Delete every file" in that context. Maybe that checkbox should be renamed.

0
Comment actions Permalink

That would be the IntelliJ bin directory, since that showed up as the default (I'm guessing this was fixed by now).

Burned me for a while a few weeks ago.

anders

0
Comment actions Permalink

You are right Jonas :)

Those who set output directory to be the same as the source directory had problems with this option on by default.
Note that obsolete files are always deleted by make (when we are sure the files were compiled by IDEA). This option now affects only
rebuild behaviour.

--

Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Jonas Karlsson" <pjak@yahoo.com> wrote in message news:bt52j1$pk0$1@is.intellij.net...

"Erik Hanson" <ehanson-lists@eh.cdeh.org> wrote in message
news:ehanson-lists-E62FBA.14410202012004@host98.intellij.net...

Why isn't the "Clear output directory on rebuild" option in Project
Settings : Compiler : General not enabled by default?

>

Probably to make it harder to f**k up royally by accidentally deleting a
directory you did not want deleted by setting the output directory to
somewhere you really shouldn't have set it to. Not that I've ever done
something like that. ;)

>

/Jonas

>
>


0
Comment actions Permalink

In article <bt8iq7$3hk$1@is.intellij.net>,
"Eugene Zhuravlev \(JetBrains\)" <jeka@intellij.com> wrote:

You are right Jonas :)

Those who set output directory to be the same as the source directory had
problems with this option on by default.
Note that obsolete files are always deleted by make (when we are sure the
files were compiled by IDEA). This option now affects only
rebuild behaviour.


Ah. I can see how clearing out the wrong directory would be bad.

I had tons of old class files sitting around in my build directory,
which was causing problems, so I guess make wasn't sure that the files
were compiled by IDEA.

Perhaps there could be an option to only clear .class files from the
output directory when rebuilding? Or to warn the user when there are
class files in the output directory that IDEA didn't create?


--
Erik Hanson

0

Please sign in to leave a comment.