Skip to content

Remove namespace usage from 'fr'#66

Open
ChrisJefferson wants to merge 1 commit into
gap-packages:masterfrom
ChrisJefferson:remove-namespace
Open

Remove namespace usage from 'fr'#66
ChrisJefferson wants to merge 1 commit into
gap-packages:masterfrom
ChrisJefferson:remove-namespace

Conversation

@ChrisJefferson
Copy link
Copy Markdown
Member

There is a plan that we might remove namespaces from GAP (code using '@'), because the implementation doesn't really work that well.

This PR is an experiment to see how Fr could be fixed, and how nice the code looks, without using '@'. I don't consider this PR a requirement to merge, and it might not even be the nicest way to do this! However, Fr is one of the biggest users of namespaces and '@'.

Similar to how I have handled similar issues in my own packages, I've added a global record 'Fr', and then put all the 'fr' methods inside that. The only place this doesn't work with with attributes / methods, so those I've prefixed with 'Fr_'.

One issue is we can't use 'BindGlobal' any more, so I just assign members of the record.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 55.11412% with 531 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.67%. Comparing base (0cce6ee) to head (5d6138d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
gap/linear.gi 18.54% 101 Missing ⚠️
gap/vector.gi 31.81% 90 Missing ⚠️
gap/group.gi 58.45% 86 Missing ⚠️
gap/helpers.gi 34.14% 81 Missing ⚠️
gap/examples.gi 47.12% 46 Missing ⚠️
gap/mealy.gi 72.12% 46 Missing ⚠️
gap/cp.gi 66.31% 32 Missing ⚠️
gap/algebra.gi 54.54% 15 Missing ⚠️
gap/frelement.gi 84.50% 11 Missing ⚠️
gap/perlist.gi 33.33% 8 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
- Coverage   55.68%   55.67%   -0.01%     
==========================================
  Files          25       25              
  Lines       15999    15996       -3     
==========================================
- Hits         8909     8906       -3     
  Misses       7090     7090              
Files with missing lines Coverage Δ
gap/group.gd 100.00% <100.00%> (ø)
gap/helpers.gd 70.32% <100.00%> (ø)
gap/linear-gbnp.gi 17.85% <33.33%> (+3.04%) ⬆️
gap/bisets.gi 56.47% <66.66%> (ø)
gap/frmachine.gi 82.83% <94.56%> (+0.01%) ⬆️
gap/vhgroup.gi 66.77% <81.48%> (-0.11%) ⬇️
gap/perlist.gi 56.50% <33.33%> (ø)
gap/frelement.gi 88.10% <84.50%> (-0.02%) ⬇️
gap/algebra.gi 30.68% <54.54%> (ø)
gap/cp.gi 53.65% <66.31%> (ø)
... and 6 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
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, I like it! For some background, see also gap-system/gap#6079

But of course it is @laurentbartholdi who needs to decide.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants