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

Bring --batch closer to --makefile: make --batch sort and run GenMakefile tasks #49

Open
tahina-pro opened this issue Mar 5, 2021 · 1 comment
Assignees
Labels
3d The 3d dependent data description language and frontend

Comments

@tahina-pro
Copy link
Member

tahina-pro commented Mar 5, 2021

Motivation

  • One issue described by @aseemr and @nikswamy was that the Wrapper files produced by --batch make all modules on the command line share the same internal state, such as counters to assign error codes to struct fields. This has the effect of having such fields of some module A appear in the Wrapper of a module B even if A and B do not depend on one another.

  • We should not keep two distinct build processes, one for --makefile and another for --batch. Eliminating the latter would make our code maintenance much easier.

Proposed Solution

I believe that a solution to this problem is to make --batch behave closer to --makefile, by actually making 3d call itself again on each task instead of performing internal function calls. The way I envision it is to take the tasks computed by GenMakefile and topologically sort them and execute them instead of printing them into a Makefile.

Non-goal: Parallelism

I do not intend to introduce parallelism here. I believe that parallelism should be deferred to a build system. While 3d support for GNU Make can already offer parallelism, I can understand that users may want more lightweight and portable solutions. For such users, I believe that #48 will answer them, because Ninja readily and smoothly supports parallelism while being very lightweight (less than half a megabyte), so much so that I could even include it in future EverParse binary packages (by virtue of Ninja's Apache 2 open-source license.)

@tahina-pro tahina-pro added the 3d The 3d dependent data description language and frontend label Mar 5, 2021
@tahina-pro tahina-pro self-assigned this Mar 5, 2021
@tahina-pro
Copy link
Member Author

I should not break calling 3d --batch on .3d files that do not depend on each other but live in different directories. If I am not careful, then I might hit #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3d The 3d dependent data description language and frontend
Projects
None yet
Development

No branches or pull requests

1 participant