tbillington / kondo

Cleans dependencies and build artifacts from your projects.
MIT License
1.79k stars 51 forks source link

Feat/direnv support #101

Open meskill opened 1 year ago

meskill commented 1 year ago

Clear caches that are created by the direnv tool

meskill commented 1 year ago

@tbillington please take a look

tbillington commented 1 year ago

Hey! Cheers for opening this PR, it looks good and I'd like to merge it in.

The only issue I can see is that you're very likely to have direnv in the same directory as your project. Unfortunately due to kondo's current design it only supports detecting a single "project type" per directory (https://github.com/tbillington/kondo/issues/29). That would mean kondo would detect either a direnv directory or your actual project type.

It's up on my list of priorities to support detecting multiple project types within the same folder.

If I merge this in now you will encounter the issue I mentioned, I'm not sure that is desirable.

I'm going to have a think about the restructure tonight, if it is less work than I think I might be able to do it relatively soon..

meskill commented 1 year ago

Thanks @tbillington

I've just recently learned about kondo and didn't know its has limitation to resolve only single project type. It's indeed undesirable in that case to add direnv support.

Let's put this on hold then until something changes about this.

tbillington commented 10 months ago

@meskill Thank you again for making this PR! It alerted me to direnv which I didn't know about before.

Direnv is an interesting case because it will very frequently accompany other projects in the same directory. So surfacing every use of direnv might add quite a bit of noise to the output of kondo, but it is still a cache that I assume the user would want cleared if they are cleaning a project in the same directory.

I've been planning a rework of the internals of kondo to more use-cases, including things like direnv, and I've mentioned this PR in the tracking issue.