Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Command line flag or other means to output only the filenames that would be generated #62

Closed
mrdomino opened this issue Feb 20, 2015 · 4 comments

Comments

@mrdomino
Copy link
Contributor

Something like --only-print-filenames? That'd make it way easier to use Djinni in GYP actions.

A lot of the time you can just specify one of the directories or nothing at all under outputs in a GYP action and still have the right thing happen, but if you wan to e.g. add your autogenned Objective-C headers to mac_framework_headers for a framework target, you wind up having to do two passes if you're using something like glob.py: one to generate the files, and one for the build target to pick up the list of files to copy. (This issue can also be sidestepped if you check the autogenerated files into version control, but it's kind of lame for that to be the only way to make it work.)

@skabbes
Copy link
Contributor

skabbes commented Mar 3, 2015

+1

@artwyman
Copy link
Contributor

It's reasonably likely this would be almost as expensive as if you did the full run and simply ignored the output files, since Djinni would still need to parse all the input to know the set of output files. Saving the I/O cost of writing them would be worthwhile, though, and not too difficult.

Another alternative here would be a mode in which Djinni outputs a single file (with a predictable name you can use in GYP actions). That can't work for Java, though.

@mknejp
Copy link
Contributor

mknejp commented May 14, 2015

This would be a help for tools like CMake.
CMake does have special targets to run code generators, but you have to supply it with the names of the generated files so it can do dependency analysis, know when to rebuild projects (for instance to add/remove generated files to Xcode projects) and stuff. So if it were possible to run djinni once to only get the output file names, capture them, and then forward them to the generator target, that might be a win.

Though this is yet hypothetical, we haven't integrated Djinni into our CMake toolchain yet.

@artwyman
Copy link
Contributor

This is available now. See the --list-in-files and --list-out-files parameters.

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

No branches or pull requests

4 participants