Skip to content

Avoid setting attributes twice - #3655

Merged
fingolfin merged 4 commits into
gap-system:masterfrom
fingolfin:mh/attribute-fixes
Sep 13, 2019
Merged

fingolfin merged 4 commits into
gap-system:masterfrom
fingolfin:mh/attribute-fixes

Conversation

@fingolfin

Copy link
Copy Markdown
Member

This fixes a few places which cause Info messages when using PR #3628 and a high enough InfoAttributes level. In the case of GeneralRestrictedMapping, it avoids a warning for an attribute where HasFOO is set (here: HasSource and HasRange), but no actual value is stored in the object: for mappings, we do this intentionally, as the Source/Range are stored in the family object.

This touches Pcgs and mappings code. Many further things could be fixed, but these seem fairly "obvious" to me.

Use AttributeValueNotSet( Pcgs, group ) instead of Pcgs( group ),
otherwise the SetPcgs call afterwards has no effect.
- reduce code duplication
- remove a stray hole in a list
- don't call SetSource / SetRange, as there are custom getters for these
  for mappings which gets the source / range from the family object.
@fingolfin fingolfin added topic: library release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Sep 11, 2019
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.004%) to 84.436% when pulling b84390d on fingolfin:mh/attribute-fixes into 511e9ad on gap-system:master.

@ChrisJefferson

Copy link
Copy Markdown
Contributor

Thanks for looking at these, at least one is a clear bug, and the others are definately improvements.

@fingolfin
fingolfin merged commit d47f05c into gap-system:master Sep 13, 2019
@fingolfin
fingolfin deleted the mh/attribute-fixes branch September 16, 2019 11:24
fingolfin added a commit that referenced this pull request Jun 4, 2025
This could corrupt group objects and cause nonsense outputs.

This was introduced by my commit 0c67c5a
from PR #3655.
fingolfin added a commit that referenced this pull request Jun 6, 2025
This could corrupt group objects and cause nonsense outputs.

This was introduced by my commit 0c67c5a
from PR #3655.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants