Skip to content

Look for GAP/autodoc files in pkgdir first, and in the current directory second#369

Merged
fingolfin merged 1 commit into
gap-packages:masterfrom
stertooy:use-pkgdir
May 11, 2026
Merged

Look for GAP/autodoc files in pkgdir first, and in the current directory second#369
fingolfin merged 1 commit into
gap-packages:masterfrom
stertooy:use-pkgdir

Conversation

@stertooy
Copy link
Copy Markdown
Contributor

@stertooy stertooy commented May 9, 2026

This prevents problems in the rare case where we are calling a makedoc.g script from outside the package's directory, but the current directory has a file with the same relative path as one of the files used in the documentation.

For example, this can happen by calling makedoc ../packageA/makedoc.g from within Package B's directory (this is actually how I encountered the problem). And that's not an entirely unreasonable thing to do, since package B's documentation may require Package A's documentation to be compiled first, in order to resolve references.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.17%. Comparing base (4e7dbed) to head (eaa7247).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #369   +/-   ##
=======================================
  Coverage   93.17%   93.17%           
=======================================
  Files          13       13           
  Lines        2944     2944           
=======================================
  Hits         2743     2743           
  Misses        201      201           
Files with missing lines Coverage Δ
gap/Magic.gi 73.91% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fingolfin
Copy link
Copy Markdown
Member

Good catch, thanks

You probably are aware, but just to make sure: note that until very recently, this was not supported at all: we always searched in the current directory. So if you invoked gap ../packageA/makedoc.g from within packageB, it built the documentation of packageB, not of packageA.

@fingolfin fingolfin merged commit cbe79f7 into gap-packages:master May 11, 2026
8 checks passed
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.

2 participants