New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 772918 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 738871



Sign in to add a comment

Port jumbo to native gn

Project Member Reported by brat...@opera.com, Oct 9 2017

Issue description

jumbo works fine as a gn template but there are a few downsides. Since it's a template it is hard to combine with other templates (for instance we can't make a jumbo_test without adding a dependency on testing). Also, it hides files from gn so the generated IDE projects are not as intuitive as they should be.

So the plan is to port it from gn templates to native gn. My plan is to keep the same structure:

If a target is deemed suitable for jumbo then generate an action that produces the jumbo file that precedes the normal compilation target in ninja. That action will have to be a configurable python script to not have to hard code details.

dpranke, brettw, is there a natural place in the code to insert this functionality in gn? Initially I think a boolean flag in a target should trigger it, but I can also imagine a global flag for (non-Chromium) projects where the project has control of all code.

 

Comment 1 by brat...@opera.com, Oct 9 2017

Description: Show this description
Cc: thakis@chromium.org
Components: Build
Labels: Build-Tools-GN
I don't know that there's an obvious place to put the logic, I'd kinda expect you to need to modify things in multiple places.

There is a part of me that wonders if the right thing to do is to make it so you can have forward references in templates and fix the generators instead. 

I do think that having the jumbo functionality be native would be kinda cool, but I am concerned about whether it's stable enough yet; I don't like the idea of requiring a separate jumbo/merge script very much.
i agree that we should try to remove stuff from gn over time instead of adding to it

Comment 4 by brat...@opera.com, Oct 9 2017

I think the IDE problem (bug 738871) is the only issue I have no idea how to solve with a hack or workaround in gni scripts. Unfortunately it really matters to those with a IDE-centric workflow (primarily Windows). An alternative to porting jumbo to gn in some way then becomes to introducing a way to generate the IDE projects correctly with gn. Still no clear idea how to do it nicely.

Comment 5 by brat...@opera.com, Nov 13 2017

ninja -t query also doesn't work properly right now for the same reason, source files not being visible by gn and then ninja.

Comment 6 by brat...@opera.com, Nov 13 2017

ninja -t query is used by https://cs.chromium.org/chromium/src/tools/vim/chromium.ycm_extra_conf.py which is why it matters.
Owner: tmonius...@opera.com
Status: Assigned (was: Untriaged)
This bug has an owner, thus, it's been triaged. Changing status to "assigned".
Owner: ----
Status: Untriaged (was: Assigned)
I'm unassigning myself from this bug as I don't actively work on it anymore.
The solution is available here: https://chromium-review.googlesource.com/c/chromium/src/+/1005295
The patch doesn't apply anymore because GN sources have moved to separate repo.
Cc: brat...@opera.com
Thanks. I still think that merging the jumbo code into the main GN repo is the right thing to do, but I haven't had the time to work on it and help build the case.

I think maintaining a fork with the enhancement is a good alternative. I look forward to seeing how it works out and whether you add other things that we haven't yet been willing to merge into the main repo :).
Status: Available (was: Untriaged)
I'm happy to help moving jumbo into the main GN repo when the decision is made. For reference, a fork mentioned in https://bugs.chromium.org/p/chromium/issues/detail?id=772918#c10 is available at https://github.com/operasoftware/gn-opera.

Sign in to add a comment