Skip to content
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

Change naming convention for Flatpak manifest files #406

Open
janopae opened this issue Jul 17, 2023 · 5 comments
Open

Change naming convention for Flatpak manifest files #406

janopae opened this issue Jul 17, 2023 · 5 comments

Comments

@janopae
Copy link

janopae commented Jul 17, 2023

Currently, the docs propose to name the manifest file {appliction-id}.yaml or {appliction-id}.json. This makes sense when a repository (or directory) contains multiple manifests for different applications.

However, the docs also propose to use this naming convention for their example, where the Flatpak manifest lives directly with the application itself in the same directory.

In such a case, this kind of file name is not very helpful: The information to which application the manifest belongs is already provided by the location of the file (the VCS repository) and by its contents (which also contains the application id). At least the file name provides the information that it is in yaml/json format, but it says nothing about its structure or meaning in the context of the repository.

This has the following disadvantages:

  • developers who don't know about Flatpak have a hard time finding out what the file is for. The best they could do would be asking ChatGPT or a human.
  • IDEs have a hard time providing autocompletion
  • finding Flatpak manifests in an unknown repo can be hard (both manually and for scripts)

I propose the following convention instead:

If the target of the Flatpak manifest is unambigous given its location (e. g. the repository it lives in), simply call it flatpak-manifest.yaml/flatpak-manifest.json. If there are multiple flatpak manifest files in the location, give it a prefix that tells it apart:

  • A manifest for the nightly build of the app in the containing repo might be called nightly.flatpak-manifest.yaml
  • A manifest for the dependencies that gets imported by other manifests might be called dependencies.flatpak-manifest.yaml
  • A manifest living in a repo along with other manifests for different applications might be prefixed with the application id (org.example.app.flatpak-manifest.yaml)

The advantages of this naming convention:

@TingPing
Copy link
Member

I'll just copy my comment from the flatpak-builder issue:

Unfortunately there is a ton of convention and tooling that expects $FLATPAK_ID.json. I don't think we should publish anything until we can actually ensure people would even be open to using a new file extension.

@janopae
Copy link
Author

janopae commented Aug 29, 2023

Hey @TingPing, thanks for your feedback. I didn't know that tooling depends on the exact file name, I thought, most tooling was agnostic to the exact file name (like flatpak-builder is).

Only changing the suggestion when the community is on board sounds very reasonable. What would be your indicator to know whether the community is fine with a new convention? Which tools depend on the {application-id}.yaml convention, and need to support a different convention before it can be official?

@hfiguiere
Copy link
Contributor

Which tools depend on the {application-id}.yaml convention,

Flathub does.

@TingPing
Copy link
Member

GNOME-Builder, and probably every other IDE (VSCode's extension?)

@razzeee
Copy link
Collaborator

razzeee commented Dec 24, 2023

Still, would be nice to have that for the tooling.

I would be interested, if @bilelmoussaoui thought about this and has some insights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants