PLCnext / PLCnext_CLI_Templates

This is the project template repository for the PLCnext CLI. Make use of the template system and tailor templates for your needs.
Apache License 2.0
1 stars 2 forks source link

Auto-generated component header file contains an incorrect path in some circumstances #5

Closed martinboers closed 9 months ago

martinboers commented 1 year ago

To reproduce:

Correct behaviour:

$ plcncli new project --output Project
$ cat Project/src/ProjectComponent.hpp
#pragma once
#include "Arp/System/Core/Arp.h"
#include "Arp/System/Acf/ComponentBase.hpp"
#include "Arp/System/Acf/IApplication.hpp"
#include "Arp/Plc/Commons/Esm/ProgramComponentBase.hpp"
#include "ProjectComponentProgramProvider.hpp"           <=== correct (no path)
#include "Arp/Plc/Commons/Meta/MetaLibraryBase.hpp"
#include "Arp/System/Commons/Logging.h"
    :

Incorrect behaviour:

$ plcncli new project --output Path/Project
$ cat Path/Project/src/ProjectComponent.hpp
#pragma once
#include "Arp/System/Core/Arp.h"
#include "Arp/System/Acf/ComponentBase.hpp"
#include "Arp/System/Acf/IApplication.hpp"
#include "Arp/Plc/Commons/Esm/ProgramComponentBase.hpp"
#include "Project/ProjectComponentProgramProvider.hpp"    <=== wrong path
#include "Arp/Plc/Commons/Meta/MetaLibraryBase.hpp"
#include "Arp/System/Commons/Logging.h"
    :

I think this might be an error in this line of the Component template:

https://github.com/PLCnext/PLCnext_CLI_Templates/blob/4d98e3c9e8723f9199c48cbfaa092e0293d68735/ComponentTemplate/Component.hpp#L6

mluhmann commented 9 months ago

Fixed in toolchain release 2023.0