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.mkenums: Use rspfiles on Windows when possible #14391

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amyspark
Copy link
Contributor

@amyspark amyspark commented Mar 21, 2025

This MR aims to update the work made in #4966 to allow (known) custom targets, like Gnome's glib-mkenums, to use response files.

I'm setting it as draft because this doesn't completely work on Windows; this is because I cannot find a suitable point in the target lifecycle to convert arguments to response files:

  • Doing so in the Gnome module breaks placeholder variables conversion
  • Doing so at the Ninja backend level breaks generation altogether (making the CUSTOM_COMMAND rule rspable means I have to supply a placeholder to rsp_content -- see below)
  • Doing so at the generic backend level (either in as_meson_exe_cmdline or get_executable_serialisation) seems like the wisest choice, however on Windows scripts must go through an interpreter. In the case of glib-mkenums it's Python, but it's not possible to ensure I'm converting just the call to glib-mkenums, as the command + arguments have already been completely flattened

All feedback, and ideas to fix the last hurdle, is appreciated.

(EDIT -- I think there's still an outstanding bug, in that the space escaping doesn't work in some circumstances, yielding a broken interpreter call C:\Program instead of the full Python path. I need to sort out the response file handling before being able to determine where it happens and why.)

Fixes #6710

@amyspark amyspark requested a review from jpakkane as a code owner March 21, 2025 23:29
@amyspark
Copy link
Contributor Author

cc @nirbheek

@amyspark amyspark force-pushed the add-rsp-file-support-to-glib-mkenums branch from 0a5e4d2 to c6cc2f7 Compare March 24, 2025 16:15
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

Successfully merging this pull request may close these issues.

gnome.mkenums generates huge command which causes command line too long error
2 participants