[Qbs] Failed 'PackageBuild' product on QBS 1.22
Hello, developers. I have a small product "PackageBuild" in my projects, I use it to generate the package_build_info file. The product code is shown below: Product { name: "PackageBuild" Depends { name: "cpp" } Depends { name: "lib.sodium" } lib.sodium.version: project.sodiumVersion lib.sodium.useSystem: project.useSystemSodium Probe { id: productProbe property string projectBuildDirectory: project.buildDirectory //property string cppstdlibPath: cppstdlib.path property var libs: [ lib.sodium, ] configure: { var file = new TextFile(projectBuildDirectory + "/package_build_info", TextFile.WriteOnly); try { for (var n in libs) { var lib = libs[n]; for (var i in lib.dynamicLibraries) { file.writeLine(lib.libraryPath + ("/lib{0}.so*").format(lib.dynamicLibraries[i])); } } //if (!cppstdlibPath.startsWith("/usr/lib", 0)) { // file.writeLine(cppstdlibPath + "/" + "libstdc++.so*"); // file.writeLine(cppstdlibPath + "/" + "libgcc_s.so*"); //} } finally { file.close(); } } } } When I open the project in QtC 7 the file package_build_info is successfully created, but after the build process starts the file package_build_info is deleted. How to make sure that file package_build_info is not deleted? -- BR, Pavel Karelin ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed build the project with QBS 1.22.1
03.05.2022 18:15, Richard Weickelt пишет: Hi, My old version works with replacing 'product' on 'exportingProduct': property var exportIncludePaths: [ "./", "./shared", ] cpp.includePaths: exportIncludePaths Export { Depends { name: "cpp" } cpp.includePaths: exportingProduct.exportIncludePaths } I am not sure whether you have it working or not. Above pattern works on my end at least. According to link https://codereview.qt-project.org/c/qbs/qbs/+/383049 there was a change in the definition for variable 'product' inside the section 'Export'. Maybe then you need to display some message in the log about a change in behavior? It was a deliberate decision. The topic was first mentioned in: https://code.qt.io/cgit/qbs/qbs.git/tree/changelogs/changes-1.18.0.md The "product" variable in Export items was scheduled for removal in the 1.20 release. The re-introduction of "product", but now as an alias of "importingProduct" has been mentioned in: https://code.qt.io/cgit/qbs/qbs.git/tree/changelogs/changes-1.22.0.md I now have all the projects at work will fall down. People will come to me and say: "Your 'QBS' doesn't work" (I promote the use of QBS at my firm). Can generally prohibit the use of variable 'product' in section 'Export', lag behind only 'importingProduct' and 'exportingProduct'? Display a message about this in the log. I am sorry to hear that this change creates inconvenience for you. What would you suggest to improve in case we have to do such a breaking change again? Don't take critics of colleagues personally. You know the problem, you can help fixing the problem, everybody will be happy. People complain every day and have already forgotten about it the other day. Yes, I think all projects will be fixed, everyone with assembly problems will come to me. I was probably just hurt that in a serious project, experienced developers allowed such a situation. If in version 1.20/1.21 I saw a deprecated-message stating that 'product' variable in section 'Export' is no longer supported and should be replaced with 'exportingProduct', then the problem would not have arisen. As I understood this transition did not happen spontaneously, you discussed it over several versions. I propose to display deprecate- messages in the future that QBS users could respond in a timely manner to impending changes. -- BR, Pavel Cheers Richard ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed build the project with QBS 1.22.1
Hi, My old version works with replacing 'product' on 'exportingProduct': property var exportIncludePaths: [ "./", "./shared", ] cpp.includePaths: exportIncludePaths Export { Depends { name: "cpp" } cpp.includePaths: exportingProduct.exportIncludePaths } I am not sure whether you have it working or not. Above pattern works on my end at least. According to link https://codereview.qt-project.org/c/qbs/qbs/+/383049 there was a change in the definition for variable 'product' inside the section 'Export'. Maybe then you need to display some message in the log about a change in behavior? It was a deliberate decision. The topic was first mentioned in: https://code.qt.io/cgit/qbs/qbs.git/tree/changelogs/changes-1.18.0.md The "product" variable in Export items was scheduled for removal in the 1.20 release. The re-introduction of "product", but now as an alias of "importingProduct" has been mentioned in: https://code.qt.io/cgit/qbs/qbs.git/tree/changelogs/changes-1.22.0.md I now have all the projects at work will fall down. People will come to me and say: "Your 'QBS' doesn't work" (I promote the use of QBS at my firm). Can generally prohibit the use of variable 'product' in section 'Export', lag behind only 'importingProduct' and 'exportingProduct'? Display a message about this in the log. I am sorry to hear that this change creates inconvenience for you. What would you suggest to improve in case we have to do such a breaking change again? Don't take critics of colleagues personally. You know the problem, you can help fixing the problem, everybody will be happy. People complain every day and have already forgotten about it the other day. Cheers Richard ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed build the project with QBS 1.22.1
03.05.2022 11:39, Christian Kandeler пишет: On 5/2/22 18:27, Карелин Павел wrote: I am using the construct: Product { name: "SharedLib" property var exportIncludePaths: [ "./", "./shared", ] Export { Depends { name: "cpp" } cpp.includePaths: product.exportIncludePaths } } Just use this as-is, except with exportingProduct in the Export item. Export { Depends { name: "cpp" } cpp.includePaths: [exportingProduct.cpp.includePaths] } I'm not entirely sure, but this might use the merged value, potentially pulling in more paths than you want. Using a dedicated property seems cleaner. The construct 'cpp.includePaths: [exportingProduct.cpp.includePaths]' does not work. QBS parsed it, but apparently the paths are not exported. The project is not built, the required header files are not found. My old version works with replacing 'product' on 'exportingProduct': property var exportIncludePaths: [ "./", "./shared", ] cpp.includePaths: exportIncludePaths Export { Depends { name: "cpp" } cpp.includePaths: exportingProduct.exportIncludePaths } According to link https://codereview.qt-project.org/c/qbs/qbs/+/383049 there was a change in the definition for variable 'product' inside the section 'Export'. Maybe then you need to display some message in the log about a change in behavior? I now have all the projects at work will fall down. People will come to me and say: "Your 'QBS' doesn't work" (I promote the use of QBS at my firm). Can generally prohibit the use of variable 'product' in section 'Export', lag behind only 'importingProduct' and 'exportingProduct'? Display a message about this in the log. Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed build the project with QBS 1.22.1
On 5/2/22 18:27, Карелин Павел wrote: I am using the construct: Product { name: "SharedLib" property var exportIncludePaths: [ "./", "./shared", ] Export { Depends { name: "cpp" } cpp.includePaths: product.exportIncludePaths } } Just use this as-is, except with exportingProduct in the Export item. Export { Depends { name: "cpp" } cpp.includePaths: [exportingProduct.cpp.includePaths] } I'm not entirely sure, but this might use the merged value, potentially pulling in more paths than you want. Using a dedicated property seems cleaner. Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs