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

gnome.compile_schemas() doesn't re-compile when schema source changes #2770

Closed
mjog opened this issue Dec 12, 2017 · 4 comments
Closed

gnome.compile_schemas() doesn't re-compile when schema source changes #2770

mjog opened this issue Dec 12, 2017 · 4 comments
Labels

Comments

@mjog
Copy link
Contributor

mjog commented Dec 12, 2017

Geary compiles its GSettings schema at compile time to allow the app to be run from the source and for use by unit tests. However if the schema source XML changes, the binary schema file is not updated, leading to client errors and failed unit tests.

A trivial fix is to allow depend_files as a kwarg via adding it to @permittedKwargs for GnomeModule. compile_schemas, allowing the developer to specify the name of the source XML file, thus meson will ensure schema is re-compiled when the source changes.

E.g: This already fixes the issue, albeit with a warning from Meson at run time:

 geary_compiled_schema = gnome.compile_schemas(
    depend_files: files('org.gnome.Geary.gschema.xml'),
 )

Meson 0.42.1.

@TingPing
Copy link
Member

I agree that is a reasonable solution (since we have no reasonable way to track the dependency otherwise). Mind opening a PR?

@mjog
Copy link
Contributor Author

mjog commented Dec 12, 2017

PR done. Thoughts?

@nirbheek nirbheek added the gnome label Dec 12, 2017
@nirbheek
Copy link
Member

Fixed with #2771. In the future please put "Closes #XXX" in the commit message so this happens automatically 😄

@mjog
Copy link
Contributor Author

mjog commented Dec 13, 2017

Will do, thanks!

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

No branches or pull requests

3 participants