Re: [Qbs] Any novice tickets

2019-05-01 Thread Richard Weickelt
 
> Meanwhile, I get another question… I think, I already asked it, but still. Is 
> the magic behind config parameter documented somewhere?

Have you looked at 
https://doc.qt.io/qbs/cli-build.html#parameters ?
This was updated only recently.
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Any novice tickets

2019-05-01 Thread Иван Комиссаров
Yes, I overlooked that section, there are too many «building» words on this 
page=)
Here’s the review https://codereview.qt-project.org/#/c/260211/ 


Meanwhile, I get another question… I think, I already asked it, but still. Is 
the magic behind config parameter documented somewhere?
For example, qbs build config:debug builds a debug build, this is clear from 
the examples…

What other possible options do I have? From what I’ve found, only «release» and 
«debug» are supported, but this is not documented. What do you think about 
adding support for «releaseWithDebugInfo»? This is kinda common usecase.

> 30 апр. 2019 г., в 9:59, Christian Kandeler  
> написал(а):
> 
> On Tue, 30 Apr 2019 08:22:05 +0200
> Иван Комиссаров  wrote:
> 
>> I want to add doc about how to run tests using QBS. But I can’t find 
>> Appendix A page, surprisingly, it is not near Appendix B page.
>> Christian, can you please point to the correct page location?
> 
> You mean in the sources? In the qbs.qdoc file. grep is your friend ;)
> 
> 
> 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] Any novice tickets

2019-04-30 Thread Christian Kandeler
On Tue, 30 Apr 2019 08:22:05 +0200
Иван Комиссаров  wrote:

> I want to add doc about how to run tests using QBS. But I can’t find Appendix 
> A page, surprisingly, it is not near Appendix B page.
> Christian, can you please point to the correct page location?

You mean in the sources? In the qbs.qdoc file. grep is your friend ;)


Christian
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Any novice tickets

2019-04-29 Thread Иван Комиссаров
I want to add doc about how to run tests using QBS. But I can’t find Appendix A 
page, surprisingly, it is not near Appendix B page.
Christian, can you please point to the correct page location?

> 13 февр. 2019 г., в 16:10, Иван Комиссаров  написал(а):
> 
> The same as we discussed earlier - I can't do "try pkg-config module, if 
> fails, try probe-based-detect, if fails, fallback to user-defined paths".
> This is because I can't set the condition of the module based on a probe 
> result and only one module is loaded; if it fails, no fallback occurred.
> 
> Иван Комиссаров
> 
>> 13 февр. 2019 г., в 15:59, Christian Kandeler  
>> написал(а):
>> 
>> On Wed, 13 Feb 2019 15:26:00 +0100
>> Иван Комиссаров  wrote:
>> 
>>> I see that module providers feature was implemented. Is it now possible to 
>>> use a provider to create a module for auto-detected protobuf library (via 
>>> probes and via pkg-config)?
>> 
>> Which problem are you trying to solve?
>> 
>> 
>> 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] Any novice tickets

2019-02-13 Thread Иван Комиссаров
The same as we discussed earlier - I can't do "try pkg-config module, if fails, 
try probe-based-detect, if fails, fallback to user-defined paths".
This is because I can't set the condition of the module based on a probe result 
and only one module is loaded; if it fails, no fallback occurred.

Иван Комиссаров

> 13 февр. 2019 г., в 15:59, Christian Kandeler  
> написал(а):
> 
> On Wed, 13 Feb 2019 15:26:00 +0100
> Иван Комиссаров  wrote:
> 
>> I see that module providers feature was implemented. Is it now possible to 
>> use a provider to create a module for auto-detected protobuf library (via 
>> probes and via pkg-config)?
> 
> Which problem are you trying to solve?
> 
> 
> 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] Any novice tickets

2019-02-13 Thread Christian Kandeler
On Wed, 13 Feb 2019 15:26:00 +0100
Иван Комиссаров  wrote:

> I see that module providers feature was implemented. Is it now possible to 
> use a provider to create a module for auto-detected protobuf library (via 
> probes and via pkg-config)?

Which problem are you trying to solve?


Christian
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Any novice tickets

2019-02-13 Thread Иван Комиссаров
I see that module providers feature was implemented. Is it now possible to use 
a provider to create a module for auto-detected protobuf library (via probes 
and via pkg-config)?

Иван Комиссаров

> 12 дек. 2018 г., в 10:24, Christian Kandeler  
> написал(а):
> 
> On Tue, 11 Dec 2018 21:27:00 +0100
> Иван Комиссаров  wrote:
> 
>> That helped, thanks!
>> 
>> Now I’ve a got a question about module priority. Perhaps I didn’t get the 
>> idea - I tried to use two "internal.libprotobuf"  modules with different 
>> priority hoping that if failed to configure, the other will be loaded. But 
>> it looks like only one module is loaded, with the highest priority and if it 
>> fails, others are not loaded.
> 
> Yes, the process is less dynamic than you imagined. I suppose it could be 
> implemented, but it wouldn't be trivial at all.
> 
>> Maybe it’s worth trying to load all modules in a chain one after the other?
> 
> That's probably the most sensible approach. Take a look at the first
> example here:
> https://doc.qt.io/qbs/qml-qbslanguageitems-depends.html#details
> 
> 
> 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] Any novice tickets

2018-12-12 Thread Christian Kandeler
On Tue, 11 Dec 2018 21:27:00 +0100
Иван Комиссаров  wrote:

> That helped, thanks!
> 
> Now I’ve a got a question about module priority. Perhaps I didn’t get the 
> idea - I tried to use two "internal.libprotobuf"  modules with different 
> priority hoping that if failed to configure, the other will be loaded. But it 
> looks like only one module is loaded, with the highest priority and if it 
> fails, others are not loaded.

Yes, the process is less dynamic than you imagined. I suppose it could be 
implemented, but it wouldn't be trivial at all.

> Maybe it’s worth trying to load all modules in a chain one after the other?

That's probably the most sensible approach. Take a look at the first
example here:
https://doc.qt.io/qbs/qml-qbslanguageitems-depends.html#details


Christian
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-12-11 Thread Иван Комиссаров
That helped, thanks!

Now I’ve a got a question about module priority. Perhaps I didn’t get the idea 
- I tried to use two "internal.libprotobuf"  modules with different priority 
hoping that if failed to configure, the other will be loaded. But it looks like 
only one module is loaded, with the highest priority and if it fails, others 
are not loaded.

Maybe it’s worth trying to load all modules in a chain one after the other?

> 11 дек. 2018 г., в 10:37, Christian Kandeler  
> написал(а):
> 
> On Mon, 10 Dec 2018 22:50:14 +0100
> Иван Комиссаров  wrote:
> 
>> https://codereview.qt-project.org/#/c/247814/1
>> 
>> Can you please take a look what I am doing wrong? 
> 
> Don't use ids in Depends items, that won't work properly. Always refer to a 
> module by its real name. You then also need to rename the "private" prefix to 
> something else, as that is a reserved word in JavaScript.
> 
> 
> Christian
> ___
> Qbs mailing list
> q...@lists.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] Any novice tickets

2018-08-09 Thread Christian Kandeler
On Thu, 9 Aug 2018 13:50:52 +0300
Иван Комиссаров  wrote:

> Ok, I forgot about objective-C, so yes, I will use explicit property.
> 
> Anyway, I got a question, does product.dependencies contains only strict
> dependencies (specified at Product item), or the list of all dependencies,
> including deps from dependent products/modules?

It contains all dependencies. Note that product.dependencies is only available 
in rules.


Christian
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-08-09 Thread Иван Комиссаров
Ok, I forgot about objective-C, so yes, I will use explicit property.

Anyway, I got a question, does product.dependencies contains only strict
dependencies (specified at Product item), or the list of all dependencies,
including deps from dependent products/modules?

2018-08-09 12:16 GMT+03:00 Christian Kandeler :

> On Thu, 9 Aug 2018 03:53:50 +0300
> Иван Комиссаров  wrote:
>
> > Im a bit stuck with protobuf module. I’m trying to make the module
> behave different for different languages, i.e. generate .cc files for cpp
> project, java for java project and so on.
> >
> > I am trying to use product.dependencies[i].name == «cpp» condition. It
> works in the outputArtifacts section, but i can’t provide a conditionally
> exported cpp.staticLibraries: ["protobuf»]
>
> I  assume you are referring to the suggestion in the bug report to
> auto-detect the target language? I'm not sure this is so valuable, and we
> could easily guess wrong. What if a project has both a cpp and a Java
> dependency? What about C++ vs Objective-C? Both come from the cpp module...
> I suggest providing a property targetLanguages where the user can set the
> language(s) explicitly and have matching conditions in the respective rules
> (or have just one rule, but different ones might be cleaner).
> Coming up with a good default value seems a bit tricky, but perhaps we can
> just leave it empty and inform the user that it needs to be set.
>
> > Here’s the code https://pastebin.com/gNMiNg7G <
> https://pastebin.com/gNMiNg7G>
> >
> > I tried to tie cpp.staticLibraries to each artifact (but i guess the
> libraries are ignored for cpp tags) and i tried to use a Properties but it
> seems my condition function is not called at all (at least, throwing in it
> makes no result)
>
> It makes no sense to set cpp.*Libraries on an artifact. The linker rule
> reads this property from the product level.
>
>
> Christian
> ___
> Qbs mailing list
> Qbs@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-08-09 Thread Christian Kandeler
On Thu, 9 Aug 2018 03:53:50 +0300
Иван Комиссаров  wrote:

> Im a bit stuck with protobuf module. I’m trying to make the module behave 
> different for different languages, i.e. generate .cc files for cpp project, 
> java for java project and so on.
> 
> I am trying to use product.dependencies[i].name == «cpp» condition. It works 
> in the outputArtifacts section, but i can’t provide a conditionally exported 
> cpp.staticLibraries: ["protobuf»]

I  assume you are referring to the suggestion in the bug report to auto-detect 
the target language? I'm not sure this is so valuable, and we could easily 
guess wrong. What if a project has both a cpp and a Java dependency? What about 
C++ vs Objective-C? Both come from the cpp module...
I suggest providing a property targetLanguages where the user can set the 
language(s) explicitly and have matching conditions in the respective rules (or 
have just one rule, but different ones might be cleaner).
Coming up with a good default value seems a bit tricky, but perhaps we can just 
leave it empty and inform the user that it needs to be set.

> Here’s the code https://pastebin.com/gNMiNg7G 
> 
> I tried to tie cpp.staticLibraries to each artifact (but i guess the 
> libraries are ignored for cpp tags) and i tried to use a Properties but it 
> seems my condition function is not called at all (at least, throwing in it 
> makes no result)

It makes no sense to set cpp.*Libraries on an artifact. The linker rule reads 
this property from the product level.


Christian
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-08-08 Thread Иван Комиссаров
Im a bit stuck with protobuf module. I’m trying to make the module behave 
different for different languages, i.e. generate .cc files for cpp project, 
java for java project and so on.

I am trying to use product.dependencies[i].name == «cpp» condition. It works in 
the outputArtifacts section, but i can’t provide a conditionally exported 
cpp.staticLibraries: ["protobuf»]

Here’s the code https://pastebin.com/gNMiNg7G 

I tried to tie cpp.staticLibraries to each artifact (but i guess the libraries 
are ignored for cpp tags) and i tried to use a Properties but it seems my 
condition function is not called at all (at least, throwing in it makes no 
result)

> 6 авг. 2018 г., в 16:39, Иван Комиссаров  написал(а):
> 
> https://bugreports.qt.io/browse/QBS-563 
>  (Add support for Google Protocol 
> Buffers) It seems that shouldn't be very hard to implement a module for a 
> protoc.

___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-08-07 Thread Christian Kandeler
On Mon, 6 Aug 2018 23:58:50 +0200
Richard Weickelt  wrote:

> >> https://bugreports.qt.io/browse/QBS-511 (QBS help text is not properly
> >> format in windows cmd shell) I guess, QBS doesn't use QCommandLineParser at
> >> the moment?  
> > 
> > No, and I don't think it can, because of the "command plus additional 
> > arguments" syntax that qbs uses.  
> 
> This would be a very useful add-on in QCommandLineParser. Is the following
> work-around too hackish?
> 1. Parse the second argument in argv (or QCoreApplication::arguments())
> manually in order to deduce the command before initializing an appropriate
> QCommandLineParser object.
> 2. Then remove the second argument and pass the resulting list (without the
> command) to QCommandLineParser.
> 
> 1. qbs build --options
> 2. qbs --option ...

The thing is that at this point, I don't think qbs has much to gain by 
switching to QCommandLineParser. The whole parser infrastructure is in place, 
and adding commands and options is simple. We will use QCommandLineParser for 
new helper tools, though (qbs-create-project already does).


Christian
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-08-06 Thread Иван Комиссаров
I don’t think it’s too hackish, but there may be some corner cases that will 
require proper documentation.
What comes to my mind, how you suppose to treat positionalArguments() of the 
top-level parser? Should it be empty/contain all subparser arguments/what’s 
left after subparsing?
Anyway, I used QCommandLineParser for the qbs-style command line parsing and 
that worked except it requires a lot of copy/pasting 

> 7 авг. 2018 г., в 0:58, Richard Weickelt  написал(а):
> 
> 
>>> https://bugreports.qt.io/browse/QBS-511 (QBS help text is not properly
>>> format in windows cmd shell) I guess, QBS doesn't use QCommandLineParser at
>>> the moment?
>> 
>> No, and I don't think it can, because of the "command plus additional 
>> arguments" syntax that qbs uses.
> 
> This would be a very useful add-on in QCommandLineParser. Is the following
> work-around too hackish?
> 1. Parse the second argument in argv (or QCoreApplication::arguments())
> manually in order to deduce the command before initializing an appropriate
> QCommandLineParser object.
> 2. Then remove the second argument and pass the resulting list (without the
> command) to QCommandLineParser.
> 
> 1. qbs build --options
> 2. qbs --option ...
> ___
> Qbs mailing list
> Qbs@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs

___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-08-06 Thread Richard Weickelt


>> https://bugreports.qt.io/browse/QBS-511 (QBS help text is not properly
>> format in windows cmd shell) I guess, QBS doesn't use QCommandLineParser at
>> the moment?
> 
> No, and I don't think it can, because of the "command plus additional 
> arguments" syntax that qbs uses.

This would be a very useful add-on in QCommandLineParser. Is the following
work-around too hackish?
1. Parse the second argument in argv (or QCoreApplication::arguments())
manually in order to deduce the command before initializing an appropriate
QCommandLineParser object.
2. Then remove the second argument and pass the resulting list (without the
command) to QCommandLineParser.

1. qbs build --options
2. qbs --option ...
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-08-06 Thread Christian Kandeler
On Mon, 6 Aug 2018 16:39:20 +0300
Иван Комиссаров  wrote:

> Most of the time i use Mac OS for desktop development, sometimes I use
> debian-based Linux.

Ok, good to know. There are many interesting things to do for Mac, but most of 
them are probably too complex to get started with.
Perhaps you could take a look at the Xcode generator? This is supposed to be a 
complete patch that we haven't gotten around to look at yet. Just testing it a 
bit would already be helpful.

> I looked more at the issues and found some
> https://bugreports.qt.io/browse/QBS-563 (Add support for Google Protocol
> Buffers) It seems that shouldn't be very hard to implement a module for a
> protoc.

Yes, this looks like a low-hanging fruit.

> https://bugreports.qt.io/browse/QBS-120 (Qbs uses too much memory) I can
> take a look at allocations Instrument to see what's happening

That surely can't hurt. My experiments with massif weren't very conclusive.

> https://bugreports.qt.io/browse/QBS-511 (QBS help text is not properly
> format in windows cmd shell) I guess, QBS doesn't use QCommandLineParser at
> the moment?

No, and I don't think it can, because of the "command plus additional 
arguments" syntax that qbs uses.


Christian
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-08-06 Thread Иван Комиссаров
Hello, Christian. Thank you for the quick answer.

Most of the time i use Mac OS for desktop development, sometimes I use
debian-based Linux.

I looked more at the issues and found some
https://bugreports.qt.io/browse/QBS-563 (Add support for Google Protocol
Buffers) It seems that shouldn't be very hard to implement a module for a
protoc.
https://bugreports.qt.io/browse/QBS-120 (Qbs uses too much memory) I can
take a look at allocations Instrument to see what's happening
https://bugreports.qt.io/browse/QBS-511 (QBS help text is not properly
format in windows cmd shell) I guess, QBS doesn't use QCommandLineParser at
the moment?

2018-08-06 11:28 GMT+03:00 Christian Kandeler :

> On Mon, 6 Aug 2018 11:21:28 +0300
> Иван Комиссаров  wrote:
>
> Hi Ivan,
>
> > Hello, I want to participate in QBS development,
>
> That's great to hear.
>
> > but I don't know where to start. I looked at the open issues at bug
> tracker, but all of them seems rather complicated and requires knowledge of
> the qbs architecture. Are there any easy tickets to start so I can get
> familiar with the codebase?
>
> I'd ignore the qbscore library for now and look for things that can be
> achieved by writing or adapting modules. Which are your preferred platforms?
>
>
> Christian
> ___
> Qbs mailing list
> Qbs@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Any novice tickets

2018-08-06 Thread Christian Kandeler
On Mon, 6 Aug 2018 11:21:28 +0300
Иван Комиссаров  wrote:

Hi Ivan,

> Hello, I want to participate in QBS development, 

That's great to hear.

> but I don't know where to start. I looked at the open issues at bug tracker, 
> but all of them seems rather complicated and requires knowledge of the qbs 
> architecture. Are there any easy tickets to start so I can get familiar with 
> the codebase?

I'd ignore the qbscore library for now and look for things that can be achieved 
by writing or adapting modules. Which are your preferred platforms?


Christian
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


[Qbs] Any novice tickets

2018-08-06 Thread Иван Комиссаров
Hello, I want to participate in QBS development, but I don't know where to 
start. I looked at the open issues at bug tracker, but all of them seems rather 
complicated and requires knowledge of the qbs architecture. Are there any easy 
tickets to start so I can get familiar with the codebase?

Иван Комиссаров
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs