Use of Undeclared Identifier Error

48 views
Skip to first unread message

Luke Swiderski

unread,
Jan 25, 2021, 11:11:34 AM1/25/21
to Chrome DevTools
I have been working on devtools bugs to gain open source experience.  

Recently, I found a fairly simple bug and made a small code change and now I need to run web tests to make sure I didn't break anything. I am using the integrated checkout, as described here: https://chromium.googlesource.com/devtools/devtools-frontend/+/HEAD/docs/workflows.md

My code change is in the /devtools/devtools-frontend repo, as described in the above doc.

To run the web tests, according to https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_tests.md,

from the /chromium/src repo, I need to first run "autoninja -C out/Default blink_tests" to build the blink_tests target to get content_shell and all of the other needed binaries.

When I run "autoninja -C out/Default blink_tests" from /chromium/src, I consistently get errors involving undeclared identifiers.  Several weeks ago, I tried to start over and fetch chromium from scratch, and when I went to build chromium I got these same errors.  Eventually I built from an old commit and then rebased and gclient synched.  That worked but when I ran ""autoninja -C out/Default blink_tests" I got the errors again.  

I have attached a terminal output with an example of the errors.  This is really hindering my progress, as I have now spent weeks trying to solve this "Undeclared Identifier" error instead of working on bugs.  

I have tried rebasing and gclient synching everyday for several weeks.  Can anyone tell me what is going on here or maybe point me somewhere else where someone knowledgable could help?

I am on an intel Mac, version 10.14.6.

Screen Shot 2021-01-25 at 11.04.51 AM.png

Yang Guo

unread,
Jan 26, 2021, 5:41:56 AM1/26/21
to Google Chrome Developer Tools
Hi Luke,

Thanks for your curiosity to work on DevTools! From what I can tell the workflows around the integrated checkout is up-to-date.

This looks like an issue with outdated files. I would have suggested `gclient sync`, but you already tried that. Maybe you want to do a `gclient sync -D` to get rid of outdated and unnecessary dependencies.

Maybe it makes sense for you to try to build an unchanged Chromium (or the blink_tests build target) on the master branch to see whether that works? If time permits, you could try a fresh build via `gclient -C out/Default clean`, or at least delete the failing build target in `out/Default/obj/ui` to force a rebuild.

Cheers,

Yang

--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/6c2c5aea-fa1c-4497-b2db-d9981e86f4f0n%40googlegroups.com.

Luke Swiderski

unread,
Jan 26, 2021, 7:56:01 AM1/26/21
to Chrome DevTools
Thank you so much for responding!

I have already tried gclient sync -D,  unfortunately it doesn't seem to help.  I have also tried building without my changes.  I initially was on a new branch but for the past couple weeks I have been doing this on the master branch without any code changes, just to get it working first.  

I do have the time to try a fresh build, however, when I run "gclient -C out/Default clean" (from /chromium/src) I get "gclient.py: error: no such option: -C." 

Yang Guo

unread,
Jan 26, 2021, 7:58:33 AM1/26/21
to Google Chrome Developer Tools
Sorry about the wrong command. It should have been `gn clean -C out/Default` :)

Yang

Luke Swiderski

unread,
Jan 26, 2021, 10:59:04 AM1/26/21
to Chrome DevTools
I tried `gn clean -C out/Default` and then ran 'autoninja -C out/Default blink_tests' and got the same error.  When this problem originally occured, about a month ago, I deleted all chromium repos, and started over, refetching chromium according to this document (https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md).  When I tried to build chromium, via "autoninja -C out/Default chrome" I got these same errors, 'use of undeclared identifier'.  I made a previous post about it a few weeks ago.  I checked out an old commit and was able to build.  Then I rebase-updated, gclient synched and I was able to build on master branch without the errors.  But then whenever I try the "autoninja -C out/Default blink_tests" I get what I attached from the terminal output.  So it seems to do this in multiple circumstances.  

Yang Guo

unread,
Jan 27, 2021, 3:22:11 AM1/27/21
to Google Chrome Developer Tools
Hi Luke,

To be honest I haven't experienced this before. Maybe it's worth posting on chromi...@chromium.org. Maybe somebody else already encountered this before. This does not seem like a problem specific to DevTools.

Cheers,

Yang

Luke Swiderski

unread,
Jan 27, 2021, 9:08:58 AM1/27/21
to Chrome DevTools
Thank you, I did not know about that group.  That is a great lead.  
Reply all
Reply to author
Forward
0 new messages