Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong argument of DeclareAttribute in SONATA package #2107

Closed
olexandr-konovalov opened this issue Jan 23, 2018 · 11 comments
Closed

Wrong argument of DeclareAttribute in SONATA package #2107

olexandr-konovalov opened this issue Jan 23, 2018 · 11 comments
Labels
topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker)

Comments

@olexandr-konovalov
Copy link
Member

Now happening in the master branch:

 ┌───────┐   GAP 4.8.8-4974-g3afc42f of today
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-apple-darwin16.7.0-default64
 Configuration:  gmp 6.1.2, readline
 Loading the library and packages ...
 Packages:   GAPDoc 1.6.1, PrimGrp 3.3.0, smallgrp 1.2, TransGrp 2.0.2
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> LoadPackage("sonata");
Error, Usage: DeclareAttribute( <name>, <filter>[, <mutable>][, <rank>] ) at /Users/alexk/GITREPS/gap/lib/oper.g:1285 called from
<function "DeclareAttribute">( <arguments> )
 called from read-eval loop at /Users/alexk/GITREPS/gap/pkg/sonata/lib/nr.gd:324
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk> 

The line in question in SONATA is

DeclareAttribute( "NRRowEndos", IsNearRing, IsMutable );
@fingolfin
Copy link
Member

This is clearly a bug in SONATA

@olexandr-konovalov
Copy link
Member Author

olexandr-konovalov commented Jan 23, 2018

Oh yes, I see - documentation requires

DeclareAttribute( name, filter[, "mutable"][, rank] )

I will let SONATA authors know. That now may break tests for some packages where SONATA appears in dependencies (e.g. Wedderga through GUAVA).

P.S. Seems to be revealed by #2078

@olexandr-konovalov olexandr-konovalov added the topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker) label Jan 23, 2018
@olexandr-konovalov olexandr-konovalov changed the title master branch breaks SONATA package Wrong argument of DeclareAttribute in SONATA package Jan 23, 2018
olexandr-konovalov pushed a commit to olexandr-konovalov/wedderga that referenced this issue Jan 23, 2018
olexandr-konovalov pushed a commit to olexandr-konovalov/wedderga that referenced this issue Jan 23, 2018
olexandr-konovalov pushed a commit to gap-packages/wedderga that referenced this issue Jan 23, 2018
@fingolfin
Copy link
Member

This also look as if the SONATA package authors intended for NRRowEndos to be a mutable attribute... But it never was... So it is unclear to me (without inspecting the SONATA code) whether this can be a regular immutable attribute, or whether perhaps it really should become mutable now (but then: why did nobody ever notice it wasn't mutable?)

On a meta-level, mutable attributes really are an abomination, and also kind of violate the whole idea of "all subobjects of an immutable object are immutable".

@olexandr-konovalov
Copy link
Member Author

While reporting this to SONATA author, I've checked for other cases like this. SONATA has some more calls of DeclareAttribute where the 3rd argument is "mutable" as required by documentation. But I don't know anything about the reasons behind this...

olexandr-konovalov pushed a commit to gap-system/gap-distribution that referenced this issue Jan 25, 2018
This should wait until SONATA will fix a call of DeclareAttribute with
a wrong argument (see gap-system/gap#2107)
@olexandr-konovalov
Copy link
Member Author

I have just send an email to Peter Mayr to remind about this.

@olexandr-konovalov
Copy link
Member Author

Fix submitted in gap-packages/sonata#6. Although the question to @PMayr whether it's really necessary to use a mutable attribute there remains open.

@PMayr
Copy link

PMayr commented Sep 12, 2018

Looking at the SONATA code, I don't see why the attribute NRRowEndos should be mutable. In fact it is not used anywhere in SONATA. I don't know whether it is required for anything outside of SONATA, but if not we could just get rid of it.

@fingolfin
Copy link
Member

Indeed, and I can't find any reference to NRRowEndos in any other package either. So just removing it seems indeed like the best option.

@olexandr-konovalov
Copy link
Member Author

Fix merged in SONATA - waiting for the release to be published.

@fingolfin
Copy link
Member

@alex-konovalov SONATA 2.9 was released 2018-10-01, and AFAIK fixes this. OK to close this now?

@olexandr-konovalov
Copy link
Member Author

Yes - the new SONATA release now appears in bootstrapping package archives, and fixes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker)
Projects
None yet
Development

No branches or pull requests

3 participants