Giter VIP home page Giter VIP logo

Comments (7)

everythingfunctional avatar everythingfunctional commented on July 25, 2024

That assumption actually comes from here.

The reasoning is that we want the file name to match the module name, and the module name to include the path components of the file name. This was a basic structure to help with organizing modules that @certik and I came up with.

There are ways to just inspect the source files and figure out the module names and dependencies more flexibly, but for our initial implementation we wanted to keep things as simple as possible and try and encourage a common organizational convention.

Obviously this is something that should be added to the README. @certik , do you think you'll have time to write up our standard conventions in the README any time soon?

from fpm.

milancurcic avatar milancurcic commented on July 25, 2024

Specifically for datetime-fortran, that's fine. I'm happy to rename the source file so it can build with fpm.

I also support encouraging the practice one module per source file, with file name matching the module.

However, I think this may be quite limiting if fpm is to build existing packages. I don't know, but it's possible that there are many that have multiple modules per source file.

This made me think now: why would there be an expectation for a specific .mod file to be present? AFAIK, the compiler cares only about the include path and that the modules are there. It knows how to find the file in the include directory. So, this requirement by fpm seems artificial to me. Could it be removed so that fpm only checks for .o files? I think it's safe to assume that if .o file is created, that the .mod files have been created as well.

from fpm.

milancurcic avatar milancurcic commented on July 25, 2024

However, I think this may be quite limiting if fpm is to build existing packages. I don't know, but it's possible that there are many that have multiple modules per source file.

Related to this, I think more problematic is that this requirement would prevent fpm from building correct and modern Fortran code.

from fpm.

everythingfunctional avatar everythingfunctional commented on July 25, 2024

It's more about rebuilds. If you change a module and rebuild, then if the .mod file changes, you need to rebuild everything that depends on it.

from fpm.

certik avatar certik commented on July 25, 2024

from fpm.

milancurcic avatar milancurcic commented on July 25, 2024

Okay, sounds good. We can revisit if it shows to be an issue, I don't think it is right now.

Yes, it'd be good to discuss and write out requirements for packages. I don't remember seeing this specific one anywhere.

from fpm.

certik avatar certik commented on July 25, 2024

@milancurcic see #39.

from fpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.