Skip to content

#582 Ensure single point of responsibility in generating names and artefacts in the main program

Albert Hofkamp requested to merge 582-responsibility-main-program into develop

Changes:

  1. Make it simpler to access any generator from any generator (that is, discard the non-cyclic dependencies restriction between them).
  2. Give the PlcCodeStorage ownership of the expression generator to use for generating code for its main program.
  3. Replace the hard-coded variable names in the main program by generated local names to ensure uniqueness.

With respect to the first change, rather than the discussed 3rd option in the issue (explicitly distributing generator links from the target during setup), I opted for the simpler form of storing the links in the active target and allow any generator to retrieve them as needed.

Closes #582 (closed)

Merge request reports