[Builder] wip/libide branch



Hi Everyone!

I've been quiet for the last couple weeks due to the Cambridge hackfest,
FOSDEM, and travel recovery thereafter.

During that time, I've been working on the base of what will provide
IDE-like features in Builder. This is something I'm calling libIDE.
For now, that will be a static library inside of Builder. But
if others are interested (such as Gedit plugin authors) then we can
extract it and make it usable externally.

There is so much covered in the design document [1], so please go
check that out. It covers most of the objects in LibIDE and how they
interact. This covers build systems, version control systems, search
engines, basic project management, symbol resolvers, diagnostics,
external devices, debuggers, profilers, automatically saving drafts,
and user scripting.

While not yet supported, it is important that this library be GObject
Introspectable. This is because the JavaScript scripting support for
Builder will live within this realm.

Some of what is currently in Builder today will move into libIDE. In
particular, I think the following are candidates to move soon:

 - Git search (move to IdeGitSearchProvider)
 - Code assistance (IdeClangService, IdeDiagnoser, IdeDiagnostic)
 - File navigation and edit point history (file marks, etc)

Other potential candidates if libIDE takes GtkSourceView dependency

 - Snippets
   It's probably enevitable that we will depend on Gtk in this static
   library. Otherwise, scripting interfaces for manipulating buffers
   will be a major annoyance.
 - Auto-Completion engines
 - Semantic language highlighters

Builder has some nice test utilities for this in the tools/ directory.
Right now, there are `ide-list-files` and `ide-build`. The former will
list all of the files discovered by the project system (in most cases,
the IdeGitVcs performs the file loading). `ide-build` will perform an
autotools build.

Neither have too much failsafe code, so be careful :)

Only the "local device" is supported right now, but with `ide-build`
you'll be able to provide the device id you want to build for, and the
build will cross-compile automatically (using autoconf).

  $ cd my_project
  $ ../gnome-builder/ide-build -d local configure.ac

My hope is that in the not too distant future we can get support for
building with xdg-app runtimes. We will synthesize an IdeDevice for
each of the discovered runtimes.

If you take a look at the wip/libide branch [2], you'll see where I'm
playing around. LibIDE made implementing a project tree quite trivial.
You can take a look at that here [3].

Also, while there is no UI for it, the `build` command should work from
the command bar (control+spacebar). This wont work on projects that
have an in tree configuration already, so `git clean -fxd` your projects
tree first.

Builds end up in ~/.cache/gnome-builder/builds/<project>/<system-type>.

All of this will be automated in the future, but one step at a time!

For more information on the components, see libide/DESIGN.md in the
source repository [1].

Thanks for reading!

-- Christian


[1]
https://git.gnome.org/browse/gnome-builder/plain/libide/DESIGN.md?h=wip/libide
[2] https://git.gnome.org/browse/gnome-builder/tree/?h=wip%2Flibide
[3]
https://git.gnome.org/browse/gnome-builder/tree/src/tree/gb-project-tree-builder.c?h=wip/libide#n220


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]