1.91 Trunk: Broken Windows Build

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6680
Joined: Wed Feb 28, 2007 7:54 am

1.91 Trunk: Broken Windows Build

Post by another_commander »

The Windows build, starting with commit 4752329 generates broken installations. Whilst the build is successful and an installer for Windows gets generated and installs its files correctly, running the game fails with this message:
Latest.log wrote:
08:30:03.203 [descriptions.verify]: ***** FATAL: Tried to verify descriptions, but descriptions was nil - unable to load any descriptions.plist file.

Closing log at 2023-06-30 08:30:03 +0300.
A quick investigation reveals that the file info-gnustep.plist, which is produced for Windows during the build and is based on the contents of src/Cocoa/Info-Oolite.plist contains an incorrect version number in the CFBundleVersion key. It contains the version number "1.90", when it should be "1.91". Correcting this fixes the brokenness and the game can start up normally again.

The file infoPlist.strings also has this mistake, but apparently the Windows build is not using it so it is not a problem for me. It could be a problem for other ports though, not sure which ports do use that file.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: 1.91 Trunk: Broken Windows Build

Post by hiran »

Thank you for spotting.
The automatic version bump should have happened here:
https://github.com/OoliteProject/oolite ... ll.yml#L58
As this is just a preparation step the result needs to be carried over to the OS specific builds. This is happening in
https://github.com/OoliteProject/oolite ... ll.yml#L76
The Windows build pulls and applies these prepared files here
https://github.com/OoliteProject/oolite ... l.yml#L191

So it should not matter what version number is in the document in version control. But apparently something did not go as planned.

I will take a look.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: 1.91 Trunk: Broken Windows Build

Post by hiran »

I found an issue in the common build part. Despite having 1.91 in oolite-version.xcconfig the version was distributed as 1.90.

I will try to fix that.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: 1.91 Trunk: Broken Windows Build

Post by hiran »

hiran wrote: Fri Jun 30, 2023 7:51 am
I found an issue in the common build part. Despite having 1.91 in oolite-version.xcconfig the version was distributed as 1.90.

I will try to fix that.
So I experimented a bit - unfortunately on the master branch. But the build behaves differently there and I cannot tell why.
First I verified the parameters I used point to the correct directory and config file. Then I checked again the values inside the config file.

That semver task ignores the 'next_version' value in the configuration file and run with reasonable defaults. However the defaults do not match what we have in mind.

I found why my fork was behaving differently than the main repo. Working on a fix...
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: 1.91 Trunk: Broken Windows Build

Post by hiran »

I am close to a solution but want to smooth it a bit and test it before running the next PR.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: 1.91 Trunk: Broken Windows Build

Post by hiran »

Finally I have working builds with a working numbering scheme. But on my VM Oolite crashes, and I hope it is just due to the OpenGL version.

Yet I'd appreciate if more people could have a look at the releases and confirm if it actually works.

Please check out https://github.com/HiranChaudhuri/oolite/releases
Sunshine - Moonlight - Good Times - Oolite
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6680
Joined: Wed Feb 28, 2007 7:54 am

Re: 1.91 Trunk: Broken Windows Build

Post by another_commander »

I am not close to my computer and cannot check right now, but just looking at the page you linked to, I was wondering why the version numbering goes from 1.91.0 to 1.91.1. The current version should be 1.91.0 (the 0 can be committed for simplicity) and should be bumped to 1.91.1 only if there is a future parch that fixes a bug. Here it seems to be used as an incremental build number though.

I'll download and test to be sure as soon as I am back to my PC.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: 1.91 Trunk: Broken Windows Build

Post by hiran »

another_commander wrote: Sat Jul 01, 2023 2:41 pm
I am not close to my computer and cannot check right now, but just looking at the page you linked to, I was wondering why the version numbering goes from 1.91.0 to 1.91.1. The current version should be 1.91.0 (the 0 can be committed for simplicity) and should be bumped to 1.91.1 only if there is a future parch that fixes a bug. Here it seems to be used as an incremental build number though.

I'll download and test to be sure as soon as I am back to my PC.
When I checked the Makefile I found it supports a third digit and made use of it.

But what is the difference between a version, a patch and a build? Just a build number could be enough. The important thing is you need to identify one version, and the industry is converging to semver. That essentially means major.minor.patch. In detail there is more but I was reluctant to apply it.

If the builds work let's merge so we are back to a working scheme. And we can still figure out how to align the concepts.
Sunshine - Moonlight - Good Times - Oolite
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6680
Joined: Wed Feb 28, 2007 7:54 am

Re: 1.91 Trunk: Broken Windows Build

Post by another_commander »

As I was afraid, build OoliteInstall-1.91.0.db08f87-dev.exe runs OK, but OoliteInstall-1.91.1.21c1a54-dev.exe fails to run. The reason for the failure is that info-gnustep.plist contains "1.91" as the string for the CFBundleVersion key, when it should contain "1.91.1". However, the version should not be automatically bumped to 1.91.1 between builds.



In order to answer your questions, let ne explain how our current versioning scheme works to the best of my knowledge:

A complete Oolite version string consists of six components. The first three are mandatory and are what is used for GitHub tagging, release generating and overall application version reference. These three need to be set up correctly for the game to work, as we are witnessing at this time. The remaining three components are there for developer assistance and are used to uniquely identify the exact code commit that produced an executable and provide a 1-to-1 correspondence between a specific binary and the code that created it. The image below explains it further:

Image
Image

1.Major: This has been set to 1 since the first release, some 17 or more years ago. We don't expect it to go to 2 unless someone rewrites Oolite from scratch or modifies the game's structure down to the lowest level possible. Not something that is expected any time soon.

2. Minor: This number is important. It is even for stable releases and odd for development ones. Currently we are at 91, which is a version under development. This number gets bumped before a stable release (e.g. it will be bunmped to 92 for the next one), the release is made and then this number is immediately bumped again (e.g. 93 in our case) to denote the next development cycle.

3. Patchlevel: This is set to 0 under normal circumstances. Consider this scenario: We have released 1.92 (which is the same as 1.92.0 for our purposes) and we suddenly find out that we shipped it with a major show-stopping bug in. Let's say it takes us 6 code commits until we have a proper fix ready. Now what we want to do is bump the patchlevel version number to 1 and ship 1.92.1 asap so that the problem is sorted out. That's an example where the patchlevel will have to be bumped manually and thankfully is a rare occurrence. But this is how we would use it and our version number would be 1.92.1 and not 1.92.6. Just because it took us 6 code commits to fix an issue doesn't mean that we will be bumping patchLevel 6 times.

The above three numbers need to be correctly reported in the game files, mainly because of how GNUstep handles them. There is not much we can do about it ourselves, it seems to be related to the internal workings of our core support libraries. The components above are what is normally presented to users and how we normally describe our versions (e.g. our last release is 1.90, our current trunk is 1.91 and if we need a bugfix patch after the next version comes out it will be 1.92.1, while if we need a second bug fix it would become 1.92.2). Note that a 0 as the last version component can be ommitted and e.g. 1.91 is treated the same way as 1.91.0. Now let's go to the non-compulsory components. What is described below is reported in the Windows port and I am not sure if all of this is also reported under the other ports fully or partially. But these ones are optional anyway, so it doesn't matter if some minor differences exist.

4. Incremental build number: Whenever there is a commit on github, it receives an internal incremental number regardless of which branch or PR it was pushed to. Because of this, said component can be used to uniquely identify a commit. Also, this is how SVN used to assign commit numbers in the past and Oolite started on SVN, so we kept the incremental build number as a continuation of the old system.

5. Date of build: This is in YYMMDD format and it helps us locate the time a build was made. Note that it does not tell us when a particular commit was made, but when the binary was compiled, which could be some time after the corresponding commit was pushed to github (but when it comes to the automated releases, this is not normally a consideration as those are made immediately after a commit). Still, it can be helpful with investigating issues.

6. GitHub hash #: This is there so that we can easily search for a particular commit on github based on its hash, which is the info github publishes in order to refer to a specific commit. It immediately lets us know where in the codebase we need to look at when a user reports a bug or other problem.


This scheme has been established for many years and it has been proven to serve us pretty well till now. Automating this is fine, but the "rules" for bumping a version should respect the established practices. Interfering with the versioning scheme is much more easily done for a new project, but for one that's been going on for almost 20 years, one has to tread very carefully to avoid confusion.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: 1.91 Trunk: Broken Windows Build

Post by hiran »

another_commander wrote: Sun Jul 02, 2023 11:49 am
As I was afraid, build OoliteInstall-1.91.0.db08f87-dev.exe runs OK, but OoliteInstall-1.91.1.21c1a54-dev.exe fails to run. The reason for the failure is that info-gnustep.plist contains "1.91" as the string for the CFBundleVersion key, when it should contain "1.91.1". However, the version should not be automatically bumped to 1.91.1 between builds.
Ack. I tried to fix this for https://github.com/HiranChaudhuri/oolit ... tag/1.91.2
another_commander wrote: Sun Jul 02, 2023 11:49 am
A complete Oolite version string consists of six components.
How does the code actually treat all six components? From what I saw the Makefile just identifies three. It would mean the third component would contain everything after the second dot. Is it expected to be a number or is anything (alphanumerical) allowed?

Major/Minor - still under manual control so there should be no issue
Indeed patchlevels seem to be autoincremented. Maybe not necessary, but it would not break the current numbering system, would it? Let's see how we can interact with it later in this post.

For the incremental build number: I also had setup projects in the past on subversion and the repository revision number was a very welcome item in counting the builds. Since git this is no longer possible. It is a distributed system and there is no reliable single sequence. That is why git refers to hashes instead of commit numbers.
I noticed the Makefile calculates a build number using git rev-list --count (https://github.com/OoliteProject/oolite ... kefile#L15). But I'd challenge that this will only create reliable numbers as long as you stay on one branch. If you start using multiple branches that number is no longer unique.

For the build date: It is not close to the commit date. You can run multiple commits, but only when you push a build on Github is triggered. And times may vary.
another_commander wrote: Sun Jul 02, 2023 11:49 am
This scheme has been established for many years and it has been proven to serve us pretty well till now. Automating this is fine, but the "rules" for bumping a version should respect the established practices. Interfering with the versioning scheme is much more easily done for a new project, but for one that's been going on for almost 20 years, one has to tread very carefully to avoid confusion.
This semver pattern allows to have uniquely identifiable numbers even across branches. https://github.com/HiranChaudhuri/oolit ... stbranch.1

So the example you gave can be handled in multiple ways. Let's stick with the story that we have a release and then notice something needs to be patched, and that takes 6 commits.
1) you can commit/push six times and the patch level will increase six times. Everything is visible to the public.
2) you can commit six times and push only once. The patch level will increase only once. Nothing but the one last push was visible to the public.
3) you can create a branch, commit/push any amount of times and will notice that only the branch counter increases. Upon merge to master
you can choose to keep the full commit history or to squash them down to only one. Nevertheless only one patch increase should be noticable. The branch version numbers and downloads allow other users to access and feedback to those versions, which may be the information you need to merge. Everything is visible to the public but the next patch level would look as per your taste.

You do not necessarily need the commit number. Just do a git checkout 1.91.1-testbranch.1
(see https://github.com/HiranChaudhuri/oolit ... stbranch.1) to get that version, as all (pre-)releases are tagged automatically. Going back in time is easier than before.

Best of all: Rather than creating/maintaining custom code we just rely on standardizded behaviour coming through gitversion (which acknowledges semver) and automatic releases.
Sunshine - Moonlight - Good Times - Oolite
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6680
Joined: Wed Feb 28, 2007 7:54 am

Re: 1.91 Trunk: Broken Windows Build

Post by another_commander »

hiran wrote: Sun Jul 02, 2023 3:37 pm
This runs, but getting a 1.91.2 version number is incorrect, especially if the next commit will generate version 1.91.3 .
How does the code actually treat all six components? From what I saw the Makefile just identifies three. It would mean the third component would contain everything after the second dot. Is it expected to be a number or is anything (alphanumerical) allowed?
No,the Makefile actually identifies all six and synthesizes the version string by combining them.

Code: Select all

VERSION     := $(strip $(shell cat src/Cocoa/oolite-version.xcconfig | cut -d '=' -f 2))
VER_MAJ     := $(shell echo "${VERSION}" | cut -d '.' -f 1)
VER_MIN     := $(shell echo "${VERSION}" | cut -d '.' -f 2)
VER_REV     := $(shell echo "${VERSION}" | cut -d '.' -f 3)
VER_REV     := $(if ${VER_REV},${VER_REV},0)
VER_DATE	:= $(shell date +%y%m%d)
# VER_GITREV: Make sure git is in the command path
# VER_GITREV is the count of commits since the establishment of the repository on github. Used
# as replacement for SVN incremental revision number, since we require the version number to be
# of format X.X.X.X.
# VER_GITHASH are the first seven digits of the actual hash of the commit being built.
VER_GITREV	:= $(shell git rev-list --count HEAD)
VER_GITHASH	:= $(shell git rev-parse --short=7 HEAD)
VER         := $(shell echo "${VER_MAJ}.${VER_MIN}.${VER_REV}.${VER_GITREV}-${VER_DATE}-${VER_GITHASH}")
The core code on the other hand uses the CFBundleVersion key to get the version string in the Maj.Min.Patchlevel format. Whenever a version comparison or calculation is needed, the version string is split into three integers and the whole lot is sent as an array of integers to whatever function needs to work with it. Check https://github.com/OoliteProject/oolite ... ing.m#L359 for the implementation.

The six-component string is created by just appending the build number, date and github hash to the standard Maj.Min.Patchlevel combo, as seen in the snippet above. This is not a problem for anything, because the full six-component version string is used only for displaying and not for version calculations. The full version string is seen as a watermark at the top right of the screen as well as at the log header when the release-snapshot build configuration is used and on Windows we also embed it in the installer's Properties dialog:

Image

Hope this clarifies things somewhat.

Indeed patchlevels seem to be autoincremented. Maybe not necessary, but it would not break the current numbering system, would it?
If this is the case, then patchlevel has been assigned the same functionality as incremental build number, which is not a correct use of the patchlevel version component for Oolite.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: 1.91 Trunk: Broken Windows Build

Post by hiran »

another_commander wrote: Mon Jul 03, 2023 5:26 am
If this is the case, then patchlevel has been assigned the same functionality as incremental build number, which is not a correct use of the patchlevel version component for Oolite.
What is correct use of patchlevel may be out for discussion. I rather stick to a specified standard than what one project thinks is right or not.
In case of questions refer to https://semver.org/. All I am trying to do is to run each build by automation such that it can be released with minimum effort (just relabel).
A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. X is the major version, Y is the minor version, and Z is the patch version. Each element MUST increase numerically. For instance: 1.9.0 -> 1.10.0 -> 1.11.0.

Once a versioned package has been released, the contents of that version MUST NOT be modified. Any modifications MUST be released as a new version.
Width respect to your need to compile locally (https://bb.oolite.space/viewtopic.php?f=3&t=21401) and wish to not stick to the standard I will revoke my changes.
Sunshine - Moonlight - Good Times - Oolite
Post Reply