Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version and origin URL to binary and generated sources #131

Open
wants to merge 1 commit into
base: vlm_master
Choose a base branch
from

Conversation

gatopeich
Copy link

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"
 */

@gatopeich
Copy link
Author

@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
Copy link
Owner

mouse07410 commented Jun 15, 2023

@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.

@mouse07410
Copy link
Owner

@gatopeich could you please try to address the CI failure in your PR?

@gatopeich
Copy link
Author

I haven't forgotten, will do it on next chance

@v0-e
Copy link

v0-e commented Oct 12, 2023

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.

@mouse07410
Copy link
Owner

Standing by for a PR that provides the necessary functionality and passes CI. 😉

@mouse07410
Copy link
Owner

Standing by for updates to this PR that resolves conflicts and passes CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants