On Fri, 04 Oct 2013 11:35:59 GMT, NCrashed wrote:

Hi, i use very heavy library GtkD as library package in my small project. And DUB is compiling GtkD every 'dub build' command, even there is no need in this, thus compilation continues within a minute.

Does dub have any options to prevent such behavior?

P.S. Pull request for GtkD dub package is reviewing at the moment, therefore i use local repository installation (dub add-local).

It's planned to build each package separately, but the schedule for that is not yet clear due to a lack of manpower. However, you can work around it with a little manual modification of GTkD's package.json. Conceptually it would look like this:

  "name": "gtkd",
  "importPaths": ["src"],
  "configurations": [
      "name": "library",
      "targetType": "library",
      "sourcePaths": ["src"]
      "name": "prebuiltLibrary",
      "targetType": "sourceLibrary",
      "dflags-posix": ["-L$PACKAGE_DIR", "-lgtkd"],
      "sourceFiles-windows-x86": ["gtkd.lib"]

Then run "dub build" once in the GtkD directory and use "subConfigurations": {"gtkd": "prebuiltLibrary"} in dependent projects.

Disclaimer: I haven't actually tested this. It should work in principle but there may be some wrong details in the draft.