NameError: global name 'version' is not defined when building with a wrong NDK directory
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect)
Tracking
(firefox67 fixed)
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(5 files)
When you have --with-android-ndk=wrong-path in your mozconfig, configure fails with:
0:00.82 File "/home/glandium/gecko/build/moz.configure/android-ndk.configure", line 225, in android_toolchain
0:00.82 toolchain = toolchain_format % (ndk, target_base, version,
0:00.82 NameError: global name 'version' is not defined
Seems like the configure lint should check for this.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D19109
Assignee | ||
Comment 4•5 years ago
|
||
Using the assert
keyword actually generates bytecode that uses the
AssertionError
class under the hood. Ideally, we should probably not
use asserts in python configure, but there are currently so many that
it's easier to allow it, until a better strategy is decided upon.
Depends on D19110
Assignee | ||
Comment 5•5 years ago
|
||
Currently, running the configure lint will raise errors with little
context, if any, which can make finding the cause of the errors tedious.
So instead of raising exceptions directly, we use a hack to make the
exception appear as if they had been thrown at the code location an
issue is reported for, which makes the test harness print more useful
context.
With more context, printed out, some exception messages can be made
lighter.
The added _raise_from method does more than is necessary here, but will
be fully used in a new check shortly.
Depends on D19111
Assignee | ||
Comment 6•5 years ago
|
||
There are cases that can be easily detected where an undefined variable
is used, and such mistakes seem to happen more often than they should,
as all the errors fixed in the previous patches (that this new lint
caught).
Depends on D19112
Pushed by dvarga@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/358cf23ac448 Fix miscellaneous NameErrors lingering in the python configure code. r=nalexander https://hg.mozilla.org/mozilla-central/rev/61464095c91a Add missing imports for Exception. r=nalexander https://hg.mozilla.org/mozilla-central/rev/9fcb810cde87 Add AssertionError to the python configure sandbox builtins. r=nalexander https://hg.mozilla.org/mozilla-central/rev/817c1e5b3d0a Improve error reporting by the configure lint. r=nalexander https://hg.mozilla.org/mozilla-central/rev/af6a8b058f9a Add a configure lint for undefined variables. r=nalexander
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/358cf23ac448
https://hg.mozilla.org/mozilla-central/rev/61464095c91a
https://hg.mozilla.org/mozilla-central/rev/9fcb810cde87
https://hg.mozilla.org/mozilla-central/rev/817c1e5b3d0a
https://hg.mozilla.org/mozilla-central/rev/af6a8b058f9a
Updated•5 years ago
|
Description
•