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

Missing dependency on package FGA #117

Closed
zickgraf opened this issue Dec 12, 2017 · 9 comments
Closed

Missing dependency on package FGA #117

zickgraf opened this issue Dec 12, 2017 · 9 comments

Comments

@zickgraf
Copy link
Member

CAP uses the global function BoundPositions which is installed by the package FGA. However, CAP has no dependency on FGA. Thus, if CAP is loaded without loading FGA first, the following warnings appear:

Syntax warning: unbound global variable in /xxxxxx/CAP_project/CAP/gap/ToolsForCategories.gi line 747
        Print( String( Length( BoundPositions( current_cache!.value ) ) ), " objects stored\n" );
                                             ^
Syntax warning: unbound global variable in /xxxxxx/CAP_project/CAP/gap/ToolsForCategories.gi line 787
        Append( current_list, [ current_cache!.hit_counter, current_cache!.miss_counter, Length( BoundPositions( current_cache!.value ) ) ] );
                                                                                                               ^

The corresponding code references are:

Print( String( Length( BoundPositions( current_cache!.value ) ) ), " objects stored\n" );

Append( current_list, [ current_cache!.hit_counter, current_cache!.miss_counter, Length( BoundPositions( current_cache!.value ) ) ] );

@sebasguts
Copy link
Contributor

sebasguts commented Dec 12, 2017

Thanks for pointing this out.

@sebastianpos This is a one-line function. Should we really introduce a dependency here or have our own function? The function that replaces this is

list -> Filtered( [ 1 .. Length( list ) ], i -> IsBound( list[ i ] ) );

@sebastianpos
Copy link
Member

No, a dependency from FGA seems implausible.
We should either provide our own function
or ask for moving this function.

@sebasguts
Copy link
Contributor

I provided a PR to the GAP repository: gap-system/gap#2021

Once it is merged, we can replace BoundPositions( list ) by PositionsProperty( list, ReturnTrue ).

@olexandr-konovalov
Copy link

Thanks @sebasguts but unfortunately it does not solve problems for GAP 4.8 releases. The problem was not visible in regression tests before, since FGA was loaded before CAP. But after some recent package updates the order in which packages are loaded changed, and now I can see the error message about unbound global variable in the test logs. I will try to find which package(s) are responsible for that and revert those packages to their prior versions included in GAP 4.8.9 (which did not have that problem). Alternatively, an urgent release of CAP with the documented dependency may be more helpful.

olexandr-konovalov pushed a commit to gap-system/gap-distribution that referenced this issue Jan 14, 2018
CAP-2017.12.30 uses BoundPositions from the FGA package without declaring
this dependency. See homalg-project/CAP_project#117
for the discussion.
@olexandr-konovalov
Copy link

My previous analysis was incorrect - I've assumed that the error report refers to the current release of CAP, not to its development version. So, the problem did not appear in GAP 4.8.9 distribution because CAP version there did not use BoundPositions at all. Its use was introduced in CAP-2017.12.30, and hence the new CAP release breaks GAP regression tests and can not be included in GAP 4.8.10 distribution.

I've now specified that GAP 4.8.10 distribution should use stable releases of packages from the CAP project in gap-system/gap-distribution@a5e71a1. There is no need for an urgent release then, just fixing this in due course by switching to PositionsProperty in GAP 4.9 could be fine.

@sebasguts
Copy link
Contributor

@alex-konovalov okay. Since the commit defining PositionsProperty is not yet in the lastest release GAP, I will not yet make this fix in the master branch. Once we come close to 4.9, I will update CAP accordingly. I will leave this issue open until then.

sebasguts added a commit to sebasguts/CAP_project that referenced this issue Jul 4, 2018
to get rid of hidden FGA dependence. Closes homalg-project#117.
@olexandr-konovalov
Copy link

This is a reminder that I still can not include latest releases of the CAP project in GAP 4.9 distribution because of this issue (see https://github.com/gap-system/gap/wiki/Package-updates-status - am using their stable versions instead).

@sebasguts
Copy link
Contributor

Thanks for the reminder. I just merged the corresponding PR and will make a release this weekend.

@olexandr-konovalov
Copy link

@sebasguts Did the release happen? I don't see any new versions of CAP & friends being picked up.

olexandr-konovalov referenced this issue in gap-system/gap-distribution Aug 17, 2018
LOOPS still breaks tests in stable-4.9 branch. CAP was already
set to stable in stable-4.9 because of the problem with
`BoundPositions`.
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

No branches or pull requests

4 participants