Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does zef recognize and handle pre-release modules?

Tags:

module

raku

zef

I have a module App::Assixt, to which I've recently made a relatively large change. I've of course tested it on my local system, but would like to give it some field testing before calling it a "stable release".

Is there a way to "tag" this release as an "alpha", or "release-candidate", so this release will only be installed by people who have opted to use unstable/testing releases?

like image 903
Tyil Avatar asked Aug 27 '18 09:08

Tyil


1 Answers

zef will treat versions the same as Perl 6:

# true because "1.0.a" < "1.0.0"
$ perl6 -e 'say Version.new("1.0.PREVIEW") < Version.new("1.0")'
True

If a Foo:ver<1.0.PREVIEW> is installed it can be used as Foo:ver<1.0.PREVIEW> or Foo:ver<1.0>. This means any systems that have Foo:ver<1.0.PREVIEW> installed would need to uninstall it to upgrade / install Foo:ver<1.0> in the future ( unless using --force-install ), but also that authors can write code for the final version without declaring the extra .PREVIEW everywhere.

This is not very useful in regards to publishing -- zef will grab the newest version by default despite the user not having opted in to whatever versioning scheme is in use. Since the user wants to opt-in for this, there are two options.


1) Create e.g. unstable, testing, stable` indexes and convince people to use them

This could be done by copying the zef config to %*ENV<XDG_CONFIG_HOME>/zef/config.json and incorporate the following:

"Repository" : [
    {
        "short-name" : "unstable",
        "enabled" : 0,
        "module" : "Zef::Repository::Ecosystems",
        "options" : {
            "name" : "unstable",
            "mirrors" : [ "/path/or/url/to/package/list.json" ]
        }
    }
]

Which allows:

zef install Foo::Bar --unstable

2) Give out a link to the resource without publishing it

zef install https://github.com/ugexe/[email protected]
zef install https://github.com/ugexe/Perl6-Text--Table--Simple/archive/v0.0.3.zip
like image 90
ugexe Avatar answered Oct 16 '22 14:10

ugexe