Application creation failure make subsequent creation fails
This is a very annoying bug because it makes testing / using FraSCAti Studio heavy and cumbersome (have to restart it all every error).
When an application creation fails (ex. because compilation error "publc" instead of "public"), some things are rollbacked :
- application persistence is rollbacked
- application root directory is deleted (including source dirs) in ServiceManagerImpl.createApplication()
but others are not :
- source dirs are not removed from membraneGeneration (where they have been added by addJavaSource() in ServiceManagerImpl.createApplication())
As a consequence, subsequent application creations, or any FraSCAti compilation for that matter, fail because it can't find those deleted directories, with cryptic errors such as : Creation error No such file or directory <.,C:\Users\user\Documents\frascati-studio\user\Fibo2\src\main\java> that appear within TemplateActionBasicService.doActionAfterCreation() / JavaCodeTransformer.transform() / JuliacComponent.compileJavaSource() / Juliac's SourceFile.addAllJavaFiles().
Solution : remove those also from Juliac membraneGeneration, or don't delete those dirs and the application itself.
Further, check for other such "bad state" problems.