Skip to content

Make error message for Group([]) more helpful - #6511

Open
limakzi wants to merge 1 commit into
masterfrom
6499-group-with-an-empty-list-as-an-argument
Open

Make error message for Group([]) more helpful#6511
limakzi wants to merge 1 commit into
masterfrom
6499-group-with-an-empty-list-as-an-argument

Conversation

@limakzi

@limakzi limakzi commented Aug 14, 2026

Copy link
Copy Markdown
Member

Fix Group with an empty list of generators (#6499)

Group([]) failed with the generic usage error, which listed Group(<gens>) as valid and gave no hint that the identity element is required. The one-argument operations were worse: GroupWithGenerators([]) reported no method found, and GroupWithGenerators("") silently returned a group with no identity that only broke later.

@limakzi limakzi added kind: bug Issues describing general bugs, and PRs fixing them topic: documentation Issues and PRs related to documentation labels Aug 14, 2026
@limakzi limakzi linked an issue Aug 14, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.91%. Comparing base (0ff3c4f) to head (e12d56d).

Files with missing lines Patch % Lines
lib/grp.gi 96.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6511   +/-   ##
=======================================
  Coverage   78.91%   78.91%           
=======================================
  Files         685      685           
  Lines      294163   294187   +24     
  Branches     8669     8669           
=======================================
+ Hits       232147   232169   +22     
  Misses      60215    60215           
- Partials     1801     1803    +2     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread lib/grp.gi
Comment on lines +4951 to +4952
ErrorNoReturn("an empty list of generators is not supported, ",
"the identity element must be given as second argument");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But it is supported, just not alone...

Comment thread lib/grp.gi
Comment on lines +5133 to +5134
"Group(<gens>) with an empty list <gens> is not supported, ",
"use Group(<gens>,<id>) to specify the identity element <id>");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That message is much better!

@fingolfin fingolfin changed the title Fix group object with empty list as an argument Make error message for Group([]) more helpful Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: bug Issues describing general bugs, and PRs fixing them topic: documentation Issues and PRs related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Group with an empty list as an argument

2 participants