xsharp.eu • Automatic Build number in AssemblyInfo.prg
Page 1 of 1

Automatic Build number in AssemblyInfo.prg

Posted: Wed Aug 05, 2020 12:36 pm
by leon-ts
Hi,

When I specify automatic build number generation (put an asterisk instead of an explicit number):

Code: Select all

[assembly: AssemblyVersion ("1.0.*")]
then the final build number is always 65534.
Is this functionality supported in XSharp?

Best regards,
Leonid

Automatic Build number in AssemblyInfo.prg

Posted: Wed Aug 05, 2020 12:55 pm
by Chris
Hi Leonid,

Looks like a bug. Thanks, will log a report for Robert to look into!

Automatic Build number in AssemblyInfo.prg

Posted: Wed Aug 05, 2020 12:59 pm
by leon-ts
Hi Chris,

Thanks!

Best regards,
Leonid

Automatic Build number in AssemblyInfo.prg

Posted: Thu Aug 06, 2020 1:39 pm
by robert
Leonid,
Fixed.
However, this kind of versioning is not recommended anymore. More and more people want 'deterministic' compilations.
Our compiler supports that too (not in the project properties dialog yet) by passing a /deterministic commandline option, or by adding <deterministic>true</deterministic> to the project properties in your project file.
If you google for "deterministic" you will see that this is a big thing

Robert

Automatic Build number in AssemblyInfo.prg

Posted: Thu Aug 06, 2020 1:46 pm
by FFF
robert wrote:If you google for "deterministic" you will see that this is a big thing
Hm. "In mathematics, computer science and physics, a deterministic system is a system in which no randomness is involved in the development of future states of the system. A deterministic model will thus always produce the same output from a given starting condition or initial state."
Not sure, how that's connected. "I" would like a new "name" (=number), whenever the compiled code differs from it's predecessors. Is that deterministic?

Automatic Build number in AssemblyInfo.prg

Posted: Thu Aug 06, 2020 2:20 pm
by leon-ts
Hi Robert,

Thanks!

P.S. The automatic build number helps with internal testing when you submit an application for QA review. At this stage, builds are released frequently, with minor fixes, and it is important to know which build the tester is working with. You can forget to increase the build number on your own, and it is difficult to follow this. This should be automated (Build number). Major and Minor must be explicitly defined by the developer. I think different models are suitable for different methods of project management - somewhere deterministic, somewhere not.

Best regards,
Leonid

Automatic Build number in AssemblyInfo.prg

Posted: Thu Aug 06, 2020 2:53 pm
by Terry
Hi Karl

Like you, I have difficulty in seeing the connection.

But be careful of reading too much into deterministic and non-deterministic.

Both are vital and occur in every application.

Basically they are the only two ways logic can be, and is, routed through a running application. A route that is non-deterministic is a route in which you need to catch potential errors since you can't predict what the user may do. Deterministic, as it's name implies, is enforced in your code - and you are responsible for errors or bugs in that.

Having said that, trying to read across from mathematics is frought with difficulty. Basically a digital program cannot completely remove the random element. (It can get close)

This is because, in mathematics we can imagine a system in which randomness gets ever smaller down to zero. (Mathematicians will qualify what they say by stipulating their functions are continuous).

Digital Processing cannot do this, for the simple reason the calculations would take an infinite length of time to work things out.

This leads into probabilities, statistics and so on - ugh.

Terry

Automatic Build number in AssemblyInfo.prg

Posted: Thu Aug 06, 2020 3:03 pm
by robert
Terry
The "deterministic" in this context means that everytime when you build the same binary with the compiler from the same source, then the binary result must be 100% identical.
So the binary can not contain "current date/time" timestamps and also not version numbers that are automatically calculated.

Robert

Automatic Build number in AssemblyInfo.prg

Posted: Thu Aug 06, 2020 3:15 pm
by Terry
Thanks Robert. Understood.Terry

Automatic Build number in AssemblyInfo.prg

Posted: Thu Aug 06, 2020 3:33 pm
by FFF
robert wrote:..So the binary can not contain "current date/time" timestamps and also not version numbers that are automatically calculated.
That's why: whenever the compiled code differs from it's predecessors. :P