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

Don't make package info records immutable #2597

Merged
merged 1 commit into from
Jul 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions lib/package.gi
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,14 @@ InstallGlobalFunction( InitializePackagesInfoRecords, function( arg )
elif IsRecord( record.PackageDoc ) then
record.PackageDoc:= [ record.PackageDoc ];
fi;
Add( GAPInfo.PackagesInfo, MakeImmutable(record) );
if IsHPCGAP then
# FIXME: we make the package info record immutable, to
# allow access from multiple threads; but that in turn
# can break packages, which rely on their package info
# record being readable (see issue #2568)
MakeImmutable(record);
fi;
Add( GAPInfo.PackagesInfo, record );
fi;
fi;
fi;
Expand All @@ -303,7 +310,13 @@ InstallGlobalFunction( InitializePackagesInfoRecords, function( arg )
else
record.( name ):= [ r ];
fi;
MakeImmutable( record.( name ) );
if IsHPCGAP then
# FIXME: we make the package info record immutable, to
# allow access from multiple threads; but that in turn
# can break packages, which rely on their package info
# record being readable (see issue #2568)
MakeImmutable( record.( name ) );
fi;
od;
GAPInfo.PackagesInfo:= AtomicRecord(record);

Expand Down