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

Replace some uses of DeclareGlobalVariable/InstallValue #3857

Merged
merged 1 commit into from
Jan 28, 2020

Conversation

fingolfin
Copy link
Member

... and instead use BindGlobal.

My ultimate goal would be to get rid of all uses if InstallValue, though we might never attain that (and we couldn't remove it, or even mark it as obsolete, for quite some time anyway; lots of packages use it, though I've also started to submit patches which removes its use in packages, too).

Why? Well, there is #1637 and more recently, I discovered that it violates an important invariant in GAP (which is even more important in HPC-GAP): It can end up replacing an immutable object with a mutable one. Actually, the worst part probably is that it really replaces an object, rewriting the innards of the object, which can lead to really weird stuff going on...

Anyway, in all the places changed by this PR, there really wasn't a good reason to use InstallValue over BindGlobal.

@coveralls
Copy link

coveralls commented Jan 22, 2020

Coverage Status

Coverage decreased (-0.003%) to 84.817% when pulling 53b64a1 on fingolfin:mh/reduce-InstallValue into b2dced0 on gap-system:master.

@fingolfin fingolfin merged commit 7ef5b72 into gap-system:master Jan 28, 2020
@fingolfin fingolfin deleted the mh/reduce-InstallValue branch January 28, 2020 14:18
fingolfin added a commit to fingolfin/cryst that referenced this pull request Jan 28, 2020
Instead just use BindGlobal. For motivation of this change, please see
<gap-system/gap#3857>
fingolfin added a commit to gap-packages/cryst that referenced this pull request Dec 1, 2020
Instead just use BindGlobal. For motivation of this change, please see
<gap-system/gap#3857>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants