Replies: 4 comments 3 replies
-
I like the idea and the simplicity to define the aliases... I think it would be great if Another improvement is if the Also will the alias override an existing task? For example in a module extending Thanks for using my code as an idea :) |
Beta Was this translation helpful? Give feedback.
-
I'd love to take a shot on this one... would you point me where to start looking (maybe follow the implementation of other |
Beta Was this translation helpful? Give feedback.
-
I don't like the discussed APIs so far. They work, but they don't feel like the rest of Mill. Specifically, Mill has distinct Scala APIs and CLIs, and mixing query strings in the Something like this would be better IMO, at least keeping to Scala-like APIs in the /** Run all tests. */
def testall = T.alias(allModules[TestModule](_.test()))
/** Publish all modules. */
def pub = T.alias(io.kipp.mill.ci.release.ReleaseModule.publishAll(???))
def run = T.alias(foo.bar.run)
def help = T.help(testAll, pub, run, foo.run) I wonder if we can drop the wrappers, and let people just alias tasks directly? This cuts boilerplate further, but we'd need some story for how CLI arguments are handled (does each alias need to duplicate them? Or can we automate that somehow?) /** Run all tests. */
def testall = allModules[TestModule](_.test())
/** Publish all modules. */
def pub = io.kipp.mill.ci.release.ReleaseModule.publishAll(???)
def run = foo.bar.run() Some of the need for aliases could be satisfied in other ways, albeit less conveniently:
Overall I can see the need, but I'm not convinced it's a good ROI in terms of complexity v.s. benefit, at least what has been discussed so far. I feel like we should try to streamline the existing clunky techniques above, rather than introducing a whole new set of APIs just to bypass them and ending up with two ways to do the same thing. There's that saying "every problem can be solved by an additional layer of indirection, except the problem of too many layers of indirection", and one of Mill's primary design goals has been to minimize the number of "layers" that a user needs to think about. If we could better integrate these user workflows by streamlining the core Mill APIs, rather than layering them on top, I think that would put us in a better place One compromise is we could prototype this as a plugin, either an external plugin we link to on our docsite or as a in-tree plugin in the |
Beta Was this translation helpful? Give feedback.
-
How about supporting a lightweight alias mechanism like //> using mill.alias myalias: -j0 -d __.someTask + someOtherCommand
//> using mill.alias testAll: --no-server -j1 app.smoketests
//> using mill.alias find-updates-1: --meta-level 1 -j0 mill.scalalib.Dependency/showUpdates --format PerDependency |
Beta Was this translation helpful? Give feedback.
-
Often, when switching projects, I find it hard to remember which targets needs to be run to start, test or deploy an application. Often, also some parameters need to be applied.
Co-colleagues used to maintain a small Makefile, just to collect the essential build commands. As using GNU Make around Mill doesn't feel right to me, I think we should try to fill the gaps.
It would be great, if we could provide some API to improve the DX out of the box.
Lets visit the example given by @carlosedp in this comment: #299 (comment)
Let's find some nice Mill-idiomatic API to replace such workarounds.
And, as it is often easier to start thinking how some API might feel like and also to spot issues, here is a first sketch how it could look like:
Please comment, what you think?
Beta Was this translation helpful? Give feedback.
All reactions