OldConfigurationMigration

This information is not up to date and needs some cleanup.


Startup

Old configuration

Ace (-ace Ace.ace)

  1. load the ace file
  2. convert it into the new configuration file
  3. add a warning
  4. restart with the new configuration file

Epr (-project Project.epr)

  1. load the epr file
  2. get the ace file
  3. convert it into the new configuration file
  4. add a warning
  5. restart with the new configuration file and use old project path as new path


New configuration (-config config.ecf -target mytarget)

  • load configuration file
  • if project_path setting
    • write/update .user file with new project_path
  • else
    • try to get project path from .user file or use default
  • if project file found
    • if project file up to date
      • load project file
    • else
      • create project
  • else
    • create project

Directory layout

config.ecf
EIFGENS/target/COMP
EIFGENS/target/W_code
EIFGENS/target/F_code
EIFGENS/other_target/COMP
EIFGENS/other_target/W_code
EIFGENS/other_target/F_code

Compiler changes

CLASS_I and CLASS_C

Old

CLASS_I

  • represents an uncompiled class.
  • compiled class returns corresponding CLASS_C (if any)
  • invariant: compiled_class.lace_class = Current
  • cluster returns associated cluster

EXTERNAL_CLASS_I

  • inherits from CLASS_I and CONF_CLASS_ASSEMBLY
  • represents an uncompiled external class.
  • assembly returns associated assembly

CLASS_C

  • represents a compiled class.
  • lace_class returns corresponding CLASS_I
  • invariant: lace_class.compiled_class = Current

EXTERNAL_CLASS_C

  • inherits from CLASS_C
  • represents a compiled external class.

New

CONF_CLASS

  • represents an uncompiled class as seen from the configuration system

CONF_CLASS_ASSEMBLY

  • inherits from CONF_CLASS
  • represents an external class

CONF_CLASS_PARTIAL

  • inherits from CONF_CLASS
  • represents a normal eiffel class that was generated out of multiple partial classes
  • has a list of files from which it was generated

CLASS_I

  • abstract
  • represents an uncompiled class
  • compiled class returns corresponding CLASS_C (if any)
  • invariant: compiled_class.original_class = Current
  • config_class returns CONFIG_CLASS
  • group returns associated CONF_GROUP

EIFFEL_CLASS_I

  • inherits from CLASS_I and CONF_CLASS
  • represents a normal uncompiled eiffel class
  • cluster returns associated CLUSTER_I

EXTERNAL_CLASS_I

  • inherits from CLASS_I and CONF_CLASS_ASSEMBLY
  • represents an external uncompiled class
  • assembly returns associated ASSEMBLY_I

PARTIAL_EIFFEL_CLASS_I

  • inherits from EIFFEL_CLASS_I and CONF_CLASS_PARTIAL
  • represents a normal eiffel class that was automatically generated out of multiple partial classes

CLASS_C

  • abstract
  • represents a compiled class
  • original_class returns CLASS_I for the original version of this class
  • lace_class returns CLASS_I for the possible overriden version of this class that it was compiled from
  • invariant: original_class.compiled_class = Current (compiled information is stored in original, not overriden class)
  • is_eiffel_class_c is true if it's a normal eiffel class
  • eiffel_class_c returns Current as EIFFEL_CLASS_C
  • is_external_class is true if it's an external class
  • external_class_c returns Current as EXTERNAL_CLASS_C

EIFFEL_CLASS_C

  • inherits from CLASS_C
  • represents a compiled normal eiffel class

EXTERNAL_CLASS_C

  • inherits from CLASS_C
  • represents a compiled external class

clusters vs. groups

Old

CLUSER_I

  • container for CLASS_I

ASSEMBLY_I

  • inherits from CLUSTER_I
  • represents an assembly
  • container for EXTERNAL_CLASS_I

Recursive clusters

  • For each subdirectory a CLUSTER_I was generated and the path was encoded into the name of the cluster

New

CONF_GROUP

  • abstract container for CONF_CLASS
  • class_by_name checks first in current group, then if a_dependencies is true also in dependencies that are enabled for a_platform and a_build

CONF_CLUSTER

  • inherits from CONF_GROUP
  • cluster
  • can have a parent cluster
  • can have multiple child clusters

CONF_OVERRIDE

  • inherits from CONF_CLUSTER
  • override cluster

CONF_LIBRARY

  • inherits from CONF_GROUP
  • library, has a library_target which can have CONF_CLUSTER, CONF_OVERRIDE, CONF_LIBRARY, CONF_PRECOMPILE, CONF_ASSEMBLY

CONF_PRECOMPILE

  • inherits from CONF_LIBRARY
  • represents a precompile

CONF_ASSEMBLY

  • inherits from CONF_GROUP
  • represents an assembly

Recursive clusters

  • a recursive cluster is a normal cluster
  • CONF_CLASS has path attribute that gives the path inside the cluster separated by /

General

In most cases the use of CLUSTER_I can be replased by CONF_GROUP. For recursive clusters there is only one cluster and the information is in the classes in the path. The world is now a tree instead of a flat representation as before, for example we can have a library which can have clusters and another library ... For lots of things the easiest way to go through the information is to create a visitor. CONF_VISITOR visits every node, CONF_CONDITIONED_VISITOR only visits node that are enabled for the current build/platform.

Universe

The universe has now the complete configuration in conf_system, platform and build (only correctly set during compilation), the current target in target and the groups that are specified in the current target in groups.

Now there is a is_read_only query on a class.