[m-rev.] for review: Put .mh files into Mercury/mhs subdirectory.
Zoltan Somogyi
zoltan.somogyi at runbox.com
Tue Jul 23 16:41:52 AEST 2024
On Tue, 23 Jul 2024 16:29:26 +1000, Peter Wang <novalazy at gmail.com> wrote:
> > > compiler/write_deps_file.m:
> > > Add $(mhs_subdir) prefix before %.mh patterns.
> > >
> > > Create a Mercury/mhs -> .. symlink when installing.
> >
> > Do NOT do this, ever. It makes it impossible to back up
> > the resulting directory, because the cp command will copy
> > Mercury/mhs to the target location in an infinite loop.
> > In this case, it is too late, because this problem already exists
> > for other suffixes, but in other projects ....
> >
>
> I'm not sure what action to take.
None. As I said: its too late.
> The Mercury/<ext>s -> .. symlinks
> are ugly, but expected by mmc --make and mmake --use-subdirs.
That is exactly what needs to be fixed first.
> (It's not impossible to back up the directory, but of course you can't
> dereference the symlinks when doing so.)
A requirement that everyone who tries to use "cp" to backup a Mercury install
has to discover for him/herself. I find that to be ... seriously suboptimal.
> > However, this diff also raises a question. When I completely redesigned
> > file_names.m, I left the handling of each extension as it was before,
> > even when it did not make sense. There are a bunch of XXXs in that file
> > noting extensions whose old handling (which we have so far preserved)
> > seems wrong. The intention was always to fix these together, because
> > for users, a single big change is preferable to a drip-feed of smaller changes.
> > The question is: should we start this process now?
>
> This change will mainly affect users who produce Mercury libraries to be
> consumed via a C interface, which I guess would not be too many.
> Looking through in file_names.m, the only XXX that looks user facing to
> me would be moving .prof files into a grade-specific subdir.
> I don't think there is any hurry.
They are all user-facing, if and only if the user in question is using the files
with the affected extensions. And it is not just .prof files; the two above as well,
and .exe/.bat files.
I don't think there is any hurry either, but it does seem like a good time.
Zoltan.
More information about the reviews
mailing list