Giter Club home page Giter Club logo

Comments (19)

Hywan avatar Hywan commented on June 18, 2024

That's a question I have since a long time. I am not comfortable with the idea of delivering a broken binary. The compromise I found is to log messages:

Core/composer.json

Lines 32 to 34 in 1e62154

"hoa/console" : "To use the `hoa` script.",
"hoa/dispatcher": "To use the `hoa` script.",
"hoa/router" : "To use the `hoa` script.",
with suggest in composer.json. I wonder if this is possible to come with a Composer's plugin that install the hoa binary if all requirements are satisfied (i.e. if hoa/router, hoa/dispatcher and hoa/console are installed)?

I don't think that's a good idea to install the hoa binary with hoa/console because:

  1. hoa/console does not require neither hoa/dispatcher or hoa/router (https://github.com/hoaproject/Console/blob/e4450ac42d0e807bca7a39bba5b6fede65f54bdd/composer.json),
  2. hoa/console is a library, used in combination with hoa/router and hoa/dispatcher to create the hoa binary,
  3. All libraries come with a Bin/ directory, containing several commands used by the hoa binary; consequently all libraries would depend on hoa/console, and this is not good.

So it's not strictly related.

What do you think about having a Composer's plugin? /cc @hoaproject/hoackers

from core.

Hywan avatar Hywan commented on June 18, 2024

/ping @jubianchi (as you asked on IRC)

from core.

evert avatar evert commented on June 18, 2024

I think the 'official' answer would be to create a separate package that distributes the binary and depends on all three packages.

But, if it were me, I wouldn't be fully sure if I would want to do that... it does reduce the visibility of the binary.

from core.

Hywan avatar Hywan commented on June 18, 2024

@evert Welcome in my dilema :-].

from core.

evert avatar evert commented on June 18, 2024

Have you put any further thought towards this yet?

from core.

Hywan avatar Hywan commented on June 18, 2024

Not yet. I will try to open a discussion about the split of Hoa\Core very soon. My plans seem correct. This will involve this issue.

from core.

jubianchi avatar jubianchi commented on June 18, 2024

@Hywan Here are my thoughts (based on what I personnally think and on the feedbacks I got from several users of other libraries I contribute to) about this issue :

  • The fact that libraries provide some commands accessible through the hoa binary makes them kind of dependent to hoa/console. hoa/core in particular is where the dependency exists. This is some kind of optional dependency because the library just works without hoa/console only users using the CLI will notice the dependency. But,
  • I once contributed to a library (which I won't link here because the use case is not really related) and we came though a "optional dependency" problem. I used composer suggests and I got the following answer: There's no such thing as an optional dependency. I do not totally agree with those statements but OK, let's consider them.
  • I totally understand you don't want to make a hard-dependency between hoa/core and hoa/console because, most of the time, the hoa binary will not be used and the user will get useless dependencies.
  • I totally understand you don't want to hide the hoa binary in a seperate package, but...

Extracting the hoa binary to its own package seems to be the best solution:

  • no more unusable (when dependencies are not here) binary in hoa/core
  • no more "optional dependencies" in hoa/core
  • more user-friendly: user will not have to bother with the binary dependencies and eventual errors, everything will be handled by composer (or any other loader)
  • will require an extra package to be installed
  • will probably require some work to correctly extract the biary's logic (finding commands among other hoa libraries)
  • only a single suggest in each hoa library providing CLI commands

I can easily imagine a new package called hoa/cli with every dependencies hard-linked with composer.json. This package would be responsible of installing the hoa binary, its dependencies and publishing the binary in the root-package bin folder if asked.

My 2 cents ;)

from core.

Hywan avatar Hywan commented on June 18, 2024

So, what about putting hoa CLI tools into Hoa\Devtools?

from core.

jubianchi avatar jubianchi commented on June 18, 2024

the hoa commands are not all only related to dev ?

from core.

Hywan avatar Hywan commented on June 18, 2024

Agree. So, maybe we have to go through hoa/cli? I don't like the name though. Any better idea? It's like an empty “package”. Do we keep the same naming for these packages?

Please @hoaproject/hoackers, vote!

from core.

marmotz avatar marmotz commented on June 18, 2024

hoa/cli is a common name and everybody know what this package do only with the name.

"It's a cli for hoa"

So, 👍 @jubianchi

from core.

Hywan avatar Hywan commented on June 18, 2024

Ok. Any volunteer? /cc @hoaproject/hoackers

from core.

jubianchi avatar jubianchi commented on June 18, 2024

@Hywan I'm on it ;)

from core.

Hywan avatar Hywan commented on June 18, 2024

@jubianchi Perfect :-). Are you a commiter to create the new repository? Please, come on IRC to discuss about that.

from core.

jubianchi avatar jubianchi commented on June 18, 2024

capture d ecran 2015-07-13 a 15 34 40

I'm coming on IRC right now ;)

from core.

jubianchi avatar jubianchi commented on June 18, 2024

Feedbacks welcome: https://github.com/jubianchi/hoaproject-cli/

from core.

Hywan avatar Hywan commented on June 18, 2024

Done. Hoa\Cli.

from core.

jubianchi avatar jubianchi commented on June 18, 2024

👍

from core.

evert avatar evert commented on June 18, 2024

awesome!

from core.

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.