Adding a new generated jni method doesn't provide good error logging

NEW
Unassigned

Status

()

Firefox for Android
General
4 years ago
3 months ago

People

(Reporter: wesj, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
I added a new generated JNI method to GeckoAppShell today. Building with 'mach build' gave an error that the method didn't exist. After a bit, I tried just building mobile/android to see if it would fix the problem (using 'make -C mobile/android') and finally saw a 'run this command' message (why do we not just do that for you?). Running that seems to have made the world happy.

This should all just work with no intervention.
We shouldn't run the command automatically because it potentially clobbers local changes if you have any. But I do agree that the full error message should show up when you run mach build; I don't know why that is different from make -C mobile/android. CC'ing ckitching and gps.
Indeed. It's a bit of a kludge. The procedure that works is to annotate the new method in Java, run a build, copy the generated files, then add your C++ code that uses the new C++ method, then build again.

This isn't obvious.
Blocks: 1281900
You need to log in before you can comment on or make changes to this bug.