[Qt-creator] Nim: Advice for handling run configurations

Filippo Cucchetto filippocucchetto at gmail.com
Sun Mar 22 13:29:16 CET 2020


Hi,
i would need some advises in how to properly handle run configurations
for Nimble.
i will start describing how i would like it to be and then the current
state in 4.12 branch.

Desired behavior:
1) A Run configuration should be created automatically each time a new
"binary" is specified in the ".nimble" project file.
The run configuration should basically call the executable build by
nimble. The end user should always find this run configuration
available.
2) Optionally i would like to create automatically a run configuration
in case there are no binaries. This is the case of
a Nimble library (something that doesn't produce a binary). The end
user should be able to delete it or recreate whenever he/she wants.

Current state:
1) The NimbleBuildSystem calls the setApplicationTargets() with the
binaries obtained by inspecting the ".nimble" file. Updating the
ApplicationTargets in turn stimulate the creation of one or more
NimbleRunConfiguration.
2) For (2) i created a new NimbleTestRunConfiguration that is always
created since creationMode is AlwaysCreate. This has the drawback to
appear also in
Nimble binary applications and furthermore it is listed has the first
run configuration (this is annoying for users that created a binary
application).

Obviously the current situation doesn't fulfill (2) correctly.
Possible workaround/solutions
A) Override NimbleTestRunConfiguration::availableCreators and set the
RunConfigurationCreationInfo::creationMode to "Manually".
This makes the "Nimble Run configuration" optional but i don't get it
for free when the user create a library application.
B) Completely remove NimbleTestRunConfiguration and in the
NimbleBuildSystem add a target for running the tests

Any tip?

Thank you in advance
-- 
Filippo Cucchetto


More information about the Qt-creator mailing list