[m-rev.] Fwd: Re: for review: add missing prereqs for .class files
Zoltan Somogyi
zoltan.somogyi at runbox.com
Fri Sep 26 23:21:43 AEST 2025
I accidentally sent this just to Julien.
Zoltan.
----- Start Forwarded Message -----
Sent: Fri, 26 Sep 2025 20:17:02 +1000 (AEST)
From: "Zoltan Somogyi" <zoltan.somogyi at runbox.com>
To: "Julien Fischer" <juliensf at gmail.com>
Subject: Re: [m-rev.] for review: add missing prereqs for .class files
On Fri, 26 Sep 2025 17:19:01 +1000, Julien Fischer <juliensf at gmail.com> wrote:
> > > Which source file or files do you mean here? The Mercury one or the generated
> > > target language one. (The two can differ since due to source file mapping in
> > > Mercury, Mercury source files can reside in different directories; target
> > > language source files never should.)
> >
> > The Mercury one. I will clarify that.
>
> Ok. So, what does cur_dir mean with respect to source file mappings across
> directories? (E.g where some of the Mercury source files are physically
> located in another directory and we use source file mapping to point to them.)
Good point. However, I just tried that, meaning that
- I did mmake realclean in grade_lib,
- made a subdir and moved a module there,
- did mmc -f that included all the modules, including the moved one,
- and then did mmake depend (which worked, sort-of) and mmake (which failed).
The symptom was the missing .int3 file of the moved module,
which wasn't either in grade_lib or its new subdir. The sort-of is because
mmake depend did not create a .d file for the moved module either.
> In that case, are such mapped source files treated as being in the
> current directory?
Since the rest of the system does not seem to support mmc -f being invoked
on non-current-directory files, how this diff treats them does not seem to matter.
It is a separate issue that deserves a separate diff. I will document the issue,
though.
> > > > +:- type src_cur_dir
> > > > + ---> src_is_not_in_cur_dir
> > > > + ; src_is_in_cur_dir.
> > >
> > > The diff looks ok otherwise; you probably want to adjust some of the comments
> > > in light of the discussion on the mailing list.
> >
> > Thanks.
> >
> > What's your opinion of two separate {direct,indirect}_imports_non_intermod_local
> > prereq_specs, compared to a local_modules_only wrapper around existing
> > prereq_specs?
>
> On the face of it, moving to a local_modules_only wrapper seems preferable.
I tried that, and it turns out to be a bad idea. I documented it as a rejected possible
alternative.
The updated diff is attached. Since the only parts that changed are comments,
and the code has been reviewed, I am committing it.
Zoltan.
----- End Forwarded Message -----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.cd2
Type: application/octet-stream
Size: 13721 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20250926/2a0c0a1d/attachment.obj>
More information about the reviews
mailing list