-
Notifications
You must be signed in to change notification settings - Fork 109
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
Package layout #39
Comments
Here is a second iteration of the above layout:
|
I'm really confused now.
So based on feedback so far, I assume that source file should be named the same as the module, and perhaps the spec in this thread is out of date. Then you have (ignoring app and x.f90 for simplicity):
Now the source files have the same name as the modules they define. This doesn't work either because fpm builds
Okay, so fpm does some renaming of files under the hood--
Great, fpm now builds correctly. Perhaps this is what Brad meant in #57 when he said
I didn't understand this because the 1st half of the sentence conflicts the 2nd half of the sentence. But I think the 2nd half is key: If you have src/a/b/c/utils.f90, then the module should be called Given this, perhaps I can reverse engineer the correct spec. Let's try a third iteration:
Then, the contents are:
fpm builds this correctly. Now, if I went through this much trouble to figure this out with help from fpm developers, imagine other people trying to build their thing with fpm. :) We need a clear, clean, explicit spec. |
@everythingfunctional and I discussed this, and the solution that we both liked in the end is precisely as I posted above (which is different to your comment), I just didn't have time to write it more explicitly. @milancurcic, please help us, we are doing what we can in our little time. If you have time, please help us write the spec. The most natural way seems to have a file What you are proposing is to name the file as Now we are just working on In particular, we need to write more tests, which would clarify what is meant to work. |
Ok, yeah. Here's what I think the specification about that would be. fpm replaces the path separators with underscores when determining the name of the I'm sure this could use a bit more wordsmithing or clarification. It also needs to be fit into a larger specification about the expected (default) organization of an fpm compatible project, with instructions about how to override the defaults. |
What do you think I'm doing? :)
I don't propose that, it's how I originally understood Brad, but that's not what he meant and I understood it later. What led me astray is that the 2nd iteration of your tree wasn't consistent with the module names in the original post. Based on the feedback, here's the package structure (same as Ondrej's 2nd iteration):
And here are the contents:
Does this look correct? |
Almost. You are still putting the prefix into the filename in I also had the |
Oops, you're right, I did that. If we ignore
I put module names as # comments next to each file. I think this is correct now and I agree with it. If you agree, I'll submit a PR to document this. |
Btw, current master of fpm builds this correctly. |
@milancurcic yes, if you could please document this and the reasoning behind this decision, that would be awesome. I am really happy you agree with this also. It's different to what I've been used to doing, but only in the fact that each module has the full name in the |
It looks like we're on the same page now. Thanks for struggling through this @milancurcic . I know we didn't do a very good job documenting it, so your efforts are hugely appreciated. |
I think this is pretty well settled now. Should we close this? |
We should document these choices and why we chose it. Then we can close this. Because this will come up again.
…On Wed, Apr 29, 2020, at 9:30 PM, Brad Richardson wrote:
I think this is pretty well settled now. Should we close this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFAWES7J5OW4SJVYLBDYLRPDWENANCNFSM4K2TQKOQ>.
|
This issue does not have much info anyway and it is documented in the tutorial a bit, so let's close this one. |
We've been working with @everythingfunctional on the standardization of the layout. First iteration:
The text was updated successfully, but these errors were encountered: