Skip to content
Unstable

Changes

Summary

  1. Reduce references to Undeclared global variable (details)
  2. Add missing method (details)
Commit d842cc734b09bc1bf63f9568fc51e4a212b588a5 by cyril
Reduce references to Undeclared global variable

## Context

Currently, it is not possible to have clean new environments or modules because some part of Pharo are still managed via global variables or singletons. One example is the management of undeclares that is done via the global variable `Undeclared`.

I plan to remove this global variable and to replace it by a design where we have one undeclared registry by environment. Like this, environments will be independants.

## Done in this PR

Here is a first step. I introduced an #undeclaredRegistry accessor on environments and classes. They are currently returning the value of the global but they will help to reduce the references to this global.
I also started using those accessors to reduce drastically the references to this global variable.

## Future step

- The only references to the globals that are still in the image are in UndeclaredVariable. A next step will be to make the undeclared variables know their environment in order to remove the usage of the global.
- Remove the references in the bootstrap scripts
- Remove the global variable (or deprecate it)
The file was modified src/SUnit-Core/ClassFactoryForTestCase.class.st (diff)
The file was modified src/Kernel-CodeModel/Class.class.st (diff)
The file was modified src/System-Support/SmalltalkImage.class.st (diff)
The file was modified src/Hermes/HEInstaller.class.st (diff)
The file was modified src/Tool-Base/SystemNavigation.extension.st (diff)
The file was modified src/System-Support/SystemDictionary.class.st (diff)
Commit 01c361cf596c03bf030bc629df40ae5d4c516612 by cyril
Add missing method
The file was addedsrc/PharoBootstrap/RGGlobalVariable.extension.st