I've been trying to build the ORBTrace bitfile on a branch that doesn't use semantic versioning. What do you think about updating get_version_bcd() to just print a warning and return 0 when it doesn't see a tag of the correct format? Or is there some other way you can think of to handle this case?
The reason it's currently an exception is so that e.g. CI doesn't silently create a build with the wrong bcdDevice value if tags haven't been fetched properly, ref. 7d5d341.
If you're building a modified branch, the intention is for it to look up the most recent tagged ancestor and derive from that, and since the commit adding get_version_bcd() has a tagged ancestor, this should always be possible unless you're adding your own tags on your branch.
I'm open to adding a builder argument that overrides bcdDevice and thereby omits the call to get_version_bcd().
Activity
zyp commented on Aug 15, 2023
The reason it's currently an exception is so that e.g. CI doesn't silently create a build with the wrong bcdDevice value if tags haven't been fetched properly, ref. 7d5d341.
If you're building a modified branch, the intention is for it to look up the most recent tagged ancestor and derive from that, and since the commit adding get_version_bcd() has a tagged ancestor, this should always be possible unless you're adding your own tags on your branch.
I'm open to adding a builder argument that overrides bcdDevice and thereby omits the call to get_version_bcd().
Hoernchen commented on Aug 16, 2023
The easiest way to break this is not to modify anything: just do a shallow clone because you don't plan to modify anything and it breaks...