Ninja doesn't build after change

1,142 views
Skip to first unread message

arunoday sarkar

unread,
Jun 23, 2014, 7:23:39 PM6/23/14
to chromi...@chromium.org
Hi

I made few changes to a file. Apparently ninja doesn't recognize those and complains 

ninja: no work to do

Any clue?

Thanks

arunoday sarkar

unread,
Jun 23, 2014, 7:26:00 PM6/23/14
to chromi...@chromium.org
Adding some more details

I did a full build of unit_tests. Made some changes to render_widget_host_view_mac_unittest.mm and ran ninja -C out/Debug unit_tests again.

Thanks

Rachel Blum

unread,
Jun 23, 2014, 7:26:52 PM6/23/14
to a.sark...@gmail.com, Chromium-dev
That usually means the file is not part of the ninja target you specified. Which target and which file did you specify?


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Ingwie Phoenix

unread,
Jun 23, 2014, 7:27:07 PM6/23/14
to a.sark...@gmail.com, chromi...@chromium.org
Hey.

use the find command to pick up the file you were editing and delete the object file, to cause a rebuild. Assuming your file is called „FooBar.cpp“, the object should be „FooBar.o“:

find . -iname „foobar.o“

If it finds something, delete it.

Or, try deleting the ninja cache: rm .ninja_*

Alternatively, go the hard route:

ninja -t clean
ninja ….

Kind regards, Ingwie.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Nico Weber

unread,
Jun 23, 2014, 7:32:01 PM6/23/14
to arunoday sarkar, Chromium-dev
On Mon, Jun 23, 2014 at 4:26 PM, arunoday sarkar <a.sark...@gmail.com> wrote:
Adding some more details

I did a full build of unit_tests. Made some changes to render_widget_host_view_mac_unittest.mm and ran ninja -C out/Debug unit_tests again.

render_widget_host_view_mac_unittest.mm is part of target content_unittests, not unit_tests.

I think you can say `ninja -C out/Debug ../../browser/renderer_host/render_widget_host_view_mac_unittest.mm^` to mean "rebuild a target containing this file".

(Note that on OS X, release builds tend to build quicker than debug builds, and they still contain symbols. Unless you need unoptimized code for some reason, I'd recommend usually doing release builds on OS X. You can set dcheck_always_on=1 in your gyp defines to still get DCHECKs.)
 

Thanks


On Monday, June 23, 2014 7:23:39 PM UTC-4, arunoday sarkar wrote:
Hi

I made few changes to a file. Apparently ninja doesn't recognize those and complains 

ninja: no work to do

Any clue?

Thanks

--

Rachel Blum

unread,
Jun 23, 2014, 7:32:41 PM6/23/14
to a.sark...@gmail.com, Chromium-dev
On Mon, Jun 23, 2014 at 4:26 PM, arunoday sarkar <a.sark...@gmail.com> wrote:

If you use cs.chromium.org to search for that file name[1], you'll find it's part of content_unittests, not unit_tests.

- Rachel

arunoday sarkar

unread,
Jun 23, 2014, 7:34:21 PM6/23/14
to Rachel Blum, Chromium-dev
My bad it is indeed content_unittest, before making a full build to unit_tests i made change to render_widget_host_view_mac_unittest.mm.

when I ran the test with gtest_filter it pick up the change ! Not a clue why.

Thanks
Reply all
Reply to author
Forward
0 new messages