GithubHelp home page GithubHelp logo

Comments (6)

ugexe avatar ugexe commented on June 14, 2024

This functionality was both added and removed in the last month.

At first thought it seemed ideal. However it ended up having some less than ideal traits:

  • Since zef test Some::Module "just worked", then zef build Some::Module should also work
  • The above zef build Some::Module actually did work. But now there was an abundance of redundancy where zef build Some::Module zef test Some::Module and zef install Some::Module all ran the same stuff except for the processes after it (build stopped right before test, test stopped right before install)
  • Since both test and build were able to accept module names this gave the impression that they should optionally fetch any required dependencies. This also means that both test and build commands need all the additional options/flags in multi MAIN to support search/depends/etc, which in turn makes the automatic USAGE that shows commands + options (not the --help USAGE) even larger (mostly with redundant flags)
  • test should not imply running build. So the install workflow cannot be used as is, adding only a way to stop after testing (it would have to use a different workflow to skip build, unlike install)

I'm open to being convinced otherwise, but for now my evidence suggests the pros do not outweight the cons of added redundancy/complexity. The desired behavior can, however, be accomplished a few different ways:

# Fetch dependencies
zef --dry install Some::Module # Additionally runs `build` as needed
zef look Some::Module && zef --depsonly install . && zef test .

# Don't fetch dependencies
zef look Some::Module && zef build . && zef test . # Additionally runs `build`
zef look Some::Module && zef test .

tl;dr: If rakudo's &MAIN_HELPER ever gets updated to gracefully handle universal options (options that all multi MAIN share) the complexity will no longer be an issue, because it won't have to duplicate the same descriptive (so sometimes longer) variable names in every signature to get the proper USAGE

from zef.

azawawi avatar azawawi commented on June 14, 2024

In my mind, zef test . depends on a on zef build .. Ofcourse one can add a --no-build for people who may want that behavior.

from zef.

azawawi avatar azawawi commented on June 14, 2024

Any update on this one?

from zef.

ugexe avatar ugexe commented on June 14, 2024

I will probably bring it back when I have some free time. I see there is a way to hide stuff from USAGE that could alleviate my previously mentioned concerns, but because zef --dry install . at least provides the functionality already, it's not yet at the top of my todo list

from zef.

azawawi avatar azawawi commented on June 14, 2024

So shall i close it or not?

from zef.

ugexe avatar ugexe commented on June 14, 2024

You can leave it open. Maybe someone else will have an opinion on it before I get around to redoing USAGE

from zef.

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.