Subject: Re: [GSoC][PATCH v3 1/1] userdiff: add support for Scheme

From: Junio C Hamano <[email-masked]>
Date: Mon, 12 Apr 2021 16:04:04 -0700

Atharva Raykar <[email-masked]> writes:

> Add a diff driver for Scheme-like languages which recognizes top level
> and local `define` forms, whether it is a function definition, binding,
> syntax definition or a user-defined `define-xyzzy` form.
>
> Also supports R6RS `library` forms, `module` forms along with class and
> struct declarations used in Racket (PLT Scheme).
>
> Alternate "def" syntax such as those in Gerbil Scheme are also
> supported, like defstruct, defsyntax and so on.
>
> The rationale for picking `define` forms for the hunk headers is because
> it is usually the only significant form for defining the structure of
> the program, and it is a common pattern for schemers to have local
> function definitions to hide their visibility, so it is not only the top
> level `define`'s that are of interest. Schemers also extend the language
> with macros to provide their own define forms (for example, something
> like a `define-test-suite`) which is also captured in the hunk header.
>
> Since it is common practice to extend syntax with variants of a form
> like `module+`, `class*` etc, those have been supported as well.
>
> The word regex is a best-effort attempt to conform to R7RS[1] valid
> identifiers, symbols and numbers.
>
> [1] https://small.r7rs.org/attachment/r7rs.pdf (section 2.1)
>
> Signed-off-by: Atharva Raykar <[email-masked]>
> ---
>  Documentation/gitattributes.txt    |  2 ++
>  t/t4018-diff-funcname.sh           |  1 +
>  t/t4018/scheme-class               |  7 +++++++
>  t/t4018/scheme-def                 |  4 ++++
>  t/t4018/scheme-def-variant         |  4 ++++
>  t/t4018/scheme-define-slash-public |  7 +++++++
>  t/t4018/scheme-define-syntax       |  8 ++++++++
>  t/t4018/scheme-define-variant      |  4 ++++
>  t/t4018/scheme-library             | 11 +++++++++++
>  t/t4018/scheme-local-define        |  4 ++++
>  t/t4018/scheme-module              |  6 ++++++
>  t/t4018/scheme-top-level-define    |  4 ++++
>  t/t4018/scheme-user-defined-define |  6 ++++++
>  t/t4034-diff-words.sh              |  1 +
>  t/t4034/scheme/expect              | 11 +++++++++++
>  t/t4034/scheme/post                |  6 ++++++
>  t/t4034/scheme/pre                 |  6 ++++++
>  userdiff.c                         |  9 +++++++++
>  18 files changed, 101 insertions(+)
>  create mode 100644 t/t4018/scheme-class
>  create mode 100644 t/t4018/scheme-def
>  create mode 100644 t/t4018/scheme-def-variant
>  create mode 100644 t/t4018/scheme-define-slash-public
>  create mode 100644 t/t4018/scheme-define-syntax
>  create mode 100644 t/t4018/scheme-define-variant
>  create mode 100644 t/t4018/scheme-library
>  create mode 100644 t/t4018/scheme-local-define
>  create mode 100644 t/t4018/scheme-module
>  create mode 100644 t/t4018/scheme-top-level-define
>  create mode 100644 t/t4018/scheme-user-defined-define
>  create mode 100644 t/t4034/scheme/expect
>  create mode 100644 t/t4034/scheme/post
>  create mode 100644 t/t4034/scheme/pre

We have seen reviews on previous rounds, and haven't heard anything
on this round yet.

If I do not hear from anybody in a few days, let's merge it to
'next'.