-
Notifications
You must be signed in to change notification settings - Fork 103
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
Hosting of packages #4
Comments
Although worthwhile thinking ahead, I think we are far from this. It's a big technical challenge that requires dedicated hardware and person (people) if it's to work smoothly. In the interim, as you describe, we can maintain a registry that provides all the info about available packages that fpm needs, but the source code of packages is hosted wherever its hosted by the package maintainers (GitHub, GitLab, custom url, whatever). The downside to this approach is that if the maintainer takes down the package, or changes the url, or GitHub is down, the package is unavailable through fpm. I think these are edge cases that we can live with and work around for a while, especially considering that Fortran's ecosystem is still fledgling. Let's discuss what would the registry look like. How about if we maintain a registry of fpm.toml files for each supported package in fpm's repo. Something like this:
fpm.toml for a package includes all the info that fpm would need to build the package, including but not limited to:
For a maintainer to add their package to fpm, they would open a PR in fpm to add their fpm.toml to the fpm Registry. Am I going in the right direction? |
Actually, the registry would be just a list of urls to download the package, so:
Each of these urls will be either a tarball, or a git repository. When you download it, it contains the Regarding the design of fpm, I would do exactly what Rust does. So a standard layout (which however can be disabled if you don't like it from Cargo.toml), pure Rust is automatic, non-Rust parts are compiled by hand by writing a build script (and listing it in Cargo.toml, then Cargo executes it before building Rust parts). From the build script you can call cmake or whatever build system one wants. |
Can you explain why you need a separate (middle-man) repo for metadata, per package? If fpm gets metadata from one repo, which would then instruct it to download the package tarball from a custom url and build it with some commands, then it would have to do that transaction every time you inquire about a package. To not query a remote repo on every command, you'd want to cache results, which basically means you'd be building a local registry of packages. But if you're building a local registry of packages, you might as well maintain the registry in one repo. More problematically, without a local (or remote but aggregated) registry, how do you search for available packages? With Cargo I can do:
Would Looking at my local |
Are you saying that for pure Fortran code (like stdlib at the moment), you wouldn't use a build system but do the build explicitly by directly invoking the compiler? In the long run I think this is a good choice but I'm worried that it'd be a big ordeal to implement because now you have to worry about building dependency trees and all the necessary stuff that CMake was doing for us. Or, are you thinking about generating a CMakeLists.txt based on the scan of the source files and directories? Seems complex too. |
Yes, that's how it is already implemented in this very small prototype of https://github.com/fortran-lang/fpm/tree/master/tests/1 All you have to do is execute That's exactly how Cargo does it, and I think that's what we want also. And yes, I agree with you that using CMake as the vehicle to actually build it is the way to go initially. All It already works, and my next step is to start doing the dependencies. Once we have a prototype of that, let's brainstorm how to host it properly. (Yes, I want |
Eventually we need to have a central place for packages similar to crates.io.
But for now we will use a git repository (GitHub, GitLab and other places will work) as well as just url for a tarball. That way we don't need to host anything ourselves at first and can get the initial community and ecosystem of packages built up without worrying about security and other issues that will come with maintaining our own repository.
The text was updated successfully, but these errors were encountered: