How to properly do development and manifests management?

Hi! One of the Flatpak’s advantages listed on the main page is:

Consistent environments
Develop and test your application in an environment that’s identical to the one users have.

But what I see in action is that developers make a production manifest stored in a repo at Flathub’s GitHub, and a “.Devel” manifest used for developing and testing at the project’s repo.

The most notable difference of development manifests, is the usage of the “master” version of the runtime, while in production manifests, they specify the latest stable version. I feel like this alone breaks the concept of developing, testing and using in the same environment.

However, it seems that the issue isn’t just in misuse. If I wanted to use a production manifest for developing a Rust project — I couldn’t. That’s because Rust’s package manager, Cargo, is one of those that require network connection while building. It’s possible to download dependencies beforehand using flatpak-builder-tools to build offline. But to know which dependencies to download — the tool parses a “Cargo.lock” file, which is programmatically populated in the building process, when it already needs dependencies (recursion). I could, in theory, manually bundle all of the dependencies of dependencies, but… Too much work.

So, the question is — how to properly do development and manifests management?

Thanks in advance.

An application should ship the Cargo.lock. That’s the practice for Rust and isn’t specific to Flatpak.

But since flatpak-builder-tools tools are run by the package maintainer to generate manifest fragments, you can still generate it. There is no chicken-and-egg problem.

1 Like