-
Notifications
You must be signed in to change notification settings - Fork 116
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
[Core] delete obsolete ".m2/.cache/m2e/" directory and old logback logs #964
[Core] delete obsolete ".m2/.cache/m2e/" directory and old logback logs #964
Conversation
-1 you might have users still using older versions of eclipse/m2e, that are simply evaluating a newer version of m2e. That'd be really bad. You should show a popup asking users whether they want to delete something on their machine, that goes beyond the scope of a given eclipse instance. |
42e49e5
to
3b39d38
Compare
Good point. |
@fbricon, are you fine with this now? |
How about :
|
3b39d38
to
a9b6eef
Compare
"Delete obsolete M2E cache?", | ||
"A cache directory used by previous M2E versions was detected:\n" + m2eCache + "\n\n" | ||
+ "It's no longer used by newer M2E versions and, unless older Eclipse installations need it, can be safely deleted.", | ||
SWT.NONE, "Keep Cache", "Delete Cache"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you probably need a don't ask again choice as well, else it'll nag users who decide to keep the cache on every start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also suggest storing the result globally for the user, so that they won't be asked for every new eclipse installation again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's really a huge effort just for users switching back-and.forth between old and new m2e ... So probably simply let them waste theri disk-space than wasting development and maintenance effort here... @mickaelistria
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's really a huge effort just for users switching back-and.forth between old and new m2e ... So probably simply let them waste theri disk-space than wasting development and maintenance effort here... @mickaelistria
It was indeed not the intended to end up with that much code. :/
I would also suggest storing the result globally for the user, so that they won't be asked for every new eclipse installation again.
They should at least be ask for each Eclipse installation, because otherwise it will probably forgotten if the last installation started to use M2E 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, IMHO that's still too much in certain environments, where people deploy new eclipse installations weekly rather than yearly. With oomph, things are set up automatically, and that popup would interrupt the automatic installation process (git clone, project import, etc.). These modal dialogs on startup (takari stats, jboss usage and now this) are not helpful in that regard.
There could be a system property to disable the popup. Or make it a passive notification instead of a modal dialog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I actually never wanted to make it that complicated, but before we get many complaints and since I had started it ...
You can now set the Java-system property m2e.keep.legacy.cache
to true
to just keep the cache.
Furthermore you can set a check-box to be not asked again.
In that case a marker file DELETE_ME.txt
is created in the directory that explains why/when this can be deleted and that prevents the dialog from popping up subsequently.
If that is not sufficient I will just add the file to the directory so one can delete it manually if stumbling upon it.
This way maybe gigabytes of storage are kept unnecessarily occupied but at least no pop-up shows up.
a9b6eef
to
85119c2
Compare
85119c2
to
62a4f2d
Compare
I consider your absent of objections as silent consent. If you think more has to be done, it can be done in a follow up PR. |
Similar to #606 the M2E-cache at
<user-home>/.m2/.cache/m2e/
is not used anymore and can be deleted, since we don't sue the indexer anymore.Anyone can check the size of that folder. This usually removes a few GB of unused files that where created by m2e in the past.
Furthermore the old logs in the state location of the now renamed o.e.m2e.lockback.configuration can be deleted, which removes up to another GB of useless data.