Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
- X-seq: zsh-users 23525
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Marc Chantreux <eiro@xxxxxxxxx>
- Subject: Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
- Date: Fri, 29 Jun 2018 20:39:46 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ek4Zl9i5mPbXz4BCGCGkGj8vBSXYzx9oAlx3cAHzgic=; b=PrY0AgYpC1ga69t/41sDONZ/NPn7uoYAUuu5ApucM3plEeljSCQzTVqpGBopTqXu6T YNSGceUEGpJgSlsMW3hMuEmFqINT80WZV6Kwd6uMHKZe8juGMv0RCeKH9dlPyMNsFCSU rWTvoPcfPz/7wq0CVEU1T3LqAUMrDNuYnRUmVM3SraXC++v+no+JdDoh9dQkUME3Qr05 wB79uKnzhjhwMhV2EOgpO/MvWm2MxO0N3uf42YiCuW5oasqfj+jZs8Yj1f+aySWugLU2 SbVA9f3mCPtGC9UmYsyEmTmxsOm9pxXB2+4GiB4GdPDthrSRNf5GzhPS4mUPzEpVStME zFtQ==
- In-reply-to: <20180629061524.GA17197@prometheus.u-strasbg.fr>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVA9a3MQk7AxFnXH6cDVL3xdX4fCeKMP4Qf6Sppb5hgW6Q@mail.gmail.com> <20180629061524.GA17197@prometheus.u-strasbg.fr>
On 29 June 2018 at 08:15, Marc Chantreux <eiro@xxxxxxxxx> wrote:
> hello Sebastian,
>
>> Has anyone a testing framework or other project that could
>> be part of a "zsh-suite"
>
> i don't know what are the crietia to be a part of zsh-suite.
> for the uze project, i wrote a TAP (https://testanything.org/)
> emiter inspired by Test::More ().
I see the zsh-suite as a collection of self-contained tools and
libraries. By self-contained I mean I don't like dependencies
spreading in exponential or so speed and things ending up as 1000
modules installed by node.js. Then, on the other hand, going outside
zsh code feels a bit refreshing. Integration is a good thing (if not
exponential, etc.), and for test framework Perl use is not a problem,
it's even nice.
> but everything is written using the uze convention and helpers.
> i would be pleased to be part of a larger project but i'm really
> bound to some "good practices" i developped over years. for example
> uze use those options and i'm not open to discussion about
> it (because reliability and readability).
>
> braceccl extendedglob globstarshort
> rcquotes promptbang promptsubst
> nohashdirs pathdirs
> nounset warncreateglobal
> pipefail shinstdin
>
> also: i use "alternative syntax" as a first choice and really encourage
> it
Your syntax gives good impression. When coding Zsh scripts and the
project gets bigger, one can have an impression of the code being
logy, sluggish-looking. So for example I wrote a logging library,
which is characterized by use of <( the_logger ) process substitution,
yielding mysql, sqlite, etc. backend support and 0-delays in
foreground producer-process. But it doesn't feel nice to announce it,
because I see people reacting to it in terms of "such project in Zsh?
it must be logy". I of course fight with any logy part of my code,
sometimes it's not possible, and I think your syntax and style is
contrary to logy. Zsh-Suite should be good quality code explicitly
without logy parts and I think you could help with this.
> Back to TAP.zsh
>
> the idea behind that is to have a simple implemetation to
> give me the ability to reuse all the tooling already written
> for TAP and JUnit (because there is a converter).
>
> here is an exemple of test suite
>
> https://github.com/zsh-uze/http-tools/blob/master/t/100_json.t
I read the source (TAP.zsh), it's not long, I can agree with
namespaces for whole Zsh-Suite because it seems to force not-logy
looking code (the same with alternate syntax). To compare, the bats
test file I mentioned:
https://github.com/zdharma/git-url/blob/master/test/short.bats
I would miss this syntax: the conditions enumerations in [ ... ]\n[
... ]..., but TAP.zsh integrates with other stuff so there's no clear
winner. Zsh-Suite could provide 2 test suites, they would probably
differ in details and user would have a choice.
> if you clone the repo and zsh is already installed, you
> can have a test report using
>
> prove -ezsh -r t
>
> prove comes with perl, it has a lot of plugin
> (html reports for example)
That's nice feature.
>> I have Zshelldoc
>
> for the moment, i use inline pod strings
>
> : <<=cut
>
> =head1 why?
>
> this is cool because i can just run
>
> perldoc my/zsh/lib.zsh
>
> to have a manpage
>
> =cut
>
> but i'm not bound to this.
Here is the situation I've described earlier: Zshelldoc, coming with
impression of logy Zsh code somewhat glued together, and perldoc which
has a normal aura. Again, user can have a choice. To defend Zshelldoc
which lost at start ;), it has a function-extraction code (I wrote
some unit tests using this code, it extracts functions, then autoloads
them and tests them) and generates call-trees and reverse-call-trees
for each function. Zsh-Suite could do something to convey the message
that it's not weekend top-down script logy coding.
--
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author