Open JodliDev opened 7 years ago
Hi there, I am a bit puzzled about this change.
If I add this to my ant file, and also similar copy blocks for migration and mapreduce, then all works fine. But without those changes, I see a lot of class not found and null pointer exceptions in the server output when running ant -f antbuild.xml runserver
(even though the server seems to work anyway).
But then there is also a target to create symlinks that should do what those copy blocks do, but it does not seem to be used. So two questions I would highly appreciate any help with:
1) Do the changes in this PR need to be added to the ant file (alongside sections for migration and mapreduce)? Or is it the case that the symlink target should be run (added as a dependency)? Could it be that git is not cloning these symlinks that seem to be in the original repo?
2) Which ones are the original classes to be modified (if needed), the ones inside default, or the ones in the respective same level directories? Or none of them because all those are bytecode, and the original ones are the java files in the src folder. Those seem to be the ones used in javac inside the compile target, so I am guessing that these copy additions should be palced after that javac action?
In any case I am a bit confused as of why classes are copied from one place to the other... the compile target seems to compile whatever is inside src, but the changes in this PR seem to copy classes before they are compiled... and somehow it seems to do the job (maybe only running it twice? or because ant builds incrementally).
In summary, I am confused about why duplicating classes in several directories inside ear makes things work and exceptions go away, at least from the runserver
target.
I'd be happy to put a PR together if anyone can clarify if any of my assumptions are correct. Many thanks!
Hi,
The build goal of copying is so that the compiled classes are available to each appengine module. Originally, we used a symlink to do this and that legacy ant task did that. It was unreliable in various situations. I haven’t incorporated this CL as we all have symlinks and the build is gonna be rewritten to use Gradle anyway — its a long overdue technical debt.
If you are interested in contributing a PR for building multiple appengine modules with Gradle I would be most grateful. Otherwise, I should just get around to reviewing this PR so people aren’t confused.
Bob
On Mar 8, 2018, at 9:39 AM, Jos notifications@github.com wrote:
Hi there, I am a bit puzzled about this change.
If I add this to my ant file, and also similar copy blocks for migration and mapreduce, then all works fine. But without those changes, I see a lot of class not found and null pointer exceptions in the server output when running ant -f antbuild.xml runserver (even though the server seems to work anyway).
But then there is also a target to create symlinks that should do what those copy blocks do, but it does not seem to be used. So two questions I would highly appreciate any help with:
• Do the changes in this PR need to be added to the ant file (alongside sections for migration and mapreduce)? Or is it the case that the symlink target should be run (added as a dependency)? Could it be that git is not cloning these symlinks that seem to be in the original repo?
• Which ones are the original classes to be modified (if needed), the ones inside default, or the ones in the respective same level directories? Or none of them because al those are bytecode, and the original ones are the java files in the src folder. Those seem to be the ones used in javac inside the compile target, so I am guessing that these copy additions should be palced after that javac action?
In any case I am a bit confused as of why classes are copied from one place to the other... the compile target seems to compile whatever is inside src, but the changes in this PR seem to copy classes before they are compiled... and somehow it seems to do the job (maybe only running it twice? or because ant builds incrementally).
In summary, I am confused about why duplicating classes in several directories inside ear makes things work and exceptions go away, at least from the runserver target.
I'd be happy to put a PR together if anyone can clarify if any of my assumptions are correct. Many thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi @BobEvans,
thanks for the info. It makes sense now. I can see how the symlinks will not work on windows, for instance.
I am not familiar with Gradle (I use it on Android, but Android Studio does everything for me!). Looking at the App Engine docs it now seems to rely on GCP and the new gcloud tool, even for a pure Gradle project (with no Eclipse or IntelliJ tools). I think I'd rather look into other issues right now, would be a more efficient use of my time. I might play a bit with the already existing (broken) script in any case.
If you look at this PR, note that the copy action is done before the classes are compiled, and also that it would need blocks for migration and mapreduce; or at least I needed them locally.
This fix should make the local server able to run again