Groterik / qtcreator-dubmanager

QtCreator plugin for dub manager support (dlang, d programming language)
MIT License
7 stars 2 forks source link

[QtCreator 3.5.81, Qt 5.5.1] Building fails #6

Closed drug007 closed 9 years ago

drug007 commented 9 years ago

Building using gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4, Qt Creator 3.5.81 Основан на Qt 5.5.1 (GCC 4.8.4, 64 бита) fails with the following:

In file included from ../qtcreator-dubmanager/src/dubprojectmanagerplugin.cpp:11:0:
../qtcreator-dubmanager/src/dubwizard.h:28:18: error: conflicting return type specified for 'virtual void DubProjectManager::DubWizard::runWizard(const QString&, QWidget*, const QString&, const QVariantMap&)'
     virtual void runWizard(const QString &path, QWidget *parent,
                  ^
In file included from ../qtcreator-dubmanager/src/dubwizard.h:4:0,
                 from ../qtcreator-dubmanager/src/dubprojectmanagerplugin.cpp:11:
../qt-creator/src/plugins/coreplugin/iwizardfactory.h:94:28: error:   overriding 'virtual Utils::Wizard* Core::IWizardFactory::runWizard(const QString&, QWidget*, const QString&, const QVariantMap&)'
     virtual Utils::Wizard *runWizard(const QString &path, QWidget *parent, const QString &platform,
                            ^
../qtcreator-dubmanager/src/dubprojectmanagerplugin.cpp: In member function 'virtual bool DubProjectManager::Internal::DubProjectManagerPlugin::initialize(const QStringList&, QString*)':
../qtcreator-dubmanager/src/dubprojectmanagerplugin.cpp:68:31: error: cannot allocate an object of abstract type 'DubProjectManager::DubWizard'
     addAutoReleasedObject(new DubWizard);
                               ^
In file included from ../qtcreator-dubmanager/src/dubprojectmanagerplugin.cpp:11:0:
../qtcreator-dubmanager/src/dubwizard.h:22:7: note:   because the following virtual functions are pure within 'DubProjectManager::DubWizard':
 class DubWizard : public Core::IWizardFactory
       ^
In file included from ../qtcreator-dubmanager/src/dubwizard.h:4:0,
                 from ../qtcreator-dubmanager/src/dubprojectmanagerplugin.cpp:11:
../qt-creator/src/plugins/coreplugin/iwizardfactory.h:118:28: note:     virtual Utils::Wizard* Core::IWizardFactory::runWizardImpl(const QString&, QWidget*, const QString&, const QVariantMap&)
     virtual Utils::Wizard *runWizardImpl(const QString &path, QWidget *parent, const QString &platform,
                            ^
make: *** [.obj/debug-shared/dubprojectmanagerplugin.o] Error 1
10:48:57: Процесс «/usr/bin/make» завершился с кодом 2.
Ошибка при сборке/установке проекта dubprojectmanager (комплект: Qt 5.5.1 (qt5))
Во время выполнения этапа «Сборка»

The problem is that the definition of runWizardImpl has been changed and returns Utils::Wizard now instead of void.

drug007 commented 9 years ago

I modified code to build it, it installs now, I see the plugin in modules list, it's activated, also in "Options" I see dub executable settings, but I can't understand how to create or open dub project.

Groterik commented 9 years ago

Now, as you installed the plugin you are able to open dub.json as File -> Open File or Project or create new DUB project via File -> Create New File or Project -> Non-Qt Project -> DUB Project. If it fails please check options for DUB executable path.

drug007 commented 9 years ago

Probably installation is broken because I can't openg dub.json and can't create DUB project... Well, will keep trying... But DUB was system-wide installed and runs perfectely from CLI...

drug007 commented 9 years ago

Ooops, it's funny but I can do it) will be testing it tomorrow. Thank you!

drug007 commented 9 years ago

I can open simple DUB project, but when I try to open non-trivial DUB project either it fails due to dub process timeout or it fails in failed assert. But simple project works - and autocompletion, and building/running and even debuging. It's interesting!

drug007 commented 9 years ago

When I increased timeout it only fails in assert. will investigate this.

Groterik commented 9 years ago

Please could you specify the assert file and line?

drug007 commented 9 years ago

I manage to run one non-trivial DUB project - the problem was dub hanged during getting annotations. When this reason was removed this project opens and so on very well. But another project fails in dubproject.cpp:93. As I understand here

const ConfigurationInfo& s = m_parser->configurationInfo(m_parser->configurationsList().front());

is fetching front element from empty container.

Groterik commented 9 years ago

Thank you, that's very helpful, I'll try to handle this case. But still, why do you have empty configuration list? Could you exec dub build --annotate --print-configs for the project? Is an output list of available configurations empty?

drug007 commented 9 years ago

I have empty configuration list because this package is container for subpackages only.

Groterik commented 9 years ago

Oh, ok, I'll fix it.

drug007 commented 9 years ago

this project dub.json looks like

{
    "name": "rdpl",
    "targetType": "none",
    "subPackages": [
        "./core/",
        "./service",
        "./utils",
    ],
}
Groterik commented 9 years ago

I did some workaround for the last problem (f978d4076b6500d3221941eb664c830350f7f7dd). So projects that have no configurations are eligible now and are able to show a project tree for subPackages (only for their default configurations). Build configurations are available after manual configuration only (as long as dub build fails with such "none"-typed projects). It is a little bit messy but I could not find another way to do it because it seems impossible to configure QtCreator's subprojects. In conclusion, I suggest to open subPackages separately.

drug007 commented 9 years ago

Thank you!