zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Marc Chantreux <eiro@phear.org>
Cc: Zsh Users <zsh-users@zsh.org>
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	[thread overview]
Message-ID: <CAKc7PVA8hPRsnBoEUK9wWz=TJCF1OoXoJGtSPsR0BN9KMDmaCQ@mail.gmail.com> (raw)
In-Reply-To: <20180629061524.GA17197@prometheus.u-strasbg.fr>

On 29 June 2018 at 08:15, Marc Chantreux <eiro@phear.org> 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


  parent reply	other threads:[~2018-06-29 18:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 12:51 Sebastian Gniazdowski
2018-06-29  6:15 ` Marc Chantreux
2018-06-29 17:22   ` Daniel Shahaf
2018-06-29 17:52     ` Marc Chantreux
2018-06-29 18:04       ` Jérémie Roquet
2018-06-29 18:04       ` Daniel Shahaf
2018-06-29 18:57         ` Marc Chantreux
2018-06-29 18:39   ` Sebastian Gniazdowski [this message]
2018-06-29 18:58     ` Bart Schaefer
2018-06-29 20:38     ` Sebastian Gniazdowski
2018-07-13 12:02 ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKc7PVA8hPRsnBoEUK9wWz=TJCF1OoXoJGtSPsR0BN9KMDmaCQ@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=eiro@phear.org \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).