-
Notifications
You must be signed in to change notification settings - Fork 108
Implicit relationship between the names of a module and the source file that contains it assumed #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Arjen, yes, it's by design, see https://github.com/fortran-lang/fpm/blob/master/PACKAGING.md#single-module-library. The rationale is that if we have higher constraints on the user application or library structure, we can design a more robust build system that has a "sane default" with fewer edge cases. Do you think the packaging guide could be improved in any way? |
However, the unhelpful response from fpm is not by design, but is due to this exception handling not being implemented. In scenarios like this fpm must be helpful to the user, for example:
or similar. |
Yes, the default layout that fpm expects is on purpose restricted, similar to how Cargo does it. The module names must be consistent with the filename. However, I am all for allowing exceptions, which you could specify by hand in The error message is not helpful. But we should work on fixing both of these things in the Fortran implementation (see #124). |
It is not criticism :) - just a user experience. I understand the
limitations, but an innocent user may run into this sort of things and not
be able to pinpoint the cause (as I was not with my other problem).
Regards,
Arjen
Op di 21 jul. 2020 om 16:56 schreef Ondřej Čertík <[email protected]
…:
Yes, the default layout that fpm expects is on purpose restricted, similar
to how Cargo does it. The module names must be consistent with the filename.
However, I am all for allowing exceptions, which you could specify by hand
in fpm.toml. We should do that.
The error message is not helpful. But we should work on fixing both of
these things in the Fortran implementation (see #124
<#124>).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#128 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN6YR5JSM22HTKDFHJED3TR4WUB7ANCNFSM4PDLQ2RQ>
.
|
@certik I opened #129 and #130 to track these specific exception handling and error message issues. I also created the fpm-fortran tag so that we can tag any issue to be specific to the Fortran implementation and not Haskell. You'll notice that I didn't initially tag #129 and #130 as fpm-fortran, as I'm unsure whether we should leave these unattended for a long time before fpm-fortran is up to speed. I think they're quite critical UI issues. |
And I implemented the initial infrastructure for Fortran at #131 to start getting things moving. |
This might be fixed with #213. |
The bootstrap version is no longer enforcing any match between module and source file name. |
I have run into a problem that is illustrated with the attached project:
`
$ d:/fortran/fpm/fpm.exe build
gfortran (for build/gfortran_debug/mxmy/mx.o build/gfortran_debug/mxmy/mx.mod)
fpm.exe: Error when running Shake build system:
at want, called at src\Build.hs:205:11 in fpm-0.1.0.0-9a29EtwrI5D7C1C0BiAJeV:Build
at need, called at src\Build.hs:203:13 in fpm-0.1.0.0-9a29EtwrI5D7C1C0BiAJeV:Build
at &%>, called at src\Build.hs:183:11 in fpm-0.1.0.0-9a29EtwrI5D7C1C0BiAJeV:Build
at error, called at src\Development\Shake\Internal\Rules\Files.hs:245:13 in shake- 0.18.5-7VS8ovPeUeSCopHgkQQ1Vu:Development.Shake.Internal.Rules.Files
Error, &%> rule failed to produce 1 file (out of 2)
build/gfortran_debug/mxmy/mx.o
build/gfortran_debug/mxmy/mx.mod - MISSING
`
The source file is called "mx.f90" but it contains a module "my". Apparently this is not currently supported, whether by design or otherwise. It seems to me to be a bug.
test-fpm-mxmy.zip
The text was updated successfully, but these errors were encountered: