//#IMPORT(LEGACY|MODERN) to control import semantics.
Activity

charles morton December 13, 2017 at 2:29 PM
W20171213-091611 - dataland example as requested

Gavin Halliday December 13, 2017 at 11:07 AM
It should be possible to add it to each attribute separately. And the second example should have failed. Do you have references to the workunits? I would only expected it to have no effect on a system that doesn't support it (i.e. pre 6.2)

charles morton December 7, 2017 at 3:05 PMEdited
this sounds very promising, but i'd like to ask for a little clarification on how to use this.
naively, i was hoping that builder window like this (in dataland) would now execute in under 20 seconds, but it doesnt
//#IMPORT (MODERN)
1+1;
then, i also thought that a builder window like this might fail, because it has no imports, but it doesnt.
//#IMPORT (MODERN)
sizeof(linking_h.layout_header)
maybe i have this wrong and the //#IMPORT (MODERN) needs to be added to most of the individual ECL attributes in the repository for this to take effect?

David Bayliss November 29, 2016 at 1:39 PM
EXCELLENT!!!!!!! THNX

Richard Chapman November 29, 2016 at 11:36 AM
FYI
Details
Components
Assignee
Gavin HallidayGavin HallidayReporter
Gavin HallidayGavin HallidayPriority
MajorCompatibility
MinorFix versions
Labels
Pull Request URL
Details
Details
Components
Assignee

Reporter

This is a feature added to help migrate old users from the legacy import semantics.
The special format comment:
//#IMPORT(LEGACY)
means that all following ECL will use the legacy import rules.
//#IMPORT(MODERN)
ensures that it uses the new rules.
The idea is that attributes can gradually be moved over from legacy to modern, but adding
//#IMPORT (MODERN)
to the head of the file, and then fixing any resulting compile issues. Once most attributes are switched over
//#IMPORT(LEGACY)
can be added to any remaining attributes, and the default for the system can be switched from legacy. Any remaining attributes can then be changed as required.
NOTE: Slightly unusually //#IMPORT within a macro definition only applies to the contents of that macro definition. This allows exported macro definitions to be switched over in the same way.