After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790486 - Various meson related improvements
Various meson related improvements
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks: 790490
 
 
Reported: 2017-11-17 09:51 UTC by Iñigo Martínez
Modified: 2017-11-27 09:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Rename build options (4.56 KB, patch)
2017-11-17 09:54 UTC, Iñigo Martínez
committed Details | Review
build: Remove unnecessary dependency checks (8.21 KB, patch)
2017-11-17 09:55 UTC, Iñigo Martínez
none Details | Review
build: Remove default warning level (941 bytes, patch)
2017-11-17 09:55 UTC, Iñigo Martínez
committed Details | Review
build: Remove unused defines (3.01 KB, patch)
2017-11-17 09:56 UTC, Iñigo Martínez
none Details | Review
build: Use meson 0.43.0 features (999 bytes, patch)
2017-11-17 09:57 UTC, Iñigo Martínez
committed Details | Review
build: Comment session selector and tracker checks (917 bytes, patch)
2017-11-17 10:00 UTC, Iñigo Martínez
none Details | Review
build: Remove unnecessary dependency checks (7.46 KB, patch)
2017-11-17 12:38 UTC, Iñigo Martínez
committed Details | Review
build: Remove unused defines (2.53 KB, patch)
2017-11-17 12:43 UTC, Iñigo Martínez
committed Details | Review
build: Comment session selector and tracker checks (933 bytes, patch)
2017-11-17 12:45 UTC, Iñigo Martínez
committed Details | Review
build: Restore options default values (1.47 KB, patch)
2017-11-18 10:38 UTC, Iñigo Martínez
committed Details | Review

Description Iñigo Martínez 2017-11-17 09:51:43 UTC
This bug includes various meson improvements.
Comment 1 Iñigo Martínez 2017-11-17 09:54:33 UTC
Created attachment 363900 [details] [review]
build: Rename build options

Following the new meson porting guidelines, this patch renames the build options as follows:

- Remove the `enable` prefix from boolean options.
- The character separator in multi-word options has been changed to underscore.
Comment 2 Iñigo Martínez 2017-11-17 09:55:18 UTC
Created attachment 363901 [details] [review]
build: Remove unnecessary dependency checks

There are multiple deprecated checks, related to IPv6 and X window system, which are not necessary anymore.

This patch removes those checks and also their meson options.
Comment 3 Iñigo Martínez 2017-11-17 09:55:59 UTC
Created attachment 363902 [details] [review]
build: Remove default warning level

gnome-session uses 1 as the project's default warning level. However, meson already uses this level as the default warning level.

This patch removes the warning level from project's default options.
Comment 4 Iñigo Martínez 2017-11-17 09:56:39 UTC
Created attachment 363903 [details] [review]
build: Remove unused defines

meson generates the `config.h` file with multiple defines to be used as compile-time options, in the same way as autotools does. However, some of them are not used.

This patch removes those unused defines.
Comment 5 Iñigo Martínez 2017-11-17 09:57:13 UTC
Created attachment 363904 [details] [review]
build: Use meson 0.43.0 features

meson 0.43.0 comes with a new function in the compiler's object called get_supported_arguments, which allows checking multiple options at once.

This patch takes advantage of this new feature.
Comment 6 Iñigo Martínez 2017-11-17 10:00:33 UTC
Created attachment 363905 [details] [review]
build: Comment session selector and tracker checks

The session selector support and session tracker support are next to each other.

This patch comments where meson checks session selector and the session tracker support to avoid confussions.
Comment 7 Bastien Nocera 2017-11-17 11:59:03 UTC
Review of attachment 363900 [details] [review]:

Looks good.
Comment 8 Bastien Nocera 2017-11-17 12:03:55 UTC
Review of attachment 363901 [details] [review]:

There seems to be quite a lot of unnecessary line shuffling, especially in the top-level meson.build, which makes the patch hard to read. Could we cut down on those?

I would also have renamed the options after removing the ipv6 and xtrans dependency, but that's just nitpicking.

::: tools/meson.build
@@ -6,3 @@
 deps = session_deps + [
-  sm_dep,
-  ice_dep

Why swap those 2 lines?

@@ +44,2 @@
   dependency('epoxy'),
+  dependency('gl'),

Or this one.

@@ +49,3 @@
 programs += [['gnome-session-check-accelerated-gl-helper', deps, cflags, session_libexecdir]]
 
+deps += gtk_dep

Or this change?
Comment 9 Bastien Nocera 2017-11-17 12:06:13 UTC
Review of attachment 363902 [details] [review]:

Sure.
Comment 10 Bastien Nocera 2017-11-17 12:07:02 UTC
Review of attachment 363903 [details] [review]:

::: meson.build
@@ -219,3 @@
-  output: 'config.h',
-  configuration: config_h
-)

Why move this? Unless it fixes a bug, I'd do it separately, if at all.
Comment 11 Bastien Nocera 2017-11-17 12:07:24 UTC
Review of attachment 363904 [details] [review]:

++
Comment 12 Bastien Nocera 2017-11-17 12:09:24 UTC
Review of attachment 363905 [details] [review]:

Sure, though I would add a bit more information as to what those are, because it resembles the "n++; // increment n" type of comments ;)

"Check for session selector GTK+ UI" and "Check for session tracking backend"?
Comment 13 Iñigo Martínez 2017-11-17 12:38:34 UTC
Created attachment 363921 [details] [review]
build: Remove unnecessary dependency checks

(In reply to Bastien Nocera from comment #8)
> Review of attachment 363901 [details] [review] [review]:
> 
> There seems to be quite a lot of unnecessary line shuffling, especially in
> the top-level meson.build, which makes the patch hard to read. Could we cut
> down on those?

I usually try to put the dependencies sorted because I think that they might help developers/maintainers. However, it is just an aesthetic change, so I have reverted it.

> I would also have renamed the options after removing the ipv6 and xtrans
> dependency, but that's just nitpicking.

I had also my doubts about this but I changed the order :(
Comment 14 Iñigo Martínez 2017-11-17 12:43:01 UTC
Created attachment 363922 [details] [review]
build: Remove unused defines

(In reply to Bastien Nocera from comment #10)
> Review of attachment 363903 [details] [review] [review]:
> 
> ::: meson.build
> @@ -219,3 @@
> -  output: 'config.h',
> -  configuration: config_h
> -)
> 
> Why move this? Unless it fixes a bug, I'd do it separately, if at all.

I have moved it back to its place.
Comment 15 Iñigo Martínez 2017-11-17 12:45:20 UTC
Created attachment 363923 [details] [review]
build: Comment session selector and tracker checks

(In reply to Bastien Nocera from comment #12)
> Review of attachment 363905 [details] [review] [review]:
> 
> Sure, though I would add a bit more information as to what those are,
> because it resembles the "n++; // increment n" type of comments ;)
> 
> "Check for session selector GTK+ UI" and "Check for session tracking
> backend"?

Agree, it sounds better. Changed.
Comment 16 Bastien Nocera 2017-11-17 16:45:00 UTC
Review of attachment 363921 [details] [review]:

Looks good.
Comment 17 Bastien Nocera 2017-11-17 16:45:28 UTC
Review of attachment 363922 [details] [review]:

Sure.
Comment 18 Bastien Nocera 2017-11-17 16:50:35 UTC
Review of attachment 363923 [details] [review]:

Sure.
Comment 19 Iñigo Martínez 2017-11-17 17:13:59 UTC
Comment on attachment 363900 [details] [review]
build: Rename build options

Pushed as 9c02bffc - build: Rename build options
Comment 20 Iñigo Martínez 2017-11-17 17:14:43 UTC
Comment on attachment 363921 [details] [review]
build: Remove unnecessary dependency checks

Pushed as 4ccee7b1 - build: Remove unnecessary dependency checks
Comment 21 Iñigo Martínez 2017-11-17 17:15:25 UTC
Comment on attachment 363902 [details] [review]
build: Remove default warning level

Pushed as 67b0ee9f - build: Remove default warning level
Comment 22 Iñigo Martínez 2017-11-17 17:15:53 UTC
Comment on attachment 363922 [details] [review]
build: Remove unused defines

Pushed as 6c39b0e8 - build: Remove unused defines
Comment 23 Iñigo Martínez 2017-11-17 17:16:17 UTC
Comment on attachment 363904 [details] [review]
build: Use meson 0.43.0 features

Pushed as b059c286 - build: Use meson 0.43.0 features
Comment 24 Iñigo Martínez 2017-11-17 17:16:37 UTC
Comment on attachment 363923 [details] [review]
build: Comment session selector and tracker checks

Pushed as 8948157b - build: Comment session selector and tracker checks
Comment 25 Iñigo Martínez 2017-11-18 10:38:54 UTC
Created attachment 363966 [details] [review]
build: Restore options default values

During the migration to meson build system, the default value of different options were changed. The options are the following:

- session-tracking: systemd (without consolekit support by default)
- docbook: true
- man: true

This patch restores those default values.
Comment 26 Bastien Nocera 2017-11-27 09:22:39 UTC
Review of attachment 363966 [details] [review]:

++
Comment 27 Iñigo Martínez 2017-11-27 09:28:47 UTC
Comment on attachment 363966 [details] [review]
build: Restore options default values

Pushed as f62989f1 - build: Restore options default values