babashka / neil

A CLI to add common aliases and features to deps.edn-based projects
MIT License
370 stars 27 forks source link

Consider using `deps-info` for `neil new` implementation #116

Closed rads closed 4 months ago

rads commented 2 years ago

I needed to use the same tools.deps inference for bbin so I moved the code to a shared library:

https://github.com/rads/deps-infer

I suggest we add a dependency for this lib in neil and update the neil new implementation to use this.

I plan to maintain deps-infer going forward since it's a useful library on its own without bbin or neil.

bb --config <(echo "{:deps $(deps-infer --lib io.github.rads/watch)}") \
  -e "(require 'rads.watch) (rads.watch/print-help nil)"
borkdude commented 2 years ago

@rads Hmm, I already have a library with the same name but with a different purpose: https://github.com/borkdude/deps-infer.

rads commented 2 years ago

@borkdude: Ah, I didn't know about that one! I can change the name if that's the main blocker here.

rads commented 2 years ago

Woops, wrong button!

rads commented 2 years ago

I should clarify that I plan to change the name regardless of whether we use the library for neil. Definitely want to avoid any conflicts with your library.

borkdude commented 2 years ago

On the other hand, borkdude/deps-infer isn't very actively developed and used, so maybe it's not a big deal. Coming up with a good unique name is hard.

borkdude commented 2 years ago

Other than that, I don't see a problem, other than maybe some redundant code in the library which could slow down neil's startup time. I do prefer keeping neil's deps as lean as possible to ensure good startup and bb compatibility.

rads commented 2 years ago

@borkdude:

I do prefer keeping neil's deps as lean as possible to ensure good startup and bb compatibility.

I agree. I think I can keep any extra stuff out of neil by splitting the namespaces and using :deps/root as needed.

rads commented 2 years ago

I've created a duplicate issue of https://github.com/babashka/neil/issues/79 in https://github.com/rads/deps-info/issues/1. This means I can implement the GitLab/Bitbucket/Beanstalk/Sourcehut integration there and both bbin and neil will be able to use it.

Going to hold off on using deps-info for neil until https://github.com/rads/deps-info/issues/1 is done first.

rads commented 4 months ago

I'm moving the deps-info code inline into bbin so I'm going to close this issue for now.