Author Topic: Autoversioning and multiple users  (Read 2615 times)

Offline nitgun

  • Single posting newcomer
  • *
  • Posts: 3
Autoversioning and multiple users
« on: August 03, 2016, 02:20:33 pm »
Dear Forum,
today I stumbled over the autoversioning pluging, which could easily solve our problem of automatically generating unique version numbers for our embedded software. Unfortunately I did not get it to work properly. I am using the version provided with 13.12 rev 9501.
First I got it to work quite well in a first test. But the trouble started, when I thought about which file would need to go into our SVN to ensure that the version numbers stay correct when Person A started the development and Person B continues. Two problems arose:
1. What would happen when both would work in parallel. This would lead to a conflicted version.h. And depending on the build numbers performed by each developer the minor release numbers would differ at some point. So what would be the best way to handle this case?
2. Where does the plugin store the counting values? I tried updating version.h in an external editor, but this was ignored. Then I tried restarting codeblocks and it started counting at zero again. This makes no real sense to me. Is this an usage error?
Hopefully you can help me with the usage of the plugin. I was glad to see in the codeblocks SVN that it is still actively maintained although no recent thread can be found in this forum.
Best regards,
nitgun

P.S.: how could I compile the plugin from SVN to see if the recent version behaves differently? Unfortunately I am stuck with codeblocks 13.12 for now, because of safety reasons (I am not allowed to use a different IDE because there is the chance of different compile results)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Autoversioning and multiple users
« Reply #1 on: August 03, 2016, 04:19:09 pm »
2. Where does the plugin store the counting values? I tried updating version.h in an external editor, but this was ignored. Then I tried restarting codeblocks and it started counting at zero again. This makes no real sense to me. Is this an usage error?

As far as i can see the version info is safed in the project file...

Unfortunately I am stuck with codeblocks 13.12 for now, because of safety reasons (I am not allowed to use a different IDE because there is the chance of different compile results)
The IDE should NEVER change the output of the compiled program. The compiler changes the program.


But the trouble started, when I thought about which file would need to go into our SVN to ensure that the version numbers stay correct when Person A started the development and Person B continues. Two problems arose:
1. What would happen when both would work in parallel. This would lead to a conflicted version.h. And depending on the build numbers performed by each developer the minor release numbers would differ at some point. So what would be the best way to handle this case?
This would lead to a difference in the project file, and you have to handle this with a merge...

greetings

Offline nitgun

  • Single posting newcomer
  • *
  • Posts: 3
Re: Autoversioning and multiple users
« Reply #2 on: August 03, 2016, 09:25:32 pm »
As far as i can see the version info is safed in the project file...

I took a look in the project file. Indeed there were fields for major and minor version. But they had not the values used in the next version.h. I don't know what they are. But you "forced" me to test again. The result was really strange again: Testing at work with 13.12 suddenly showed that the former values are read from version.h when opening the project. But now I tried again at home. This time nothing was read from the version.h again. Even the status fields are empty in the autoversioning dialog.

edit: The reading back from version.h seems to happen just when I am using #defines in version.h. With static variables it seems to be working.

The IDE should NEVER change the output of the compiled program. The compiler changes the program.

In my opinion this should also be the case. But the IDE decides on the order of compilation. Of course if you did a good programming job the order of compilation should have no effect. But if not, the order can have an effect.

BR
« Last Edit: August 03, 2016, 09:40:09 pm by nitgun »