Coder Social home page Coder Social logo

Comments (10)

jcspencer avatar jcspencer commented on July 30, 2024

I also think delegating calls from mix hex <command> [arguments...] to mix hex.<command> [arguments...] would be useful for newcomers as well, as everything would be available under the hex command. This would, of course, be backwards compatible with the current tasks (as it's really just calling them).

e.g. mix hex.info -> mix hex info or mix hex.owner add [arguments...] -> mix hex owner add [arguments...]

from hex.

josevalim avatar josevalim commented on July 30, 2024

I think delegating is confusing. I know the goal is to help on typos and newcomers, but then people write tutorials, some using one syntax, some use others, and that ends up causing a lot of confusion. Plus, it would only work with hex, and not other tasks, causing even more confusion.

We are going to support mix help --search hex on Elixir v1.0, mix hex could simply invoke it.

from hex.

jcspencer avatar jcspencer commented on July 30, 2024

@josevalim Now that I think about it, that would get very confusing in many ways 😕

Maybe we could output something like this for mix hex:

Hex is a package manager for the Erlang ecosystem. This is
a basic help message containing pointers to more information.

Usage:
  mix hex (this command)
  mix hex.command [arguments...] [options...]

Tasks:
>output from mix help --search hex<

Further information can be found here: https://hex.pm/docs/tasks

from hex.

ericmj avatar ericmj commented on July 30, 2024

I don't like the idea of having a task solely for documentation. We could isntead rename hex.info to hex and delegate to elixir-lang/elixir#2807.

from hex.

jcspencer avatar jcspencer commented on July 30, 2024

Would something like this work? https://gist.github.com/JamesS237/e3ad837a8e052443f645

from hex.

ericmj avatar ericmj commented on July 30, 2024

Looks good

from hex.

jcspencer avatar jcspencer commented on July 30, 2024

What should we do for Elixir versions older than v1.1.0? (regarding mix help --search PATTERN support)

from hex.

ericmj avatar ericmj commented on July 30, 2024

We don't call it for pre 1.1.0

from hex.

jcspencer avatar jcspencer commented on July 30, 2024

Should we simply call Mix.Task.run("help", ["--search", "hex."]) in the task if the version is >v1.1.0?

from hex.

jcspencer avatar jcspencer commented on July 30, 2024

Closed in #88

from hex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.