Skip to content

Load NautyTracesInterface support as an extension - #950

Open
fingolfin wants to merge 3 commits into
digraphs:mainfrom
fingolfin:mh/package-extensions
Open

fingolfin wants to merge 3 commits into
digraphs:mainfrom
fingolfin:mh/package-extensions

Conversation

@fingolfin

Copy link
Copy Markdown
Contributor

Until now the nauty support (DIGRAPHS_NautyAvailable, NAUTY_DATA) was read only if NautyTracesInterface was already marked for loading when Digraphs got loaded. Whether the feature is available therefore depended on load order: LoadPackage("Digraphs"); LoadPackage("NautyTracesInterface"); silently left it out, and the only remedy was restarting GAP and loading the packages the other way round.

This PR declares that code in the Extensions component of PackageInfo.g instead (see gap-system/gap#5760 and the section "Extensions Provided by a Package" in the GAP reference manual). GAP reads an extension as soon as all packages it needs are loaded, in whichever order that happens.

Extensions require GAP 4.13 (released 2024), so this raises the minimal GAP version to 4.13; GAP 4.11 and 4.12 are dropped from CI.

Tested: loading Digraphs with OnlyNeeded and then NautyTracesInterface (and GRAPE), and the reverse order, both provide the feature; tst/teststandard.g passes with and without suggested packages.

Before, loading NautyTracesInterface after Digraphs left nauty unusable, e.g. NautyAutomorphismGroup returned fail.

There are two further commits:

  • Stop binding GRAPE names when GRAPE is absent: without GRAPE, Digraphs bound IsGraph, Vertices and Adjacency itself, so loading GRAPE afterwards printed warnings such as BIND_GLOBAL: variable `Adjacency' already has a value. These functions are now looked up at runtime.
  • Remove code for GAP versions before 4.13: the kernel module and UserHomeExpand fallbacks, the IsKernelExtensionAvailable workaround in PackageInfo.g, and a CompareVersionNumbers branch in oper.gi.

🤖 Generated with Claude Code

DIGRAPHS_NautyAvailable and NAUTY_DATA were fixed when Digraphs was
loaded, depending on whether NautyTracesInterface was marked for loading
at that point. Loading NautyTracesInterface afterwards left nauty
unusable, e.g. NautyAutomorphismGroup returned fail.

Start with nauty unavailable and let a package extension, which GAP
reads as soon as both packages are loaded, install NAUTY_DATA and set
DIGRAPHS_NautyAvailable. Extensions require GAP 4.13, so drop GAP 4.11
and 4.12 from CI.

Assisted-by: Claude Code (Opus 5.5)
Without GRAPE, Digraphs bound IsGraph, Vertices and Adjacency itself to
avoid warnings about unbound globals. Loading GRAPE afterwards then
printed warnings such as "BIND_GLOBAL: variable `Adjacency' already has
a value". Look the GRAPE functions up at runtime instead.

Assisted-by: Claude Code (Opus 5.5)
Assisted-by: Claude Code (Opus 5.5)
@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.47%. Comparing base (8d49e9a) to head (5158fa1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #950      +/-   ##
==========================================
+ Coverage   97.45%   97.47%   +0.02%     
==========================================
  Files          50       51       +1     
  Lines       21189    21187       -2     
  Branches      639      639              
==========================================
+ Hits        20649    20652       +3     
+ Misses        475      470       -5     
  Partials       65       65              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant