dlang / dub

Package and build management system for D
MIT License
673 stars 230 forks source link

Can not build project with multiple subpackages. #334

Closed MrSmith33 closed 10 years ago

MrSmith33 commented 10 years ago

I'm tried the dub master version. First dub tries to download all the previos versions of the project, while it is not needed. The project structure:

dub.json
import
    + anchovy
        + core (subpackage lib)
        + graphics (subpackage lib)
        + gui (subpackage lib)
        + utils (subpackage lib)
examples  (subpackage exe)

subpackages depend on each other (without circular dependencies)

Here is more details

MrSmith33 commented 10 years ago

Ok, i've got rid of all subpackages except example. Now dub compiles it, but downloads every version of anchovy (even if it is compiled just now) twice(!) Here is log of stderror http://pastebin.com/D2LjhRp2 And here is stdout:


D:\anchovy>dub build anchovy:example01 --build=release -v 
Building package anchovy:example01 in D:\anchovy\examples\example01\
Fetching anchovy 0.4.0...
Placing anchovy 0.4.0 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.2.4...
Placing anchovy 0.2.4 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.4.0...
Placing anchovy 0.4.0 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.2.4...
Placing anchovy 0.2.4 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.4.0...
Placing anchovy 0.4.0 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.2.4...
Placing anchovy 0.2.4 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.4.0...
Placing anchovy 0.4.0 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.2.4...
Placing anchovy 0.2.4 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.4.0...
Placing anchovy 0.4.0 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.2.4...
Placing anchovy 0.2.4 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.4.0...
Placing anchovy 0.4.0 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.2.4...
Placing anchovy 0.2.4 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.4.0...
Placing anchovy 0.4.0 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.2.4...
Placing anchovy 0.2.4 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.4.0...
Placing anchovy 0.4.0 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Fetching anchovy 0.2.4...
Placing anchovy 0.2.4 to C:\Users\andrey\AppData\Roaming\dub\packages\...
Target derelict-util 1.0.1 is up to date. Use --force to rebuild.
Target derelict-ft ~master is up to date. Use --force to rebuild.
Target dlib ~master is up to date. Use --force to rebuild.
Target derelict-fi ~master is up to date. Use --force to rebuild.
Target derelict-glfw3 ~master is up to date. Use --force to rebuild.
Target derelict-sdl2 ~master is up to date. Use --force to rebuild.
Target sdlang-d ~master is up to date. Use --force to rebuild.
Target derelict-gl3 ~master is up to date. Use --force to rebuild.
Target anchovy ~master is up to date. Use --force to rebuild.
Target anchovy:example01 ~master is up to date. Use --force to rebuild.
s-ludwig commented 10 years ago

Is this fixed on master? I had planned to look at it as the last thing before releasing another beta.

MrSmith33 commented 10 years ago

I have changed project structure, so it now compiles. The issue with fetching of all the older versions of current project i've hacked with --nodeps flag. This thing needs a look. It was also mentioned in #323. Just look at my last comment here. It downloads all versions of anchovy while it doesn't needs to download. It builds it locally.

s-ludwig commented 10 years ago

Turns out this wasn't really related to the issue in #323. I've just tried to build with the package description mentioned in the forum topic and found and fixed several diagnostic output issues. The actual issue was that the ":utils" style references didn't do what they seemed to do when used within sub packages. Until the actual semantics are settled, I've disallowed them there now.

MrSmith33 commented 10 years ago

Try it now, the main package is a library and subpackage is an application which depends on library. Still tries to download all the anchovy versions.

s-ludwig commented 10 years ago

Should work now, too.