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 command line option / #3735 #3900

Closed
wants to merge 1 commit into from

Conversation

BaseMax
Copy link

@BaseMax BaseMax commented Feb 21, 2020

Description

Add --version command line option which prints out the GAP version and exits. This command should be fast, i.e., be handled by the kernel before the library is loaded.

This would be helpful for scripts that just want to test if the installed GAP version is new enough.

Reffer to: #3735
Thanks to @fingolfin @hulpke

Further details

$ ./gap -v

KernelVersion 4.dev
BuildVersion 4.12dev-333-gfc65b03-dirty

Checklist for pull request reviewers

  • proper formatting

If your code contains kernel C code, run clang-format on it; the
simplest way is to use git clang-format, e.g. like this (don't
forget to commit the resulting changes):

git clang-format $(git merge-base HEAD master)
  • usage of relevant labels

    1. either release notes: not needed or release notes: to be added
    2. at least one of the labels bug or enhancement or new feature
    3. for changes meant to be backported to stable-4.X add the backport-to-4.X label
    4. consider adding any of the labels build system, documentation, kernel, library, tests
  • runnable tests

  • lines changed in commits are sufficiently covered by the tests

  • adequate pull request title

  • well formulated text for release notes

  • relevant documentation updates

  • sensible comments in the code

@ChrisJefferson
Copy link
Contributor

This is better that hat we had before, but I think @fingolfin was thinking about putting this into the C level (there is a table around line 660 of system.c). Flags defined here have the advantage that they don't require GAP to start (which takes a while, and requires a working library)

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution. However, this pull request in its current form does not address the issue adequately; as @ChrisJefferson explained, for that a change to the C kernel code will be necessary, in order to ensure GAP processes the --version argument before loading the library.

@fingolfin fingolfin added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements status: awaiting response Issues and PRs whose progress is stalled awaiting a response from (usually) the author labels Feb 25, 2020
@fingolfin fingolfin closed this Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements status: awaiting response Issues and PRs whose progress is stalled awaiting a response from (usually) the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants