184 | | If the developer needs to change the tests while he evolves his library this is a symptom the interface have been changed and the same way the tests are broken, the user code can also be broken. If the developer forbids himself to modify the test, he will be able to identify breaking changes early on. |
185 | | |
186 | | ----------------------------------------------------------------------------------------------- |
187 | | = Documentation = |
188 | | |
189 | | ----------------------------------------------------------------------------------------------- |
190 | | == Tag Boost library with specific library version [developer] == #version |
191 | | Tagging each library release with a version, is the better way to signal possible incompatibilities to the user. |
| 184 | If the developer needs to change the tests while she/he evolves his library this is a symptom the interface has been changed and the same way the tests are broken, the user code can also be broken. If the developer forbids himself to modify the test, he will be able to identify breaking changes early on. |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | ----------------------------------------------------------------------------------------------- |
| 190 | = Developer Guidelines = |
| 191 | |
| 192 | ----------------------------------------------------------------------------------------------- |
| 193 | == Announce new library features == #announce |
| 194 | It is a good idea the developer announce to the Boost mailing lists the new features just before committing in the release branch. This will let the time to the Boost community to inspect the modifications introduced. |
| 195 | |
| 196 | ----------------------------------------------------------------------------------------------- |
| 197 | == Make feature request for each feature == #feature_request |
| 198 | Each modification deprecated/suppressed/modified/new feature should be tracked with a ticket on the Trac system. |
| 199 | |
| 200 | ----------------------------------------------------------------------------------------------- |
| 201 | == Document == |
| 202 | |
| 203 | ----------------------------------------------------------------------------------------------- |
| 204 | === Tag Boost library with specific library version === #version |
| 205 | Tagging each library release with a version, is the more visible way to signal possible incompatibilities to the user. |
251 | | ----------------------------------------------------------------------------------------------- |
252 | | = Coding = |
253 | | |
254 | | |
255 | | ----------------------------------------------------------------------------------------------- |
256 | | == Don't use using directives [user] ==#dont_using |
257 | | As seen before, using directives in user code is one of the sources of user code breaking, so it will be safer to use namespace synonyms instead and prefix each symbol with them. |
258 | | |
259 | | Instead of doing |
260 | | |
261 | | {{{ |
262 | | #!cpp |
263 | | using namespace boost::interprocess; |
264 | | |
265 | | shared_memory_object::remove("MySharedMemory"); |
266 | | }}} |
267 | | |
268 | | do |
269 | | |
270 | | |
271 | | {{{ |
272 | | #!cpp |
273 | | namespace bip = boost::interprocess; |
274 | | |
275 | | bip::shared_memory_object::remove("MySharedMemory"); |
276 | | }}} |
277 | | |
278 | | ----------------------------------------------------------------------------------------------- |
279 | | == Avoid the use of include all features files at the /boost level [user] == |
280 | | Avoid the use of include all features files at the /boost level use instead specific files at boost/lib/file.hpp. Including less code reduce your user code breaking chances. |
281 | | |
282 | | ----------------------------------------------------------------------------------------------- |
283 | | == Be careful with the use of using namespace header files [developer] == |
| 260 | == Coding == |
| 261 | ----------------------------------------------------------------------------------------------- |
| 262 | === Be careful with the use of using namespace header files === |
474 | | ----------------------------------------------------------------------------------------------- |
475 | | == Track regression test on the trac system tickets == #ticket_test_case [user] |
| 454 | |
| 455 | ----------------------------------------------------------------------------------------------- |
| 456 | === Preserve the functional test from the preceding versions === #released_tests |
| 457 | While doing modifications to the library the developer can find some regressions on some tests of the preceding versions. It seems natural to change them to make the test succeed. This is not a good idea. The failing test is a symptom that the new modifications could break user code. |
| 458 | |
| 459 | If the modification don't pretended to be an interface break, the developer should modify the library until the preceding test cases pass. |
| 460 | |
| 461 | If the break is intentional move the tests to the failing tests compile_fail or run_fail on the Jamfile. The developer can copy the test and adapt it to the new interface. It could be a good idea to state explicitly on the test file name on which version they were included. |
| 462 | |
| 463 | In order to avoid erroneous modification of the the released tests files the developer could change the rights of the test files. If the developer has no permission to do that on the SVN repository as a last resort he could change the permission in its own SVN copy. |
| 464 | |
| 465 | ----------------------------------------------------------------------------------------------- |
| 466 | = User guidelines = |
| 467 | |
| 468 | ----------------------------------------------------------------------------------------------- |
| 469 | == Don't use using directives == #dont_using |
| 470 | As seen before, using directives in user code is one of the sources of user code breaking, so it will be safer to use namespace synonyms instead and prefix each symbol with them. |
| 471 | |
| 472 | Instead of doing |
| 473 | |
| 474 | {{{ |
| 475 | #!cpp |
| 476 | using namespace boost::interprocess; |
| 477 | |
| 478 | shared_memory_object::remove("MySharedMemory"); |
| 479 | }}} |
| 480 | |
| 481 | do |
| 482 | |
| 483 | |
| 484 | {{{ |
| 485 | #!cpp |
| 486 | namespace bip = boost::interprocess; |
| 487 | |
| 488 | bip::shared_memory_object::remove("MySharedMemory"); |
| 489 | }}} |
| 490 | |
| 491 | ----------------------------------------------------------------------------------------------- |
| 492 | == Avoid the use of include all features files at the /boost level == |
| 493 | Avoid the use of include all features files at the /boost level use instead specific files at boost/lib/file.hpp. Including less code reduce your user code breaking chances. |
| 494 | |
| 495 | ----------------------------------------------------------------------------------------------- |
| 496 | == Help tracking regression test on the Trac system tickets == #ticket_test_case |
477 | | State clearly which test cases reproduce the bug it they exists and propose a new test case reproducing the bug otherwise [user] |
478 | | |
479 | | ----------------------------------------------------------------------------------------------- |
480 | | == Preserve the functional test from the preceding versions [developer] == #released_tests |
481 | | While doing modifications to the library the developer can find some regressions on some tests of the preceding versions. It seems natural to change them to make the test succeed. This is not a good idea. The failing test is a symptom that the new modifications could break user code. |
482 | | |
483 | | If the modification don't pretended to be an interface break, the developer should modify the library until the preceding test cases pass. |
484 | | |
485 | | If the break is intentional move the tests to the failing tests compile_fail or run_fail on the Jamfile. The developer can copy the test and adapt it to the new interface. It could be a good idea to state explicitly on the test file name on which version they were included. |
486 | | |
487 | | In order to avoid erroneous modification of the the released tests files the developer could change the rights of the test files. If the developer has no permission to do that on the SVN repository as a last resort he could change the permission in its own SVN copy. |
488 | | |
489 | | ----------------------------------------------------------------------------------------------- |
490 | | = Inspections = |
491 | | ----------------------------------------------------------------------------------------------- |
492 | | == Announce new library features [developer] == #announce |
493 | | It would be great if the developer announce to the Boost mailing lists the new features just before committing in the release branch. This will let the time to the Boost community to inspect the modifications introduced. |
494 | | |
495 | | ----------------------------------------------------------------------------------------------- |
496 | | == Inspect the code [developer, user, RM] == #review |
497 | | Inspect the code to check that the new modifications don't include user code breaks. Tools comparing the contents of the current release and the preceding one could help. |
498 | | |
499 | | ----------------------------------------------------------------------------------------------- |
500 | | == Check that every modification has been documented [developer, user, RM] == #coherent_doc |
501 | | Inspect that every modification has been reported on the documentation. Tools comparing the contents of the current release and the preceding one could help. |
502 | | |
503 | | ----------------------------------------------------------------------------------------------- |
504 | | == Check that every modification has been tested [developer, user, RM] == #test_coverage |
505 | | Inspect that every modification has been tested. Tools comparing the contents of the current release and the preceding one could help. |
506 | | |
507 | | |
508 | | ----------------------------------------------------------------------------------------------- |
509 | | = Developer guidelines = |
510 | | ||'''Kind'''||'''Guideline'''|| |
511 | | ||Documentation||[wiki:Guidelines/MaintenanceGuidelines#versionTag Boost library with specific library version ]|| |
512 | | ||Documentation||[wiki:Guidelines/MaintenanceGuidelines#feature_request Feature Request for each deprecated/suppressed/modified/new feature]|| |
513 | | ||Documentation||[wiki:Guidelines/MaintenanceGuidelines#release_note Release note and trac system traceability]|| |
514 | | ||Documentation||[wiki:Guidelines/MaintenanceGuidelines#ticket_test_case_map Trac ticket and test cases association]|| |
515 | | ||Code||[wiki:Guidelines/MaintenanceGuidelines#dont_using Don't use using sentences in test programs]|| |
516 | | ||Code||[wiki:Guidelines/MaintenanceGuidelines#dont_delete_files Don't delete files prematurely ]|| |
517 | | ||Code||[wiki:Guidelines/MaintenanceGuidelines#dont_delete_cpp_symbols Don't delete classes/functions/variables prematurely]|| |
518 | | ||Code||[wiki:Guidelines/MaintenanceGuidelines#deprecated_removal Remove the deprecated features on a given release]|| |
519 | | ||Code||[wiki:Guidelines/MaintenanceGuidelines#dont_modify_prototypes Don't modify functions prototypes prematurely]|| |
520 | | ||Test||[wiki:Guidelines/MaintenanceGuidelines#ticket_test_case Regression Test and trac system traceability]|| |
521 | | ||Test||[wiki:Guidelines/MaintenanceGuidelines#released_tests Preserve the test from the preceding versions]|| |
522 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#announce Announce new library features]|| |
523 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#review Inspect the code].|| |
524 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#coherent_doc Check that every modification has been documented]|| |
525 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#test_coverage Check that every modification has been tested]|| |
526 | | |
527 | | ----------------------------------------------------------------------------------------------- |
528 | | = User guidelines = |
529 | | ||'''Kind'''||'''Guideline'''|| |
530 | | ||Documentation||[wiki:Guidelines/MaintenanceGuidelines#feature_request Feature Request for each deprecated/suppressed/modified/new feature]|| |
531 | | ||Code||[wiki:Guidelines/MaintenanceGuidelines#dont_using Don't use using sentences]|| |
532 | | ||Test||[wiki:Guidelines/MaintenanceGuidelines#ticket_test_case Regression Test and trac system traceability]|| |
533 | | |
534 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#review Inspect the code].|| |
535 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#coherent_doc Check that every modification has been documented]|| |
536 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#test_coverage Check that every modification has been tested]|| |
537 | | |
538 | | ----------------------------------------------------------------------------------------------- |
539 | | = Release manager guidelines = |
540 | | ||'''Kind'''||'''Guideline'''|| |
541 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#review Inspect the code]|| |
542 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#coherent_doc Check that every modification has been documented]|| |
543 | | ||Inspections||[wiki:Guidelines/MaintenanceGuidelines#test_coverage Check that every modification has been tested]|| |
544 | | |
| 498 | State clearly which test cases reproduce the bug it they exists and propose a new test case reproducing the bug otherwise. |
| 499 | |
| 500 | ----------------------------------------------------------------------------------------------- |
| 501 | = Boosters guidelines = |
| 502 | |
| 503 | ----------------------------------------------------------------------------------------------- |
| 504 | == Inspect the code == #review |
| 505 | Inspect the code to check that the new modifications don't include user code breaks. |
| 506 | Tools comparing the contents of the current release and the preceding one could help. |
| 507 | Discuss the issue on the ML and do a ticket on the Trac system if there is something to improve. |
| 508 | |
| 509 | ----------------------------------------------------------------------------------------------- |
| 510 | == Check that every modification has been documented == #coherent_doc |
| 511 | Inspect that every modification has been reported on the documentation. |
| 512 | Tools comparing the contents of the current release and the preceding one could help. |
| 513 | Discuss the issue on the ML and do a ticket on the Trac system if there is something to improve. |
| 514 | |
| 515 | ----------------------------------------------------------------------------------------------- |
| 516 | == Check that every modification has been tested == #test_coverage |
| 517 | Inspect that every modification has been tested. |
| 518 | Tools comparing the contents of the current release and the preceding one could help. |
| 519 | Discuss the issue on the ML and do a ticket on the Trac system if there is something to improve. |
| 520 | |