I thought about extending EDE to support more project types - some work was already started for JVM-based projects, but I found that we may need to slightly change existing projects & maybe organize additional hierarchy of projects.
Many build tools are using single project file that is always located in the top of hierarchy - right now this are Maven, Ant, Clojure's Leiningen, Erlang's Rebar, Scala's SBT. Some of these project types are almost completely self-contained (maven, lein, sbt?, rebar), so we can extract all necessary information (list of goals, source directories, etc) from them, while some, like Ant, requires that we provided additional information (list of directories with source code, classpath, etc.) when creating EDE project.
Most of single root project types have different goals (in maven's terminology) - targets that user can execute staying in top-level directory, and configurations (for example, Maven's profiles) that affect build process. But there is a difference between goals & EDE targets - EDE targets always are bound to directory, while targets for single root projects should be bound to different goals/commands defined for given project, and these targets are always executed from top level directory.
Right now we have hierarchy of classes, derived from
jvm-base class, but this class has
several slots that could be useful for all single root projects, not only for JVM-based
(for example, Erlang's Rebar, and maybe more). This are following slots:
file-mod-timeproject file modification date (float). It's useful to track also modifications in project file, as list of dependencies (classpath), or other information could be changed;
current-target- command (target) that is executed in the root of the project. I want to allow user to switch between available targets (list of targets could be dynamic, depending on project's type), but right now not yet sure how it's better to make this – add drop-down menu like is done for EDE configurations?
target-options- additional options that are passed to command (customizable by user)
existing-targets- list of existed targets for given project. It could be static, like for Rebar, or could by dynamic like for Ant & Maven. Maybe this slot isn't necessary, if we could reuse existing
Some of these options, like
file-mod-time could be put into
ede-project, but I'm
thinking about adding new base class, like
single-root-project, inherited from
ede-project and storing targets information (or it's better to put everything into
ede-project?). I'm also not sure - should we store all these slots in the cache, or we
can extract all necessary information on first use.
What do you think about this? For me the most important are opinions about maintaining targets & how it's better to organize switching between targets.--