#1 2014-10-23 06:56:12

azriel
Member
Registered: 2014-10-23
Posts: 10

Is it alright to publish CppMicroServices on Biicode?

Hi,

Short:
Biicode is a cloud dependency manager for c++ (like Maven central for Java). Is it alright if I publish CppMicroServices there? (Or wait for one of you to, or not at all?)

Long:
I'm starting development on a new project, and since I've used OSGi before, I picked CppMicroServices. I'm experimenting with dependency management and build systems. I hadn't used CMake before, and writing the CMakeLists for my project is getting long. Biicode will potentially shorten this process. If approved, then I may go ahead with this.

I know it doesn't violate the license, but asking is always nicer

Offline

#2 2014-10-23 16:41:44

sascha
Administrator
Registered: 2012-05-04
Posts: 46

Re: Is it alright to publish CppMicroServices on Biicode?

Hi,

sure, go ahead and publish it. I am not really familiar with biicode, so I don't know how it handles versioning and updating the published project from one release to another.

Would you be willing to look into that and maybe publish new releases?

Thanks!

Offline

#3 2014-10-24 06:41:08

azriel
Member
Registered: 2014-10-23
Posts: 10

Re: Is it alright to publish CppMicroServices on Biicode?

I've managed to get it compiling and published (see https://www.biicode.com/azriel/azriel/c … ces/master), but haven't got a working example of it being used yet. Also, haven't checked if the minimal biicode config I added lets it run for an embedded use of CppMicroServices (what does embedded mean?).

Shall do those before I make a pull request.

Known caveat: Biicode automatically discovers dependencies based on imports, and require them to be in the format <user>/<project>/<filename>, so what used to look like this:

#include <usModule.h>
#include <usModuleRegistry.h>
#include <usSharedLibrary.h>

would now look like this (replace 'azriel' with whomever the main publisher will be):

#include <azriel/cppmicroservices/usModule.h>
#include <azriel/cppmicroservices/usModuleRegistry.h>
#include <azriel/cppmicroservices/usSharedLibrary.h>

Offline

#4 2014-10-27 22:25:52

sascha
Administrator
Registered: 2012-05-04
Posts: 46

Re: Is it alright to publish CppMicroServices on Biicode?

Thanks a lot for your efforts.

In general, I would suggest to only push releases to Biicode. Although the master contains only "release commits" since some time, I think it is best practice to push the latest release tag. As I am not really familiar with Biicode, I don't know their available policies about versioning though.

In which context are you referring to an "embedded use"? There is an internal CMake variable "US_IS_EMBEDDED" which is used if the source code is embedded in another larger project but this is all done automatically.

The caveat you are mentioning leads me to think about the header file directory layout for CppMicroServices modules. The next release will support multiple modules inside the CppMicroServices repository and header files will typically get installed in

/usr/include/cppmicroservices/core/Module.h
/usr/include/cppmicroservices/shell/ShellService.h
...

So, a user "cppmicroservices" on Biicode could make sense, with the sub-modules representing project names. Again, I don't know if Biicode can handle projects contained in the same repository. But the include directives would look the same in every project using CppMicroServices, irrespective of the fact if it uses Biicode or not.

Offline

#5 2014-11-04 06:08:25

azriel
Member
Registered: 2014-10-23
Posts: 10

Re: Is it alright to publish CppMicroServices on Biicode?

Hello again,

sascha wrote:

In which context are you referring to an "embedded use"? There is an internal CMake variable "US_IS_EMBEDDED" which is used if the source code is embedded in another larger project but this is all done automatically.

I was referring to that - I didn't know what embedded meant, now I do smile

---

I've made some progress

Preamble:
In Biicode, "blocks" are the units of code that are versioned together. Block names are always lowercase.

Short:
I've published a "stable" version of a CppMicroServices block, so it can be depended on by other blocks.
I've also published the service event listener bundle as a block, as an example of how to create a bundle.
I extracted the ustestdriver into a block which can be used to load any shared library bundle (useful for testing), using `l <path_to_shared_library>`

Long:
Normally each block is small, and headers are included via `#include <user/blockname/path/to/header.h>`.

CppMicroServices does not have a readily available "include" directory; it is generated when cmake is run. To get Biicode to resolve the headers, users can include <user/cppmicroservices/src/module/usModuleActivator.h>. These headers #include a generated "usConfig.h". In theory, it should resolve the generated file during compilation, but for some reason it says it cannot resolve "usConfig.h" - this thread was my attempt at reproducing the unresolved inclusion, but it worked for the minimal project setup, and I haven't discovered why not in the cppmicroservices block.

The method currently used in the published block is to make the generated "include" directory transitive (biicode forum topic). Blocks that require the cppmicroservices library block have to explicitly declare the library as a dependency in their CMakeLists.txt (example here).

The includes from a source file is then the same as if Biicode is not used, i.e. `#include <usModuleActivator.h>`

---

I haven't gotten a travis build integrated yet, and there's work to be done on README's for the various repositories.

---

github repositories:
CppMicroServices/feature/biicode-support
usserviceeventlistener
ustestdriver
usbundleloader

Last edited by azriel (2014-11-04 06:11:51)

Offline

#6 2015-02-08 23:51:10

azriel
Member
Registered: 2014-10-23
Posts: 10

Re: Is it alright to publish CppMicroServices on Biicode?

Hi, I've made a pull request: https://github.com/saschazelzer/CppMicr … es/pull/26
It's different to the previous branch I made - this one is based off the development branch rather than the latest release tag

It contains the following changes:

  • modifies the CMake configuration and adds biicode configuration to allow it to be built and published to biicode

  • travis configuration is updated to build and test the biicode build for both g++ and clang compilers

  • appveyor configuration is added to test the biicode build on windows

The CI builds don't automatically publish to biicode (since the encrypted keys should be set up on the main travis account)

Could you take a look and let me know if any changes are needed for the branch to get merged?

Thank you

Offline

#7 2015-02-21 13:39:42

sascha
Administrator
Registered: 2012-05-04
Posts: 46

Re: Is it alright to publish CppMicroServices on Biicode?

Hi Azriel,

thanks a lot for the effort you put into this, it is highly appreciated. I have been very busy the last weeks so sorry for getting back to you so late.

I will look through your branch in detail the next week and probably get back to you with a few questions.

Thanks,
Sascha

Offline

#8 2015-02-23 19:12:05

azriel
Member
Registered: 2014-10-23
Posts: 10

Re: Is it alright to publish CppMicroServices on Biicode?

Hi Sascha,

If you can hold off for a little bit, I'm cleaning up the pull request history to make minimal changes, and we also discovered an issue in biicode that warrants a change in the cmake configuration regarding tests.
I'll post back after that's done, which should be two days maximum


Azriel

Offline

#9 2015-02-25 09:04:01

azriel
Member
Registered: 2014-10-23
Posts: 10

Re: Is it alright to publish CppMicroServices on Biicode?

Okay I've updated the pull request to be clean, but some of the build agents on travis don't appear to work with the previously configured build script. The first commit is the bulk of the changes which you can review; I'll fix the travis build script as soon as possible, but it may have to be in the weekend.


Azriel

Offline

#10 2015-02-28 01:17:24

azriel
Member
Registered: 2014-10-23
Posts: 10

Re: Is it alright to publish CppMicroServices on Biicode?

Turned out to be flaky connection issues between the agents and the apt repository they were connecting to. I pushed a trivial change to trigger the build and it passed this time.

Offline

#11 2015-05-27 06:36:11

azriel
Member
Registered: 2014-10-23
Posts: 10

Re: Is it alright to publish CppMicroServices on Biicode?

Hi Sascha, the latest state of the PR fails on Windows because the usModuleResourceTest assumes line endings will be \r\n, whereas Appveyor clones the repository with \n-s for line endings.

I'd like to get this PR merged in, but what is your take on this?

Offline

#12 2015-06-01 06:59:31

sascha
Administrator
Registered: 2012-05-04
Posts: 46

Re: Is it alright to publish CppMicroServices on Biicode?

Hi,

the test assumes that default line endings are present in the test data and the appveyor git clone does seem to work with autocrlf=input by default. I would suggest to try and change the autocrlf setting in the appveyor config file to true as suggested here: http://help.appveyor.com/discussions/pr … t_35102707

Are you otherwise satisfied with your PR so far? If yes, I would start adding some remarks on GitHub.

Thanks!

Offline

#13 2015-06-03 08:07:50

azriel
Member
Registered: 2014-10-23
Posts: 10

Re: Is it alright to publish CppMicroServices on Biicode?

Hi, thanks for that, not sure why I didn't think to search.

I've pushed the fix for appveyor, and I'm satisfied with the PR. Happy to fix and improve upon things that aren't the best in their current state.

Best

Offline

Board footer

Powered by FluxBB