Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Idea: automatic dotfiles bisection (and minimal example extraction)
- X-seq: zsh-users 22271
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Idea: automatic dotfiles bisection (and minimal example extraction)
- Date: Sun, 25 Dec 2016 14:51:45 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=b8sIi2rZSuSrJWE QVgInuc4tP54=; b=xIGO3K2eC0e38cGtN4iqwOKjjdaVLvvN4r6Sq15xtiyi+5f ol8uJL9LecsgENWtUDIL9z+90ovTbN5ukfD3J/xWxQ9307DqYvlGcX12rgoZ7a3s LzM9HTWz0htV+BD9+YCo9mUrfbGyvmiu1x6TnQvnkWovsDxE/nmibNggyYCE=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=b8sIi2rZSuSrJW EQVgInuc4tP54=; b=hiF5Zo8IYe4Jvx9hzYY9TG6OyN99jtovpwszyYYMRflIGc vETknP6x5zZ8Kny82RX5OgvfyFcILoLdCzeb36wRQPrVpRitFBFPFqNz8DVP0GnP +dB6wS3GONR2umJxBysRPEgbt+pf2I+F+BH3MOIecnR62TPBeIHyIkcT0eNRU=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
I'm tired of having to ask people to bisect their zshrc to find minimal
reproducers for bugs they report.
I was thinking, we could write an automatic bisector, similar to
git-bisect(1), which operates on zshenv,zprofile,zshrc, and
automatically reports which statement in those files causes the problem.
A simplistic version would simply split the file by lines, and deal with
the case that a particular split is invalid (say, includes a '{' token
but not its matching '}' token) by trying to split a few lines above or
below, like «git bisect run» does when its argument script exits 125.
A more intelligent version would use the ${(z)} tokeniser to split the
file on statement boundaries. (It would basically need to keep track of
nesting level into subshells, {…} blocks, and control structures
(done/fi/esac); statement ends are represented as «;» array elements.)
Once "report which line causes the problem to appear" is implemented,
a future feature would be to start weeding out _other_ statements whilst
the problem still reproduces, and thereby automatically construct
a minimal reproduction script. :-)
Does such a thing exist? Does anyone plan to implement it?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author