kou commented on code in PR #50413:
URL: https://github.com/apache/arrow/pull/50413#discussion_r3544353879
##########
c_glib/doc/meson.build:
##########
@@ -22,6 +22,7 @@ gi_docgen_toml_conf = configuration_data()
gi_docgen_toml_conf.set('SOURCE_REFERENCE', source_reference)
# We can't use "version.replace('-SNAPSHOT', '.dev')" here because
# Ubuntu 20.04's Meson is < 0.58.0.
+# Is the above comment still relevant?
Review Comment:
Yes! We can use `version.replace()` here. Could you try the following?
```diff
diff --git a/c_glib/doc/meson.build b/c_glib/doc/meson.build
index 82f300aa03..9c92465f1a 100644
--- a/c_glib/doc/meson.build
+++ b/c_glib/doc/meson.build
@@ -20,20 +20,7 @@ gi_docgen = find_program('gi-docgen')
gi_docgen_toml_conf = configuration_data()
gi_docgen_toml_conf.set('SOURCE_REFERENCE', source_reference)
-# We can't use "version.replace('-SNAPSHOT', '.dev')" here because
-# Ubuntu 20.04's Meson is < 0.58.0.
-if version_tag == ''
- gi_docgen_version_tag = ''
-else
- # GI-DocGen doesn't like MAJOR.MINOR.PATCH-SNAPSHOT format.
- gi_docgen_version_tag = '.dev'
-endif
-gi_docgen_version = '@0@.@1@.@2@@3@'.format(
- version_major,
- version_minor,
- version_micro,
- gi_docgen_version_tag,
-)
+gi_docgen_version = version.replace('-SNAPSHOT', '.dev')
gi_docgen_toml_conf.set('VERSION', gi_docgen_version)
gir_top_build_dir = meson.current_build_dir() / '..'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]