asn1c
asn1c copied to clipboard
Add version and origin URL to binary and generated sources
asn1c identifies itself and its generated sources with the latest release/tag name, commit hash, and date of the last commit.
Also shows the URL from git remote get-url origin
so it is easy to trace it back to the specific fork that was used.
$ asn1c -v
ASN.1 Compiler, v2023.5-0-g47a234a0-dirty-2023-05-18 from https://github.com/mouse07410/asn1c
Copyright (c) 2003-2017 Lev Walkin <[email protected]> and contributors.
And in the C sources:
/*
* Generated by asn1c-v2023.5-0-g47a234a0-dirty-2023-05-18 from https://github.com/mouse07410/asn1c
* From ASN.1 module "F1AP-Containers"
* found in "f1ap-v15.10.asn"
*/
@mouse07410 this is my first PR, let's start by distinguishing the version we are using... should adjust automatically for any fork cloned via git. Afterwards we'll look into more interesing fixes...
@mouse07410 this is my first PR,
Certainly. First, welcome in!
let's start by distinguishing the version we are using... should adjust automatically for any fork cloned via git.
Yes. My apologies for delay in getting to this - other things piled up.
Let's see what the CI has to say. I suspect we (you ;-) would need to do more changes, as I seem to recall that ASN.1 compiler version is hard-coded in the tests (rather unfortunate, but I "inherited" this vast body of tests from the upstream).
Afterwards we'll look into more interesting fixes...
Absolutely!
Update
@gatopeich if you could take a look at the tests and why they fail? E.g., run make check
on your fork?
Update 2
Please merge the current vlm_master
into your branch before running the tests.
@gatopeich could you please try to address the CI failure in your PR?
I haven't forgotten, will do it on next chance
Hey guys. I agree, this is a very useful feature. In my system, with a freshly cloned repo (from gatopeich:o-ran), the version command outputs:
$ asn1c -v
ASN.1 Compiler, v18f84280-2023-05-18 from https://github.com/gatopeich/asn1c
Copyright (c) 2003-2017 Lev Walkin <[email protected]> and contributors.
I suggest keeping some sort of incremental versioning (like SemVer), as package systems usually rely on an incremental system to correctly do updates.
Standing by for a PR that provides the necessary functionality and passes CI. 😉