Difference between revisions of "Void-Safe Library Status"
(update for thread library) |
(Added rules, without any formatting, please improve) |
||
Line 2: | Line 2: | ||
During the [[:Category:EiffelStudio|EiffelStudio]] [[EiffelStudio 6.4 Releases|6.4]] development cycle Eiffel Software and any willing third-party contributors are updating the Eiffel stock [[:Category:Library|libraries]] to be Void-Safe. The libraries will still compile in non-Void-Safe contexts so you code will not be broken. The status reflects work completed so you may start migrating your own code to ensure Void-safety. | During the [[:Category:EiffelStudio|EiffelStudio]] [[EiffelStudio 6.4 Releases|6.4]] development cycle Eiffel Software and any willing third-party contributors are updating the Eiffel stock [[:Category:Library|libraries]] to be Void-Safe. The libraries will still compile in non-Void-Safe contexts so you code will not be broken. The status reflects work completed so you may start migrating your own code to ensure Void-safety. | ||
+ | |||
+ | Make sure to follow the general rules given below, and ask the community for guidance if you run into any problems or uncertainties. | ||
== Completion Status == | == Completion Status == | ||
Line 122: | Line 124: | ||
== Contributing == | == Contributing == | ||
EiffelStudio is open source and welcomes the Eiffel community contributions to speed up the adapt process. If you are interested in participating please let a comment on the discussion board with you contact details. | EiffelStudio is open source and welcomes the Eiffel community contributions to speed up the adapt process. If you are interested in participating please let a comment on the discussion board with you contact details. | ||
+ | |||
+ | ==Rules to be applied == | ||
+ | |||
+ | For examples of libraries already adapted, see UUID (for a small example) and EiffelBase (for a larger one). | ||
+ | |||
+ | - First compile with `full_class_checking' option on. Then enable the void-safe option. | ||
+ | - Compile libraries on both Windows/.NET/Unix to ensure it is sound. | ||
+ | |||
+ | - Not to modify the libraries very much and attached by default if it makes sense, otherwise it has to be detachable by default. | ||
+ | - Use the convention library-safe.ecf for naming void-safe libraries for now, all library references should be using the -safe.ecf variants. | ||
+ | - Use the same UUIDs for void-safe and non-void-safe libraries. | ||
+ | - Before any modifications add a library.lic and library-safe.lic (replace library with the name of the ECF minus the .ecf extension) next to the ECFs of the same name containing only the single line reference:forum2 (Note please use template files from rev#76374. in Delivery/studio/templates/licenses and place in $ISE_EIFFEL/studio/templates/licenses) | ||
+ | - Use Transitional Syntax in both the void-safe and non-void-safe libraries. | ||
+ | |||
+ | - Replace indexing with note | ||
+ | - Remove is keyword - use replace tool with regex \ is[\ \t]*$ (be careful, do not use replace all because comments and multi-line string may have "is" text!) | ||
+ | - Replace "is" usage in constants with = | ||
+ | |||
+ | - DO NOT USE ! | ||
+ | |||
+ | - MINIMIZE USE OF OBJECT TEST; ideally, no object test unless there was an assignment attempt in the original library | ||
+ | |||
+ | - When precondition expect a Void argument, then use ? if attached by default. | ||
+ | - When precondition expect a non-Void argument, then use ! if detachable by default. | ||
+ | - Librairies should compile in both void-safe and non-void-safe mode. | ||
+ | - Only use attribute keyword when it is not possible to initialize an attribute in the creation procedure. Never use it for lazy evaluation. | ||
+ | |||
+ | - May include preconditions x /= Void, will have to be removed in the end (helped by compiler warning that says this is not needed for attached x). | ||
+ | |||
+ | - Test authoring: | ||
+ | 1. Create a cluster called 'tests' in the library root folder. e.g. for | ||
+ | the UUID library the 'tests' folder exists at '$ISE_LIBRARY/uuid/tests'. | ||
+ | |||
+ | 2. In the library ECFs exclude the 'tests' cluster because it contains | ||
+ | testing code and not library code. | ||
+ | |||
+ | 3. Add a testing 'tests.ecf' in the 'tests' folder. (See UUID library | ||
+ | for example ECF) - be sure to create a library ECF and change the UUID. | ||
+ | The library should also use the void-safe options found in the | ||
+ | associated library's ECF. | ||
+ | |||
+ | 4. Create test class names using the library name along with TEST as a | ||
+ | prefix: | ||
+ | EiffelBase = BASE_TEST_ | ||
+ | EiffelThread = THREAD_TEST_ | ||
+ | EiffelVision2 = EV_TEST_ or VISION2_TEST | ||
+ | |||
+ | |||
+ | - As you encounter problems and devise your solutions, please include the results of your experience here |
Revision as of 18:14, 24 December 2008
During the EiffelStudio 6.4 development cycle Eiffel Software and any willing third-party contributors are updating the Eiffel stock libraries to be Void-Safe. The libraries will still compile in non-Void-Safe contexts so you code will not be broken. The status reflects work completed so you may start migrating your own code to ensure Void-safety.
Make sure to follow the general rules given below, and ask the community for guidance if you run into any problems or uncertainties.
Completion Status
Library Name | Status | Credits |
---|---|---|
EiffelBase | Done | Eiffel Software |
EiffelBase extension | ||
EiffelTime | ||
EiffelThread | Done (classic) | Eiffel Software |
EiffelUUID | Done | Eiffel Software |
Eiffel2Java | ||
WEL | ||
EiffelVision2 | ||
EiffelVision2 extension | ||
EiffelProcess | ||
Argument parser | Partial | Eiffel Software |
EiffelLex | ||
EiffelParse | ||
EiffelNet | ||
EiffelNet IPv6 | ||
EiffelCurl | ||
Encoding | ||
EiffelCOM | ||
EiffelStore | ||
EiffelTesting | ||
EiffelWeb | ||
Gobo | ||
Docking | ||
Gobo extension | ||
EiffelGraph | ||
Memory Analyzer | ||
EiffelPreferences |
Contributing
EiffelStudio is open source and welcomes the Eiffel community contributions to speed up the adapt process. If you are interested in participating please let a comment on the discussion board with you contact details.
Rules to be applied
For examples of libraries already adapted, see UUID (for a small example) and EiffelBase (for a larger one).
- First compile with `full_class_checking' option on. Then enable the void-safe option. - Compile libraries on both Windows/.NET/Unix to ensure it is sound.
- Not to modify the libraries very much and attached by default if it makes sense, otherwise it has to be detachable by default. - Use the convention library-safe.ecf for naming void-safe libraries for now, all library references should be using the -safe.ecf variants. - Use the same UUIDs for void-safe and non-void-safe libraries. - Before any modifications add a library.lic and library-safe.lic (replace library with the name of the ECF minus the .ecf extension) next to the ECFs of the same name containing only the single line reference:forum2 (Note please use template files from rev#76374. in Delivery/studio/templates/licenses and place in $ISE_EIFFEL/studio/templates/licenses) - Use Transitional Syntax in both the void-safe and non-void-safe libraries.
- Replace indexing with note - Remove is keyword - use replace tool with regex \ is[\ \t]*$ (be careful, do not use replace all because comments and multi-line string may have "is" text!) - Replace "is" usage in constants with =
- DO NOT USE !
- MINIMIZE USE OF OBJECT TEST; ideally, no object test unless there was an assignment attempt in the original library
- When precondition expect a Void argument, then use ? if attached by default. - When precondition expect a non-Void argument, then use ! if detachable by default. - Librairies should compile in both void-safe and non-void-safe mode. - Only use attribute keyword when it is not possible to initialize an attribute in the creation procedure. Never use it for lazy evaluation.
- May include preconditions x /= Void, will have to be removed in the end (helped by compiler warning that says this is not needed for attached x).
- Test authoring:
1. Create a cluster called 'tests' in the library root folder. e.g. for the UUID library the 'tests' folder exists at '$ISE_LIBRARY/uuid/tests'.
2. In the library ECFs exclude the 'tests' cluster because it contains testing code and not library code.
3. Add a testing 'tests.ecf' in the 'tests' folder. (See UUID library for example ECF) - be sure to create a library ECF and change the UUID. The library should also use the void-safe options found in the associated library's ECF.
4. Create test class names using the library name along with TEST as a prefix: EiffelBase = BASE_TEST_ EiffelThread = THREAD_TEST_ EiffelVision2 = EV_TEST_ or VISION2_TEST
- As you encounter problems and devise your solutions, please include the results of your experience here