[m-rev.] for post-commit review: split two extension categories

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Jul 27 11:41:04 AEST 2023


This diff is a stepping stone to further simplification.
It adds a temporary numeric identifier to each extension category.
The following table , which is also attached, summarizes how extensions
in each category are translated into filenames.

--------------------------------------------------------------------------
nosearch                    search
nodir   subdir  gradesd     nodir   subdir  gradesd
--------------------------------------------------------------------------

cur     cur     cur         cur     cur     cur         4

cur     ngs     ngs         cur     ngs     ngs         1
cur     ngs     ngs         cur     ngs     ngs         11  same as 1

cur     cur     gs          cur     cur     gs          10

cur     ngs     gs          cur     cur     cur         5

cur     ngs     gs          cur     ngs     ngs         2
cur     ngs     gs          cur     ngs     ngs         12  same as 2

cur     ngs     gs          cur     ngs     gs          3
cur     ngs     gs          cur     ngs     gs          6   same as 3
cur     ngs     gs          cur     ngs     gs          7   JAVA
cur     ngs     gs          cur     ngs     gs          8   same as 3,6
cur     ngs     gs          cur     ngs     gs          9   same as 3,6,8
cur     ngs     gs          cur     ngs     gs          13  same as 3,6,8,9

--------------------------------------------------------------------------

The six main columns are a 2x3 matrix. The first three columns
are for translations without search, the next three are with search.
Each group of three are for (a) no --use-subdirs, (b) --use-subdirs
but not --use-grade-subdirs, and (c) --use-grade-subdirs.
Each entry in the main table is "cur" for "put the file into the
current directory", "ngs" for put it into a non-grade-specific
subdir, and "gs" is for "put it into a grade-specific directory".

As you can see, there are six main groups, though category 7,
marked with JAVA, differs from all the others in how the
module name is translated into the base filename, and in how
the name of the grade-specific directory is constructed.

The search parameter has an effect only for some categories.
When it has an effect, it always puts the filename into a less
specific category, which is understandable, in that you are
specifying only the final part of the filename, and you do a search
for the rest. However, it would be nice if there was some documentation
somewhere of *why* search reduces a gs into ngs, rather than cur,
or vice versa, for a given category of extensions. As far as I know,
this info is not currently written down anywhere, but if anyone
does happen to know it for any extension, I would ask you
to write it down here on m-rev.

I will factor out these commonalities once this diff is committed,
which I will do after a final bootcheck.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.fns
Type: application/octet-stream
Size: 20605 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230727/5b6ad48e/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.fns
Type: application/octet-stream
Size: 615 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230727/5b6ad48e/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CATEGORIES
Type: application/octet-stream
Size: 1165 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230727/5b6ad48e/attachment-0005.obj>


More information about the reviews mailing list