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

Refactor to improve clarity of tribits_adjust_package_enables() and update users/maintainers guide some #615

Commits on Aug 30, 2024

  1. Fix and include doc for tribits_get_package_enable_status() in users/…

    …maintainers guide
    
    I had forgotten to do this when I wrote this code and this documentation.
    This is an important function that defines how TriBITS treats internal and
    external packages in a uniform way.
    
    I also fixed some typos on the documentation.
    bartlettroscoe committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    2e90c07 View commit details
    Browse the repository at this point in the history
  2. Add new function tribits_package_is_not_explicitly_disabled()

    This makes the logic in the code a little more understandable I think.  I was
    looking over the code and I thought that this could be improved.  This will
    get used in more code in future commits.  NOTE: This gets tested through
    existing tests by usage in higher-level code (like the DependencyUnitTests
    tests).
    
    We will also need other functions like this to make the code more
    self-documenting.
    
    I also:
    
    * Added a tailing impl comment to help try to explain something.
    
    * Put the documented functions back in alphabetical order (moved
      tribits_process_enabled_standard_tpl()).
    bartlettroscoe committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    ddae174 View commit details
    Browse the repository at this point in the history
  3. Add new function tribits_package_is_explicitly_disabled()

    This makes the code more understandable.  NOTE: There is no specific unit test
    for this but it is tested indirectly through higher-level code and tests (like
    DependencyUnitTests tests).
    bartlettroscoe committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    c84ee47 View commit details
    Browse the repository at this point in the history
  4. Remove the function tribits_package_is_not_explicitly_disabled()

    You don't need a function tribits_package_is_not_explicitly_disabled() if you
    have a function tribits_package_is_explicitly_disabled().  The code is just a
    clear if you NOT the variable being returned from
    tribits_package_is_explicitly_disabled()
    bartlettroscoe committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    7d0e8e8 View commit details
    Browse the repository at this point in the history
  5. Add new function tribits_package_is_enabled_or_unset()

    This helps to make the code more clear.
    
    NOTE: This is tested as part of higher-level code and tests
    (e.g. DependencyUnitTests tests).
    bartlettroscoe committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    5d4e5b2 View commit details
    Browse the repository at this point in the history
  6. Remove tribits_set_package_enable_based_on_project_enable()

    Turns out the function tribits_set_package_enable_based_on_project_enable()
    was never called to default disable a package.
    
    I updated the one call to this function to call
    tribits_set_package_enable_based_on_project_enable_on() instead.
    bartlettroscoe committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    dadc3e5 View commit details
    Browse the repository at this point in the history
  7. Use tribits_package_is_xxx() functions in more places

    * Use tribits_package_is_explicitly_disabled()
    * Use tribits_package_is_enabled_or_unset()
    bartlettroscoe committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    36a1fba View commit details
    Browse the repository at this point in the history